@droppii-org/chat-mobile 0.2.6 → 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/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/useChatMessages.js +37 -119
- 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/useLinkPreview.js +3 -2
- package/lib/module/hooks/useLinkPreview/useLinkPreview.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatComposer.js +2 -2
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +14 -10
- 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 +1 -1
- package/lib/module/screens/chat-detail/ChatLinkPreview.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatListLegend.js +0 -2
- package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -1
- package/lib/module/screens/chat-detail/conversationHeader.utils.js +7 -9
- package/lib/module/screens/chat-detail/conversationHeader.utils.js.map +1 -1
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +10 -23
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -1
- package/lib/module/screens/chat-detail/legend/message-types.js +128 -6
- package/lib/module/screens/chat-detail/legend/message-types.js.map +1 -1
- 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/utils/conversation.js +34 -13
- package/lib/module/utils/conversation.js.map +1 -1
- package/lib/module/utils/legendListMessage.js +0 -3
- package/lib/module/utils/legendListMessage.js.map +1 -1
- package/lib/module/utils/message.js +5 -8
- package/lib/module/utils/message.js.map +1 -1
- package/lib/module/utils/url.js +3 -3
- package/lib/module/utils/url.js.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.map +1 -1
- 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/useChatMessages.d.ts +0 -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/useLinkPreview.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/ChatListLegend.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +1 -3
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts +6 -7
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- 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 +1 -0
- package/lib/typescript/src/types/common.d.ts.map +1 -1
- 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 +0 -2
- package/lib/typescript/src/utils/legendListMessage.d.ts.map +1 -1
- package/lib/typescript/src/utils/message.d.ts.map +1 -1
- package/lib/typescript/src/utils/url.d.ts +1 -1
- package/lib/typescript/src/utils/url.d.ts.map +1 -1
- package/package.json +3 -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/context/ChatContext.tsx +12 -4
- package/src/hooks/message/useSendMessage.ts +136 -0
- package/src/hooks/useChatMessages.ts +70 -158
- package/src/hooks/useConversationList.ts +34 -16
- package/src/hooks/useLinkPreview/useLinkPreview.ts +3 -2
- package/src/screens/chat-detail/ChatComposer.tsx +2 -2
- package/src/screens/chat-detail/ChatDetail.tsx +29 -22
- package/src/screens/chat-detail/ChatDetailHeader.tsx +4 -10
- package/src/screens/chat-detail/ChatLinkPreview.tsx +1 -1
- package/src/screens/chat-detail/ChatListLegend.tsx +1 -2
- package/src/screens/chat-detail/conversationHeader.utils.ts +11 -14
- package/src/screens/chat-detail/legend/LegendChatMessage.tsx +15 -33
- package/src/screens/chat-detail/legend/message-types.tsx +167 -12
- package/src/screens/chat-detail/types.ts +6 -8
- 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 +1 -0
- package/src/utils/conversation.ts +44 -17
- package/src/utils/legendListMessage.ts +0 -5
- package/src/utils/message.ts +10 -12
- package/src/utils/url.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["URL_REGEX","
|
|
1
|
+
{"version":3,"names":["URL_REGEX","extractUrls","text","match"],"sourceRoot":"../../../src","sources":["utils/url.ts"],"mappings":";;AAAA,MAAMA,SAAS,GAAG,+CAA+C;AAEjE,OAAO,SAASC,WAAWA,CAACC,IAAY,EAAY;EAClD,OAAOA,IAAI,CAACC,KAAK,CAACH,SAAS,CAAC,IAAI,EAAE;AACpC","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DConversationItem } from '../../types/chat';
|
|
2
|
-
interface AvatarSectionProps extends Partial<Pick<DConversationItem, '
|
|
2
|
+
interface AvatarSectionProps extends Partial<Pick<DConversationItem, 'peerType' | 'applicationType'>> {
|
|
3
3
|
avatar: string | null;
|
|
4
4
|
fullName: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const AvatarSection: import("react").MemoExoticComponent<({ avatar, fullName,
|
|
6
|
+
export declare const AvatarSection: import("react").MemoExoticComponent<({ avatar, fullName, peerType, applicationType }: AvatarSectionProps) => import("react").JSX.Element>;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=AvatarSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/AvatarSection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AvatarSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/AvatarSection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,UAAU,kBAAmB,SAAQ,OAAO,CAC1C,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,iBAAiB,CAAC,CACxD;IACC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,wFAC0B,kBAAkB,iCAuBrE,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PeerType } from '@droppii/openim-rn-client-sdk';
|
|
2
2
|
interface NamePrefixIconProps {
|
|
3
|
-
|
|
4
|
-
chatType?: DChatType;
|
|
3
|
+
peerType?: PeerType | string;
|
|
5
4
|
}
|
|
6
|
-
export declare const NamePrefixIcon: import("react").MemoExoticComponent<({
|
|
5
|
+
export declare const NamePrefixIcon: import("react").MemoExoticComponent<({ peerType }: NamePrefixIconProps) => import("react").JSX.Element>;
|
|
7
6
|
export {};
|
|
8
7
|
//# sourceMappingURL=NamePrefixIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamePrefixIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/NamePrefixIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NamePrefixIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/NamePrefixIcon.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AASzD,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,cAAc,qDAAuB,mBAAmB,iCA0BnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/ThreadCard.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/ThreadCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAQ1D,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,qBAAqB,CAAA;KAAE,KAAK,IAAI,CAAC;CAC5E;AAED,QAAA,MAAM,UAAU,0DAA4B,eAAe,iCAgHzD,CAAC;AAIH,eAAe,UAAU,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatContextType, ChatProviderProps } from '../types/chat';
|
|
2
2
|
export declare const ChatContext: import("react").Context<ChatContextType>;
|
|
3
3
|
export declare const useChatContext: () => ChatContextType;
|
|
4
|
-
export declare const ChatProvider: ({
|
|
4
|
+
export declare const ChatProvider: ({ ...props }: ChatProviderProps) => import("react").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=ChatContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAExE,eAAO,MAAM,WAAW,0CAEvB,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,eAMjC,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAExE,eAAO,MAAM,WAAW,0CAEvB,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,eAMjC,CAAC;AAeF,eAAO,MAAM,YAAY,GAAI,cAAc,iBAAiB,gCAE3D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UploadFileItem } from 'react-native-fs';
|
|
2
|
+
import type { IUrlMetadata } from '../../types/common';
|
|
3
|
+
export declare const useSendMessage: () => {
|
|
4
|
+
sendMessage: ({ plainText, files, urlMetadata, }: {
|
|
5
|
+
plainText?: string;
|
|
6
|
+
files?: UploadFileItem[];
|
|
7
|
+
urlMetadata?: IUrlMetadata;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export declare const createTextMessage: (text: string) => Promise<any>;
|
|
11
|
+
export declare const createUrlTextMessage: (text: string, urls: string[]) => Promise<any>;
|
|
12
|
+
//# sourceMappingURL=useSendMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAatD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,eAAO,MAAM,cAAc;sDASpB;QACD,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;QACzB,WAAW,CAAC,EAAE,YAAY,CAAC;KAC5B;CAoDJ,CAAC;AAyBF,eAAO,MAAM,iBAAiB,GAAU,MAAM,MAAM,iBAanD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,iBActE,CAAC"}
|
|
@@ -15,7 +15,6 @@ export declare function useChatMessages({ conversationId, enabled, pageSize, }:
|
|
|
15
15
|
error: Error;
|
|
16
16
|
onLoadEarlier: () => Promise<void>;
|
|
17
17
|
onLoadNewer: () => Promise<void>;
|
|
18
|
-
sendTextMessage: (text: string) => Promise<void>;
|
|
19
18
|
refresh: () => Promise<void>;
|
|
20
19
|
};
|
|
21
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatMessages.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useChatMessages.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useChatMessages.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useChatMessages.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAQlD,KAAK,sBAAsB,GAAG;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,OAAc,EACd,QAAa,GACd,EAAE,sBAAsB;;;;;;;;;;;;EAkLxB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { DConversationItem } from '../types/chat';
|
|
1
2
|
type Params = {
|
|
2
3
|
applicationType: string;
|
|
3
4
|
page: number;
|
|
4
5
|
enabled?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare function useConversationList({ applicationType, page, enabled, }: Params): import("@tanstack/react-query").UseQueryResult<NoInfer<
|
|
7
|
+
export declare function useConversationList({ applicationType, page, enabled, }: Params): import("@tanstack/react-query").UseQueryResult<NoInfer<DConversationItem[]>, Error>;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=useConversationList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConversationList.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useConversationList.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useConversationList.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useConversationList.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,eAAe,CAAC;AAErE,KAAK,MAAM,GAAG;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAyBF,wBAAgB,mBAAmB,CAAC,EAClC,eAAe,EACf,IAAQ,EACR,OAAc,GACf,EAAE,MAAM,uFAgCR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinkPreview.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useLinkPreview/useLinkPreview.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS;;;;;
|
|
1
|
+
{"version":3,"file":"useLinkPreview.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useLinkPreview/useLinkPreview.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS;;;;;EA0BvD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ChatDetailProps } from './types';
|
|
2
|
-
declare const ChatDetail: import("react").MemoExoticComponent<({ conversationId, enabled, title, subtitle, avatarUri, avatarFullName,
|
|
2
|
+
declare const ChatDetail: import("react").MemoExoticComponent<({ conversationId, enabled, title, subtitle, avatarUri, avatarFullName, peerType, applicationType, showAddMember, getSubtitle, onBack, onPressSearch, onPressAddMember, onPressMenu, onPressAvatar, renderChat, showQuickActions, showAttachmentActions, quickActions, getQuickActions, inputValue, inputPlaceholder, onChangeInput, onPressAttach, onPressEmoji, attachmentActions, onQuickActionPress, onAttachmentAction, renderQuickAction, renderQuickActions, renderAttachmentAction, attachmentColumns, }: ChatDetailProps) => import("react").JSX.Element>;
|
|
3
3
|
export default ChatDetail;
|
|
4
4
|
//# sourceMappingURL=ChatDetail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDetail.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetail.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatDetail.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetail.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI/C,QAAA,MAAM,UAAU,whBAkCX,eAAe,iCA6LnB,CAAC;AAUF,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ChatDetailHeaderProps } from './types';
|
|
2
|
-
declare const ChatDetailHeader: import("react").MemoExoticComponent<({ title, subtitle, avatarUri, avatarFullName,
|
|
2
|
+
declare const ChatDetailHeader: import("react").MemoExoticComponent<({ title, subtitle, avatarUri, avatarFullName, peerType, applicationType, showAddMember, onBack, onPressSearch, onPressAddMember, onPressMenu, onPressAvatar, }: ChatDetailHeaderProps) => import("react").JSX.Element>;
|
|
3
3
|
export default ChatDetailHeader;
|
|
4
4
|
//# sourceMappingURL=ChatDetailHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDetailHeader.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetailHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,QAAA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ChatDetailHeader.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetailHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,QAAA,MAAM,gBAAgB,uMAcjB,qBAAqB,iCA6GzB,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatListLegend.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatListLegend.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM7C,eAAO,MAAM,cAAc,wLAYtB,aAAa,
|
|
1
|
+
{"version":3,"file":"ChatListLegend.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatListLegend.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM7C,eAAO,MAAM,cAAc,wLAYtB,aAAa,iCAsTjB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DConversationItem } from '../../types/chat';
|
|
2
2
|
export declare const getConversationTitle: (conversation?: DConversationItem) => string;
|
|
3
3
|
export declare const getConversationAvatarUri: (conversation?: DConversationItem) => string | null;
|
|
4
4
|
export declare const getConversationSubtitle: (conversation?: DConversationItem) => string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversationHeader.utils.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/conversationHeader.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
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"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { DMessageItem } from '../../../types/chat';
|
|
2
|
-
import type { DChatMessageType } from '../../../types/message';
|
|
3
2
|
interface LegendChatMessageProps {
|
|
4
3
|
message: DMessageItem;
|
|
5
|
-
messageType: DChatMessageType;
|
|
6
4
|
isOutgoing: boolean;
|
|
7
5
|
createdAtTime: number;
|
|
8
6
|
}
|
|
@@ -10,6 +8,6 @@ interface LegendChatMessageProps {
|
|
|
10
8
|
* Dispatcher component - renders the appropriate message component
|
|
11
9
|
* based on message type. Extensible for new message types.
|
|
12
10
|
*/
|
|
13
|
-
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message,
|
|
11
|
+
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime }: LegendChatMessageProps) => import("react").JSX.Element>;
|
|
14
12
|
export {};
|
|
15
13
|
//# sourceMappingURL=LegendChatMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatMessage.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -8,5 +8,6 @@ export declare const LegendTextMessage: import("react").MemoExoticComponent<({ m
|
|
|
8
8
|
export declare const LegendImageMessage: import("react").MemoExoticComponent<({ isOutgoing }: BaseLegendMessageProps) => import("react").JSX.Element>;
|
|
9
9
|
export declare const LegendVideoMessage: import("react").MemoExoticComponent<({ isOutgoing }: BaseLegendMessageProps) => import("react").JSX.Element>;
|
|
10
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>;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=message-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-types.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/message-types.tsx"],"names":[],"mappings":"
|
|
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,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;
|
|
@@ -49,7 +49,7 @@ export interface ChatComposerProps {
|
|
|
49
49
|
value?: string;
|
|
50
50
|
placeholder?: string;
|
|
51
51
|
onChangeText?: (text: string) => void;
|
|
52
|
-
onSend?: () => void;
|
|
52
|
+
onSend?: (urlMetadata?: IUrlMetadata) => void;
|
|
53
53
|
onPressAttach?: () => void;
|
|
54
54
|
onPressEmoji?: () => void;
|
|
55
55
|
showQuickActions?: boolean;
|
|
@@ -74,15 +74,14 @@ export interface ChatListProps {
|
|
|
74
74
|
isLoadingNewer?: boolean;
|
|
75
75
|
hasMoreNewer?: boolean;
|
|
76
76
|
}
|
|
77
|
-
export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'title' | 'subtitle' | 'avatarUri' | 'avatarFullName' | '
|
|
77
|
+
export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'title' | 'subtitle' | 'avatarUri' | 'avatarFullName' | 'peerType' | 'applicationType' | 'showAddMember'> {
|
|
78
78
|
conversationId: string;
|
|
79
79
|
enabled?: boolean;
|
|
80
80
|
title?: string;
|
|
81
81
|
subtitle?: string;
|
|
82
82
|
avatarUri?: string | null;
|
|
83
83
|
avatarFullName?: string;
|
|
84
|
-
|
|
85
|
-
chatCategory?: DChatCategory;
|
|
84
|
+
peerType?: PeerType;
|
|
86
85
|
applicationType?: DConversationItem['applicationType'];
|
|
87
86
|
showAddMember?: boolean;
|
|
88
87
|
getSubtitle?: (conversation: DConversationItem) => string | undefined;
|
|
@@ -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,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,GAAG,YAAY,CAAC;AAE9E,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,C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AC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAClC,eAAe,CAAC,EAAE,CAChB,YAAY,EAAE,iBAAiB,KAC5B,gBAAgB,EAAE,GAAG,SAAS,CAAC;IACpC,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,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;CAC5B"}
|
|
@@ -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;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,eAAe,EAAE,oBAAoB,CAAC;CACvC,CAAC,CAAC;AAEH,oBAAY,oBAAoB;IAC9B,OAAO,YAAY;IACnB,KAAK,UAAU;CACh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 +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;
|
|
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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DMessageItem } from '../types/chat';
|
|
2
|
-
import type { DChatMessageType } from '../types/message';
|
|
3
2
|
/**
|
|
4
3
|
* Extract message text based on content type
|
|
5
4
|
*/
|
|
@@ -7,7 +6,6 @@ export declare const getMessageText: (message: DMessageItem) => string;
|
|
|
7
6
|
export interface PrecomputedMessageData {
|
|
8
7
|
messageId: string;
|
|
9
8
|
dayStart: boolean;
|
|
10
|
-
messageType: DChatMessageType;
|
|
11
9
|
createdAt: number;
|
|
12
10
|
}
|
|
13
11
|
/**
|
|
@@ -1 +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
|
|
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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function extractUrls(text: string): string[];
|
|
2
2
|
//# sourceMappingURL=url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/utils/url.ts"],"names":[],"mappings":"AAEA,wBAAgB,
|
|
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,7 +67,7 @@
|
|
|
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
71
|
"@legendapp/list": "^3.0.6",
|
|
72
72
|
"axios": "^1.16.1",
|
|
73
73
|
"lodash": "^4.18.1",
|
|
@@ -209,4 +209,4 @@
|
|
|
209
209
|
],
|
|
210
210
|
"version": "0.62.0"
|
|
211
211
|
}
|
|
212
|
-
}
|
|
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}
|