@droppii-org/chat-mobile 0.2.29 → 0.2.31
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/index.js +1 -0
- package/lib/module/assets/images/index.js.map +1 -1
- package/lib/module/assets/images/notification-warning.png +0 -0
- package/lib/module/components/ThreadCard/MuteThread.js +71 -31
- package/lib/module/components/ThreadCard/MuteThread.js.map +1 -1
- package/lib/module/components/ThreadCard/ThreadCard.js +9 -4
- package/lib/module/components/ThreadCard/ThreadCard.js.map +1 -1
- package/lib/module/components/flows/inputButtons/index.js +6 -3
- package/lib/module/components/flows/inputButtons/index.js.map +1 -1
- package/lib/module/components/messages/fileMessage/index.js +2 -1
- package/lib/module/components/messages/fileMessage/index.js.map +1 -1
- package/lib/module/config/api-endpoints.js +2 -1
- package/lib/module/config/api-endpoints.js.map +1 -1
- package/lib/module/context/ChatDetailContext.js +35 -2
- package/lib/module/context/ChatDetailContext.js.map +1 -1
- package/lib/module/context/index.js +1 -0
- package/lib/module/context/index.js.map +1 -1
- package/lib/module/hooks/conversation/useGetConversationDetail.js +58 -0
- package/lib/module/hooks/conversation/useGetConversationDetail.js.map +1 -0
- package/lib/module/hooks/flows/useFlow.js +1 -1
- package/lib/module/hooks/flows/useFlow.js.map +1 -1
- package/lib/module/hooks/flows/useGetConversationFlowMainMenu.js +17 -0
- package/lib/module/hooks/flows/useGetConversationFlowMainMenu.js.map +1 -0
- package/lib/module/hooks/message/useSendMessage.js +32 -7
- package/lib/module/hooks/message/useSendMessage.js.map +1 -1
- package/lib/module/hooks/query-keys.js +5 -1
- package/lib/module/hooks/query-keys.js.map +1 -1
- package/lib/module/hooks/useChatCompose.js +0 -1
- package/lib/module/hooks/useChatCompose.js.map +1 -1
- package/lib/module/hooks/useIsJoinedGroup.js +15 -0
- package/lib/module/hooks/useIsJoinedGroup.js.map +1 -0
- package/lib/module/index.js +4 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatAttachmentPanel.js +4 -14
- package/lib/module/screens/chat-detail/ChatAttachmentPanel.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatComposer.js +26 -15
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +58 -71
- package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetailHeader.js +7 -10
- package/lib/module/screens/chat-detail/ChatDetailHeader.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatListLegend.js +1 -1
- package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatLoadEarlier.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatQuickActions.js +2 -1
- package/lib/module/screens/chat-detail/ChatQuickActions.js.map +1 -1
- package/lib/module/screens/chat-detail/constants.js +30 -24
- package/lib/module/screens/chat-detail/constants.js.map +1 -1
- package/lib/module/screens/chat-detail/index.js +2 -2
- package/lib/module/screens/chat-detail/index.js.map +1 -1
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +1 -4
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -1
- package/lib/module/screens/chat-detail/types.js +15 -1
- package/lib/module/screens/chat-detail/types.js.map +1 -1
- package/lib/module/services/attachmentHandlers/imageAttachmentHandler.js +2 -2
- package/lib/module/services/attachmentHandlers/imageAttachmentHandler.js.map +1 -1
- package/lib/module/services/endpoints.js +3 -1
- package/lib/module/services/endpoints.js.map +1 -1
- package/lib/module/translation/resources/i18n.js +8 -2
- package/lib/module/translation/resources/i18n.js.map +1 -1
- package/lib/module/types/chat.js +9 -0
- package/lib/module/types/chat.js.map +1 -1
- package/lib/module/types/flows.js +5 -0
- package/lib/module/types/flows.js.map +1 -1
- package/lib/module/utils/device.js +1 -1
- package/lib/module/utils/device.js.map +1 -1
- package/lib/module/utils/flows.js +5 -0
- package/lib/module/utils/flows.js.map +1 -1
- package/lib/module/utils/imageUtils.js +0 -3
- package/lib/module/utils/imageUtils.js.map +1 -1
- package/lib/module/utils/messageUtils.js +5 -19
- package/lib/module/utils/messageUtils.js.map +1 -1
- package/lib/typescript/src/assets/images/index.d.ts +1 -0
- package/lib/typescript/src/assets/images/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/MuteThread.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
- package/lib/typescript/src/components/flows/inputButtons/index.d.ts.map +1 -1
- package/lib/typescript/src/config/api-endpoints.d.ts +1 -0
- package/lib/typescript/src/config/api-endpoints.d.ts.map +1 -1
- package/lib/typescript/src/context/ChatDetailContext.d.ts +1 -1
- package/lib/typescript/src/context/ChatDetailContext.d.ts.map +1 -1
- package/lib/typescript/src/context/index.d.ts +1 -0
- package/lib/typescript/src/context/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/conversation/useGetConversationDetail.d.ts +17 -0
- package/lib/typescript/src/hooks/conversation/useGetConversationDetail.d.ts.map +1 -0
- package/lib/typescript/src/hooks/flows/useGetConversationFlowMainMenu.d.ts +3 -0
- package/lib/typescript/src/hooks/flows/useGetConversationFlowMainMenu.d.ts.map +1 -0
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts +5 -4
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts.map +1 -1
- 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/useIsJoinedGroup.d.ts +2 -0
- package/lib/typescript/src/hooks/useIsJoinedGroup.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatAttachmentPanel.d.ts +2 -2
- package/lib/typescript/src/screens/chat-detail/ChatAttachmentPanel.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts +3 -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/ChatLoadEarlier.d.ts +3 -2
- 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/constants.d.ts +3 -3
- package/lib/typescript/src/screens/chat-detail/constants.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/index.d.ts +3 -3
- package/lib/typescript/src/screens/chat-detail/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts +28 -19
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- package/lib/typescript/src/services/endpoints.d.ts +2 -0
- package/lib/typescript/src/services/endpoints.d.ts.map +1 -1
- package/lib/typescript/src/store/conversation.d.ts +1 -1
- 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/chat.d.ts +26 -2
- package/lib/typescript/src/types/chat.d.ts.map +1 -1
- package/lib/typescript/src/types/flows.d.ts +3 -0
- package/lib/typescript/src/types/flows.d.ts.map +1 -1
- package/lib/typescript/src/utils/flows.d.ts +2 -0
- package/lib/typescript/src/utils/flows.d.ts.map +1 -1
- package/lib/typescript/src/utils/imageUtils.d.ts +0 -1
- package/lib/typescript/src/utils/imageUtils.d.ts.map +1 -1
- package/lib/typescript/src/utils/messageUtils.d.ts +1 -1
- package/lib/typescript/src/utils/messageUtils.d.ts.map +1 -1
- package/package.json +4 -6
- package/src/assets/images/index.ts +1 -0
- package/src/assets/images/notification-warning.png +0 -0
- package/src/components/ThreadCard/MuteThread.tsx +70 -36
- package/src/components/ThreadCard/ThreadCard.tsx +7 -3
- package/src/components/flows/inputButtons/index.tsx +11 -3
- package/src/components/messages/fileMessage/index.tsx +1 -0
- package/src/config/api-endpoints.ts +2 -0
- package/src/context/ChatDetailContext.tsx +57 -4
- package/src/context/index.ts +1 -0
- package/src/hooks/conversation/useGetConversationDetail.ts +78 -0
- package/src/hooks/flows/useFlow.ts +1 -1
- package/src/hooks/flows/useGetConversationFlowMainMenu.ts +19 -0
- package/src/hooks/message/useSendMessage.ts +43 -14
- package/src/hooks/query-keys.ts +7 -0
- package/src/hooks/useChatCompose.ts +1 -1
- package/src/hooks/useIsJoinedGroup.ts +13 -0
- package/src/index.tsx +15 -6
- package/src/screens/chat-detail/ChatAttachmentPanel.tsx +8 -25
- package/src/screens/chat-detail/ChatComposer.tsx +26 -21
- package/src/screens/chat-detail/ChatDetail.tsx +61 -77
- package/src/screens/chat-detail/ChatDetailHeader.tsx +7 -18
- package/src/screens/chat-detail/ChatListLegend.tsx +1 -1
- package/src/screens/chat-detail/ChatLoadEarlier.tsx +1 -2
- package/src/screens/chat-detail/ChatQuickActions.tsx +6 -2
- package/src/screens/chat-detail/constants.ts +33 -27
- package/src/screens/chat-detail/index.ts +5 -8
- package/src/screens/chat-detail/legend/LegendChatMessage.tsx +1 -5
- package/src/screens/chat-detail/types.ts +30 -28
- package/src/services/attachmentHandlers/imageAttachmentHandler.ts +2 -2
- package/src/services/endpoints.ts +4 -0
- package/src/store/conversation.ts +1 -1
- package/src/translation/resources/i18n.ts +7 -1
- package/src/types/chat.ts +31 -1
- package/src/types/flows.ts +4 -0
- package/src/utils/device.ts +1 -1
- package/src/utils/flows.ts +7 -0
- package/src/utils/imageUtils.ts +0 -4
- package/src/utils/messageUtils.ts +7 -22
- package/lib/module/screens/chat-detail/ChatDay.js +0 -65
- package/lib/module/screens/chat-detail/ChatDay.js.map +0 -1
- package/lib/module/types/message.js +0 -17
- package/lib/module/types/message.js.map +0 -1
- package/lib/module/utils/resolveMessageType.js +0 -47
- package/lib/module/utils/resolveMessageType.js.map +0 -1
- package/lib/typescript/src/screens/chat-detail/ChatDay.d.ts +0 -3
- package/lib/typescript/src/screens/chat-detail/ChatDay.d.ts.map +0 -1
- package/lib/typescript/src/types/message.d.ts +0 -16
- package/lib/typescript/src/types/message.d.ts.map +0 -1
- package/lib/typescript/src/utils/resolveMessageType.d.ts +0 -4
- package/lib/typescript/src/utils/resolveMessageType.d.ts.map +0 -1
- package/src/screens/chat-detail/ChatDay.tsx +0 -73
- package/src/types/message.ts +0 -18
- package/src/utils/resolveMessageType.ts +0 -51
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DChatQuickAction, type DChatPannelAction } from './types';
|
|
2
2
|
export declare const CHAT_BUBBLE_COLORS: {
|
|
3
3
|
readonly received: string;
|
|
4
4
|
readonly sent: string;
|
|
@@ -6,12 +6,12 @@ export declare const CHAT_BUBBLE_COLORS: {
|
|
|
6
6
|
readonly timestamp: any;
|
|
7
7
|
readonly dayLabel: any;
|
|
8
8
|
};
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const DEFAULT_QUICK_ACTIONS: DChatQuickAction[];
|
|
10
10
|
export declare const ATTACHMENT_PANEL_COLUMNS = 4;
|
|
11
11
|
export declare const ATTACHMENT_ITEM_HEIGHT = 100;
|
|
12
12
|
export declare const ATTACHMENT_PANEL_VERTICAL_PADDING = 16;
|
|
13
13
|
export declare const getAttachmentPanelHeight: (actionCount: number, columns?: number) => number;
|
|
14
14
|
/** @deprecated use getAttachmentPanelHeight */
|
|
15
15
|
export declare const DEFAULT_ATTACHMENT_PANEL_HEIGHT: number;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const DEFAULT_PANNEL_ACTIONS: DChatPannelAction[];
|
|
17
17
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/constants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/constants.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAGvB,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC;AAEX,eAAO,MAAM,qBAAqB,EAAE,gBAAgB,EAgBnD,CAAC;AAEF,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,eAAO,MAAM,wBAAwB,GACnC,aAAa,MAAM,EACnB,gBAAkC,KACjC,MAGF,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,+BAA+B,QAA8B,CAAC;AAE3E,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,EA+BrD,CAAC"}
|
|
@@ -3,8 +3,8 @@ export { default as ChatDetailHeader } from './ChatDetailHeader';
|
|
|
3
3
|
export { ChatComposer } from './ChatComposer';
|
|
4
4
|
export { ChatQuickActions } from './ChatQuickActions';
|
|
5
5
|
export { ChatAttachmentPanel } from './ChatAttachmentPanel';
|
|
6
|
-
export {
|
|
6
|
+
export { DEFAULT_QUICK_ACTIONS, DEFAULT_PANNEL_ACTIONS, DEFAULT_ATTACHMENT_PANEL_HEIGHT, } from './constants';
|
|
7
7
|
export { getConversationTitle, getConversationAvatarUri, getConversationSubtitle, shouldShowAddMember, } from './conversationHeader.utils';
|
|
8
|
-
export type { DChatActionItem, DChatActionIconProvider, DChatQuickAction,
|
|
9
|
-
export {
|
|
8
|
+
export type { DChatActionItem, DChatActionIconProvider, DChatQuickAction, DChatPannelAction, ChatDetailProps, ChatDetailHeaderProps, ChatListProps, ChatComposerProps, ChatQuickActionsProps, ChatQuickActionsRenderParams, ChatPanelProps, } from './types';
|
|
9
|
+
export { DChatPannelActionItemType, DChatQuickActionItemType } from './types';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,
|
|
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,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,+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,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -12,6 +12,6 @@ interface LegendChatMessageProps {
|
|
|
12
12
|
onLongPress?: () => void;
|
|
13
13
|
customMessageItemFactory?: (m: DMessageItem) => ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, onMediaPress, onPressUrl, onRetry, onLongPress, customMessageItemFactory, }: LegendChatMessageProps) => import("react").JSX.Element>;
|
|
15
|
+
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, onMediaPress, onPressUrl, onRetry, onLongPress, customMessageItemFactory, }: LegendChatMessageProps) => string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>> | import("react").JSX.Element>;
|
|
16
16
|
export {};
|
|
17
17
|
//# 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":"AAEA,OAAO,KAAK,EAAoC,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAGjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAiB/D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,YAAY,CAAC;I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,YAAY,KAAK,SAAS,CAAC;CAC3D;AAyBD,eAAO,MAAM,iBAAiB,0JAUzB,sBAAsB,wRAkC1B,CAAC"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { MediaItem } from '../../hooks/useMediaViewer';
|
|
3
3
|
import type { DMessageItem } from '../../types/chat';
|
|
4
|
-
import type { ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
5
4
|
import type { MeasuredRect } from './messageToolbox/types';
|
|
6
5
|
export type DChatActionIconProvider = 'MaterialCommunityIcons' | 'DroppiiNew';
|
|
6
|
+
export declare enum DChatPannelActionItemType {
|
|
7
|
+
Gallery = "Gallery",
|
|
8
|
+
Camera = "Camera",
|
|
9
|
+
Documents = "Documents",
|
|
10
|
+
SendOrder = "SendOrder",
|
|
11
|
+
SendProduct = "SendProduct",
|
|
12
|
+
CreateAppointment = "CreateAppointment"
|
|
13
|
+
}
|
|
14
|
+
export declare enum DChatQuickActionItemType {
|
|
15
|
+
Restart = "Restart",
|
|
16
|
+
SendOrder = "SendOrder",
|
|
17
|
+
ScamWarning = "ScamWarning"
|
|
18
|
+
}
|
|
7
19
|
export interface DChatActionItem {
|
|
8
|
-
id:
|
|
20
|
+
id: DChatQuickActionItemType | DChatPannelActionItemType;
|
|
9
21
|
label: string;
|
|
10
22
|
iconName: string;
|
|
11
23
|
iconProvider?: DChatActionIconProvider;
|
|
@@ -13,13 +25,13 @@ export interface DChatActionItem {
|
|
|
13
25
|
onPress?: () => void;
|
|
14
26
|
meta?: Record<string, unknown>;
|
|
15
27
|
}
|
|
16
|
-
export
|
|
17
|
-
|
|
28
|
+
export interface DChatQuickAction extends DChatActionItem {
|
|
29
|
+
id: DChatQuickActionItemType;
|
|
30
|
+
}
|
|
31
|
+
export interface DChatPannelAction extends DChatActionItem {
|
|
32
|
+
id: DChatPannelActionItemType;
|
|
33
|
+
}
|
|
18
34
|
export interface ChatDetailHeaderProps {
|
|
19
|
-
title: string;
|
|
20
|
-
subtitle?: string;
|
|
21
|
-
avatarUri?: string | null;
|
|
22
|
-
avatarFullName?: string;
|
|
23
35
|
showAddMember?: boolean;
|
|
24
36
|
onBack?: () => void;
|
|
25
37
|
onPressSearch?: () => void;
|
|
@@ -39,11 +51,9 @@ export interface ChatQuickActionsProps {
|
|
|
39
51
|
renderAction?: (action: DChatQuickAction, onPress: () => void) => ReactNode;
|
|
40
52
|
renderQuickActions?: (params: ChatQuickActionsRenderParams) => ReactNode;
|
|
41
53
|
}
|
|
42
|
-
export interface
|
|
43
|
-
actions?:
|
|
54
|
+
export interface ChatPanelProps {
|
|
55
|
+
actions?: DChatPannelAction[];
|
|
44
56
|
columns?: number;
|
|
45
|
-
onActionPress?: (action: DChatAttachmentAction) => void;
|
|
46
|
-
renderAction?: (action: DChatAttachmentAction, onPress: () => void) => ReactNode;
|
|
47
57
|
}
|
|
48
58
|
export interface ChatComposerProps {
|
|
49
59
|
isEmptyMessage?: boolean;
|
|
@@ -63,16 +73,15 @@ export interface ChatListProps {
|
|
|
63
73
|
onPressUrl?: (url: string) => void;
|
|
64
74
|
onLongPress?: (message: DMessageItem, rect: MeasuredRect) => void;
|
|
65
75
|
}
|
|
66
|
-
export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, '
|
|
67
|
-
|
|
76
|
+
export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'showAddMember' | 'conversationId'> {
|
|
77
|
+
targetConversationId?: string;
|
|
78
|
+
targetUserId?: string;
|
|
79
|
+
targetGroupId?: string;
|
|
80
|
+
targetBotId?: string;
|
|
68
81
|
enabled?: boolean;
|
|
69
|
-
title?: string;
|
|
70
|
-
subtitle?: string;
|
|
71
|
-
avatarUri?: string | null;
|
|
72
|
-
avatarFullName?: string;
|
|
73
82
|
showAddMember?: boolean;
|
|
74
|
-
getSubtitle?: (conversation: ConversationItem) => string | undefined;
|
|
75
83
|
onPressUrl?: (url: string) => void;
|
|
76
84
|
customMessageItemFactory?: (item: DMessageItem) => ReactNode;
|
|
85
|
+
pannelActions?: DChatPannelAction[];
|
|
77
86
|
}
|
|
78
87
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,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,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,GAAG,YAAY,CAAC;AAE9E,oBAAY,yBAAyB;IACnC,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;CACxC;AAED,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,WAAW,gBAAgB;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,wBAAwB,GAAG,yBAAyB,CAAC;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EA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const ENDPOINTS: {
|
|
|
10
10
|
conversationFlow: (id: string) => string;
|
|
11
11
|
resetConversationFlow: (id: string) => string;
|
|
12
12
|
runConversationFlow: (id: string) => string;
|
|
13
|
+
getConversationByBotId: (botId: string) => string;
|
|
14
|
+
conversationFlowMainMenu: (id: string) => string;
|
|
13
15
|
};
|
|
14
16
|
uploaderService: {
|
|
15
17
|
readonly uploadImage: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAGjC,eAAO,MAAM,SAAS;;;+BAKK,MAAM;oCAED,MAAM;kCAER,MAAM;;;;;
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAGjC,eAAO,MAAM,SAAS;;;+BAKK,MAAM;oCAED,MAAM;kCAER,MAAM;wCAEA,MAAM;uCAEP,MAAM;;;;;CAQxC,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
|
2
2
|
type ConversationID = string;
|
|
3
3
|
export interface ConversationStore {
|
|
4
4
|
currentConversationId?: ConversationID;
|
|
5
|
-
setCurrentConversation(id
|
|
5
|
+
setCurrentConversation(id?: ConversationID): void;
|
|
6
6
|
getCurrentConversation(): ConversationItem | undefined;
|
|
7
7
|
list: ConversationID[];
|
|
8
8
|
map: Record<ConversationID, ConversationItem>;
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAClD,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":";;;AA8DA,wBAEE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
1
|
+
import { type ConversationItem, type MessageItem } from '@droppii/openim-rn-client-sdk';
|
|
2
2
|
import type { PropsWithChildren } from 'react';
|
|
3
3
|
import type { IUrlMetadata } from './common';
|
|
4
|
-
import type { IConversationFlow, IConversationFlowStep, IRunConversationFlowPayload } from './flows';
|
|
4
|
+
import type { DFlowContext, IConversationFlow, IConversationFlowStep, IRunConversationFlowPayload } from './flows';
|
|
5
5
|
import type { GetOpenIMTokenResponse } from './auth';
|
|
6
6
|
export declare const EventProvider: {
|
|
7
7
|
readonly ga: "ga";
|
|
@@ -44,6 +44,10 @@ export declare enum DMemberRole {
|
|
|
44
44
|
AGENT = "AGENT",
|
|
45
45
|
MEMBER = "MEMBER"
|
|
46
46
|
}
|
|
47
|
+
export declare enum DFlowState {
|
|
48
|
+
BOT = 1,
|
|
49
|
+
CS = 2
|
|
50
|
+
}
|
|
47
51
|
export interface DConversationPeerUser {
|
|
48
52
|
id: string;
|
|
49
53
|
username?: string;
|
|
@@ -117,6 +121,9 @@ export interface ChatDetailContextType {
|
|
|
117
121
|
refetchConversationFlow: () => void;
|
|
118
122
|
isBotConversation: boolean;
|
|
119
123
|
setConverationFlowStep: (step?: IConversationFlowStep) => void;
|
|
124
|
+
flowState?: DFlowState;
|
|
125
|
+
runButtonContext: (stringContext: DFlowContext) => Promise<boolean>;
|
|
126
|
+
conversation?: ConversationItem;
|
|
120
127
|
}
|
|
121
128
|
export interface ChatDetailProviderProps extends PropsWithChildren {
|
|
122
129
|
}
|
|
@@ -131,5 +138,22 @@ export interface IConversationItemEx {
|
|
|
131
138
|
};
|
|
132
139
|
chatCategory: DChatCategory;
|
|
133
140
|
}
|
|
141
|
+
export declare const CustomMessageType: {
|
|
142
|
+
readonly Order: "Order";
|
|
143
|
+
readonly Product: "Product";
|
|
144
|
+
};
|
|
145
|
+
export type CustomMessageType = (typeof CustomMessageType)[keyof typeof CustomMessageType];
|
|
146
|
+
export type CustomElemOrderData = {
|
|
147
|
+
id: string;
|
|
148
|
+
orderCode: string;
|
|
149
|
+
timestamp: number;
|
|
150
|
+
};
|
|
151
|
+
export type CustomMessagePayload = {
|
|
152
|
+
type: typeof CustomMessageType.Order;
|
|
153
|
+
data: CustomElemOrderData;
|
|
154
|
+
} | {
|
|
155
|
+
type: typeof CustomMessageType.Product;
|
|
156
|
+
data: Record<string, unknown>;
|
|
157
|
+
};
|
|
134
158
|
export {};
|
|
135
159
|
//# 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,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EACV,YAAY,EACZ,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,aAAa;IAC5B,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,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,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAC;IAAC,IAAI,EAAE,mBAAmB,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,OAAO,iBAAiB,CAAC,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { PeerType } from '@droppii/openim-rn-client-sdk';
|
|
2
2
|
import type { DChatApplicationType, DChatCategory } from './chat';
|
|
3
|
+
export declare enum DFlowContext {
|
|
4
|
+
CHAT_WITH_CS = "chat_with_cs"
|
|
5
|
+
}
|
|
3
6
|
/** START NODE TYPE */
|
|
4
7
|
export declare const NodeTypes: {
|
|
5
8
|
readonly BubbleText: "bubble-text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../../src/types/flows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAElE,sBAAsB;AACtB,eAAO,MAAM,SAAS;;;;;;CAMZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;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AK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,oBAAoB;AAEpB,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,oBAAoB,CAAC;IACtC,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC5C;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type GroupChild, type IConversationFlowStep } from '../types/flows';
|
|
2
2
|
export declare const getFlowInputButtonsNode: (step?: IConversationFlowStep | null) => GroupChild<"input-buttons">;
|
|
3
3
|
export declare const DEFAULT_BUTTON_ID = "default-item-button";
|
|
4
|
+
export declare const CONTEXT_BUTTON_PREFIX = "context:";
|
|
5
|
+
export declare const isContextButton: (label: string) => boolean;
|
|
4
6
|
//# sourceMappingURL=flows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../../src/utils/flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,uBAAuB,GAClC,OAAO,qBAAqB,GAAG,IAAI,gCAQpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../../src/utils/flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC3B,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,uBAAuB,GAClC,OAAO,qBAAqB,GAAG,IAAI,gCAQpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,YAG5C,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ImageFile } from '../types/imageUpload';
|
|
2
|
-
export declare const generateUUID: () => string;
|
|
3
2
|
export declare const isVideoFile: (filename: string | undefined) => boolean;
|
|
4
3
|
export declare const isVideoFromPicker: (pickedItem: any) => boolean;
|
|
5
4
|
export declare const getMimeType: (fileName: 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;AAItD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"imageUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/imageUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAItD,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,IAiB5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,KAAG,MAExD,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Message formatting and preview utilities
|
|
3
3
|
*/
|
|
4
4
|
import { type ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
5
|
-
import type
|
|
5
|
+
import { type DMessageItem } from '../types/chat';
|
|
6
6
|
export declare const isMessageRevoked: (message: DMessageItem) => boolean;
|
|
7
7
|
export declare const extractTextContent: (message: DMessageItem) => string;
|
|
8
8
|
export declare const getMessagePreview: (message: DMessageItem) => string;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,eAAO,MAAM,gBAAgB,GAAI,SAAS,YAAY,KAAG,OACN,CAAC;AAEpD,eAAO,MAAM,kBAAkB,GAAI,SAAS,YAAY,KAAG,MAQ1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,YAAY,KAAG,MAmEzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,SAAS,YAAY,GAAG,SAAS,EACjC,gBAAgB,MAAM,EACtB,eAAe,gBAAgB,KAC9B,MAmBF,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.31",
|
|
4
4
|
"description": "Droppii chat mobile",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -69,17 +69,16 @@
|
|
|
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-rc15",
|
|
73
73
|
"@legendapp/list": "^3.0.6",
|
|
74
74
|
"axios": "^1.16.1",
|
|
75
75
|
"lodash": "^4.18.1",
|
|
76
76
|
"react-native-fs": "^2.20.0",
|
|
77
|
-
"react-native-
|
|
78
|
-
"uuid": "^9.0.0"
|
|
77
|
+
"react-native-uuid": "^2.0.4"
|
|
79
78
|
},
|
|
80
79
|
"devDependencies": {
|
|
81
80
|
"@commitlint/config-conventional": "^20.5.0",
|
|
82
|
-
"@droppii/libs": "git+ssh://git@github.com:droppii/mobile-components.git#v1.1.
|
|
81
|
+
"@droppii/libs": "git+ssh://git@github.com:droppii/mobile-components.git#v1.1.17",
|
|
83
82
|
"@eslint/compat": "^2.0.3",
|
|
84
83
|
"@eslint/eslintrc": "^3.3.5",
|
|
85
84
|
"@eslint/js": "^10.0.1",
|
|
@@ -146,7 +145,6 @@
|
|
|
146
145
|
"react-native-create-thumbnail": "*",
|
|
147
146
|
"react-native-file-viewer": "*",
|
|
148
147
|
"react-native-gesture-handler": "*",
|
|
149
|
-
"react-native-gifted-chat": "*",
|
|
150
148
|
"react-native-image-crop-picker": "*",
|
|
151
149
|
"react-native-keyboard-controller": "*",
|
|
152
150
|
"react-native-linear-gradient": "*",
|
|
@@ -5,6 +5,7 @@ const Images = {
|
|
|
5
5
|
ICON_PDF: require('./icon_pdf.png'),
|
|
6
6
|
ICON_TXT: require('./icon_txt.png'),
|
|
7
7
|
ICON_WORD: require('./icon_word.png'),
|
|
8
|
+
NOTIFICATION_WARNING: require('./notification-warning.png'),
|
|
8
9
|
TAG_BOT: require('./tag_bot.png'),
|
|
9
10
|
TAG_MALL: require('./tag_mall.png'),
|
|
10
11
|
ICON_DROPPII: require('./icon_droppii.png'),
|
|
Binary file
|
|
@@ -5,6 +5,8 @@ import { useMuteConversation } from '../../hooks/useMuteConversation';
|
|
|
5
5
|
import { trans } from '../../translation';
|
|
6
6
|
import { UIUtils } from '../../utils/UIUtils';
|
|
7
7
|
import { type ConversationItem } from '@droppii/openim-rn-client-sdk';
|
|
8
|
+
import { Image, StyleSheet } from 'react-native';
|
|
9
|
+
import Images from '../../assets/images';
|
|
8
10
|
|
|
9
11
|
interface MuteThreadProps {
|
|
10
12
|
isMuted: boolean;
|
|
@@ -17,37 +19,64 @@ export const MuteThread = memo(
|
|
|
17
19
|
const { muteConversation, unmuteConversation } = useMuteConversation();
|
|
18
20
|
|
|
19
21
|
const handleMutePress = useCallback(() => {
|
|
20
|
-
UIUtils.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
label: trans('chat:mute_confirm_secondary'),
|
|
47
|
-
kind: 'gray',
|
|
48
|
-
onPress: () => swipeableMethods.close(),
|
|
22
|
+
UIUtils.popup.open({
|
|
23
|
+
header: {
|
|
24
|
+
title: { text: trans('chat:mute_confirm_title') },
|
|
25
|
+
alignment: 'center',
|
|
26
|
+
},
|
|
27
|
+
body: {
|
|
28
|
+
renderContent: () => {
|
|
29
|
+
return (
|
|
30
|
+
<KContainer.View padding={'1rem'} justifyContent alignItems>
|
|
31
|
+
<KContainer.View paddingV={'1rem'}>
|
|
32
|
+
<Image
|
|
33
|
+
source={Images.NOTIFICATION_WARNING}
|
|
34
|
+
style={styles.notificationWarning}
|
|
35
|
+
/>
|
|
36
|
+
</KContainer.View>
|
|
37
|
+
<KLabel.RichText
|
|
38
|
+
typo="TextMdNormal"
|
|
39
|
+
richTextOptions={{
|
|
40
|
+
i18nKey: trans('chat:mute_confirm_desc'),
|
|
41
|
+
components: {
|
|
42
|
+
b: <KLabel.Text typo="TextMdBold" />,
|
|
43
|
+
},
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</KContainer.View>
|
|
47
|
+
);
|
|
49
48
|
},
|
|
50
|
-
|
|
49
|
+
},
|
|
50
|
+
actions: {
|
|
51
|
+
buttons: [
|
|
52
|
+
{
|
|
53
|
+
label: trans('chat:mute_confirm_secondary'),
|
|
54
|
+
kind: 'light',
|
|
55
|
+
onPress: () => swipeableMethods.close(),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: trans('chat:mute_confirm_primary'),
|
|
59
|
+
kind: 'primary',
|
|
60
|
+
onPress: async () => {
|
|
61
|
+
try {
|
|
62
|
+
await muteConversation(conversation);
|
|
63
|
+
UIUtils.toast.open({
|
|
64
|
+
title: trans('chat:mute_toast_success'),
|
|
65
|
+
theme: 'light',
|
|
66
|
+
});
|
|
67
|
+
} catch {
|
|
68
|
+
UIUtils.toast.open({
|
|
69
|
+
title: trans('chat:generic_error'),
|
|
70
|
+
theme: 'error',
|
|
71
|
+
});
|
|
72
|
+
} finally {
|
|
73
|
+
swipeableMethods.close();
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
type: 'horizontal-button',
|
|
79
|
+
},
|
|
51
80
|
});
|
|
52
81
|
}, [swipeableMethods, conversation, muteConversation]);
|
|
53
82
|
|
|
@@ -56,7 +85,7 @@ export const MuteThread = memo(
|
|
|
56
85
|
await unmuteConversation(conversation);
|
|
57
86
|
UIUtils.toast.open({
|
|
58
87
|
title: trans('chat:unmute_toast_success'),
|
|
59
|
-
theme: '
|
|
88
|
+
theme: 'light',
|
|
60
89
|
});
|
|
61
90
|
} catch {
|
|
62
91
|
UIUtils.toast.open({
|
|
@@ -73,15 +102,13 @@ export const MuteThread = memo(
|
|
|
73
102
|
width={76}
|
|
74
103
|
alignItems="center"
|
|
75
104
|
justifyContent="center"
|
|
76
|
-
background={
|
|
77
|
-
isMuted ? KColors.palette.gray.w400 : KColors.palette.danger.w400
|
|
78
|
-
}
|
|
105
|
+
background={KColors.gray.light}
|
|
79
106
|
onPress={isMuted ? handleUnmutePress : handleMutePress}
|
|
80
107
|
>
|
|
81
108
|
<KImage.VectorIcons
|
|
82
|
-
name={isMuted ? 'bell-
|
|
109
|
+
name={isMuted ? 'bell-b' : 'bell-off-b'}
|
|
83
110
|
provider="DroppiiNew"
|
|
84
|
-
size={
|
|
111
|
+
size={16}
|
|
85
112
|
color={KColors.white}
|
|
86
113
|
/>
|
|
87
114
|
<KLabel.Text
|
|
@@ -98,3 +125,10 @@ export const MuteThread = memo(
|
|
|
98
125
|
);
|
|
99
126
|
|
|
100
127
|
MuteThread.displayName = 'MuteThread';
|
|
128
|
+
|
|
129
|
+
const styles = StyleSheet.create({
|
|
130
|
+
notificationWarning: {
|
|
131
|
+
width: 120,
|
|
132
|
+
height: 144,
|
|
133
|
+
},
|
|
134
|
+
});
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
type MessageItem,
|
|
15
15
|
} from '@droppii/openim-rn-client-sdk';
|
|
16
16
|
import { MuteThread } from './MuteThread';
|
|
17
|
+
import { useIsJoinedGroup } from '../../hooks/useIsJoinedGroup';
|
|
17
18
|
|
|
18
19
|
interface ThreadCardProps {
|
|
19
20
|
item: string;
|
|
@@ -30,11 +31,14 @@ const ThreadCard = memo(({ item, onPress }: ThreadCardProps) => {
|
|
|
30
31
|
unreadCount = 0,
|
|
31
32
|
recvMsgOpt = MessageReceiveOptType.Normal,
|
|
32
33
|
isPinned,
|
|
33
|
-
isNotInGroup,
|
|
34
34
|
latestMsgSendTime,
|
|
35
35
|
latestMsg,
|
|
36
|
+
groupID,
|
|
36
37
|
} = conversation || {};
|
|
37
38
|
|
|
39
|
+
const { data: isJoinedGroup } = useIsJoinedGroup(groupID);
|
|
40
|
+
const isNotInGroup = groupID ? !isJoinedGroup : false;
|
|
41
|
+
|
|
38
42
|
const latestMsgData: MessageItem = useMemo(() => {
|
|
39
43
|
let result = null;
|
|
40
44
|
try {
|
|
@@ -121,8 +125,8 @@ const ThreadCard = memo(({ item, onPress }: ThreadCardProps) => {
|
|
|
121
125
|
<KContainer.VisibleView visible={isMuted}>
|
|
122
126
|
<KContainer.View marginL="0.25rem">
|
|
123
127
|
<KImage.VectorIcons
|
|
124
|
-
name="bell-off"
|
|
125
|
-
provider="
|
|
128
|
+
name="bell-off-b"
|
|
129
|
+
provider="DroppiiNew"
|
|
126
130
|
size={16}
|
|
127
131
|
color={KColors.palette.gray.w500}
|
|
128
132
|
/>
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
KRadiusValue,
|
|
7
7
|
KSpacingValue,
|
|
8
8
|
} from '@droppii/libs';
|
|
9
|
-
import { memo, useCallback } from 'react';
|
|
9
|
+
import { memo, useCallback, useMemo } from 'react';
|
|
10
10
|
import { StyleSheet } from 'react-native';
|
|
11
11
|
import { messageStyles } from '../../messages/styles';
|
|
12
12
|
import type {
|
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
InputButtonItem,
|
|
15
15
|
IRunConversationFlowPayload,
|
|
16
16
|
} from '../../../types/flows';
|
|
17
|
-
import { DEFAULT_BUTTON_ID } from '../../../utils/flows';
|
|
17
|
+
import { DEFAULT_BUTTON_ID, isContextButton } from '../../../utils/flows';
|
|
18
18
|
import { trans } from '../../../translation';
|
|
19
19
|
|
|
20
20
|
interface IInputButtonFlow {
|
|
@@ -26,6 +26,14 @@ interface IInputButtonFlow {
|
|
|
26
26
|
export const InputButtonFlow = memo((props: IInputButtonFlow) => {
|
|
27
27
|
const { nodeData, onResetFlow, onRunFlow } = props || {};
|
|
28
28
|
|
|
29
|
+
const buttonList = useMemo(() => {
|
|
30
|
+
return (
|
|
31
|
+
nodeData?.data?.buttons?.filter(
|
|
32
|
+
(n) => !isContextButton(n?.label || '')
|
|
33
|
+
) || []
|
|
34
|
+
);
|
|
35
|
+
}, [nodeData]);
|
|
36
|
+
|
|
29
37
|
const onPressItem = useCallback(
|
|
30
38
|
(item: InputButtonItem) => {
|
|
31
39
|
if (item.id === DEFAULT_BUTTON_ID) {
|
|
@@ -71,7 +79,7 @@ export const InputButtonFlow = memo((props: IInputButtonFlow) => {
|
|
|
71
79
|
return (
|
|
72
80
|
<KContainer.View style={styles.bubble}>
|
|
73
81
|
<KContainer.View style={styles.buttonsContainer}>
|
|
74
|
-
{
|
|
82
|
+
{buttonList?.map((item) => renderButtonItem(item))}
|
|
75
83
|
</KContainer.View>
|
|
76
84
|
</KContainer.View>
|
|
77
85
|
);
|