@droppii-org/chat-mobile 0.2.4 → 0.2.7
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/ThreadCard/AvatarSection.js +4 -4
- package/lib/module/components/ThreadCard/AvatarSection.js.map +1 -1
- package/lib/module/components/ThreadCard/NamePrefixIcon.js +13 -16
- package/lib/module/components/ThreadCard/NamePrefixIcon.js.map +1 -1
- package/lib/module/components/ThreadCard/ThreadCard.js +13 -33
- package/lib/module/components/ThreadCard/ThreadCard.js.map +1 -1
- package/lib/module/config/feature-flags.js +38 -0
- package/lib/module/config/feature-flags.js.map +1 -0
- package/lib/module/context/ChatContext.js +7 -6
- package/lib/module/context/ChatContext.js.map +1 -1
- package/lib/module/hooks/message/useSendMessage.js +101 -0
- package/lib/module/hooks/message/useSendMessage.js.map +1 -0
- package/lib/module/hooks/query-keys.js +4 -0
- package/lib/module/hooks/query-keys.js.map +1 -1
- package/lib/module/hooks/useChatMessages.js +54 -91
- package/lib/module/hooks/useChatMessages.js.map +1 -1
- package/lib/module/hooks/useConversationList.js +29 -17
- package/lib/module/hooks/useConversationList.js.map +1 -1
- package/lib/module/hooks/useLinkPreview/useFetchUrlMetadata.js +17 -0
- package/lib/module/hooks/useLinkPreview/useFetchUrlMetadata.js.map +1 -0
- package/lib/module/hooks/useLinkPreview/useLinkPreview.js +35 -0
- package/lib/module/hooks/useLinkPreview/useLinkPreview.js.map +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatComposer.js +20 -4
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +116 -22
- package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetailHeader.js +5 -8
- package/lib/module/screens/chat-detail/ChatDetailHeader.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatLinkPreview.js +79 -0
- package/lib/module/screens/chat-detail/ChatLinkPreview.js.map +1 -0
- package/lib/module/screens/chat-detail/ChatList.js +2 -0
- package/lib/module/screens/chat-detail/ChatList.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatListLegend.js +350 -0
- package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -0
- package/lib/module/screens/chat-detail/ChatQuickActions.js +12 -2
- package/lib/module/screens/chat-detail/ChatQuickActions.js.map +1 -1
- package/lib/module/screens/chat-detail/conversationHeader.utils.js +29 -0
- package/lib/module/screens/chat-detail/conversationHeader.utils.js.map +1 -0
- package/lib/module/screens/chat-detail/index.js +1 -0
- package/lib/module/screens/chat-detail/index.js.map +1 -1
- package/lib/module/screens/chat-detail/legend/LegendChatDay.js +57 -0
- package/lib/module/screens/chat-detail/legend/LegendChatDay.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/LegendChatLoadEarlier.js +21 -0
- package/lib/module/screens/chat-detail/legend/LegendChatLoadEarlier.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +34 -0
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/LegendChatScrollToBottom.js +58 -0
- package/lib/module/screens/chat-detail/legend/LegendChatScrollToBottom.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/message-types.js +244 -0
- package/lib/module/screens/chat-detail/legend/message-types.js.map +1 -0
- package/lib/module/screens/chat-detail/messages/ChatMessageBubble.js.map +1 -1
- package/lib/module/services/apis.js +1 -1
- package/lib/module/services/apis.js.map +1 -1
- package/lib/module/services/endpoints.js +8 -0
- package/lib/module/services/endpoints.js.map +1 -0
- package/lib/module/store/conversation.js +1 -1
- package/lib/module/store/conversation.js.map +1 -1
- package/lib/module/store/message.js +45 -0
- package/lib/module/store/message.js.map +1 -0
- package/lib/module/translation/resources/i18n.js +7 -1
- package/lib/module/translation/resources/i18n.js.map +1 -1
- package/lib/module/types/chat.js +2 -7
- package/lib/module/types/chat.js.map +1 -1
- package/lib/module/types/common.js +2 -0
- package/lib/module/types/common.js.map +1 -0
- package/lib/module/utils/conversation.js +34 -13
- package/lib/module/utils/conversation.js.map +1 -1
- package/lib/module/utils/legendListMessage.js +77 -0
- package/lib/module/utils/legendListMessage.js.map +1 -0
- package/lib/module/utils/message.js +5 -8
- package/lib/module/utils/message.js.map +1 -1
- package/lib/module/utils/url.js +7 -0
- package/lib/module/utils/url.js.map +1 -0
- package/lib/typescript/src/components/Avatar/Avatar.d.ts +1 -1
- package/lib/typescript/src/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/src/components/Avatar/AvatarBadge.d.ts +1 -1
- package/lib/typescript/src/components/Avatar/AvatarBadge.d.ts.map +1 -1
- package/lib/typescript/src/components/Avatar/DoubleAvatar.d.ts +1 -1
- package/lib/typescript/src/components/Avatar/DoubleAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/Avatar/SingleAvatar.d.ts +1 -1
- package/lib/typescript/src/components/Avatar/SingleAvatar.d.ts.map +1 -1
- 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/NamePrefixIcon.d.ts +3 -4
- package/lib/typescript/src/components/ThreadCard/NamePrefixIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts +1 -1
- package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/UnreadBadge.d.ts +1 -1
- package/lib/typescript/src/components/ThreadCard/UnreadBadge.d.ts.map +1 -1
- package/lib/typescript/src/config/feature-flags.d.ts +12 -0
- package/lib/typescript/src/config/feature-flags.d.ts.map +1 -0
- package/lib/typescript/src/context/ChatContext.d.ts +1 -1
- package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts +12 -0
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts.map +1 -0
- package/lib/typescript/src/hooks/query-keys.d.ts +4 -0
- package/lib/typescript/src/hooks/query-keys.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useChatMessages.d.ts +3 -1
- package/lib/typescript/src/hooks/useChatMessages.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useConversationList.d.ts +2 -1
- package/lib/typescript/src/hooks/useConversationList.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useLinkPreview/useFetchUrlMetadata.d.ts +3 -0
- package/lib/typescript/src/hooks/useLinkPreview/useFetchUrlMetadata.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useLinkPreview/useLinkPreview.d.ts +7 -0
- package/lib/typescript/src/hooks/useLinkPreview/useLinkPreview.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatAttachmentPanel.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatAttachmentPanel.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDay.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDay.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 +9 -0
- package/lib/typescript/src/screens/chat-detail/ChatLinkPreview.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/ChatList.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatList.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts +3 -0
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/ChatLoadEarlier.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatLoadEarlier.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatQuickActions.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatQuickActions.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatScrollToBottom.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatScrollToBottom.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatTextBubble.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatTextBubble.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts +6 -0
- package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/index.d.ts +2 -1
- package/lib/typescript/src/screens/chat-detail/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatDay.d.ts +6 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatDay.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatLoadEarlier.d.ts +6 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatLoadEarlier.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +13 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatScrollToBottom.d.ts +6 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatScrollToBottom.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts +13 -0
- package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/messages/ChatMessageBubble.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/messages/ChatMessageBubble.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts +33 -7
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- package/lib/typescript/src/screens/inbox/Inbox.d.ts +1 -1
- package/lib/typescript/src/screens/inbox/Inbox.d.ts.map +1 -1
- package/lib/typescript/src/screens/inbox/MessagesTab.d.ts +1 -1
- package/lib/typescript/src/screens/inbox/MessagesTab.d.ts.map +1 -1
- package/lib/typescript/src/services/apis.d.ts +1 -0
- package/lib/typescript/src/services/apis.d.ts.map +1 -1
- package/lib/typescript/src/services/endpoints.d.ts +6 -0
- package/lib/typescript/src/services/endpoints.d.ts.map +1 -0
- package/lib/typescript/src/store/message.d.ts +3 -0
- package/lib/typescript/src/store/message.d.ts.map +1 -0
- package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
- package/lib/typescript/src/types/chat.d.ts +28 -27
- package/lib/typescript/src/types/chat.d.ts.map +1 -1
- package/lib/typescript/src/types/common.d.ts +7 -0
- package/lib/typescript/src/types/common.d.ts.map +1 -0
- package/lib/typescript/src/utils/conversation.d.ts +3 -2
- package/lib/typescript/src/utils/conversation.d.ts.map +1 -1
- package/lib/typescript/src/utils/legendListMessage.d.ts +23 -0
- package/lib/typescript/src/utils/legendListMessage.d.ts.map +1 -0
- package/lib/typescript/src/utils/message.d.ts.map +1 -1
- package/lib/typescript/src/utils/url.d.ts +2 -0
- package/lib/typescript/src/utils/url.d.ts.map +1 -0
- package/package.json +5 -3
- package/src/components/ThreadCard/AvatarSection.tsx +5 -8
- package/src/components/ThreadCard/NamePrefixIcon.tsx +27 -38
- package/src/components/ThreadCard/ThreadCard.tsx +16 -30
- package/src/config/feature-flags.ts +49 -0
- package/src/context/ChatContext.tsx +12 -4
- package/src/hooks/message/useSendMessage.ts +136 -0
- package/src/hooks/query-keys.ts +5 -0
- package/src/hooks/useChatMessages.ts +90 -118
- package/src/hooks/useConversationList.ts +34 -16
- package/src/hooks/useLinkPreview/useFetchUrlMetadata.ts +18 -0
- package/src/hooks/useLinkPreview/useLinkPreview.ts +31 -0
- package/src/index.tsx +1 -0
- package/src/screens/chat-detail/ChatComposer.tsx +23 -2
- package/src/screens/chat-detail/ChatDetail.tsx +163 -30
- package/src/screens/chat-detail/ChatDetailHeader.tsx +4 -10
- package/src/screens/chat-detail/ChatLinkPreview.tsx +86 -0
- package/src/screens/chat-detail/ChatList.tsx +3 -0
- package/src/screens/chat-detail/ChatListLegend.tsx +403 -0
- package/src/screens/chat-detail/ChatQuickActions.tsx +19 -2
- package/src/screens/chat-detail/conversationHeader.utils.ts +49 -0
- package/src/screens/chat-detail/index.ts +7 -0
- package/src/screens/chat-detail/legend/LegendChatDay.tsx +70 -0
- package/src/screens/chat-detail/legend/LegendChatLoadEarlier.tsx +21 -0
- package/src/screens/chat-detail/legend/LegendChatMessage.tsx +48 -0
- package/src/screens/chat-detail/legend/LegendChatScrollToBottom.tsx +56 -0
- package/src/screens/chat-detail/legend/message-types.tsx +304 -0
- package/src/screens/chat-detail/messages/ChatMessageBubble.tsx +0 -1
- package/src/screens/chat-detail/types.ts +45 -7
- package/src/services/apis.ts +1 -1
- package/src/services/endpoints.ts +5 -0
- package/src/store/conversation.ts +1 -1
- package/src/store/message.ts +44 -0
- package/src/translation/resources/i18n.ts +6 -0
- package/src/types/chat.ts +31 -30
- package/src/types/common.ts +6 -0
- package/src/utils/conversation.ts +44 -17
- package/src/utils/legendListMessage.ts +97 -0
- package/src/utils/message.ts +10 -12
- package/src/utils/url.ts +5 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type DConversationItem } from '../../types/chat';
|
|
2
|
+
export declare const getConversationTitle: (conversation?: DConversationItem) => string;
|
|
3
|
+
export declare const getConversationAvatarUri: (conversation?: DConversationItem) => string | null;
|
|
4
|
+
export declare const getConversationSubtitle: (conversation?: DConversationItem) => string | undefined;
|
|
5
|
+
export declare const shouldShowAddMember: (conversation?: DConversationItem) => boolean;
|
|
6
|
+
//# sourceMappingURL=conversationHeader.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversationHeader.utils.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/conversationHeader.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,eAAO,MAAM,oBAAoB,GAC/B,eAAe,iBAAiB,KAC/B,MAMF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,eAAe,iBAAiB,KAC/B,MAAM,GAAG,IAEX,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe,iBAAiB,KAC/B,MAAM,GAAG,SAqBX,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,eAAe,iBAAiB,KAC/B,OAEF,CAAC"}
|
|
@@ -5,7 +5,8 @@ export { ChatComposer } from './ChatComposer';
|
|
|
5
5
|
export { ChatQuickActions } from './ChatQuickActions';
|
|
6
6
|
export { ChatAttachmentPanel } from './ChatAttachmentPanel';
|
|
7
7
|
export { DEFAULT_Chat_QUICK_ACTIONS, DEFAULT_ATTACHMENT_ACTIONS, DEFAULT_ATTACHMENT_PANEL_HEIGHT, } from './constants';
|
|
8
|
-
export
|
|
8
|
+
export { getConversationTitle, getConversationAvatarUri, getConversationSubtitle, shouldShowAddMember, } from './conversationHeader.utils';
|
|
9
|
+
export type { DChatActionItem, DChatActionIconProvider, DChatQuickAction, DChatAttachmentAction, ChatDetailProps, ChatDetailHeaderProps, ChatListProps, ChatComposerProps, ChatQuickActionsProps, ChatQuickActionsRenderParams, ChatAttachmentPanelProps, } from './types';
|
|
9
10
|
export type { DGiftedChatMessage } from '../../utils/giftedChatMessage';
|
|
10
11
|
export { DChatMessageType, CUSTOM_MESSAGE_DATA_TYPE, } from '../../types/message';
|
|
11
12
|
export type { ChatMessageBubbleProps } from './messages/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendChatDay.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatDay.tsx"],"names":[],"mappings":"AA8CA,UAAU,kBAAkB;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,sDAAwB,kBAAkB,iCAiBlE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface LegendChatLoadEarlierProps {
|
|
2
|
+
isLoading?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const LegendChatLoadEarlier: import("react").MemoExoticComponent<({ isLoading }: LegendChatLoadEarlierProps) => import("react").JSX.Element>;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=LegendChatLoadEarlier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendChatLoadEarlier.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatLoadEarlier.tsx"],"names":[],"mappings":"AAIA,UAAU,0BAA0B;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,sDACR,0BAA0B,iCASnD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DMessageItem } from '../../../types/chat';
|
|
2
|
+
interface LegendChatMessageProps {
|
|
3
|
+
message: DMessageItem;
|
|
4
|
+
isOutgoing: boolean;
|
|
5
|
+
createdAtTime: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Dispatcher component - renders the appropriate message component
|
|
9
|
+
* based on message type. Extensible for new message types.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime }: LegendChatMessageProps) => import("react").JSX.Element>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=LegendChatMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatMessage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AASxD,UAAU,sBAAsB;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAYD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,+EACa,sBAAsB,iCAYhE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface LegendChatScrollToBottomProps {
|
|
2
|
+
listRef: React.RefObject<any>;
|
|
3
|
+
}
|
|
4
|
+
export declare const LegendChatScrollToBottom: import("react").MemoExoticComponent<({ listRef }: LegendChatScrollToBottomProps) => import("react").JSX.Element>;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=LegendChatScrollToBottom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendChatScrollToBottom.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatScrollToBottom.tsx"],"names":[],"mappings":"AAIA,UAAU,6BAA6B;IACrC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,wBAAwB,oDACrB,6BAA6B,iCAiB5C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DMessageItem } from '../../../types/chat';
|
|
2
|
+
interface BaseLegendMessageProps {
|
|
3
|
+
message: DMessageItem;
|
|
4
|
+
isOutgoing: boolean;
|
|
5
|
+
createdAtTime: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const LegendTextMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime }: BaseLegendMessageProps) => import("react").JSX.Element>;
|
|
8
|
+
export declare const LegendImageMessage: import("react").MemoExoticComponent<({ isOutgoing }: BaseLegendMessageProps) => import("react").JSX.Element>;
|
|
9
|
+
export declare const LegendVideoMessage: import("react").MemoExoticComponent<({ isOutgoing }: BaseLegendMessageProps) => import("react").JSX.Element>;
|
|
10
|
+
export declare const LegendFileMessage: import("react").MemoExoticComponent<({ message, isOutgoing }: BaseLegendMessageProps) => import("react").JSX.Element>;
|
|
11
|
+
export declare const LegendLinkMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime }: BaseLegendMessageProps) => import("react").JSX.Element>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=message-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-types.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/message-types.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,qBAAqB,CAAC;AAKxE,UAAU,sBAAsB;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAaD,eAAO,MAAM,iBAAiB,+EACa,sBAAsB,iCAiChE,CAAC;AAIF,eAAO,MAAM,kBAAkB,uDACZ,sBAAsB,iCAgBxC,CAAC;AAIF,eAAO,MAAM,kBAAkB,uDACZ,sBAAsB,iCAgBxC,CAAC;AAIF,eAAO,MAAM,iBAAiB,gEACF,sBAAsB,iCAkBjD,CAAC;AAsDF,eAAO,MAAM,iBAAiB,+EACa,sBAAsB,iCA6EhE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChatMessageBubbleProps } from './types';
|
|
2
|
-
export declare const ChatMessageBubble: import("react").MemoExoticComponent<({ message, position }: ChatMessageBubbleProps) => import("react
|
|
2
|
+
export declare const ChatMessageBubble: import("react").MemoExoticComponent<({ message, position }: ChatMessageBubbleProps) => import("react").JSX.Element>;
|
|
3
3
|
//# sourceMappingURL=ChatMessageBubble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessageBubble.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/messages/ChatMessageBubble.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,SAAS,CAAC;AAQ3E,eAAO,MAAM,iBAAiB,8DACJ,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ChatMessageBubble.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/messages/ChatMessageBubble.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,SAAS,CAAC;AAQ3E,eAAO,MAAM,iBAAiB,8DACJ,sBAAsB,iCAQ/C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DChatType, DChatCategory } from '../../types/chat';
|
|
3
2
|
import type { DConversationItem, DMessageItem } from '../../types/chat';
|
|
3
|
+
import type { IUrlMetadata } from '../../types/common';
|
|
4
|
+
import type { PeerType } from '@droppii/openim-rn-client-sdk';
|
|
4
5
|
export type DChatActionIconProvider = 'MaterialCommunityIcons' | 'DroppiiNew';
|
|
5
6
|
export interface DChatActionItem {
|
|
6
7
|
id: string;
|
|
@@ -18,8 +19,7 @@ export interface ChatDetailHeaderProps {
|
|
|
18
19
|
subtitle?: string;
|
|
19
20
|
avatarUri?: string | null;
|
|
20
21
|
avatarFullName?: string;
|
|
21
|
-
|
|
22
|
-
chatCategory?: DChatCategory;
|
|
22
|
+
peerType?: PeerType;
|
|
23
23
|
applicationType?: DConversationItem['applicationType'];
|
|
24
24
|
showAddMember?: boolean;
|
|
25
25
|
onBack?: () => void;
|
|
@@ -28,10 +28,16 @@ export interface ChatDetailHeaderProps {
|
|
|
28
28
|
onPressMenu?: () => void;
|
|
29
29
|
onPressAvatar?: () => void;
|
|
30
30
|
}
|
|
31
|
+
export interface ChatQuickActionsRenderParams {
|
|
32
|
+
actions: DChatQuickAction[];
|
|
33
|
+
onActionPress: (action: DChatQuickAction) => void;
|
|
34
|
+
}
|
|
31
35
|
export interface ChatQuickActionsProps {
|
|
36
|
+
visible?: boolean;
|
|
32
37
|
actions?: DChatQuickAction[];
|
|
33
38
|
onActionPress?: (action: DChatQuickAction) => void;
|
|
34
39
|
renderAction?: (action: DChatQuickAction, onPress: () => void) => ReactNode;
|
|
40
|
+
renderQuickActions?: (params: ChatQuickActionsRenderParams) => ReactNode;
|
|
35
41
|
}
|
|
36
42
|
export interface ChatAttachmentPanelProps {
|
|
37
43
|
actions?: DChatAttachmentAction[];
|
|
@@ -43,14 +49,16 @@ export interface ChatComposerProps {
|
|
|
43
49
|
value?: string;
|
|
44
50
|
placeholder?: string;
|
|
45
51
|
onChangeText?: (text: string) => void;
|
|
46
|
-
onSend?: () => void;
|
|
52
|
+
onSend?: (urlMetadata?: IUrlMetadata) => void;
|
|
47
53
|
onPressAttach?: () => void;
|
|
48
54
|
onPressEmoji?: () => void;
|
|
55
|
+
showQuickActions?: boolean;
|
|
49
56
|
quickActions?: DChatQuickAction[];
|
|
50
57
|
attachmentActions?: DChatAttachmentAction[];
|
|
51
58
|
onQuickActionPress?: (action: DChatQuickAction) => void;
|
|
52
59
|
onAttachmentAction?: (action: DChatAttachmentAction) => void;
|
|
53
60
|
renderQuickAction?: ChatQuickActionsProps['renderAction'];
|
|
61
|
+
renderQuickActions?: ChatQuickActionsProps['renderQuickActions'];
|
|
54
62
|
renderAttachmentAction?: ChatAttachmentPanelProps['renderAction'];
|
|
55
63
|
attachmentColumns?: number;
|
|
56
64
|
}
|
|
@@ -62,16 +70,33 @@ export interface ChatListProps {
|
|
|
62
70
|
isLoading?: boolean;
|
|
63
71
|
isLoadingEarlier?: boolean;
|
|
64
72
|
hasMoreEarlier?: boolean;
|
|
73
|
+
onLoadNewer?: () => void;
|
|
74
|
+
isLoadingNewer?: boolean;
|
|
75
|
+
hasMoreNewer?: boolean;
|
|
65
76
|
}
|
|
66
|
-
export interface ChatDetailProps extends ChatDetailHeaderProps {
|
|
67
|
-
|
|
68
|
-
|
|
77
|
+
export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'title' | 'subtitle' | 'avatarUri' | 'avatarFullName' | 'peerType' | 'applicationType' | 'showAddMember'> {
|
|
78
|
+
conversationId: string;
|
|
79
|
+
enabled?: boolean;
|
|
80
|
+
title?: string;
|
|
81
|
+
subtitle?: string;
|
|
82
|
+
avatarUri?: string | null;
|
|
83
|
+
avatarFullName?: string;
|
|
84
|
+
peerType?: PeerType;
|
|
85
|
+
applicationType?: DConversationItem['applicationType'];
|
|
86
|
+
showAddMember?: boolean;
|
|
87
|
+
getSubtitle?: (conversation: DConversationItem) => string | undefined;
|
|
69
88
|
renderChat?: (item: DMessageItem) => ReactNode;
|
|
89
|
+
showQuickActions?: boolean;
|
|
90
|
+
showAttachmentActions?: boolean;
|
|
70
91
|
onLoadEarlier?: () => void;
|
|
71
92
|
isLoading?: boolean;
|
|
72
93
|
isLoadingEarlier?: boolean;
|
|
73
94
|
hasMoreEarlier?: boolean;
|
|
95
|
+
onLoadNewer?: () => void;
|
|
96
|
+
isLoadingNewer?: boolean;
|
|
97
|
+
hasMoreNewer?: boolean;
|
|
74
98
|
quickActions?: DChatQuickAction[];
|
|
99
|
+
getQuickActions?: (conversation: DConversationItem) => DChatQuickAction[] | undefined;
|
|
75
100
|
attachmentActions?: DChatAttachmentAction[];
|
|
76
101
|
inputValue?: string;
|
|
77
102
|
inputPlaceholder?: string;
|
|
@@ -82,6 +107,7 @@ export interface ChatDetailProps extends ChatDetailHeaderProps {
|
|
|
82
107
|
onQuickActionPress?: (action: DChatQuickAction) => void;
|
|
83
108
|
onAttachmentAction?: (action: DChatAttachmentAction) => void;
|
|
84
109
|
renderQuickAction?: ChatQuickActionsProps['renderAction'];
|
|
110
|
+
renderQuickActions?: ChatQuickActionsProps['renderQuickActions'];
|
|
85
111
|
renderAttachmentAction?: ChatAttachmentPanelProps['renderAction'];
|
|
86
112
|
attachmentColumns?: number;
|
|
87
113
|
}
|
|
@@ -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;AACvC,OAAO,KAAK,EAAE,
|
|
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;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,K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
|
|
|
5
5
|
onPressEdit?: () => void;
|
|
6
6
|
onPressGroup?: () => void;
|
|
7
7
|
}
|
|
8
|
-
declare const Inbox: import("react").MemoExoticComponent<({ applicationType, onPressThread, onPressSearch, onPressEdit, onPressGroup, }: InboxProps) => import("react
|
|
8
|
+
declare const Inbox: import("react").MemoExoticComponent<({ applicationType, onPressThread, onPressSearch, onPressEdit, onPressGroup, }: InboxProps) => import("react").JSX.Element>;
|
|
9
9
|
export default Inbox;
|
|
10
10
|
//# sourceMappingURL=Inbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inbox.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/Inbox.tsx"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,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,sHAON,UAAU,
|
|
1
|
+
{"version":3,"file":"Inbox.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/Inbox.tsx"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,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,sHAON,UAAU,iCA+Gd,CAAC;AAIF,eAAe,KAAK,CAAC"}
|
|
@@ -2,6 +2,6 @@ interface MessagesTabProps {
|
|
|
2
2
|
applicationType: string;
|
|
3
3
|
onPressThread?: (item: string) => void;
|
|
4
4
|
}
|
|
5
|
-
export declare const MessagesTab: import("react").MemoExoticComponent<({ applicationType, onPressThread }: MessagesTabProps) => import("react
|
|
5
|
+
export declare const MessagesTab: import("react").MemoExoticComponent<({ applicationType, onPressThread }: MessagesTabProps) => import("react").JSX.Element>;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=MessagesTab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessagesTab.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/MessagesTab.tsx"],"names":[],"mappings":"AAOA,UAAU,gBAAgB;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAKD,eAAO,MAAM,WAAW,2EACe,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MessagesTab.d.ts","sourceRoot":"","sources":["../../../../../src/screens/inbox/MessagesTab.tsx"],"names":[],"mappings":"AAOA,UAAU,gBAAgB;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAKD,eAAO,MAAM,WAAW,2EACe,gBAAgB,iCAqDtD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type AxiosInstance } from 'axios';
|
|
2
2
|
import type { DConversationItem, DConversationQueryParams } from '../types/chat';
|
|
3
3
|
import type { BaseResponse } from '../types/auth';
|
|
4
|
+
export declare let apiInstance: AxiosInstance | null;
|
|
4
5
|
export declare namespace ChatAPI {
|
|
5
6
|
function initApiInstance(api: AxiosInstance): void;
|
|
6
7
|
const getLoginStatus: (operationID?: string) => Promise<boolean>;
|
|
@@ -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;AAC3C,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,YAAY,EAA0B,MAAM,eAAe,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;AAC3C,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,YAAY,EAA0B,MAAM,eAAe,CAAC;AAI1E,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,KAAK,GAChB,UAAU,aAAa,EACvB,cAAc,MAAM,qBAerB,CAAC;IAEK,MAAM,MAAM,GAAU,cAAc,MAAM,qBAGhD,CAAC;IAEK,MAAM,OAAO,GAAU,cAAc,MAAM,GAAG,SAAS,kEAE7D,CAAC;IAEF,SAAsB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,8CAWxE;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;CAIrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/store/message.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,eAAe,CAAC;AAGhE,eAAO,MAAM,eAAe,2EAsCzB,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":";;;AAWA,wBAEE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type MessageItem, type
|
|
1
|
+
import { type MessageItem, type ConversationItem, PeerType } from '@droppii/openim-rn-client-sdk';
|
|
2
2
|
import type { PropsWithChildren } from 'react';
|
|
3
|
+
import type { IUrlMetadata } from './common';
|
|
3
4
|
export declare const EventProvider: {
|
|
4
5
|
readonly ga: "ga";
|
|
5
6
|
readonly appsflyer: "appsflyer";
|
|
@@ -8,14 +9,15 @@ export declare const EventProvider: {
|
|
|
8
9
|
type LogGA = (event: string, params?: any, provider?: `${keyof typeof EventProvider}`) => void;
|
|
9
10
|
export interface ChatContextType {
|
|
10
11
|
logGA?: LogGA;
|
|
12
|
+
applicationType: DChatApplicationType;
|
|
11
13
|
}
|
|
12
14
|
export type ChatProviderProps = PropsWithChildren<{
|
|
13
|
-
enabled?: boolean;
|
|
14
15
|
logGA?: LogGA;
|
|
16
|
+
applicationType: DChatApplicationType;
|
|
15
17
|
}>;
|
|
16
18
|
export declare enum DChatApplicationType {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
DROPPII = "DROPPII",
|
|
20
|
+
OBEFE = "OBEFE"
|
|
19
21
|
}
|
|
20
22
|
export declare enum DChatCategory {
|
|
21
23
|
BIZ_BIZ = "BIZ_BIZ",
|
|
@@ -24,10 +26,6 @@ export declare enum DChatCategory {
|
|
|
24
26
|
BIZ_BOT_PDP = "BIZ_BOT_PDP",
|
|
25
27
|
BIZ_BOT_CRM = "BIZ_BOT_CRM"
|
|
26
28
|
}
|
|
27
|
-
export declare enum DChatType {
|
|
28
|
-
SINGLE = "SINGLE",
|
|
29
|
-
GROUP = "GROUP"
|
|
30
|
-
}
|
|
31
29
|
export declare enum DMemberRole {
|
|
32
30
|
AGENT = "AGENT",
|
|
33
31
|
MEMBER = "MEMBER"
|
|
@@ -45,33 +43,16 @@ export interface DConversationPeer {
|
|
|
45
43
|
user: DConversationPeerUser | null;
|
|
46
44
|
group: null;
|
|
47
45
|
}
|
|
48
|
-
export interface DConversationItem {
|
|
46
|
+
export interface DConversationItem extends ConversationItem {
|
|
49
47
|
conversationId: string;
|
|
50
48
|
chatCategory: DChatCategory;
|
|
51
|
-
chatType:
|
|
49
|
+
chatType: PeerType;
|
|
52
50
|
applicationType: string;
|
|
53
51
|
memberRole: DMemberRole;
|
|
54
52
|
pinnedAt: string | null;
|
|
55
53
|
isMuted: boolean;
|
|
56
54
|
peer: DConversationPeerUser;
|
|
57
55
|
lastMessage?: DMessageItem;
|
|
58
|
-
unreadCount?: number;
|
|
59
|
-
conversationType?: SessionType;
|
|
60
|
-
userID?: string;
|
|
61
|
-
groupID?: string;
|
|
62
|
-
showName?: string;
|
|
63
|
-
faceURL?: string;
|
|
64
|
-
recvMsgOpt?: MessageReceiveOptType;
|
|
65
|
-
groupAtType?: GroupAtType;
|
|
66
|
-
latestMsgSendTime?: number;
|
|
67
|
-
draftText?: string;
|
|
68
|
-
draftTextTime?: number;
|
|
69
|
-
isPinned?: boolean;
|
|
70
|
-
isNotInGroup?: boolean;
|
|
71
|
-
isPrivateChat?: boolean;
|
|
72
|
-
isMsgDestruct?: boolean;
|
|
73
|
-
attachedInfo?: string;
|
|
74
|
-
ex?: string;
|
|
75
56
|
}
|
|
76
57
|
export interface DConversationQueryParams {
|
|
77
58
|
applicationType: string;
|
|
@@ -107,5 +88,25 @@ export interface DMessagePushInfoEx {
|
|
|
107
88
|
title: string;
|
|
108
89
|
desc: string;
|
|
109
90
|
}
|
|
91
|
+
export interface IMessageItemEx {
|
|
92
|
+
applicationType: DChatApplicationType;
|
|
93
|
+
sessionId?: string;
|
|
94
|
+
messageInfo?: {
|
|
95
|
+
type: 'MESSAGE_INFO';
|
|
96
|
+
data: 'rich_text';
|
|
97
|
+
content: string;
|
|
98
|
+
};
|
|
99
|
+
urlMetadata?: IUrlMetadata;
|
|
100
|
+
}
|
|
101
|
+
export interface MessageStore {
|
|
102
|
+
messages: DMessageItem[];
|
|
103
|
+
hasMoreEarlier: boolean;
|
|
104
|
+
hasMoreNewer: boolean;
|
|
105
|
+
setMessages: (messages: DMessageItem[], hasMore: boolean) => void;
|
|
106
|
+
pushNewMessage: (message: MessageItem) => void;
|
|
107
|
+
updateOneMessage: (message: MessageItem) => void;
|
|
108
|
+
deleteOneMessage: (clientMsgID: string) => void;
|
|
109
|
+
reset: () => void;
|
|
110
|
+
}
|
|
110
111
|
export {};
|
|
111
112
|
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,QAAQ,EACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,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;CACvC;AAED,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;I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AAE,WAAW,KAAK,IAAI,CAAC;IACjD,gBAAgB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { SessionType, type ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
1
|
+
import { MessageType, SessionType, type ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
2
2
|
import { type DConversationItem } from '../types/chat';
|
|
3
3
|
export declare const conversationCompare: (a: ConversationItem, b: ConversationItem) => number;
|
|
4
4
|
export declare const dConversationCompare: (a: DConversationItem, b: DConversationItem) => number;
|
|
5
|
-
export declare const mergeOpenIMIntoConversation: (
|
|
5
|
+
export declare const mergeOpenIMIntoConversation: (existing: DConversationItem, openim: ConversationItem) => DConversationItem;
|
|
6
6
|
export declare const getConversationID: (sessionType: SessionType, senderID?: string, receiverID?: string) => string;
|
|
7
7
|
export declare const sortConversation: (map: Record<string, DConversationItem>) => {
|
|
8
8
|
map: Record<string, DConversationItem>;
|
|
9
9
|
list: string[];
|
|
10
10
|
};
|
|
11
|
+
export declare const generateContentBasedOnMessageType: (contentType: MessageType, plainText?: string) => string;
|
|
11
12
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/utils/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,eAAe,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;AACvC,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,eAAe,CAAC;AAG1E,eAAO,MAAM,mBAAmB,GAC9B,GAAG,gBAAgB,EACnB,GAAG,gBAAgB,WAcpB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,GAAG,iBAAiB,EACpB,GAAG,iBAAiB,WAcrB,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,UAAU,iBAAiB,EAC3B,QAAQ,gBAAgB,KACvB,iBAcF,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,iBAAiB,CAAC;;;CAKtE,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAC5C,aAAa,WAAW,EACxB,YAAY,MAAM,WAsBnB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DMessageItem } from '../types/chat';
|
|
2
|
+
/**
|
|
3
|
+
* Extract message text based on content type
|
|
4
|
+
*/
|
|
5
|
+
export declare const getMessageText: (message: DMessageItem) => string;
|
|
6
|
+
export interface PrecomputedMessageData {
|
|
7
|
+
messageId: string;
|
|
8
|
+
dayStart: boolean;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Precompute all message rendering data in single pass O(n)
|
|
13
|
+
* Eliminates redundant Date creation and type resolution during render
|
|
14
|
+
*
|
|
15
|
+
* Returns: Map of messageId -> {dayStart, messageType, createdAt}
|
|
16
|
+
*/
|
|
17
|
+
export declare const precomputeLegendListData: (messages: DMessageItem[]) => Map<string, PrecomputedMessageData>;
|
|
18
|
+
/**
|
|
19
|
+
* Legacy: Use precomputeLegendListData instead
|
|
20
|
+
* Kept for backward compatibility
|
|
21
|
+
*/
|
|
22
|
+
export declare const computeDayStarts: (messages: DMessageItem[]) => Map<string, boolean>;
|
|
23
|
+
//# sourceMappingURL=legendListMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legendListMessage.d.ts","sourceRoot":"","sources":["../../../../src/utils/legendListMessage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,YAAY,KAAG,MA8BtD,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,YAAY,EAAE,KACvB,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAwBpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,YAAY,EAAE,KACvB,GAAG,CAAC,MAAM,EAAE,OAAO,CAYrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/utils/message.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAS1E,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,iBAAiB;;;CAW7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/utils/url.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAElD"}
|
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.7",
|
|
4
4
|
"description": "Droppii chat mobile",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -67,11 +67,13 @@
|
|
|
67
67
|
"build:web": "vite build"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@droppii/openim-rn-client-sdk": "git+ssh://git@github.com/droppii/open-im-sdk-reactnative.git#v1.0.0-
|
|
70
|
+
"@droppii/openim-rn-client-sdk": "git+ssh://git@github.com/droppii/open-im-sdk-reactnative.git#v1.0.0-rc8",
|
|
71
|
+
"@legendapp/list": "^3.0.6",
|
|
71
72
|
"axios": "^1.16.1",
|
|
72
73
|
"lodash": "^4.18.1",
|
|
73
74
|
"react-native-fs": "^2.20.0",
|
|
74
75
|
"react-native-gifted-chat": "^3.3.3",
|
|
76
|
+
"react-native-permissions": "^5.6.0",
|
|
75
77
|
"react-native-tab-view": "^4.3.1"
|
|
76
78
|
},
|
|
77
79
|
"devDependencies": {
|
|
@@ -207,4 +209,4 @@
|
|
|
207
209
|
],
|
|
208
210
|
"version": "0.62.0"
|
|
209
211
|
}
|
|
210
|
-
}
|
|
212
|
+
}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { memo } from 'react';
|
|
2
2
|
import { Avatar } from '../Avatar';
|
|
3
|
-
import { DChatCategory } from '../../types/chat';
|
|
4
3
|
import type { DConversationItem } from '../../types/chat';
|
|
4
|
+
import { PeerType } from '@droppii/openim-rn-client-sdk';
|
|
5
5
|
|
|
6
6
|
interface AvatarSectionProps extends Partial<
|
|
7
|
-
Pick<DConversationItem, '
|
|
7
|
+
Pick<DConversationItem, 'peerType' | 'applicationType'>
|
|
8
8
|
> {
|
|
9
9
|
avatar: string | null;
|
|
10
10
|
fullName: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export const AvatarSection = memo(
|
|
14
|
-
({ avatar, fullName,
|
|
15
|
-
if (
|
|
16
|
-
chatCategory === DChatCategory.BIZ_BOT_CRM ||
|
|
17
|
-
chatCategory === DChatCategory.BIZ_BOT_PDP
|
|
18
|
-
) {
|
|
14
|
+
({ avatar, fullName, peerType, applicationType }: AvatarSectionProps) => {
|
|
15
|
+
if (peerType === PeerType.Bot) {
|
|
19
16
|
return (
|
|
20
17
|
<Avatar
|
|
21
18
|
source={avatar}
|
|
@@ -25,7 +22,7 @@ export const AvatarSection = memo(
|
|
|
25
22
|
);
|
|
26
23
|
}
|
|
27
24
|
|
|
28
|
-
if (applicationType === 'MALL') {
|
|
25
|
+
if (peerType === PeerType.Customer || applicationType === 'MALL') {
|
|
29
26
|
return (
|
|
30
27
|
<Avatar
|
|
31
28
|
source={avatar}
|