@droppii-org/chat-mobile 0.2.17 → 0.2.19
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/assets/images/icon_excel.png +0 -0
- package/lib/module/assets/images/icon_img.png +0 -0
- package/lib/module/assets/images/icon_pdf.png +0 -0
- package/lib/module/assets/images/icon_txt.png +0 -0
- package/lib/module/assets/images/icon_word.png +0 -0
- package/lib/module/assets/images/index.js +5 -0
- package/lib/module/assets/images/index.js.map +1 -1
- package/lib/module/components/AttachmentPreview/FilePreview.js +107 -0
- package/lib/module/components/AttachmentPreview/FilePreview.js.map +1 -0
- package/lib/module/components/AttachmentPreview/MediaPreview.js +212 -0
- package/lib/module/components/AttachmentPreview/MediaPreview.js.map +1 -0
- package/lib/module/components/AttachmentPreview/index.js +49 -0
- package/lib/module/components/AttachmentPreview/index.js.map +1 -0
- package/lib/module/components/ThreadCard/AvatarSection.js.map +1 -1
- package/lib/module/components/ThreadCard/ThreadCard.js +17 -9
- package/lib/module/components/ThreadCard/ThreadCard.js.map +1 -1
- package/lib/module/components/flows/inputButtons/index.js +7 -3
- package/lib/module/components/flows/inputButtons/index.js.map +1 -1
- package/lib/module/components/messages/fileMessage/index.js +122 -12
- package/lib/module/components/messages/fileMessage/index.js.map +1 -1
- package/lib/module/context/ChatContext.js +27 -4
- package/lib/module/context/ChatContext.js.map +1 -1
- package/lib/module/context/ChatDetailContext.js.map +1 -1
- package/lib/module/core/useChatListener.js +2 -4
- package/lib/module/core/useChatListener.js.map +1 -1
- package/lib/module/core/useUserListener.js +0 -7
- package/lib/module/core/useUserListener.js.map +1 -1
- package/lib/module/hooks/flows/useFlow.js +14 -3
- package/lib/module/hooks/flows/useFlow.js.map +1 -1
- package/lib/module/hooks/message/useSendMessage.js +1 -1
- package/lib/module/hooks/message/useSendMessage.js.map +1 -1
- package/lib/module/hooks/useConversationList.js +3 -27
- package/lib/module/hooks/useConversationList.js.map +1 -1
- package/lib/module/hooks/useFileAttachment.js +116 -0
- package/lib/module/hooks/useFileAttachment.js.map +1 -0
- package/lib/module/hooks/useFileDownload.js +175 -0
- package/lib/module/hooks/useFileDownload.js.map +1 -0
- package/lib/module/hooks/useLinkPreview/useLinkPreview.js +1 -1
- package/lib/module/hooks/useLinkPreview/useLinkPreview.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatComposer.js +44 -36
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +1 -6
- package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetailHeader.js +6 -6
- package/lib/module/screens/chat-detail/ChatDetailHeader.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatLinkPreview.js +3 -1
- package/lib/module/screens/chat-detail/ChatLinkPreview.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatListLegend.js +2 -2
- package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -1
- package/lib/module/screens/chat-detail/conversationHeader.utils.js +9 -0
- package/lib/module/screens/chat-detail/conversationHeader.utils.js.map +1 -1
- package/lib/module/screens/chat-detail/hooks/useAttachmentMapping.js +51 -0
- package/lib/module/screens/chat-detail/hooks/useAttachmentMapping.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useAttachmentSendHandler.js +39 -13
- package/lib/module/screens/chat-detail/hooks/useAttachmentSendHandler.js.map +1 -1
- package/lib/module/screens/inbox/Inbox.js +5 -1
- package/lib/module/screens/inbox/Inbox.js.map +1 -1
- package/lib/module/services/apis.js +0 -20
- package/lib/module/services/apis.js.map +1 -1
- package/lib/module/services/attachmentHandlers/fileAttachmentHandler.js +6 -6
- package/lib/module/services/attachmentHandlers/fileAttachmentHandler.js.map +1 -1
- package/lib/module/services/attachmentHandlers/index.js +1 -1
- package/lib/module/services/attachmentHandlers/index.js.map +1 -1
- package/lib/module/store/conversation.js +1 -38
- package/lib/module/store/conversation.js.map +1 -1
- package/lib/module/translation/resources/i18n.js +9 -0
- package/lib/module/translation/resources/i18n.js.map +1 -1
- package/lib/module/types/auth.js.map +1 -1
- package/lib/module/types/chat.js.map +1 -1
- package/lib/module/utils/conversation.js +1 -28
- package/lib/module/utils/conversation.js.map +1 -1
- package/lib/module/utils/device.js +32 -0
- package/lib/module/utils/device.js.map +1 -1
- package/lib/module/utils/imageUtils.js +44 -28
- package/lib/module/utils/imageUtils.js.map +1 -1
- package/lib/module/utils/message.js.map +1 -1
- package/lib/module/utils/messageUtils.js +5 -3
- package/lib/module/utils/messageUtils.js.map +1 -1
- package/lib/typescript/src/assets/images/index.d.ts +5 -0
- package/lib/typescript/src/assets/images/index.d.ts.map +1 -1
- package/lib/typescript/src/components/AttachmentPreview/FilePreview.d.ts +6 -0
- package/lib/typescript/src/components/AttachmentPreview/FilePreview.d.ts.map +1 -0
- package/lib/typescript/src/components/AttachmentPreview/MediaPreview.d.ts +9 -0
- package/lib/typescript/src/components/AttachmentPreview/MediaPreview.d.ts.map +1 -0
- package/lib/typescript/src/components/AttachmentPreview/index.d.ts +9 -0
- package/lib/typescript/src/components/AttachmentPreview/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ThreadCard/AvatarSection.d.ts +2 -2
- package/lib/typescript/src/components/ThreadCard/AvatarSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
- package/lib/typescript/src/components/messages/fileMessage/index.d.ts.map +1 -1
- package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
- package/lib/typescript/src/core/useChatListener.d.ts.map +1 -1
- package/lib/typescript/src/core/useUserListener.d.ts.map +1 -1
- package/lib/typescript/src/hooks/flows/useFlow.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useConversationList.d.ts +2 -2
- package/lib/typescript/src/hooks/useConversationList.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useFileAttachment.d.ts +20 -0
- package/lib/typescript/src/hooks/useFileAttachment.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useFileDownload.d.ts +15 -0
- package/lib/typescript/src/hooks/useFileDownload.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useImageAttachment.d.ts +1 -2
- package/lib/typescript/src/hooks/useImageAttachment.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useLinkPreview/useLinkPreview.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatLinkPreview.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts +7 -5
- package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentMapping.d.ts +10 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentMapping.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentSendHandler.d.ts +4 -1
- package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentSendHandler.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts +6 -9
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- package/lib/typescript/src/screens/inbox/Inbox.d.ts.map +1 -1
- package/lib/typescript/src/services/apis.d.ts +0 -4
- package/lib/typescript/src/services/apis.d.ts.map +1 -1
- package/lib/typescript/src/services/attachmentHandlers/fileAttachmentHandler.d.ts +2 -2
- package/lib/typescript/src/services/attachmentHandlers/fileAttachmentHandler.d.ts.map +1 -1
- package/lib/typescript/src/services/attachmentHandlers/index.d.ts +1 -1
- package/lib/typescript/src/services/attachmentHandlers/index.d.ts.map +1 -1
- package/lib/typescript/src/store/conversation.d.ts +5 -8
- package/lib/typescript/src/store/conversation.d.ts.map +1 -1
- package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
- package/lib/typescript/src/types/attachment.d.ts +22 -1
- package/lib/typescript/src/types/attachment.d.ts.map +1 -1
- package/lib/typescript/src/types/auth.d.ts +1 -0
- package/lib/typescript/src/types/auth.d.ts.map +1 -1
- package/lib/typescript/src/types/chat.d.ts +15 -13
- package/lib/typescript/src/types/chat.d.ts.map +1 -1
- package/lib/typescript/src/utils/conversation.d.ts +2 -5
- package/lib/typescript/src/utils/conversation.d.ts.map +1 -1
- package/lib/typescript/src/utils/device.d.ts +7 -0
- package/lib/typescript/src/utils/device.d.ts.map +1 -1
- package/lib/typescript/src/utils/imageUtils.d.ts +1 -0
- package/lib/typescript/src/utils/imageUtils.d.ts.map +1 -1
- package/lib/typescript/src/utils/message.d.ts +3 -3
- package/lib/typescript/src/utils/message.d.ts.map +1 -1
- package/lib/typescript/src/utils/messageUtils.d.ts +2 -1
- package/lib/typescript/src/utils/messageUtils.d.ts.map +1 -1
- package/package.json +6 -2
- package/src/assets/images/icon_excel.png +0 -0
- package/src/assets/images/icon_img.png +0 -0
- package/src/assets/images/icon_pdf.png +0 -0
- package/src/assets/images/icon_txt.png +0 -0
- package/src/assets/images/icon_word.png +0 -0
- package/src/assets/images/index.ts +5 -0
- package/src/components/AttachmentPreview/FilePreview.tsx +137 -0
- package/src/components/AttachmentPreview/MediaPreview.tsx +238 -0
- package/src/components/AttachmentPreview/index.tsx +68 -0
- package/src/components/ThreadCard/AvatarSection.tsx +2 -3
- package/src/components/ThreadCard/ThreadCard.tsx +22 -15
- package/src/components/flows/inputButtons/index.tsx +4 -1
- package/src/components/messages/fileMessage/index.tsx +156 -13
- package/src/context/ChatContext.tsx +35 -3
- package/src/context/ChatDetailContext.tsx +1 -1
- package/src/core/useChatListener.ts +2 -4
- package/src/core/useUserListener.ts +0 -8
- package/src/hooks/flows/useFlow.ts +12 -3
- package/src/hooks/message/useSendMessage.ts +1 -1
- package/src/hooks/useConversationList.ts +6 -40
- package/src/hooks/useFileAttachment.ts +163 -0
- package/src/hooks/useFileDownload.ts +200 -0
- package/src/hooks/useImageAttachment.ts +1 -1
- package/src/hooks/useLinkPreview/useLinkPreview.ts +6 -1
- package/src/screens/chat-detail/ChatComposer.tsx +61 -30
- package/src/screens/chat-detail/ChatDetail.tsx +1 -7
- package/src/screens/chat-detail/ChatDetailHeader.tsx +6 -7
- package/src/screens/chat-detail/ChatLinkPreview.tsx +16 -12
- package/src/screens/chat-detail/ChatListLegend.tsx +2 -6
- package/src/screens/chat-detail/conversationHeader.utils.ts +16 -6
- package/src/screens/chat-detail/hooks/useAttachmentMapping.ts +58 -0
- package/src/screens/chat-detail/hooks/useAttachmentSendHandler.ts +50 -11
- package/src/screens/chat-detail/types.ts +6 -13
- package/src/screens/inbox/Inbox.tsx +5 -1
- package/src/services/apis.ts +0 -38
- package/src/services/attachmentHandlers/fileAttachmentHandler.ts +8 -7
- package/src/services/attachmentHandlers/index.ts +4 -1
- package/src/store/conversation.ts +6 -55
- package/src/translation/resources/i18n.ts +9 -0
- package/src/types/attachment.ts +23 -1
- package/src/types/auth.ts +1 -0
- package/src/types/chat.ts +16 -20
- package/src/utils/conversation.ts +2 -40
- package/src/utils/device.ts +58 -0
- package/src/utils/imageUtils.ts +50 -28
- package/src/utils/message.ts +3 -2
- package/src/utils/messageUtils.ts +11 -3
- package/lib/module/components/AttachmentPreview.js +0 -252
- package/lib/module/components/AttachmentPreview.js.map +0 -1
- package/lib/typescript/src/components/AttachmentPreview.d.ts +0 -28
- package/lib/typescript/src/components/AttachmentPreview.d.ts.map +0 -1
- package/src/components/AttachmentPreview.tsx +0 -310
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversationHeader.utils.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/conversationHeader.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversationHeader.utils.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/conversationHeader.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,eAAO,MAAM,oBAAoB,GAC/B,eAAe,gBAAgB,KAC9B,MAMF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,eAAe,gBAAgB,KAC9B,MAAM,GAAG,IAEX,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe,gBAAgB,KAC9B,MAAM,GAAG,SAkBX,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,eAAe,gBAAgB,KAC9B,OAEF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,KAAG,mBAAmB,GAAG,EAQrE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ImageWithUploadStatus } from '../../../hooks/useImageAttachment';
|
|
2
|
+
import type { FileWithUploadStatus } from '../../../hooks/useFileAttachment';
|
|
3
|
+
import type { AttachmentItem } from '../../../types/attachment';
|
|
4
|
+
type Props = {
|
|
5
|
+
selectedImages: ImageWithUploadStatus[];
|
|
6
|
+
selectedFiles: FileWithUploadStatus[];
|
|
7
|
+
};
|
|
8
|
+
export declare const useAttachmentMapping: ({ selectedImages, selectedFiles, }: Props) => AttachmentItem[];
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useAttachmentMapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttachmentMapping.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useAttachmentMapping.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,qBAAqB,EAAE,CAAC;IACxC,aAAa,EAAE,oBAAoB,EAAE,CAAC;CACvC,CAAC;AAwCF,eAAO,MAAM,oBAAoB,GAAI,oCAGlC,KAAK,qBAKP,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DMessageItem } from '../../../types/chat';
|
|
2
|
+
import type { FileWithUploadStatus } from '../../../hooks/useFileAttachment';
|
|
2
3
|
interface AttachmentItem {
|
|
3
4
|
image: any;
|
|
4
5
|
uploadedUrl?: string;
|
|
@@ -8,15 +9,17 @@ interface AttachmentItem {
|
|
|
8
9
|
}
|
|
9
10
|
interface UseAttachmentSendHandlerProps {
|
|
10
11
|
selectedImages: AttachmentItem[];
|
|
12
|
+
selectedFiles: FileWithUploadStatus[];
|
|
11
13
|
sendAttachments: (items: any[], _: any, onMessageSent?: (message: DMessageItem) => void) => Promise<boolean>;
|
|
12
14
|
clearAllImages: () => void;
|
|
15
|
+
clearAllFiles?: () => void;
|
|
13
16
|
onSend?: () => void;
|
|
14
17
|
onMessageSent?: (message: DMessageItem) => void;
|
|
15
18
|
textMessage?: string;
|
|
16
19
|
urlMetadata?: any;
|
|
17
20
|
onSendText?: (text: string, urlMetadata?: any) => void;
|
|
18
21
|
}
|
|
19
|
-
export declare const useAttachmentSendHandler: ({ selectedImages, sendAttachments, clearAllImages, onSend, onMessageSent, textMessage, urlMetadata, onSendText, }: UseAttachmentSendHandlerProps) => {
|
|
22
|
+
export declare const useAttachmentSendHandler: ({ selectedImages, selectedFiles, sendAttachments, clearAllImages, clearAllFiles, onSend, onMessageSent, textMessage, urlMetadata, onSendText, }: UseAttachmentSendHandlerProps) => {
|
|
20
23
|
handleSend: () => Promise<void>;
|
|
21
24
|
};
|
|
22
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAttachmentSendHandler.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useAttachmentSendHandler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useAttachmentSendHandler.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useAttachmentSendHandler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,UAAU,cAAc;IACtB,KAAK,EAAE,GAAG,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,6BAA6B;IACrC,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,eAAe,EAAE,CACf,KAAK,EAAE,GAAG,EAAE,EACZ,CAAC,EAAE,GAAG,EACN,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,KAC5C,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACxD;AAED,eAAO,MAAM,wBAAwB,GAAI,iJAWtC,6BAA6B;;CAoV/B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { MediaItem } from '../../hooks/useMediaViewer';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DMessageItem } from '../../types/chat';
|
|
4
4
|
import type { IUrlMetadata } from '../../types/common';
|
|
5
|
-
import type {
|
|
5
|
+
import type { ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
6
6
|
export type DChatActionIconProvider = 'MaterialCommunityIcons' | 'DroppiiNew';
|
|
7
7
|
export interface DChatActionItem {
|
|
8
8
|
id: string;
|
|
@@ -20,14 +20,13 @@ export interface ChatDetailHeaderProps {
|
|
|
20
20
|
subtitle?: string;
|
|
21
21
|
avatarUri?: string | null;
|
|
22
22
|
avatarFullName?: string;
|
|
23
|
-
peerType?: PeerType;
|
|
24
|
-
applicationType?: DConversationItem['applicationType'];
|
|
25
23
|
showAddMember?: boolean;
|
|
26
24
|
onBack?: () => void;
|
|
27
25
|
onPressSearch?: () => void;
|
|
28
26
|
onPressAddMember?: () => void;
|
|
29
27
|
onPressMenu?: () => void;
|
|
30
28
|
onPressAvatar?: () => void;
|
|
29
|
+
conversationId: string;
|
|
31
30
|
}
|
|
32
31
|
export interface ChatQuickActionsRenderParams {
|
|
33
32
|
actions: DChatQuickAction[];
|
|
@@ -79,22 +78,20 @@ export interface ChatListProps {
|
|
|
79
78
|
onMediaPress?: (items: MediaItem[], index?: number) => void;
|
|
80
79
|
onPressUrl?: (url: string) => void;
|
|
81
80
|
}
|
|
82
|
-
export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'title' | 'subtitle' | 'avatarUri' | 'avatarFullName' | '
|
|
81
|
+
export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'title' | 'subtitle' | 'avatarUri' | 'avatarFullName' | 'applicationType' | 'showAddMember' | 'conversationId'> {
|
|
83
82
|
conversationId: string;
|
|
84
83
|
enabled?: boolean;
|
|
85
84
|
title?: string;
|
|
86
85
|
subtitle?: string;
|
|
87
86
|
avatarUri?: string | null;
|
|
88
87
|
avatarFullName?: string;
|
|
89
|
-
peerType?: PeerType;
|
|
90
|
-
applicationType?: DChatApplicationType;
|
|
91
88
|
showAddMember?: boolean;
|
|
92
|
-
getSubtitle?: (conversation:
|
|
89
|
+
getSubtitle?: (conversation: ConversationItem) => string | undefined;
|
|
93
90
|
renderChat?: (item: DMessageItem) => ReactNode;
|
|
94
91
|
showQuickActions?: boolean;
|
|
95
92
|
showAttachmentActions?: boolean;
|
|
96
93
|
quickActions?: DChatQuickAction[];
|
|
97
|
-
getQuickActions?: (conversation:
|
|
94
|
+
getQuickActions?: (conversation: ConversationItem) => DChatQuickAction[] | undefined;
|
|
98
95
|
attachmentActions?: DChatAttachmentAction[];
|
|
99
96
|
inputPlaceholder?: string;
|
|
100
97
|
onChangeInput?: (text: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MA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E,gBAAgB,KAAK,MAAM,GAAG,SAAS,CAAC;IACrE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,SAAS,CAAC;IAC/C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAClC,eAAe,CAAC,EAAE,CAChB,YAAY,EAAE,gBAAgB,KAC3B,gBAAgB,EAAE,GAAG,SAAS,CAAC;IACpC,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACxD,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7D,iBAAiB,CAAC,EAAE,qBAAqB,CAAC,cAAc,CAAC,CAAC;IAC1D,kBAAkB,CAAC,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;IACjE,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAC;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inbox.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/Inbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Inbox.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/Inbox.tsx"],"names":[],"mappings":"AAQA,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAID,QAAA,MAAM,KAAK,oGACqD,UAAU,iCA4GzE,CAAC;AAIF,eAAe,KAAK,CAAC"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { type AxiosInstance } from 'axios';
|
|
2
|
-
import type { DConversationItem, DConversationQueryParams } from '../types/chat';
|
|
3
|
-
import type { BaseResponse } from '../types/auth';
|
|
4
2
|
export declare let apiInstance: AxiosInstance | null;
|
|
5
3
|
export declare namespace ChatAPI {
|
|
6
4
|
function initApiInstance(api: AxiosInstance): void;
|
|
7
5
|
const getLoginStatus: (operationID?: string) => Promise<boolean>;
|
|
8
|
-
const login: (instance: AxiosInstance, operationID?: string) => Promise<unknown>;
|
|
9
6
|
const logout: (operationID?: string) => Promise<unknown>;
|
|
10
7
|
const getUser: (operationID?: string | undefined) => Promise<import("@droppii/openim-rn-client-sdk").SelfUserInfo>;
|
|
11
|
-
function queryConversations(params: DConversationQueryParams): Promise<BaseResponse<DConversationItem[]>>;
|
|
12
8
|
}
|
|
13
9
|
//# sourceMappingURL=apis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apis.d.ts","sourceRoot":"","sources":["../../../../src/services/apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"apis.d.ts","sourceRoot":"","sources":["../../../../src/services/apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,eAAO,IAAI,WAAW,EAAE,aAAa,GAAG,IAAW,CAAC;AAEpD,yBAAiB,OAAO,CAAC;IACvB,SAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAExD;IAEM,MAAM,cAAc,GAAU,cAAc,MAAM,qBAExD,CAAC;IAEK,MAAM,MAAM,GAAU,cAAc,MAAM,qBAGhD,CAAC;IAEK,MAAM,OAAO,GAAU,cAAc,MAAM,GAAG,SAAS,kEAE7D,CAAC;CACH"}
|
|
@@ -5,10 +5,10 @@ interface FileElem {
|
|
|
5
5
|
fileName: string;
|
|
6
6
|
fileSize: number;
|
|
7
7
|
fileType: string;
|
|
8
|
-
|
|
8
|
+
sourceUrl: string;
|
|
9
9
|
}
|
|
10
|
+
export declare const MAX_FILE_SIZE: number;
|
|
10
11
|
export declare class FileAttachmentHandler implements IAttachmentHandler {
|
|
11
|
-
private static readonly MAX_FILE_SIZE;
|
|
12
12
|
validate(attachment: Attachment): {
|
|
13
13
|
valid: true;
|
|
14
14
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileAttachmentHandler.d.ts","sourceRoot":"","sources":["../../../../../src/services/attachmentHandlers/fileAttachmentHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,
|
|
1
|
+
{"version":3,"file":"fileAttachmentHandler.d.ts","sourceRoot":"","sources":["../../../../../src/services/attachmentHandlers/fileAttachmentHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,eAAO,MAAM,aAAa,QAAU,CAAC;AAErC,qBAAa,qBAAsB,YAAW,kBAAkB;IAC9D,QAAQ,CACN,UAAU,EAAE,UAAU,GACrB;QAAE,KAAK,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAkC/C,YAAY,CAChB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,QAAQ,CAAC;CAsBrB;;AAED,wBAA2C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function initializeAttachmentHandlers(): void;
|
|
2
2
|
export { ImageAttachmentHandler } from './imageAttachmentHandler';
|
|
3
3
|
export { default as VideoAttachmentHandler } from './videoAttachmentHandler';
|
|
4
|
-
export { default as FileAttachmentHandler } from './fileAttachmentHandler';
|
|
4
|
+
export { default as FileAttachmentHandler, MAX_FILE_SIZE, } from './fileAttachmentHandler';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/attachmentHandlers/index.ts"],"names":[],"mappings":"AAGA,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD;AAED,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/attachmentHandlers/index.ts"],"names":[],"mappings":"AAGA,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD;AAED,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EACL,OAAO,IAAI,qBAAqB,EAChC,aAAa,GACd,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ConversationItem, MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
1
|
+
import type { ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
3
2
|
type ConversationID = string;
|
|
4
3
|
export interface ConversationStore {
|
|
5
4
|
currentConversationId?: ConversationID;
|
|
6
5
|
setCurrentConversation(id: ConversationID): void;
|
|
7
|
-
getCurrentConversation():
|
|
6
|
+
getCurrentConversation(): ConversationItem | undefined;
|
|
8
7
|
list: ConversationID[];
|
|
9
|
-
map: Record<ConversationID,
|
|
8
|
+
map: Record<ConversationID, ConversationItem>;
|
|
10
9
|
/** Signal incremented when a truly new conversation arrives and a full refetch is needed. */
|
|
11
10
|
newConversationSignal: number;
|
|
12
|
-
updateConversations(conversations:
|
|
11
|
+
updateConversations(conversations: ConversationItem[]): void;
|
|
13
12
|
/**
|
|
14
13
|
* Patches existing conversations with real-time data from OpenIM events.
|
|
15
14
|
* Returns true if any conversation was not found in the store (triggers refetch).
|
|
16
15
|
*/
|
|
17
|
-
mergeOpenIMConversations(conversations: ConversationItem[]): boolean;
|
|
18
16
|
removeConversation(id: ConversationID): void;
|
|
19
|
-
updateLastMessage(id: ConversationID, message: MessageItem): void;
|
|
20
17
|
reset(): void;
|
|
21
18
|
}
|
|
22
19
|
export declare const useConversationStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ConversationStore>>;
|
|
23
|
-
export declare const useConversation: (id: string) =>
|
|
20
|
+
export declare const useConversation: (id: string) => ConversationItem | undefined;
|
|
24
21
|
export {};
|
|
25
22
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/store/conversation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/store/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,KAAK,cAAc,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,iBAAiB;IAChC,qBAAqB,CAAC,EAAE,cAAc,CAAC;IACvC,sBAAsB,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,CAAC;IACjD,sBAAsB,IAAI,gBAAgB,GAAG,SAAS,CAAC;IACvD,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;IAC9C,6FAA6F;IAC7F,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,aAAa,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;IAC7D;;;OAGG;IACH,kBAAkB,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7C,KAAK,IAAI,IAAI,CAAC;CACf;AAED,eAAO,MAAM,oBAAoB,gFA2C9B,CAAC;AAEJ,eAAO,MAAM,eAAe,GAAI,IAAI,MAAM,KAAG,gBAAgB,GAAG,SAE/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/translation/resources/i18n.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/translation/resources/i18n.ts"],"names":[],"mappings":";;;AAqCA,wBAEE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type AttachmentType = 'image' | 'video' | 'file' | 'audio';
|
|
1
|
+
export type AttachmentType = 'image' | 'video' | 'file' | 'audio' | 'document';
|
|
2
2
|
export interface BaseAttachment {
|
|
3
3
|
id: string;
|
|
4
4
|
type: AttachmentType;
|
|
@@ -69,4 +69,25 @@ export interface AttachmentSendResult {
|
|
|
69
69
|
mergedMessageId?: string;
|
|
70
70
|
errors: Record<string, string>;
|
|
71
71
|
}
|
|
72
|
+
interface AttachmentMetadata {
|
|
73
|
+
id?: string;
|
|
74
|
+
path: string;
|
|
75
|
+
filename?: string;
|
|
76
|
+
size?: number;
|
|
77
|
+
duration?: number;
|
|
78
|
+
mimeType?: string;
|
|
79
|
+
width?: number;
|
|
80
|
+
height?: number;
|
|
81
|
+
uri?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface AttachmentItem {
|
|
84
|
+
metadata: AttachmentMetadata;
|
|
85
|
+
uploadProgress: number;
|
|
86
|
+
error: string | null;
|
|
87
|
+
isUploading: boolean;
|
|
88
|
+
uploadedUrl?: string;
|
|
89
|
+
thumbnailUrl?: string;
|
|
90
|
+
type: AttachmentType;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
72
93
|
//# sourceMappingURL=attachment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../../src/types/attachment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../../src/types/attachment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,Q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|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/types/auth.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/types/auth.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oBAAY,UAAU;IACpB,OAAO,IAAI;IACX,OAAO,IAAI;IACX,MAAM,IAAI;CACX"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type MessageItem
|
|
1
|
+
import { type MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
2
2
|
import type { PropsWithChildren } from 'react';
|
|
3
3
|
import type { IUrlMetadata } from './common';
|
|
4
4
|
import type { IConversationFlow, IConversationFlowStep, IRunConversationFlowPayload } from './flows';
|
|
5
|
+
import type { GetOpenIMTokenResponse } from './auth';
|
|
5
6
|
export declare const EventProvider: {
|
|
6
7
|
readonly ga: "ga";
|
|
7
8
|
readonly appsflyer: "appsflyer";
|
|
@@ -15,6 +16,7 @@ export interface ChatContextType {
|
|
|
15
16
|
export type ChatProviderProps = PropsWithChildren<{
|
|
16
17
|
logGA?: LogGA;
|
|
17
18
|
applicationType: DChatApplicationType;
|
|
19
|
+
getChatToken: () => Promise<GetOpenIMTokenResponse | null>;
|
|
18
20
|
}>;
|
|
19
21
|
export declare enum DChatApplicationType {
|
|
20
22
|
DROPPII = "DROPPII",
|
|
@@ -44,17 +46,6 @@ export interface DConversationPeer {
|
|
|
44
46
|
user: DConversationPeerUser | null;
|
|
45
47
|
group: null;
|
|
46
48
|
}
|
|
47
|
-
export interface DConversationItem extends ConversationItem {
|
|
48
|
-
conversationId: string;
|
|
49
|
-
chatCategory: DChatCategory;
|
|
50
|
-
chatType: PeerType;
|
|
51
|
-
applicationType: DChatApplicationType;
|
|
52
|
-
memberRole: DMemberRole;
|
|
53
|
-
pinnedAt: string | null;
|
|
54
|
-
isMuted: boolean;
|
|
55
|
-
peer: DConversationPeerUser;
|
|
56
|
-
lastMessage?: DMessageItem;
|
|
57
|
-
}
|
|
58
49
|
export interface DConversationQueryParams {
|
|
59
50
|
applicationType: string;
|
|
60
51
|
page: number;
|
|
@@ -114,9 +105,20 @@ export interface ChatDetailContextType {
|
|
|
114
105
|
conversationFlow?: IConversationFlow;
|
|
115
106
|
refetchConversationFlow: () => void;
|
|
116
107
|
isBotConversation: boolean;
|
|
117
|
-
setConverationFlowStep: (step
|
|
108
|
+
setConverationFlowStep: (step?: IConversationFlowStep) => void;
|
|
118
109
|
}
|
|
119
110
|
export interface ChatDetailProviderProps extends PropsWithChildren {
|
|
120
111
|
}
|
|
112
|
+
export interface IConversationItemEx {
|
|
113
|
+
applicationType: DChatApplicationType;
|
|
114
|
+
sessionInfo?: {
|
|
115
|
+
type: 'SESSION_INFO';
|
|
116
|
+
data: {
|
|
117
|
+
ownerId: string;
|
|
118
|
+
botId: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
chatCategory: DChatCategory;
|
|
122
|
+
}
|
|
121
123
|
export {};
|
|
122
124
|
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAErD,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,KAAK,KAAK,GAAG,CACX,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,GAAG,EACZ,QAAQ,CAAC,EAAE,GAAG,MAAM,OAAO,aAAa,EAAE,KACvC,IAAI,CAAC;AAEV,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,eAAe,EAAE,oBAAoB,CAAC;C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BAAiB,CAAC;IACrC,uBAAuB,EAAE,MAAM,IAAI,CAAC;IACpC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,sBAAsB,EAAE,CAAC,IAAI,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAChE;AAED,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;CAAG;AAErE,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,oBAAoB,CAAC;IACtC,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,cAAc,CAAC;QACrB,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAC;YAChB,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;IACF,YAAY,EAAE,aAAa,CAAC;CAC7B"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { MessageType, SessionType, type ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
2
|
-
import { type DConversationItem } from '../types/chat';
|
|
3
2
|
export declare const conversationCompare: (a: ConversationItem, b: ConversationItem) => number;
|
|
4
|
-
export declare const dConversationCompare: (a: DConversationItem, b: DConversationItem) => number;
|
|
5
|
-
export declare const mergeOpenIMIntoConversation: (existing: DConversationItem, openim: ConversationItem) => DConversationItem;
|
|
6
3
|
export declare const getConversationID: (sessionType: SessionType, senderID?: string, receiverID?: string) => string;
|
|
7
|
-
export declare const sortConversation: (map: Record<string,
|
|
8
|
-
map: Record<string,
|
|
4
|
+
export declare const sortConversation: (map: Record<string, ConversationItem>) => {
|
|
5
|
+
map: Record<string, ConversationItem>;
|
|
9
6
|
list: string[];
|
|
10
7
|
};
|
|
11
8
|
export declare const generateContentBasedOnMessageType: (contentType: MessageType, plainText?: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/utils/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/utils/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AAGvC,eAAO,MAAM,mBAAmB,GAC9B,GAAG,gBAAgB,EACnB,GAAG,gBAAgB,WAcpB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,aAAa,WAAW,EACxB,WAAW,MAAM,EACjB,aAAa,MAAM,WAUpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;;;CAKrE,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAC5C,aAAa,WAAW,EACxB,YAAY,MAAM,WAsBnB,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
export interface PickedFile {
|
|
2
|
+
uri: string;
|
|
3
|
+
name: string;
|
|
4
|
+
size: number;
|
|
5
|
+
mimeType: string;
|
|
6
|
+
}
|
|
1
7
|
declare const DeviceUtils: {
|
|
2
8
|
openImagePicker: (multiple?: boolean) => Promise<(import("react-native-image-crop-picker").Image & any[]) | (import("react-native-image-crop-picker").Video & any[]) | import("react-native-image-crop-picker").ImageOrVideo[]>;
|
|
3
9
|
openVideoPicker: (multiple?: boolean) => Promise<(import("react-native-image-crop-picker").Video & any[]) | import("react-native-image-crop-picker").Video[]>;
|
|
10
|
+
openFilePicker: (multiple?: boolean) => Promise<PickedFile[] | null>;
|
|
4
11
|
};
|
|
5
12
|
export default DeviceUtils;
|
|
6
13
|
export { DeviceUtils };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../src/utils/device.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../src/utils/device.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,WAAW;iCACmB,OAAO;iCAmCP,OAAO;gCAkC7B,OAAO,KAChB,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;CAyChC,CAAC;AAEF,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -3,6 +3,7 @@ export declare const generateUUID: () => string;
|
|
|
3
3
|
export declare const isVideoFile: (filename: string | undefined) => boolean;
|
|
4
4
|
export declare const isVideoFromPicker: (pickedItem: any) => boolean;
|
|
5
5
|
export declare const getMimeType: (fileName: string) => string;
|
|
6
|
+
export declare const getFileIcon: (mimeType?: string) => number;
|
|
6
7
|
export declare const formatFileSize: (bytes: number) => string;
|
|
7
8
|
export declare const validateImageFile: (file: ImageFile) => string | null;
|
|
8
9
|
export declare const getImageUploadEndpoint: (baseUrl: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/imageUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"imageUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/imageUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,eAAO,MAAM,YAAY,QAAO,MAE/B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,GAAG,SAAS,KAAG,OAI1D,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,YAAY,GAAG,KAAG,OAInD,CAAC;AA+BF,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,MAG9C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,KAAG,MAkB/C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAM9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,SAAS,KAAG,MAAM,GAAG,IAmB5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,KAAG,MAExD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
2
|
-
import { type
|
|
1
|
+
import { type ConversationItem, type MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
2
|
+
import { type DMessageItem } from '../types/chat';
|
|
3
3
|
export declare const mergeMessages: (current: DMessageItem[], incoming: DMessageItem[]) => DMessageItem[];
|
|
4
4
|
export declare const normalizeCreatedMessage: (message: MessageItem | string) => MessageItem;
|
|
5
5
|
export type HistoryPaginationAnchor = {
|
|
@@ -12,7 +12,7 @@ export declare const resolveHistoryLastMinSeq: (history: {
|
|
|
12
12
|
export declare const getHistoryPaginationAnchor: (messages: DMessageItem[]) => HistoryPaginationAnchor | null;
|
|
13
13
|
export declare const hasNewHistoryMessages: (current: DMessageItem[], incoming: DMessageItem[]) => boolean;
|
|
14
14
|
export declare const belongsToConversation: (message: MessageItem, conversationId: string) => boolean;
|
|
15
|
-
export declare const getReceiverId: (conversation?:
|
|
15
|
+
export declare const getReceiverId: (conversation?: ConversationItem) => {
|
|
16
16
|
groupID: string;
|
|
17
17
|
recvID: string;
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/utils/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/utils/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AASlD,eAAO,MAAM,aAAa,GACxB,SAAS,YAAY,EAAE,EACvB,UAAU,YAAY,EAAE,KACvB,YAAY,EAad,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,SAAS,WAAW,GAAG,MAAM,KAC5B,WAYF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,SAAS;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,kBAAkB,YAAY,KAC7B,MAMF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,UAAU,YAAY,EAAE,KACvB,uBAAuB,GAAG,IAkB5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,SAAS,YAAY,EAAE,EACvB,UAAU,YAAY,EAAE,KACvB,OASF,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,SAAS,WAAW,EACpB,gBAAgB,MAAM,KACrB,OAuBF,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,eAAe,gBAAgB;;;CAW5D,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Message formatting and preview utilities
|
|
3
3
|
*/
|
|
4
|
+
import { type ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
4
5
|
import type { DMessageItem } from '../types/chat';
|
|
5
6
|
export declare const extractTextContent: (message: DMessageItem) => string;
|
|
6
7
|
export declare const getMessagePreview: (message: DMessageItem) => string;
|
|
7
|
-
export declare const getLastMessageText: (message: DMessageItem | undefined, currentUserId?: string) => string;
|
|
8
|
+
export declare const getLastMessageText: (message: DMessageItem | undefined, currentUserId?: string, conversation?: ConversationItem) => string;
|
|
8
9
|
//# sourceMappingURL=messageUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/messageUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"messageUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/messageUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,eAAO,MAAM,kBAAkB,GAAI,SAAS,YAAY,KAAG,MAQ1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,YAAY,KAAG,MA8EzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,SAAS,YAAY,GAAG,SAAS,EACjC,gBAAgB,MAAM,EACtB,eAAe,gBAAgB,KAC9B,MAqBF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@droppii-org/chat-mobile",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.19",
|
|
4
4
|
"description": "Droppii chat mobile",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"example-legacy": "yarn workspace @droppii-org/chat-mobile-example-legacy"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@droppii/openim-rn-client-sdk": "git+ssh://git@github.com/droppii/open-im-sdk-reactnative.git#v1.0.0-
|
|
72
|
+
"@droppii/openim-rn-client-sdk": "git+ssh://git@github.com/droppii/open-im-sdk-reactnative.git#v1.0.0-rc11",
|
|
73
73
|
"@legendapp/list": "^3.0.6",
|
|
74
74
|
"axios": "^1.16.1",
|
|
75
75
|
"lodash": "^4.18.1",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"@eslint/js": "^10.0.1",
|
|
86
86
|
"@growthbook/growthbook-react": "*",
|
|
87
87
|
"@jest/globals": "^30.0.0",
|
|
88
|
+
"@react-native-documents/picker": "^12.0.1",
|
|
88
89
|
"@react-native/babel-preset": "0.85.0",
|
|
89
90
|
"@react-native/eslint-config": "0.85.0",
|
|
90
91
|
"@react-native/jest-preset": "0.85.0",
|
|
@@ -112,6 +113,7 @@
|
|
|
112
113
|
"react-native-builder-bob": "^0.41.0",
|
|
113
114
|
"react-native-create-thumbnail": "^2.2.0",
|
|
114
115
|
"react-native-device-info": "*",
|
|
116
|
+
"react-native-file-viewer": "^2.1.5",
|
|
115
117
|
"react-native-gesture-handler": "^3.0.0",
|
|
116
118
|
"react-native-image-crop-picker": "^0.51.1",
|
|
117
119
|
"react-native-keyboard-controller": "1.19.0",
|
|
@@ -134,11 +136,13 @@
|
|
|
134
136
|
},
|
|
135
137
|
"peerDependencies": {
|
|
136
138
|
"@droppii/libs": "*",
|
|
139
|
+
"@react-native-documents/picker": "*",
|
|
137
140
|
"@tanstack/react-query": "*",
|
|
138
141
|
"react": "*",
|
|
139
142
|
"react-native": "*",
|
|
140
143
|
"react-native-blob-util": "*",
|
|
141
144
|
"react-native-create-thumbnail": "*",
|
|
145
|
+
"react-native-file-viewer": "*",
|
|
142
146
|
"react-native-gesture-handler": "*",
|
|
143
147
|
"react-native-gifted-chat": "*",
|
|
144
148
|
"react-native-image-crop-picker": "*",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
const Images = {
|
|
2
2
|
ICON_BOT: require('./icon_bot.png'),
|
|
3
|
+
ICON_EXCEL: require('./icon_excel.png'),
|
|
4
|
+
ICON_IMG: require('./icon_img.png'),
|
|
5
|
+
ICON_PDF: require('./icon_pdf.png'),
|
|
6
|
+
ICON_TXT: require('./icon_txt.png'),
|
|
7
|
+
ICON_WORD: require('./icon_word.png'),
|
|
3
8
|
TAG_BOT: require('./tag_bot.png'),
|
|
4
9
|
TAG_MALL: require('./tag_mall.png'),
|
|
5
10
|
ICON_DROPPII: require('./icon_droppii.png'),
|