@droppii-org/chat-sdk 0.1.58 → 0.1.60

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.
Files changed (92) hide show
  1. package/dist/assets/droppiiFontSelection.json +13195 -3192
  2. package/dist/components/conversation-detail/ConversationDetailHeader.js +3 -2
  3. package/dist/components/conversation-detail/ConversationDetailInput.js +1 -1
  4. package/dist/components/conversation-detail/ConversationMessageList.d.ts.map +1 -1
  5. package/dist/components/conversation-detail/ConversationMessageList.js +33 -2
  6. package/dist/components/conversation-detail/ConversationMoreOptionItem.js +1 -1
  7. package/dist/components/conversation-detail/PinLimitModal.d.ts +7 -0
  8. package/dist/components/conversation-detail/PinLimitModal.d.ts.map +1 -0
  9. package/dist/components/conversation-detail/PinLimitModal.js +11 -0
  10. package/dist/components/conversation-detail/PinnedMessageBar.d.ts +3 -0
  11. package/dist/components/conversation-detail/PinnedMessageBar.d.ts.map +1 -0
  12. package/dist/components/conversation-detail/PinnedMessageBar.js +95 -0
  13. package/dist/components/conversation-detail/bot/BotInactiveNotice.d.ts +3 -0
  14. package/dist/components/conversation-detail/bot/BotInactiveNotice.d.ts.map +1 -0
  15. package/dist/components/conversation-detail/bot/BotInactiveNotice.js +10 -0
  16. package/dist/components/conversation-detail/bot/index.d.ts +1 -0
  17. package/dist/components/conversation-detail/bot/index.d.ts.map +1 -1
  18. package/dist/components/conversation-detail/bot/index.js +1 -0
  19. package/dist/components/conversation-detail/index.d.ts +2 -0
  20. package/dist/components/conversation-detail/index.d.ts.map +1 -1
  21. package/dist/components/conversation-detail/index.js +2 -0
  22. package/dist/components/conversation-inbox/ConversationInboxItem.js +3 -2
  23. package/dist/components/conversation-inbox/ConversationInboxTitle.js +1 -1
  24. package/dist/components/message/item/QuoteMessage.js +1 -1
  25. package/dist/components/message/item/TextMessage.d.ts.map +1 -1
  26. package/dist/components/message/item/TextMessage.js +2 -2
  27. package/dist/components/message/item/index.d.ts +3 -1
  28. package/dist/components/message/item/index.d.ts.map +1 -1
  29. package/dist/components/message/item/index.js +39 -12
  30. package/dist/components/message/reply/ReplyPreviewMedia.d.ts.map +1 -1
  31. package/dist/components/message/reply/ReplyPreviewMedia.js +3 -14
  32. package/dist/components/message/reply/ReplyQuoteContent.d.ts +2 -2
  33. package/dist/components/message/reply/ReplyQuoteContent.d.ts.map +1 -1
  34. package/dist/components/message/reply/ReplyQuoteContent.js +1 -1
  35. package/dist/components/message/toolbox/index.d.ts +1 -0
  36. package/dist/components/message/toolbox/index.d.ts.map +1 -1
  37. package/dist/components/message/toolbox/index.js +1 -0
  38. package/dist/components/message/toolbox/isPinnableMessageType.d.ts +3 -0
  39. package/dist/components/message/toolbox/isPinnableMessageType.d.ts.map +1 -0
  40. package/dist/components/message/toolbox/isPinnableMessageType.js +11 -0
  41. package/dist/components/message/toolbox/types.d.ts +1 -0
  42. package/dist/components/message/toolbox/types.d.ts.map +1 -1
  43. package/dist/components/message/toolbox/types.js +1 -0
  44. package/dist/constants/index.d.ts +1 -0
  45. package/dist/constants/index.d.ts.map +1 -1
  46. package/dist/constants/index.js +1 -0
  47. package/dist/hooks/conversation/useBotConversationDetail.js +2 -2
  48. package/dist/hooks/conversation/useBotDetail.d.ts +3 -0
  49. package/dist/hooks/conversation/useBotDetail.d.ts.map +1 -0
  50. package/dist/hooks/conversation/useBotDetail.js +18 -0
  51. package/dist/hooks/conversation/useBotFlow.d.ts +1 -0
  52. package/dist/hooks/conversation/useBotFlow.d.ts.map +1 -1
  53. package/dist/hooks/conversation/useBotFlow.js +13 -3
  54. package/dist/hooks/conversation/useConversationAvatarUrl.d.ts +3 -0
  55. package/dist/hooks/conversation/useConversationAvatarUrl.d.ts.map +1 -0
  56. package/dist/hooks/conversation/useConversationAvatarUrl.js +11 -0
  57. package/dist/hooks/conversation/useCreateConversation.js +2 -2
  58. package/dist/hooks/message/usePinMessage.d.ts +7 -0
  59. package/dist/hooks/message/usePinMessage.d.ts.map +1 -0
  60. package/dist/hooks/message/usePinMessage.js +42 -0
  61. package/dist/hooks/message/usePinnedMessages.d.ts +6 -0
  62. package/dist/hooks/message/usePinnedMessages.d.ts.map +1 -0
  63. package/dist/hooks/message/usePinnedMessages.js +33 -0
  64. package/dist/locales/vi/common.json +13 -0
  65. package/dist/locales/vi/conversation-inbox.json +2 -1
  66. package/dist/screens/conversation-detail/index.d.ts.map +1 -1
  67. package/dist/screens/conversation-detail/index.js +6 -4
  68. package/dist/services/query.d.ts +3 -2
  69. package/dist/services/query.d.ts.map +1 -1
  70. package/dist/services/query.js +3 -2
  71. package/dist/services/routes.d.ts +3 -2
  72. package/dist/services/routes.d.ts.map +1 -1
  73. package/dist/services/routes.js +3 -2
  74. package/dist/store/conversation.d.ts.map +1 -1
  75. package/dist/store/conversation.js +21 -1
  76. package/dist/store/pinnedMessage.d.ts +4 -0
  77. package/dist/store/pinnedMessage.d.ts.map +1 -0
  78. package/dist/store/pinnedMessage.js +17 -0
  79. package/dist/store/type.d.ts +4 -0
  80. package/dist/store/type.d.ts.map +1 -1
  81. package/dist/styles/global.css +1 -1
  82. package/dist/tsconfig.tsbuildinfo +1 -1
  83. package/dist/types/conversation.d.ts +20 -0
  84. package/dist/types/conversation.d.ts.map +1 -1
  85. package/dist/types/conversation.js +5 -0
  86. package/dist/utils/common.d.ts +2 -0
  87. package/dist/utils/common.d.ts.map +1 -1
  88. package/dist/utils/common.js +11 -0
  89. package/dist/utils/conversation.d.ts +1 -0
  90. package/dist/utils/conversation.d.ts.map +1 -1
  91. package/dist/utils/conversation.js +11 -1
  92. package/package.json +127 -126
@@ -0,0 +1,3 @@
1
+ import { MessageType } from "@openim/wasm-client-sdk";
2
+ export declare const isPinnableMessageType: (contentType?: MessageType) => boolean;
3
+ //# sourceMappingURL=isPinnableMessageType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isPinnableMessageType.d.ts","sourceRoot":"","sources":["../../../../src/components/message/toolbox/isPinnableMessageType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAYtD,eAAO,MAAM,qBAAqB,GAAI,cAAc,WAAW,YACY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { MessageType } from "@openim/wasm-client-sdk";
2
+ const PINNABLE_MESSAGE_TYPES = [
3
+ MessageType.TextMessage,
4
+ MessageType.QuoteMessage,
5
+ MessageType.UrlTextMessage,
6
+ MessageType.PictureMessage,
7
+ MessageType.VideoMessage,
8
+ MessageType.FileMessage,
9
+ MessageType.MergeMessage
10
+ ];
11
+ export const isPinnableMessageType = (contentType) => contentType !== undefined && PINNABLE_MESSAGE_TYPES.includes(contentType);
@@ -1,6 +1,7 @@
1
1
  export declare const MessageToolboxActionKey: {
2
2
  readonly REPLY: "REPLY";
3
3
  readonly PIN: "PIN";
4
+ readonly UNPIN: "UNPIN";
4
5
  readonly COPY_MESSAGE: "COPY_MESSAGE";
5
6
  readonly REVOKE: "REVOKE";
6
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/message/toolbox/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;CAK1B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,uBAAuB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/message/toolbox/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;CAM1B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,uBAAuB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
@@ -1,6 +1,7 @@
1
1
  export const MessageToolboxActionKey = {
2
2
  REPLY: "REPLY",
3
3
  PIN: "PIN",
4
+ UNPIN: "UNPIN",
4
5
  COPY_MESSAGE: "COPY_MESSAGE",
5
6
  REVOKE: "REVOKE",
6
7
  };
@@ -7,4 +7,5 @@ export declare const PAGE_SIZE: {
7
7
  };
8
8
  export declare const MSG_ITEM_PREFIX = "msg-item-";
9
9
  export declare const MSG_ITEM_CONTENT_PREFIX = "msg-item-content-";
10
+ export declare const MAX_PINNED_MESSAGES_PER_CONVERSATION = 5;
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,qFAC2D,CAAC;AAErF,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAEX,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,uBAAuB,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,qFAC2D,CAAC;AAErF,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAEX,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D,eAAO,MAAM,oCAAoC,IAAI,CAAC"}
@@ -7,3 +7,4 @@ export const PAGE_SIZE = {
7
7
  };
8
8
  export const MSG_ITEM_PREFIX = "msg-item-";
9
9
  export const MSG_ITEM_CONTENT_PREFIX = "msg-item-content-";
10
+ export const MAX_PINNED_MESSAGES_PER_CONVERSATION = 5;
@@ -5,9 +5,9 @@ import { ENDPOINTS } from "../../services/routes";
5
5
  import { QUERY_KEYS } from "../../services/query";
6
6
  export const useBotConversationDetail = (conversationId, enabled) => {
7
7
  return useQuery({
8
- queryKey: [QUERY_KEYS.GET_BIZ_CONVERSATION_DETAIL, conversationId],
8
+ queryKey: [QUERY_KEYS.GET_CONVERSATION_DETAIL, conversationId],
9
9
  queryFn: async () => {
10
- const res = await apiInstance.get(ENDPOINTS.chatService.getBizConversationDetail(conversationId));
10
+ const res = await apiInstance.get(ENDPOINTS.chatService.getConversationDetail(conversationId));
11
11
  return res.data.data;
12
12
  },
13
13
  enabled: enabled && !!conversationId,
@@ -0,0 +1,3 @@
1
+ import type { BotDetail } from "../../types/conversation";
2
+ export declare const useBotDetail: (botId: string, enabled: boolean) => import("@tanstack/react-query").UseQueryResult<BotDetail, Error>;
3
+ //# sourceMappingURL=useBotDetail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBotDetail.d.ts","sourceRoot":"","sources":["../../../src/hooks/conversation/useBotDetail.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,EAAE,SAAS,OAAO,qEAc3D,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { apiInstance } from "../../services/api";
4
+ import { ENDPOINTS } from "../../services/routes";
5
+ import { QUERY_KEYS } from "../../services/query";
6
+ export const useBotDetail = (botId, enabled) => {
7
+ return useQuery({
8
+ queryKey: [QUERY_KEYS.GET_BOT_DETAIL, botId],
9
+ queryFn: async () => {
10
+ const res = await apiInstance.get(ENDPOINTS.chatService.getBotDetail(botId));
11
+ return res.data.data;
12
+ },
13
+ enabled: enabled && !!botId,
14
+ staleTime: 0,
15
+ refetchOnWindowFocus: false,
16
+ refetchOnReconnect: false,
17
+ });
18
+ };
@@ -7,6 +7,7 @@ interface UseBotFlowParams {
7
7
  export declare const useBotFlow: ({ conversationId, isBotThread, }: UseBotFlowParams) => {
8
8
  status: BotFlowStatus;
9
9
  flowIsEnd: boolean;
10
+ isBotInactive: boolean;
10
11
  isProcessing: boolean;
11
12
  shouldShowButtons: boolean;
12
13
  currentButtonsBlock: BotInputButtonsBlock | null;
@@ -1 +1 @@
1
- {"version":3,"file":"useBotFlow.d.ts","sourceRoot":"","sources":["../../../src/hooks/conversation/useBotFlow.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAU9B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC;AAEtD,UAAU,gBAAgB;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB;AAsBD,eAAO,MAAM,UAAU,GAAI,kCAGxB,gBAAgB;;;;;;;6BA0GqB,MAAM;;CAiD7C,CAAC"}
1
+ {"version":3,"file":"useBotFlow.d.ts","sourceRoot":"","sources":["../../../src/hooks/conversation/useBotFlow.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAa9B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC;AAEtD,UAAU,gBAAgB;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB;AAsBD,eAAO,MAAM,UAAU,GAAI,kCAGxB,gBAAgB;;;;;;;;6BAmHqB,MAAM;;CAkD7C,CAAC"}
@@ -1,12 +1,15 @@
1
1
  "use client";
2
2
  import { useEffect, useRef, useState } from "react";
3
3
  import { useTranslation } from "react-i18next";
4
- import { BotBlockType, BotFlowNodeType, } from "../../types/conversation";
4
+ import { BotBlockType, BotFlowNodeType, BotStatus, } from "../../types/conversation";
5
5
  import { BOT_DEFAULT_BUTTON_ID } from "../../constants/botFlow";
6
6
  import { useSendMessage } from "../../hooks/message/useSendMessage";
7
7
  import useAuthStore from "../../store/auth";
8
+ import useConversationStore from "../../store/conversation";
8
9
  import emitter from "../../utils/events";
10
+ import { resolveConversationBotId } from "../../utils/conversation";
9
11
  import { useBotConversationDetail } from "./useBotConversationDetail";
12
+ import { useBotDetail } from "./useBotDetail";
10
13
  import { useRunBotFlow } from "./useRunBotFlow";
11
14
  import { useResetBotFlow } from "./useResetBotFlow";
12
15
  const INITIAL_BOT_FLOW_STATE = {
@@ -24,7 +27,7 @@ const parseMessageFlowGroupId = (ex) => {
24
27
  }
25
28
  };
26
29
  export const useBotFlow = ({ conversationId, isBotThread, }) => {
27
- var _a;
30
+ var _a, _b;
28
31
  const [botFlowState, setBotFlowState] = useState(INITIAL_BOT_FLOW_STATE);
29
32
  const { conversationId: storedConversationId, flowCurrentStep } = botFlowState;
30
33
  const isActiveConversation = storedConversationId === conversationId;
@@ -33,7 +36,13 @@ export const useBotFlow = ({ conversationId, isBotThread, }) => {
33
36
  const latestBotFlowGroupIdRef = useRef(null);
34
37
  const authUserID = useAuthStore((state) => state.userID);
35
38
  const { t } = useTranslation("conversation-inbox");
39
+ const conversationData = useConversationStore((state) => state.conversationData);
40
+ const botId = conversationData
41
+ ? resolveConversationBotId(conversationData)
42
+ : "";
36
43
  const detailQuery = useBotConversationDetail(conversationId, isBotThread);
44
+ const botDetailQuery = useBotDetail(botId, isBotThread);
45
+ const isBotInactive = ((_a = botDetailQuery.data) === null || _a === void 0 ? void 0 : _a.status) === BotStatus.INACTIVE;
37
46
  const runMutation = useRunBotFlow();
38
47
  const resetMutation = useResetBotFlow();
39
48
  const { sendMergeMessage } = useSendMessage({
@@ -72,7 +81,7 @@ export const useBotFlow = ({ conversationId, isBotThread, }) => {
72
81
  };
73
82
  }, [authUserID]);
74
83
  const activeStep = storedConversationId === conversationId ? flowCurrentStep : null;
75
- const currentButtonsBlock = (_a = activeStep === null || activeStep === void 0 ? void 0 : activeStep.data.children.find((child) => child.type === BotBlockType.InputButtons)) !== null && _a !== void 0 ? _a : null;
84
+ const currentButtonsBlock = (_b = activeStep === null || activeStep === void 0 ? void 0 : activeStep.data.children.find((child) => child.type === BotBlockType.InputButtons)) !== null && _b !== void 0 ? _b : null;
76
85
  const isProcessing = runMutation.isPending || resetMutation.isPending;
77
86
  const shouldShowButtons = !!currentButtonsBlock && !isProcessing && !pendingGroupId;
78
87
  const status = (activeStep === null || activeStep === void 0 ? void 0 : activeStep.type) === BotFlowNodeType.Start ? "not_started" : "running";
@@ -140,6 +149,7 @@ export const useBotFlow = ({ conversationId, isBotThread, }) => {
140
149
  return {
141
150
  status,
142
151
  flowIsEnd,
152
+ isBotInactive,
143
153
  isProcessing,
144
154
  shouldShowButtons,
145
155
  currentButtonsBlock,
@@ -0,0 +1,3 @@
1
+ import type { ConversationItem } from "@openim/wasm-client-sdk";
2
+ export declare const useConversationAvatarUrl: (conversation: ConversationItem) => string | null;
3
+ //# sourceMappingURL=useConversationAvatarUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConversationAvatarUrl.d.ts","sourceRoot":"","sources":["../../../src/hooks/conversation/useConversationAvatarUrl.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQhE,eAAO,MAAM,wBAAwB,GACnC,cAAc,gBAAgB,KAC7B,MAAM,GAAG,IASX,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { isBotPeer, resolveConversationAvatarUrl, resolveConversationBotId, } from "../../utils/conversation";
3
+ import { useBotDetail } from "./useBotDetail";
4
+ export const useConversationAvatarUrl = (conversation) => {
5
+ var _a, _b;
6
+ const isBotThread = isBotPeer(conversation);
7
+ const botId = isBotThread ? resolveConversationBotId(conversation) : "";
8
+ const botDetailQuery = useBotDetail(botId, isBotThread);
9
+ return (((_b = (_a = botDetailQuery.data) === null || _a === void 0 ? void 0 : _a.avatar) === null || _b === void 0 ? void 0 : _b.fullUrl) ||
10
+ resolveConversationAvatarUrl(conversation));
11
+ };
@@ -6,9 +6,9 @@ import { ENDPOINTS } from "../../services/routes";
6
6
  import { QUERY_KEYS } from "../../services/query";
7
7
  export const useCreateConversation = () => {
8
8
  return useMutation({
9
- mutationKey: [QUERY_KEYS.CREATE_BIZ_CONVERSATION],
9
+ mutationKey: [QUERY_KEYS.CREATE_CONVERSATION],
10
10
  mutationFn: async (input) => {
11
- const res = await apiInstance.post(ENDPOINTS.chatService.createBizConversation, Object.assign(Object.assign({}, input), { applicationType: useAuthStore.getState().applicationType }));
11
+ const res = await apiInstance.post(ENDPOINTS.chatService.createConversation, Object.assign(Object.assign({}, input), { applicationType: useAuthStore.getState().applicationType }));
12
12
  return res.data.data;
13
13
  },
14
14
  });
@@ -0,0 +1,7 @@
1
+ export declare const usePinMessage: () => {
2
+ pinMessage: (conversationID: string, clientMsgID: string) => Promise<void>;
3
+ unpinMessage: (conversationID: string, clientMsgID: string) => Promise<void>;
4
+ pinLoading: boolean;
5
+ unpinLoading: boolean;
6
+ };
7
+ //# sourceMappingURL=usePinMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePinMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/usePinMessage.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;;;CA6CzB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { useRequest } from "ahooks";
2
+ import { DChatSDK } from "../../constants/sdk";
3
+ import useAuthStore from "../../store/auth";
4
+ import { updateOneMessage } from "../../hooks/message/useMessage";
5
+ import { fetchPinnedMessages } from "./usePinnedMessages";
6
+ export const usePinMessage = () => {
7
+ const userID = useAuthStore((state) => state.userID);
8
+ const { runAsync: pinMessage, loading: pinLoading } = useRequest(async (conversationID, clientMsgID) => {
9
+ await DChatSDK.pinMsg({
10
+ conversationID,
11
+ clientMsgID,
12
+ });
13
+ updateOneMessage({
14
+ clientMsgID,
15
+ isPinned: true,
16
+ pinnedByUserID: userID,
17
+ pinnedTime: Date.now(),
18
+ });
19
+ await fetchPinnedMessages(conversationID);
20
+ }, {
21
+ manual: true,
22
+ });
23
+ const { runAsync: unpinMessage, loading: unpinLoading } = useRequest(async (conversationID, clientMsgID) => {
24
+ await DChatSDK.unpinMsg({
25
+ conversationID,
26
+ clientMsgID,
27
+ });
28
+ updateOneMessage({
29
+ clientMsgID,
30
+ isPinned: false,
31
+ });
32
+ await fetchPinnedMessages(conversationID);
33
+ }, {
34
+ manual: true,
35
+ });
36
+ return {
37
+ pinMessage,
38
+ unpinMessage,
39
+ pinLoading,
40
+ unpinLoading,
41
+ };
42
+ };
@@ -0,0 +1,6 @@
1
+ export declare const fetchPinnedMessages: (conversationID: string) => Promise<void>;
2
+ export declare const usePinnedMessages: (conversationID: string) => {
3
+ pinnedMessageList: import("@openim/wasm-client-sdk").MessageItem[];
4
+ pinnedTotalCount: number;
5
+ };
6
+ //# sourceMappingURL=usePinnedMessages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePinnedMessages.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/usePinnedMessages.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,GAAU,gBAAgB,MAAM,kBAmB/D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,gBAAgB,MAAM;;;CAiBvD,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { useEffect } from "react";
2
+ import { DChatSDK } from "../../constants/sdk";
3
+ import { PAGE_SIZE } from "../../constants";
4
+ import useConversationStore from "../../store/conversation";
5
+ export const fetchPinnedMessages = async (conversationID) => {
6
+ var _a;
7
+ const { setPinnedMessageData } = useConversationStore.getState();
8
+ try {
9
+ const { data } = await DChatSDK.getPinnedMessageList({
10
+ conversationID,
11
+ offset: 0,
12
+ pageSize: PAGE_SIZE.small,
13
+ });
14
+ const sortedMessageList = [...(data.messageList || [])].sort((first, second) => (second.pinnedTime || 0) - (first.pinnedTime || 0));
15
+ setPinnedMessageData(sortedMessageList, data.totalCount || 0, (_a = data.isEnd) !== null && _a !== void 0 ? _a : true);
16
+ }
17
+ catch (error) {
18
+ console.error("fetchPinnedMessages failed", error);
19
+ }
20
+ };
21
+ export const usePinnedMessages = (conversationID) => {
22
+ const pinnedMessageList = useConversationStore((state) => state.pinnedMessageList);
23
+ const pinnedTotalCount = useConversationStore((state) => state.pinnedTotalCount);
24
+ useEffect(() => {
25
+ if (!conversationID)
26
+ return;
27
+ void fetchPinnedMessages(conversationID);
28
+ }, [conversationID]);
29
+ return {
30
+ pinnedMessageList,
31
+ pinnedTotalCount,
32
+ };
33
+ };
@@ -52,6 +52,19 @@
52
52
  "message_send_failed_no_retry": "Gửi tin nhắn thất bại",
53
53
  "context_menu_reply": "Trả lời",
54
54
  "context_menu_pin": "Ghim",
55
+ "context_menu_unpin": "Bỏ ghim",
56
+ "pin_message_success": "Đã ghim tin nhắn",
57
+ "pin_message_failed": "Ghim tin nhắn thất bại",
58
+ "unpin_message_success": "Đã bỏ ghim tin nhắn",
59
+ "unpin_message_failed": "Bỏ ghim tin nhắn thất bại",
60
+ "pinned_from_text": "Tin nhắn từ {{name}}",
61
+ "pinned_from_link": "Từ {{name}}",
62
+ "pinned_from_image": "Hình ảnh từ {{name}}",
63
+ "pinned_from_video": "Video từ {{name}}",
64
+ "pinned_from_file": "Tài liệu từ {{name}}",
65
+ "pin_limit_modal_title": "Không thể ghim thêm tin nhắn",
66
+ "pin_limit_modal_description": "Chỉ được ghim tối đa {{max}} tin nhắn. Vui lòng bỏ ghim một tin nhắn hiện có trước khi ghim tin nhắn mới.",
67
+ "pin_limit_modal_confirm": "Đã hiểu",
55
68
  "context_menu_copy_message": "Sao chép tin nhắn",
56
69
  "copy_message_success": "Sao chép tin nhắn thành công",
57
70
  "context_menu_revoke": "Thu hồi",
@@ -28,7 +28,8 @@
28
28
  },
29
29
  "bot": {
30
30
  "start": "Bắt đầu",
31
- "restart": "Bắt đầu lại"
31
+ "restart": "Bắt đầu lại",
32
+ "inactive_notice": "Người dùng này không còn khả dụng"
32
33
  }
33
34
  },
34
35
  "link_preview": {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation-detail/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AASrF,MAAM,WAAW,4BAA6B,SAAQ,4BAA4B;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,uBAAuB,GAAI,gDAK9B,4BAA4B,mDA8E9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation-detail/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAUrF,MAAM,WAAW,4BAA6B,SAAQ,4BAA4B;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,uBAAuB,GAAI,gDAK9B,4BAA4B,mDAoF9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -15,8 +15,8 @@ import { usePathname, useRouter, useSearchParams } from "next/navigation";
15
15
  import { useTranslation } from "react-i18next";
16
16
  import clsx from "clsx";
17
17
  import useConversationStore from "../../store/conversation";
18
- import { ConversationMessageList, ConversationDetailHeader, ConversationDetailInput, } from "../../components/conversation-detail";
19
- import { BotButtonMessage, BotStartButton, BotSuggest, } from "../../components/conversation-detail/bot";
18
+ import { ConversationMessageList, ConversationDetailHeader, ConversationDetailInput, PinnedMessageBar, } from "../../components/conversation-detail";
19
+ import { BotButtonMessage, BotInactiveNotice, BotStartButton, BotSuggest, } from "../../components/conversation-detail/bot";
20
20
  import { useBotFlow } from "../../hooks/conversation/useBotFlow";
21
21
  import { isBotPeer } from "../../utils/conversation";
22
22
  const DChatConversationDetail = (_a) => {
@@ -42,12 +42,14 @@ const DChatConversationDetail = (_a) => {
42
42
  if (!conversation) {
43
43
  return null;
44
44
  }
45
+ const isBotInactive = isBotThread && botFlow.isBotInactive;
45
46
  const isBotNotStarted = isBotThread && botFlow.status === "not_started";
46
- const footer = isBotNotStarted ? (_jsx("div", { className: "bg-white p-6", children: _jsx(BotStartButton, { label: t("thread_detail.bot.start"), onClick: botFlow.start, disabled: botFlow.isProcessing }) })) : (_jsxs(_Fragment, { children: [isBotThread && (_jsx(BotSuggest, { disabled: botFlow.isProcessing, onRestart: botFlow.restart })), _jsx(ConversationDetailInput, Object.assign({}, inputProps))] }));
47
+ const footer = isBotInactive ? (_jsx(BotInactiveNotice, {})) : isBotNotStarted ? (_jsx("div", { className: "bg-white p-6", children: _jsx(BotStartButton, { label: t("thread_detail.bot.start"), onClick: botFlow.start, disabled: botFlow.isProcessing }) })) : (_jsxs(_Fragment, { children: [isBotThread && (_jsx(BotSuggest, { disabled: botFlow.isProcessing, onRestart: botFlow.restart })), _jsx(ConversationDetailInput, Object.assign({}, inputProps))] }));
47
48
  const botButtonsSlot = isBotThread &&
49
+ !isBotInactive &&
48
50
  !botFlow.flowIsEnd &&
49
51
  botFlow.shouldShowButtons &&
50
52
  botFlow.currentButtonsBlock ? (_jsx(BotButtonMessage, { buttons: botFlow.currentButtonsBlock.data.buttons, disabled: botFlow.isProcessing, onSelect: botFlow.selectButton, onRestart: botFlow.restart })) : null;
51
- return (_jsxs("div", { "data-testid": "conversation-detail-root", className: clsx("relative flex h-full w-full flex-col overflow-hidden bg-white", className), children: [_jsx(ConversationDetailHeader, { conversation: conversation, onBack: handleBack }), _jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: children !== null && children !== void 0 ? children : _jsx(ConversationMessageList, { bottomSlot: botButtonsSlot }) }), footer] }));
53
+ return (_jsxs("div", { "data-testid": "conversation-detail-root", className: clsx("relative flex h-full w-full flex-col overflow-hidden bg-white", className), children: [_jsx(ConversationDetailHeader, { conversation: conversation, onBack: handleBack }), _jsx(PinnedMessageBar, {}), _jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: children !== null && children !== void 0 ? children : _jsx(ConversationMessageList, { bottomSlot: botButtonsSlot }) }), footer] }));
52
54
  };
53
55
  export default DChatConversationDetail;
@@ -24,10 +24,11 @@ export declare const QUERY_KEYS: {
24
24
  JOIN_SESSION: string;
25
25
  PULL_SESSION_MESSAGES: string;
26
26
  GET_CONVERSATIONS_IM_DETAIL: string;
27
- CREATE_BIZ_CONVERSATION: string;
28
- GET_BIZ_CONVERSATION_DETAIL: string;
27
+ CREATE_CONVERSATION: string;
28
+ GET_CONVERSATION_DETAIL: string;
29
29
  RUN_BOT_FLOW: string;
30
30
  RESET_BOT_FLOW: string;
31
+ GET_BOT_DETAIL: string;
31
32
  LEAVE_CONVERSATION: string;
32
33
  IS_JOINED_GROUP: string;
33
34
  CREATE_SESSION: string;
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/services/query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCtB,CAAC"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/services/query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCtB,CAAC"}
@@ -24,10 +24,11 @@ export const QUERY_KEYS = {
24
24
  JOIN_SESSION: "JOIN_SESSION",
25
25
  PULL_SESSION_MESSAGES: "PULL_SESSION_MESSAGES",
26
26
  GET_CONVERSATIONS_IM_DETAIL: "GET_CONVERSATIONS_IM_DETAIL",
27
- CREATE_BIZ_CONVERSATION: "CREATE_BIZ_CONVERSATION",
28
- GET_BIZ_CONVERSATION_DETAIL: "GET_BIZ_CONVERSATION_DETAIL",
27
+ CREATE_CONVERSATION: "CREATE_CONVERSATION",
28
+ GET_CONVERSATION_DETAIL: "GET_CONVERSATION_DETAIL",
29
29
  RUN_BOT_FLOW: "RUN_BOT_FLOW",
30
30
  RESET_BOT_FLOW: "RESET_BOT_FLOW",
31
+ GET_BOT_DETAIL: "GET_BOT_DETAIL",
31
32
  LEAVE_CONVERSATION: "LEAVE_CONVERSATION",
32
33
  IS_JOINED_GROUP: "IS_JOINED_GROUP",
33
34
  CREATE_SESSION: "CREATE_SESSION",
@@ -27,10 +27,11 @@ export declare const ENDPOINTS: {
27
27
  leaveConversation: (conversationId: string) => string;
28
28
  pullSessionMessages: string;
29
29
  getConversationsImDetail: string;
30
- createBizConversation: string;
31
- getBizConversationDetail: (conversationId: string) => string;
30
+ createConversation: string;
31
+ getConversationDetail: (conversationId: string) => string;
32
32
  runBotFlow: (conversationId: string) => string;
33
33
  resetBotFlow: (conversationId: string) => string;
34
+ getBotDetail: (botId: string) => string;
34
35
  getUrlMetadata: string;
35
36
  };
36
37
  identityService: {
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/services/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;mCAMS,MAAM;;0CAGC,MAAM,UAAU,MAAM;6BAEnC,MAAM;;oDAEiB,MAAM;uCAEnB,MAAM;kCAEX,MAAM;;oCAGJ,MAAM;mCAEP,MAAM;uCAEF,MAAM;;;;;;;;iCASZ,MAAM;4CAEK,MAAM;;;;mDAKC,MAAM;qCAEpB,MAAM;uCAEJ,MAAM;;;;;;;;;CAUxC,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/services/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;mCAMS,MAAM;;0CAGC,MAAM,UAAU,MAAM;6BAEnC,MAAM;;oDAEiB,MAAM;uCAEnB,MAAM;kCAEX,MAAM;;oCAGJ,MAAM;mCAEP,MAAM;uCAEF,MAAM;;;;;;;;iCASZ,MAAM;4CAEK,MAAM;;;;gDAKF,MAAM;qCAEjB,MAAM;uCAEJ,MAAM;8BAEf,MAAM;;;;;;;;;CAS/B,CAAC"}
@@ -27,10 +27,11 @@ export const ENDPOINTS = {
27
27
  leaveConversation: (conversationId) => `chat-service/v1/crm/conversations/${conversationId}/leave`,
28
28
  pullSessionMessages: "/chat-service/v1/messages/session/pull",
29
29
  getConversationsImDetail: "/chat-service/v1/crm/conversations/im-detail",
30
- createBizConversation: "/chat-service/v1/app/conversations",
31
- getBizConversationDetail: (conversationId) => `/chat-service/v1/app/conversations/${conversationId}`,
30
+ createConversation: "/chat-service/v1/app/conversations",
31
+ getConversationDetail: (conversationId) => `/chat-service/v1/app/conversations/${conversationId}`,
32
32
  runBotFlow: (conversationId) => `/chat-service/v1/app/conversations/${conversationId}/bot-flows/run`,
33
33
  resetBotFlow: (conversationId) => `/chat-service/v1/app/conversations/${conversationId}/bot-flows/reset`,
34
+ getBotDetail: (botId) => `/chat-service/v1/app/bots/${botId}`,
34
35
  getUrlMetadata: "/chat-service/v1/utils/url-metadata",
35
36
  },
36
37
  identityService: {
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/store/conversation.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAM3C,QAAA,MAAM,oBAAoB,gFAsMvB,CAAC;AAEJ,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/store/conversation.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAM3C,QAAA,MAAM,oBAAoB,gFA0NvB,CAAC;AAEJ,eAAe,oBAAoB,CAAC"}
@@ -17,7 +17,13 @@ const useConversationStore = create((set, get) => ({
17
17
  });
18
18
  },
19
19
  selectedConversationId: "",
20
- setSelectedConversationId: (threadId) => set({ selectedConversationId: threadId, quotedMessage: null }),
20
+ setSelectedConversationId: (threadId) => set({
21
+ selectedConversationId: threadId,
22
+ quotedMessage: null,
23
+ pinnedMessageList: [],
24
+ pinnedTotalCount: 0,
25
+ pinnedListIsEnd: false,
26
+ }),
21
27
  selectedSourceId: "",
22
28
  // conversation
23
29
  conversationList: [],
@@ -155,6 +161,9 @@ const useConversationStore = create((set, get) => ({
155
161
  currentGroupInfo: undefined,
156
162
  currentMemberInGroup: undefined,
157
163
  quotedMessage: null,
164
+ pinnedMessageList: [],
165
+ pinnedTotalCount: 0,
166
+ pinnedListIsEnd: false,
158
167
  });
159
168
  },
160
169
  resetConversationStore: () => {
@@ -171,5 +180,16 @@ const useConversationStore = create((set, get) => ({
171
180
  setQuotedMessage: (message) => {
172
181
  set({ quotedMessage: message });
173
182
  },
183
+ //pinned message
184
+ pinnedMessageList: [],
185
+ pinnedTotalCount: 0,
186
+ pinnedListIsEnd: false,
187
+ setPinnedMessageData: (messageList, totalCount, isEnd) => {
188
+ set({
189
+ pinnedMessageList: messageList,
190
+ pinnedTotalCount: totalCount,
191
+ pinnedListIsEnd: isEnd,
192
+ });
193
+ },
174
194
  }));
175
195
  export default useConversationStore;
@@ -0,0 +1,4 @@
1
+ import { PinnedMessageStore } from "./type";
2
+ declare const usePinnedMessageStore: import("zustand").UseBoundStore<import("zustand").StoreApi<PinnedMessageStore>>;
3
+ export default usePinnedMessageStore;
4
+ //# sourceMappingURL=pinnedMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pinnedMessage.d.ts","sourceRoot":"","sources":["../../src/store/pinnedMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAE5C,QAAA,MAAM,qBAAqB,iFAgBxB,CAAC;AAEJ,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { create } from "zustand";
2
+ const usePinnedMessageStore = create((set) => ({
3
+ pinnedMessageList: [],
4
+ pinnedTotalCount: 0,
5
+ pinnedListIsEnd: false,
6
+ setPinnedMessageData: (messageList, totalCount, isEnd) => set({
7
+ pinnedMessageList: messageList,
8
+ pinnedTotalCount: totalCount,
9
+ pinnedListIsEnd: isEnd,
10
+ }),
11
+ resetPinnedMessageStore: () => set({
12
+ pinnedMessageList: [],
13
+ pinnedTotalCount: 0,
14
+ pinnedListIsEnd: false,
15
+ }),
16
+ }));
17
+ export default usePinnedMessageStore;
@@ -64,6 +64,10 @@ export interface ConversationStore {
64
64
  setSearchClientMsgID: (clientMsgID: string) => void;
65
65
  quotedMessage: MessageItem | null;
66
66
  setQuotedMessage: (message: MessageItem | null) => void;
67
+ pinnedMessageList: MessageItem[];
68
+ pinnedTotalCount: number;
69
+ pinnedListIsEnd: boolean;
70
+ setPinnedMessageData: (messageList: MessageItem[], totalCount: number, isEnd: boolean) => void;
67
71
  }
68
72
  export interface IPersonalInfo {
69
73
  fullName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/store/type.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,UAAU,EACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,WAAW,yBAAyB;IACxC,eAAe,EAAE,oBAAoB,CAAC;IACtC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;C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