@droppii-org/chat-sdk 0.0.36 → 0.0.37

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 (54) hide show
  1. package/dist/components/conversation/ConversationBySessionItem.js +2 -1
  2. package/dist/components/conversation/DeskConversationList.d.ts.map +1 -1
  3. package/dist/components/conversation/DeskConversationList.js +15 -1
  4. package/dist/components/message/MessageHeader.d.ts +9 -0
  5. package/dist/components/message/MessageHeader.d.ts.map +1 -1
  6. package/dist/components/message/MessageHeader.js +122 -2
  7. package/dist/components/message/SelectSession.d.ts +9 -0
  8. package/dist/components/message/SelectSession.d.ts.map +1 -0
  9. package/dist/components/message/SelectSession.js +21 -0
  10. package/dist/components/message/footer/ToolbarPlugin.js +7 -7
  11. package/dist/components/message/item/TextMessage.js +2 -2
  12. package/dist/components/message/item/index.d.ts.map +1 -1
  13. package/dist/components/message/item/index.js +3 -5
  14. package/dist/components/session/DeskAssignedSession.d.ts.map +1 -1
  15. package/dist/components/session/DeskAssignedSession.js +38 -26
  16. package/dist/constants/index.d.ts +1 -12
  17. package/dist/constants/index.d.ts.map +1 -1
  18. package/dist/constants/index.js +1 -12
  19. package/dist/context/ChatContext.d.ts.map +1 -1
  20. package/dist/context/ChatContext.js +2 -1
  21. package/dist/hooks/global/useGlobalEvent.d.ts.map +1 -1
  22. package/dist/hooks/global/useGlobalEvent.js +15 -1
  23. package/dist/hooks/message/useMessage.d.ts.map +1 -1
  24. package/dist/hooks/message/useMessage.js +3 -2
  25. package/dist/hooks/message/useSendMessage.d.ts.map +1 -1
  26. package/dist/hooks/message/useSendMessage.js +14 -1
  27. package/dist/hooks/session/useGetSession.d.ts.map +1 -1
  28. package/dist/hooks/session/useGetSession.js +1 -0
  29. package/dist/hooks/session/useUpdateSession.d.ts +10 -0
  30. package/dist/hooks/session/useUpdateSession.d.ts.map +1 -0
  31. package/dist/hooks/session/useUpdateSession.js +19 -0
  32. package/dist/hooks/user/useAuth.js +13 -11
  33. package/dist/layout/index.d.ts.map +1 -1
  34. package/dist/layout/index.js +0 -2
  35. package/dist/locales/vi/common.json +10 -2
  36. package/dist/services/query.d.ts +1 -0
  37. package/dist/services/query.d.ts.map +1 -1
  38. package/dist/services/query.js +1 -0
  39. package/dist/services/routes.d.ts +1 -0
  40. package/dist/services/routes.d.ts.map +1 -1
  41. package/dist/services/routes.js +1 -0
  42. package/dist/store/session.js +2 -2
  43. package/dist/styles/global.css +1 -1
  44. package/dist/types/chat.d.ts +20 -1
  45. package/dist/types/chat.d.ts.map +1 -1
  46. package/dist/types/chat.js +22 -0
  47. package/dist/types/dto.d.ts +20 -3
  48. package/dist/types/dto.d.ts.map +1 -1
  49. package/dist/utils/common.d.ts +2 -1
  50. package/dist/utils/common.d.ts.map +1 -1
  51. package/dist/utils/common.js +7 -2
  52. package/dist/utils/events.d.ts +2 -0
  53. package/dist/utils/events.d.ts.map +1 -1
  54. package/package.json +1 -1
@@ -8,6 +8,7 @@ import { useChatContext } from "../../context/ChatContext";
8
8
  import { useConversationDisplayData } from "../../hooks/conversation/useConversation";
9
9
  import { formatTimestamp, parseLatestMessage } from "../../utils/common";
10
10
  const ConversationBySessionItem = ({ sessionItem, }) => {
11
+ var _a;
11
12
  const { t } = useTranslation();
12
13
  const { user } = useChatContext();
13
14
  const isSelected = useConversationStore((state) => { var _a; return state.selectedConversationId === ((_a = sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.conversation) === null || _a === void 0 ? void 0 : _a.conversationID); });
@@ -27,7 +28,7 @@ const ConversationBySessionItem = ({ sessionItem, }) => {
27
28
  const { avatar, displayName = "" } = useConversationDisplayData(conversation || null);
28
29
  if (!conversation)
29
30
  return null;
30
- return (_jsxs("div", { onClick: () => handleConversationClick(conversation), className: `relative p-3 border-b border-gray-100 hover:bg-gray-100 cursor-pointer transition-colors ${isSelected ? "bg-blue-50" : "bg-white"}`, children: [isSelected && (_jsx("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-blue-500" })), _jsxs("div", { className: "flex items-start gap-3", children: [_jsx("div", { className: "relative flex-shrink-0", children: _jsx(Badge, { dot: true, status: "success", offset: [-2, 36], children: _jsx(Avatar, { size: 48, src: avatar, alt: displayName, children: displayName.charAt(0).toUpperCase() }) }) }), _jsx("div", { className: "flex-1 min-w-0", children: _jsxs("div", { className: "flex items-start justify-between", children: [_jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("h3", { className: "font-semibold text-gray-900 text-sm truncate", children: displayName }), _jsx("p", { className: "text-xs text-gray-500 truncate mt-0.5", children: parseLatestMessage(conversation.latestMsg, user === null || user === void 0 ? void 0 : user.userID) })] }), _jsxs("div", { className: "flex flex-col items-end gap-1 ml-2", children: [_jsx("span", { className: "text-xs text-gray-400", children: formatTimestamp(conversation.latestMsgSendTime, {
31
+ return (_jsxs("div", { onClick: () => handleConversationClick(conversation), className: `relative p-3 border-b border-gray-100 hover:bg-gray-100 cursor-pointer transition-colors ${isSelected ? "bg-blue-50" : "bg-white"}`, children: [isSelected && (_jsx("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-blue-500" })), _jsxs("div", { className: "flex items-start gap-3", children: [_jsx("div", { className: "relative flex-shrink-0", children: _jsx(Badge, { dot: true, status: "success", offset: [-2, 36], children: _jsx(Avatar, { size: 48, src: avatar, children: ((_a = displayName === null || displayName === void 0 ? void 0 : displayName.charAt) === null || _a === void 0 ? void 0 : _a.call(displayName, 0)) || "A" }) }) }), _jsx("div", { className: "flex-1 min-w-0", children: _jsxs("div", { className: "flex items-start justify-between", children: [_jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("h3", { className: "font-semibold text-gray-900 text-sm truncate", children: displayName }), _jsx("p", { className: "text-xs text-gray-500 truncate mt-0.5", children: parseLatestMessage(conversation.latestMsg, user === null || user === void 0 ? void 0 : user.userID, t) })] }), _jsxs("div", { className: "flex flex-col items-end gap-1 ml-2", children: [_jsx("span", { className: "text-xs text-gray-400", children: formatTimestamp(conversation.latestMsgSendTime, {
31
32
  hasTime: false,
32
33
  }) }), _jsx("div", { className: "flex items-center gap-1", children: conversation.unreadCount > 0 && (_jsx(Badge, { count: conversation.unreadCount })) })] })] }) })] })] }, conversation.conversationID));
33
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DeskConversationList.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/DeskConversationList.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,oBAAoB,+CAqKzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"DeskConversationList.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/DeskConversationList.tsx"],"names":[],"mappings":"AAkBA,QAAA,MAAM,oBAAoB,+CAsLzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -13,6 +13,7 @@ import InfiniteScroll from "react-infinite-scroll-component";
13
13
  import ConversationBySessionItem from "./ConversationBySessionItem";
14
14
  import { useGetSession } from "../../hooks/session/useGetSession";
15
15
  import { DChatSDK } from "../../constants/sdk";
16
+ import emitter from "../../utils/events";
16
17
  const DeskConversationList = () => {
17
18
  var _a;
18
19
  const searchInputRef = useRef(null);
@@ -25,7 +26,7 @@ const DeskConversationList = () => {
25
26
  const conversationList = useConversationStore((state) => state.conversationList);
26
27
  const updateConversationList = useConversationStore((state) => state.updateConversationList);
27
28
  const filterSummary = useSessionStore((state) => state.filterSummary);
28
- const { dataFlatten: sessions, hasNextPage, fetchNextPage, } = useGetSession(filterSummary);
29
+ const { dataFlatten: sessions, hasNextPage, fetchNextPage, refetch, } = useGetSession(filterSummary);
29
30
  const debouncedSearch = useDebounce(search, { wait: 500 });
30
31
  const onCloseSearch = () => {
31
32
  setSearch("");
@@ -61,6 +62,19 @@ const DeskConversationList = () => {
61
62
  }
62
63
  }
63
64
  }, [searchParams, conversationList]);
65
+ useEffect(() => {
66
+ emitter.on("UPDATE_SESSION", (sessionUpdated) => {
67
+ if (sessionUpdated.status !== filterSummary.status ||
68
+ sessionUpdated.tag !== filterSummary.tag) {
69
+ refetch();
70
+ }
71
+ });
72
+ return () => {
73
+ emitter.off("UPDATE_SESSION", () => {
74
+ refetch();
75
+ });
76
+ };
77
+ }, [filterSummary]);
64
78
  return (_jsxs("div", { className: `flex flex-col h-full bg-white border-r border-gray-200 w-[320px]`, children: [_jsx("div", { className: "p-3 border-b border-gray-100", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Input, { ref: searchInputRef, placeholder: t("search"), prefix: _jsx(Icon, { icon: "search-o", size: 18, className: "text-gray-400" }), onChange: (e) => {
65
79
  if (!showSearch && e.target.value) {
66
80
  setShowSearchTrue();
@@ -1,6 +1,15 @@
1
+ import { SessionStatus, SessionTag } from "../../types/chat";
1
2
  interface MessageHeaderProps {
2
3
  onClose?: () => void;
3
4
  }
5
+ type SelectSessionValueType = SessionStatus | SessionTag;
6
+ export interface SelectSessionOption {
7
+ label: string;
8
+ value: SelectSessionValueType;
9
+ tintColorClassname: string;
10
+ tintColorClassnameBg: string;
11
+ bgTintColorClassname: string;
12
+ }
4
13
  declare const MessageHeader: ({ onClose }: MessageHeaderProps) => import("react/jsx-runtime").JSX.Element;
5
14
  export default MessageHeader;
6
15
  //# sourceMappingURL=MessageHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageHeader.tsx"],"names":[],"mappings":"AASA,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,GAAI,aAAa,kBAAkB,4CA4CrD,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"MessageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQ7D,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,KAAK,sBAAsB,GAAG,aAAa,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,sBAAsB,CAAC;IAC9B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,QAAA,MAAM,aAAa,GAAI,aAAa,kBAAkB,4CA2LrD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,14 +1,134 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Avatar, Button } from "antd";
3
+ import { Avatar, Button, message } from "antd";
4
4
  import { Icon } from "../icon";
5
5
  import { useConversationDisplayData } from "../../hooks/conversation/useConversation";
6
6
  import useConversationStore from "../../store/conversation";
7
7
  import MediaCollection from "../mediaCollection";
8
+ import { useGetSession } from "../../hooks/session/useGetSession";
9
+ import { useEffect, useMemo, useState } from "react";
10
+ import { useTranslation } from "react-i18next";
11
+ import { SessionStatus, SessionTag } from "../../types/chat";
12
+ import SelectSession from "./SelectSession";
13
+ import { useUpdateSession } from "../../hooks/session/useUpdateSession";
14
+ import emitter from "../../utils/events";
15
+ import { useChatContext } from "../../context/ChatContext";
16
+ import { adminUserId } from "../../constants";
8
17
  const MessageHeader = ({ onClose }) => {
9
18
  var _a;
19
+ const { t } = useTranslation();
20
+ const { user } = useChatContext();
10
21
  const conversationData = useConversationStore((state) => state.conversationData);
22
+ const { dataFlatten: sessions, refetch: refetchSession } = useGetSession({
23
+ conversationIds: (conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationID)
24
+ ? [conversationData.conversationID]
25
+ : [],
26
+ });
27
+ const { mutate: updateSession } = useUpdateSession();
11
28
  const { avatar, displayName } = useConversationDisplayData(conversationData);
12
- return (_jsxs("div", { className: "px-4 py-3 flex items-center border-b gap-3 bg-white", children: [_jsx(Avatar, { src: avatar, size: "large", children: ((_a = displayName === null || displayName === void 0 ? void 0 : displayName.charAt) === null || _a === void 0 ? void 0 : _a.call(displayName, 0)) || "A" }), _jsxs("div", { className: "flex flex-col flex-1", children: [_jsx("p", { children: displayName || "" }), _jsx("p", { className: "text-xs text-gray-500", children: "2 thành viên" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", children: _jsx(Icon, { icon: "search-o", size: 22 }) }), _jsx(MediaCollection, {}), _jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", children: _jsx(Icon, { icon: "align-justify-o", size: 22 }) }), !!onClose && (_jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", onClick: onClose, children: _jsx(Icon, { icon: "close-b", size: 22 }) }))] })] }));
29
+ const [currentSessionStatus, setCurrentSessionStatus] = useState(SessionStatus.UNASSIGNED);
30
+ const [currentSessionTag, setCurrentSessionTag] = useState(SessionTag.NONE);
31
+ const currentSession = useMemo(() => {
32
+ return sessions === null || sessions === void 0 ? void 0 : sessions.find((session) => session.conversationId === (conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationID));
33
+ }, [sessions, conversationData]);
34
+ const statusOptions = useMemo(() => {
35
+ return [
36
+ {
37
+ label: t("unassigned"),
38
+ value: SessionStatus.UNASSIGNED,
39
+ tintColorClassname: "text-amber-500",
40
+ tintColorClassnameBg: "bg-amber-500",
41
+ bgTintColorClassname: "bg-amber-100",
42
+ },
43
+ {
44
+ label: t("waiting_process"),
45
+ value: SessionStatus.WAITING_PROCESS,
46
+ tintColorClassname: "text-orange-500",
47
+ tintColorClassnameBg: "bg-orange-500",
48
+ bgTintColorClassname: "bg-orange-100",
49
+ },
50
+ {
51
+ label: t("in_process"),
52
+ value: SessionStatus.IN_PROCESS,
53
+ tintColorClassname: "text-blue-500",
54
+ tintColorClassnameBg: "bg-blue-500",
55
+ bgTintColorClassname: "bg-blue-100",
56
+ },
57
+ {
58
+ label: t("completed"),
59
+ value: SessionStatus.COMPLETED,
60
+ tintColorClassname: "text-green-500",
61
+ tintColorClassnameBg: "bg-green-500",
62
+ bgTintColorClassname: "bg-green-100",
63
+ },
64
+ ];
65
+ }, [t]);
66
+ const tagOptions = useMemo(() => {
67
+ return [
68
+ {
69
+ label: t("awaiting_reply"),
70
+ value: SessionTag.AWAITING_REPLY,
71
+ tintColorClassname: "text-purple-500",
72
+ tintColorClassnameBg: "bg-purple-500",
73
+ bgTintColorClassname: "bg-purple-100",
74
+ },
75
+ {
76
+ label: t("slow_processing"),
77
+ value: SessionTag.SLOW_PROCESSING,
78
+ tintColorClassname: "text-red-500",
79
+ tintColorClassnameBg: "bg-red-500",
80
+ bgTintColorClassname: "bg-red-100",
81
+ },
82
+ {
83
+ label: t("temporarily_paused"),
84
+ value: SessionTag.TEMPORARILY_PAUSED,
85
+ tintColorClassname: "text-gray-500",
86
+ tintColorClassnameBg: "bg-gray-500",
87
+ bgTintColorClassname: "bg-gray-100",
88
+ },
89
+ ];
90
+ }, [t]);
91
+ const handleUpdateSession = (value, type) => {
92
+ if (currentSession) {
93
+ updateSession({
94
+ sessionId: currentSession.id,
95
+ [type]: value,
96
+ }, {
97
+ onError(error) {
98
+ var _a, _b;
99
+ message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) ||
100
+ t(`update_session_${type}_failed`));
101
+ },
102
+ onSuccess() {
103
+ if (type === "status") {
104
+ setCurrentSessionStatus(value);
105
+ }
106
+ else {
107
+ setCurrentSessionTag(value);
108
+ }
109
+ },
110
+ });
111
+ }
112
+ };
113
+ useEffect(() => {
114
+ if (currentSession) {
115
+ setCurrentSessionTag(currentSession.tag);
116
+ setCurrentSessionStatus(currentSession.status);
117
+ }
118
+ }, [currentSession]);
119
+ useEffect(() => {
120
+ emitter.on("UPDATE_SESSION", (sessionUpdated) => {
121
+ if (sessionUpdated.conversationId === (conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationID)) {
122
+ refetchSession();
123
+ }
124
+ });
125
+ return () => {
126
+ emitter.off("UPDATE_SESSION", () => {
127
+ refetchSession();
128
+ });
129
+ };
130
+ }, [conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationID]);
131
+ return (_jsxs("div", { className: "px-4 py-3 flex items-center border-b gap-3 bg-white no-transform", children: [_jsx(Avatar, { src: avatar, size: "large", children: ((_a = displayName === null || displayName === void 0 ? void 0 : displayName.charAt) === null || _a === void 0 ? void 0 : _a.call(displayName, 0)) || "A" }), _jsxs("div", { className: "flex flex-col", children: [_jsx("p", { className: "text-base truncate", children: displayName || "" }), _jsx("p", { className: "text-xs text-gray-500", children: "2 thành viên" })] }), _jsxs("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [currentSessionTag !== SessionTag.NONE &&
132
+ (user === null || user === void 0 ? void 0 : user.userID) === adminUserId && (_jsx(SelectSession, { options: tagOptions, value: currentSessionTag, onChange: (value) => handleUpdateSession(value, "tag") })), (user === null || user === void 0 ? void 0 : user.userID) === adminUserId && (_jsx(SelectSession, { options: statusOptions, value: currentSessionStatus, onChange: (value) => handleUpdateSession(value, "status") })), _jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", children: _jsx(Icon, { icon: "search-o", size: 22 }) }), _jsx(MediaCollection, {}), _jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", children: _jsx(Icon, { icon: "align-justify-o", size: 22 }) }), !!onClose && (_jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", onClick: onClose, children: _jsx(Icon, { icon: "close-b", size: 22 }) }))] })] }));
13
133
  };
14
134
  export default MessageHeader;
@@ -0,0 +1,9 @@
1
+ import { SelectSessionOption } from "./MessageHeader";
2
+ interface SelectSessionProps {
3
+ options: SelectSessionOption[];
4
+ value: SelectSessionOption["value"];
5
+ onChange: (value: SelectSessionOption["value"]) => void;
6
+ }
7
+ declare const SelectSession: ({ options, value, onChange }: SelectSessionProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default SelectSession;
9
+ //# sourceMappingURL=SelectSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectSession.d.ts","sourceRoot":"","sources":["../../../src/components/message/SelectSession.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAMtD,UAAU,kBAAkB;IAC1B,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACzD;AAED,QAAA,MAAM,aAAa,GAAI,8BAA8B,kBAAkB,4CAqEtE,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Modal } from "antd";
4
+ import { useBoolean } from "ahooks";
5
+ import { Icon } from "../icon";
6
+ import clsx from "clsx";
7
+ import { useTranslation } from "react-i18next";
8
+ const SelectSession = ({ options, value, onChange }) => {
9
+ const { t } = useTranslation();
10
+ const [open, { toggle }] = useBoolean(false);
11
+ const selectedOption = options.find((option) => option.value === value);
12
+ const handleSelect = (value) => {
13
+ onChange(value);
14
+ toggle();
15
+ };
16
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: clsx("flex items-center gap-2 px-3 py-1 rounded-sm min-w-[64px] cursor-pointer", selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.bgTintColorClassname, selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.tintColorClassname), onClick: toggle, children: [_jsx("span", { className: "text-xs font-medium truncate", children: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label) || "" }), _jsx(Icon, { icon: "angle-down-o", size: 14 })] }), _jsx(Modal, { title: t("update_session_status_title"), closable: { "aria-label": "Custom Close Button" }, open: open, onOk: toggle, onCancel: toggle, width: 300, styles: { content: { padding: 12 } }, footer: null, children: _jsx("div", { className: "flex flex-col gap-1", children: options.map((option) => {
17
+ const isSelected = option.value === value;
18
+ return (_jsxs("div", { className: "flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-100 rounded-sm", onClick: () => onChange(option.value), onClickCapture: () => handleSelect(option.value), children: [_jsx("div", { className: clsx("w-2 h-2 rounded-full", option.tintColorClassnameBg) }), _jsx("span", { className: clsx("text-xs truncate flex-1", isSelected && "font-bold"), children: option.label }), isSelected && (_jsx(Icon, { icon: "check-b", size: 18, className: "text-blue-500" }))] }, option.value));
19
+ }) }) })] }));
20
+ };
21
+ export default SelectSession;
@@ -6,7 +6,7 @@ import { $isListNode, INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND
6
6
  import { $createQuoteNode, $isQuoteNode } from "@lexical/rich-text";
7
7
  import { TOGGLE_LINK_COMMAND } from "@lexical/link";
8
8
  import { useCallback, useEffect, useMemo, useState } from "react";
9
- import { BoldOutlined, ItalicOutlined, StrikethroughOutlined, OrderedListOutlined, UnorderedListOutlined, LinkOutlined, } from "@ant-design/icons";
9
+ import { BoldOutlined, ItalicOutlined, StrikethroughOutlined, OrderedListOutlined, UnorderedListOutlined, } from "@ant-design/icons";
10
10
  import { Button } from "antd";
11
11
  const quoteIcon = (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M5.24615 10.5714C4.5616 10.5714 3.99078 10.5715 3.53762 10.5105C3.0593 10.4462 2.62745 10.3047 2.28042 9.95769C1.9334 9.61072 1.79194 9.17887 1.72763 8.70055C1.6667 8.24737 1.66673 7.67654 1.66675 6.99199V6.91274C1.66673 6.22819 1.6667 5.65734 1.72763 5.20419C1.79194 4.72586 1.9334 4.29401 2.28043 3.94699C2.62746 3.59997 3.0593 3.4585 3.53762 3.3942C3.99078 3.33327 4.56161 3.33329 5.24615 3.33331H5.32541C6.00995 3.33329 6.5808 3.33327 7.03397 3.3942C7.51228 3.4585 7.94413 3.59997 8.29116 3.94699C8.63817 4.29401 8.77966 4.72586 8.84396 5.20419C8.90491 5.65734 8.90484 6.22817 8.90484 6.91272V6.99198C8.90484 7.67652 8.90491 8.24737 8.84396 8.70055C8.77966 9.17887 8.63817 9.61072 8.29116 9.95769C7.94413 10.3047 7.51228 10.4462 7.03397 10.5105C6.5808 10.5715 6.00998 10.5714 5.32544 10.5714H5.24615Z", fill: "currentColor" }), _jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M2.84403 16.1313C2.71884 15.7295 2.94301 15.3023 3.34474 15.1772C5.71249 14.4393 7.38095 12.3426 7.38095 9.914V6.76172C7.38095 6.34094 7.72207 5.99982 8.14286 5.99982C8.56366 5.99982 8.90476 6.34094 8.90476 6.76172V9.914C8.90476 13.0731 6.73976 15.7152 3.79812 16.6319C3.39638 16.7572 2.96923 16.533 2.84403 16.1313Z", fill: "currentColor" }), _jsx("path", { d: "M14.389 10.5714C13.7044 10.5714 13.1336 10.5715 12.6804 10.5105C12.2021 10.4462 11.7703 10.3047 11.4233 9.95769C11.0762 9.61072 10.9348 9.17887 10.8704 8.70055C10.8095 8.24737 10.8096 7.67654 10.8096 6.99199V6.91274C10.8096 6.22819 10.8095 5.65734 10.8704 5.20419C10.9348 4.72586 11.0762 4.29401 11.4233 3.94699C11.7703 3.59997 12.2021 3.4585 12.6804 3.3942C13.1336 3.33327 13.7044 3.33329 14.389 3.33331H14.4682C15.1528 3.33329 15.7236 3.33327 16.1768 3.3942C16.6551 3.4585 17.087 3.59997 17.4339 3.94699C17.781 4.29401 17.9225 4.72586 17.9868 5.20419C18.0477 5.65734 18.0477 6.22817 18.0477 6.91272V6.99198C18.0477 7.67652 18.0477 8.24737 17.9868 8.70055C17.9225 9.17887 17.781 9.61072 17.4339 9.95769C17.087 10.3047 16.6551 10.4462 16.1768 10.5105C15.7236 10.5715 15.1528 10.5714 14.4682 10.5714H14.389Z", fill: "currentColor" }), _jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.9869 16.1313C11.8617 15.7295 12.0858 15.3023 12.4876 15.1772C14.8553 14.4393 16.5238 12.3426 16.5238 9.914V6.76172C16.5238 6.34094 16.8649 5.99982 17.2857 5.99982C17.7065 5.99982 18.0476 6.34094 18.0476 6.76172V9.914C18.0476 13.0731 15.8825 15.7152 12.9409 16.6319C12.5392 16.7572 12.112 16.533 11.9869 16.1313Z", fill: "currentColor" })] }));
12
12
  export const ToolbarPlugin = () => {
@@ -52,12 +52,12 @@ export const ToolbarPlugin = () => {
52
52
  }, [activeMarks]);
53
53
  const otherButtons = useMemo(() => {
54
54
  return [
55
- {
56
- key: "link",
57
- icon: _jsx(LinkOutlined, { size: 22 }),
58
- onPress: () => insertLink(),
59
- isActive: activeMarks.includes("link"),
60
- },
55
+ // {
56
+ // key: "link",
57
+ // icon: <LinkOutlined size={22} />,
58
+ // onPress: () => insertLink(),
59
+ // isActive: activeMarks.includes("link"),
60
+ // },
61
61
  {
62
62
  key: "quote",
63
63
  icon: quoteIcon,
@@ -14,8 +14,8 @@ const TextMessageItem = (props) => {
14
14
  if (Object.keys(extendMessageInfo).length > 0 &&
15
15
  (extendMessageInfo === null || extendMessageInfo === void 0 ? void 0 : extendMessageInfo.messageInfo)) {
16
16
  const htmlContent = ((_b = (_a = extendMessageInfo === null || extendMessageInfo === void 0 ? void 0 : extendMessageInfo.messageInfo) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.content) || "";
17
- return (_jsx("div", { className: "!text-sm sm:text-base break-words whitespace-pre-line flex-1", dangerouslySetInnerHTML: { __html: htmlContent } }));
17
+ return (_jsx("div", { className: "!text-sm sm:text-base break-words whitespace-pre-line flex-1 break-all", dangerouslySetInnerHTML: { __html: htmlContent } }));
18
18
  }
19
- return (_jsx("span", { className: "!text-sm sm:text-base whitespace-pre-wrap", children: ((_c = message === null || message === void 0 ? void 0 : message.textElem) === null || _c === void 0 ? void 0 : _c.content) || "" }));
19
+ return (_jsx("span", { className: "!text-sm sm:text-base whitespace-pre-wrap break-all", children: ((_c = message === null || message === void 0 ? void 0 : message.textElem) === null || _c === void 0 ? void 0 : _c.content) || "" }));
20
20
  };
21
21
  export default TextMessageItem;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,IAAI,eAAe,EAE/B,MAAM,yBAAyB,CAAC;AAYjC,UAAU,gBAAgB;IACxB,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,eAAe,EAAE,CAAC;CAChC;AAID,QAAA,MAAM,WAAW,GAAI,0BAA0B,gBAAgB,mDAgH9D,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,IAAI,eAAe,EAE/B,MAAM,yBAAyB,CAAC;AAYjC,UAAU,gBAAgB;IACxB,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,eAAe,EAAE,CAAC;CAChC;AAID,QAAA,MAAM,WAAW,GAAI,0BAA0B,gBAAgB,mDA+G9D,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -40,12 +40,10 @@ const MessageItem = ({ message, allMessages }) => {
40
40
  const prevTimeBreak = !previousMessage ||
41
41
  dayjs(message.sendTime).diff(previousMessage.sendTime, "minute") >
42
42
  BREAK_TIME;
43
- const nextTimeBreak = !nextMessage ||
44
- dayjs(nextMessage.sendTime).diff(message.sendTime, "minute") > BREAK_TIME;
45
43
  const showTimeBreak = prevTimeBreak;
46
- const isFirstInGroup = prevTimeBreak || !prevSameUser;
47
- const isLastInGroup = nextTimeBreak || !nextSameUser;
48
- return (_jsxs("div", { className: "flex flex-col gap-2 py-1 px-3 sm:p x-4", id: `${MSG_ITEM_PREFIX}${message === null || message === void 0 ? void 0 : message.clientMsgID}`, children: [showTimeBreak && (_jsx("div", { className: "flex justify-center", children: _jsx("span", { className: "text-xs text-gray-600 text-center bg-neutral-100 px-2 py-1 rounded-full", children: formatTimestamp(message.sendTime) }) })), _jsx("div", { className: clsx("flex", isMine ? "justify-end" : "justify-start"), children: _jsxs("div", { className: clsx("flex flex-1 items-end gap-2", isMine ? "justify-end" : "justify-start"), children: [!isMine && (_jsx("div", { className: "flex items-center justify-center w-[32px] h-[32px]", children: isLastInGroup && (_jsx(Avatar, { children: ((_b = (_a = message === null || message === void 0 ? void 0 : message.senderNickname) === null || _a === void 0 ? void 0 : _a.charAt) === null || _b === void 0 ? void 0 : _b.call(_a, 0)) || "A" })) })), _jsxs("div", { className: clsx("flex flex-col flex-[0.8]", isMine ? "items-end" : "items-start"), children: [isFirstInGroup && !isMine && (_jsx("span", { className: "text-xs text-gray-500 mb-1 px-3", children: message === null || message === void 0 ? void 0 : message.senderNickname })), _jsxs("div", { className: clsx("px-3 py-2 rounded-2xl max-w-full break-words flex flex-col flex-1 text-gray-900 gap-1", isMine ? "bg-blue-100" : "bg-white"), id: `${MSG_ITEM_CONTENT_PREFIX}${message === null || message === void 0 ? void 0 : message.clientMsgID}`, children: [(message === null || message === void 0 ? void 0 : message.contentType) === MessageType.MergeMessage ? (_jsxs("div", { children: [(_d = (_c = message === null || message === void 0 ? void 0 : message.mergeElem) === null || _c === void 0 ? void 0 : _c.multiMessage) === null || _d === void 0 ? void 0 : _d.map((item) => {
44
+ const showSenderAvatar = !nextSameUser;
45
+ const showSenderName = !prevSameUser && !isMine;
46
+ return (_jsxs("div", { className: "flex flex-col gap-2 py-1 px-3 sm:p x-4", id: `${MSG_ITEM_PREFIX}${message === null || message === void 0 ? void 0 : message.clientMsgID}`, children: [showTimeBreak && (_jsx("div", { className: "flex justify-center", children: _jsx("span", { className: "text-xs text-gray-600 text-center bg-neutral-100 px-2 py-1 rounded-full", children: formatTimestamp(message.sendTime) }) })), _jsx("div", { className: clsx("flex", isMine ? "justify-end" : "justify-start"), children: _jsxs("div", { className: clsx("flex flex-1 items-end gap-2", isMine ? "justify-end" : "justify-start"), children: [!isMine && (_jsx("div", { className: "flex items-center justify-center w-[32px] h-[32px]", children: showSenderAvatar && (_jsx(Avatar, { src: message === null || message === void 0 ? void 0 : message.senderFaceUrl, children: ((_b = (_a = message === null || message === void 0 ? void 0 : message.senderNickname) === null || _a === void 0 ? void 0 : _a.charAt) === null || _b === void 0 ? void 0 : _b.call(_a, 0)) || "A" })) })), _jsxs("div", { className: clsx("flex flex-col flex-[0.8]", isMine ? "items-end" : "items-start"), children: [showSenderName && (_jsx("span", { className: "text-xs text-gray-500 mb-1 px-3", children: message === null || message === void 0 ? void 0 : message.senderNickname })), _jsxs("div", { className: clsx("px-3 py-2 rounded-2xl max-w-full break-words flex flex-col flex-1 text-gray-900 gap-1", isMine ? "bg-blue-100" : "bg-white"), id: `${MSG_ITEM_CONTENT_PREFIX}${message === null || message === void 0 ? void 0 : message.clientMsgID}`, children: [(message === null || message === void 0 ? void 0 : message.contentType) === MessageType.MergeMessage ? (_jsxs("div", { children: [(_d = (_c = message === null || message === void 0 ? void 0 : message.mergeElem) === null || _c === void 0 ? void 0 : _c.multiMessage) === null || _d === void 0 ? void 0 : _d.map((item) => {
49
47
  return renderMessageByType(item);
50
48
  }), (message === null || message === void 0 ? void 0 : message.textElem) && _jsx(TextMessageItem, { message: message })] })) : (renderMessageByType(message)), _jsx("span", { className: clsx("text-xs text-gray-500 text-right text-gray-500"), children: dayjs(message === null || message === void 0 ? void 0 : message.sendTime).format("HH:mm") })] })] })] }) }, message === null || message === void 0 ? void 0 : message.clientMsgID)] }, message === null || message === void 0 ? void 0 : message.clientMsgID));
51
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DeskAssignedSession.d.ts","sourceRoot":"","sources":["../../../src/components/session/DeskAssignedSession.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,mBAAmB,+CAwNxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"DeskAssignedSession.d.ts","sourceRoot":"","sources":["../../../src/components/session/DeskAssignedSession.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,mBAAmB,+CA+NxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -2,19 +2,20 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useBoolean } from "ahooks";
4
4
  import { Button, Layout, Menu } from "antd";
5
- import { useMemo } from "react";
5
+ import { useEffect, useMemo } from "react";
6
6
  import { useTranslation } from "react-i18next";
7
- import { SESSION_STATUS_ENUM, TAG_ENUM } from "../../constants";
8
7
  import { Icon } from "../icon";
9
8
  import { useGetSessionSummary } from "../../hooks/session/useGetSessionSummary";
10
9
  import useSessionStore from "../../store/session";
11
10
  import clsx from "clsx";
11
+ import { SessionStatus, SessionTag } from "../../types/chat";
12
+ import emitter from "../../utils/events";
12
13
  const { Sider } = Layout;
13
14
  const DeskAssignedSession = () => {
14
15
  const { t } = useTranslation();
15
16
  const [collapsed, { toggle }] = useBoolean(false);
16
17
  const setFilterSummary = useSessionStore((state) => state.setFilterSummary);
17
- const { data: sessionSummary } = useGetSessionSummary();
18
+ const { data: sessionSummary, refetch } = useGetSessionSummary();
18
19
  const menuItems = useMemo(() => {
19
20
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
20
21
  return [
@@ -25,92 +26,103 @@ const DeskAssignedSession = () => {
25
26
  children: [
26
27
  {
27
28
  label: t("unassigned"),
28
- key: SESSION_STATUS_ENUM.UNASSIGNED,
29
+ key: SessionStatus.UNASSIGNED,
29
30
  icon: (_jsx(Icon, { icon: "user-del-o", size: 18, className: "!text-amber-500" })),
30
31
  onClick: () => {
31
32
  setFilterSummary({
32
- status: SESSION_STATUS_ENUM.UNASSIGNED,
33
+ status: SessionStatus.UNASSIGNED,
33
34
  tag: undefined,
34
35
  });
35
36
  },
36
- extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_b = (_a = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _a === void 0 ? void 0 : _a.find((s) => s.type === SESSION_STATUS_ENUM.UNASSIGNED)) === null || _b === void 0 ? void 0 : _b.count) || "" })),
37
+ itemIcon: !collapsed && (_jsx("span", { className: "text-xs text-gray-500 ", children: ((_b = (_a = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _a === void 0 ? void 0 : _a.find((s) => s.type === SessionStatus.UNASSIGNED)) === null || _b === void 0 ? void 0 : _b.count) || "" })),
37
38
  },
38
39
  {
39
40
  label: t("slow_processing"),
40
- key: TAG_ENUM.SLOW_PROCESSING,
41
+ key: SessionTag.SLOW_PROCESSING,
41
42
  icon: (_jsx(Icon, { icon: "warning-square-o", size: 18, className: "!text-red-500" })),
42
43
  onClick: () => {
43
44
  setFilterSummary({
44
45
  status: undefined,
45
- tag: TAG_ENUM.SLOW_PROCESSING,
46
+ tag: SessionTag.SLOW_PROCESSING,
46
47
  });
47
48
  },
48
- extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_d = (_c = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.tagCounts) === null || _c === void 0 ? void 0 : _c.find((s) => s.type === TAG_ENUM.SLOW_PROCESSING)) === null || _d === void 0 ? void 0 : _d.count) || "" })),
49
+ itemIcon: !collapsed && (_jsx("span", { className: "text-xs text-gray-500", children: ((_d = (_c = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.tagCounts) === null || _c === void 0 ? void 0 : _c.find((s) => s.type === SessionTag.SLOW_PROCESSING)) === null || _d === void 0 ? void 0 : _d.count) || "" })),
49
50
  },
50
51
  {
51
52
  label: t("waiting_process"),
52
- key: SESSION_STATUS_ENUM.WAITING_PROCESS,
53
+ key: SessionStatus.WAITING_PROCESS,
53
54
  icon: (_jsx(Icon, { icon: "time-circle-o", size: 18, className: "!text-orange-400" })),
54
55
  onClick: () => {
55
56
  setFilterSummary({
56
- status: SESSION_STATUS_ENUM.WAITING_PROCESS,
57
+ status: SessionStatus.WAITING_PROCESS,
57
58
  tag: undefined,
58
59
  });
59
60
  },
60
- extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_f = (_e = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _e === void 0 ? void 0 : _e.find((s) => s.type === SESSION_STATUS_ENUM.WAITING_PROCESS)) === null || _f === void 0 ? void 0 : _f.count) || "" })),
61
+ itemIcon: !collapsed && (_jsx("span", { className: "text-xs text-gray-500", children: ((_f = (_e = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _e === void 0 ? void 0 : _e.find((s) => s.type === SessionStatus.WAITING_PROCESS)) === null || _f === void 0 ? void 0 : _f.count) || "" })),
61
62
  },
62
63
  {
63
64
  label: t("awaiting_reply"),
64
- key: TAG_ENUM.AWAITING_REPLY,
65
+ key: SessionTag.AWAITING_REPLY,
65
66
  icon: (_jsx(Icon, { icon: "arrow-reply-o", size: 18, className: "!text-purple-500" })),
66
67
  onClick: () => {
67
68
  setFilterSummary({
68
69
  status: undefined,
69
- tag: TAG_ENUM.AWAITING_REPLY,
70
+ tag: SessionTag.AWAITING_REPLY,
70
71
  });
71
72
  },
72
- extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_h = (_g = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.tagCounts) === null || _g === void 0 ? void 0 : _g.find((s) => s.type === TAG_ENUM.AWAITING_REPLY)) === null || _h === void 0 ? void 0 : _h.count) || "" })),
73
+ itemIcon: !collapsed && (_jsx("span", { className: "text-xs text-gray-500", children: ((_h = (_g = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.tagCounts) === null || _g === void 0 ? void 0 : _g.find((s) => s.type === SessionTag.AWAITING_REPLY)) === null || _h === void 0 ? void 0 : _h.count) || "" })),
73
74
  },
74
75
  {
75
76
  label: t("in_process"),
76
- key: SESSION_STATUS_ENUM.IN_PROCESS,
77
+ key: SessionStatus.IN_PROCESS,
77
78
  icon: _jsx(Icon, { icon: "play-circle-o", size: 18 }),
78
79
  onClick: () => {
79
80
  setFilterSummary({
80
- status: SESSION_STATUS_ENUM.IN_PROCESS,
81
+ status: SessionStatus.IN_PROCESS,
81
82
  tag: undefined,
82
83
  });
83
84
  },
84
- extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_k = (_j = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _j === void 0 ? void 0 : _j.find((s) => s.type === SESSION_STATUS_ENUM.IN_PROCESS)) === null || _k === void 0 ? void 0 : _k.count) || "" })),
85
+ itemIcon: !collapsed && (_jsx("span", { className: "text-xs text-gray-500", children: ((_k = (_j = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _j === void 0 ? void 0 : _j.find((s) => s.type === SessionStatus.IN_PROCESS)) === null || _k === void 0 ? void 0 : _k.count) || "" })),
85
86
  },
86
87
  {
87
88
  label: t("temporarily_paused"),
88
- key: TAG_ENUM.TEMPORARILY_PAUSED,
89
+ key: SessionTag.TEMPORARILY_PAUSED,
89
90
  icon: _jsx(Icon, { icon: "pause-o", size: 18 }),
90
91
  onClick: () => {
91
92
  setFilterSummary({
92
93
  status: undefined,
93
- tag: TAG_ENUM.TEMPORARILY_PAUSED,
94
+ tag: SessionTag.TEMPORARILY_PAUSED,
94
95
  });
95
96
  },
96
- extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_m = (_l = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.tagCounts) === null || _l === void 0 ? void 0 : _l.find((s) => s.type === TAG_ENUM.TEMPORARILY_PAUSED)) === null || _m === void 0 ? void 0 : _m.count) || "" })),
97
+ itemIcon: !collapsed && (_jsx("span", { className: "text-xs text-gray-500", children: ((_m = (_l = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.tagCounts) === null || _l === void 0 ? void 0 : _l.find((s) => s.type === SessionTag.TEMPORARILY_PAUSED)) === null || _m === void 0 ? void 0 : _m.count) || "" })),
97
98
  },
98
99
  ],
99
- extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_p = (_o = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _o === void 0 ? void 0 : _o.find((s) => s.type === SESSION_STATUS_ENUM.IN_PROCESS)) === null || _p === void 0 ? void 0 : _p.count) || "100" })),
100
+ itemIcon: !collapsed && (_jsx("span", { className: "text-xs text-gray-500", children: ((_p = (_o = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _o === void 0 ? void 0 : _o.find((s) => s.type === SessionStatus.IN_PROCESS)) === null || _p === void 0 ? void 0 : _p.count) || "" })),
100
101
  },
101
102
  {
102
- label: (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "ant-menu-title-content ant-menu-title-content-with-extra flex-1", children: t("closed_sessions") }), _jsx("span", { className: "text-xs text-gray-500", children: (sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.completedSessionCount) || "" })] })),
103
+ label: t("closed_sessions"),
103
104
  key: "CLOSED_SESSIONS",
104
105
  icon: _jsx(Icon, { icon: "check-square-o", size: 20 }),
105
106
  onClick: () => {
106
107
  setFilterSummary({
107
- status: SESSION_STATUS_ENUM.COMPLETED,
108
+ status: SessionStatus.COMPLETED,
108
109
  tag: undefined,
109
110
  });
110
111
  },
112
+ itemIcon: !collapsed && (_jsx("span", { className: "text-xs text-gray-500", children: (sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.completedSessionCount) || "" })),
111
113
  },
112
114
  ];
113
- }, [sessionSummary]);
114
- return (_jsxs(Sider, { collapsible: true, collapsed: collapsed, onCollapse: toggle, width: 220, className: "bg-white h-full border-r border-gray-200", trigger: null, children: [_jsxs("div", { className: clsx("flex items-center p-4 border-b", collapsed ? "justify-center" : "justify-between"), children: [!collapsed && (_jsx("span", { className: "text-md font-semibold flex-1 truncate", children: "Droppii Staging" })), _jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", onClick: toggle, children: _jsx(Icon, { icon: collapsed ? "angle-right-o" : "angle-left-o", size: 22 }) })] }), _jsx(Menu, { defaultSelectedKeys: [SESSION_STATUS_ENUM.IN_PROCESS], defaultOpenKeys: ["ACTIVE_SESSIONS"], mode: "inline", items: menuItems, inlineIndent: 12, expandIcon: _jsx("span", { className: "text-xs text-gray-500", children: sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.activeSessionCount }) })] }));
115
+ }, [sessionSummary, t, collapsed]);
116
+ useEffect(() => {
117
+ emitter.on("UPDATE_SESSION", () => {
118
+ refetch();
119
+ });
120
+ return () => {
121
+ emitter.off("UPDATE_SESSION", () => {
122
+ refetch();
123
+ });
124
+ };
125
+ }, []);
126
+ return (_jsxs(Sider, { collapsible: true, collapsed: collapsed, onCollapse: toggle, width: 220, className: "bg-white h-full border-r border-gray-200", trigger: null, children: [_jsxs("div", { className: clsx("flex items-center p-4 border-b", collapsed ? "justify-center" : "justify-between"), children: [!collapsed && (_jsx("span", { className: "text-md font-semibold flex-1 truncate", children: "Droppii Staging" })), _jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", onClick: toggle, children: _jsx(Icon, { icon: collapsed ? "angle-right-o" : "angle-left-o", size: 22 }) })] }), _jsx(Menu, { defaultSelectedKeys: [SessionStatus.IN_PROCESS], defaultOpenKeys: ["ACTIVE_SESSIONS"], mode: "inline", items: menuItems, inlineIndent: 12, expandIcon: _jsx("span", { className: "text-xs text-gray-500", children: sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.activeSessionCount }) })] }));
115
127
  };
116
128
  export default DeskAssignedSession;
@@ -1,17 +1,6 @@
1
1
  export declare const coreWasmPath = "https://droppiistg.blob.core.windows.net/droppii-stg-public/3315964d-11d5-4d27-8af7-d2ec2354994f.wasm";
2
- export declare const SESSION_STATUS_ENUM: {
3
- UNASSIGNED: string;
4
- WAITING_PROCESS: string;
5
- IN_PROCESS: string;
6
- COMPLETED: string;
7
- };
8
- export declare const TAG_ENUM: {
9
- NONE: string;
10
- AWAITING_REPLY: string;
11
- SLOW_PROCESSING: string;
12
- TEMPORARILY_PAUSED: string;
13
- };
14
2
  export declare const PAGE_SIZE = 50;
15
3
  export declare const MSG_ITEM_PREFIX = "msg-item-";
16
4
  export declare const MSG_ITEM_CONTENT_PREFIX = "msg-item-content-";
5
+ export declare const adminUserId = "2c0388c5-787d-453c-830c-603d17b85393";
17
6
  //# 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,0GACgF,CAAC;AAE1G,eAAO,MAAM,mBAAmB;;;;;CAK/B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAC;AAEF,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,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,0GACgF,CAAC;AAE1G,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D,eAAO,MAAM,WAAW,yCAAyC,CAAC"}
@@ -1,16 +1,5 @@
1
1
  export const coreWasmPath = "https://droppiistg.blob.core.windows.net/droppii-stg-public/3315964d-11d5-4d27-8af7-d2ec2354994f.wasm";
2
- export const SESSION_STATUS_ENUM = {
3
- UNASSIGNED: "UNASSIGNED",
4
- WAITING_PROCESS: "WAITING_PROCESS",
5
- IN_PROCESS: "IN_PROCESS",
6
- COMPLETED: "COMPLETED",
7
- };
8
- export const TAG_ENUM = {
9
- NONE: "NONE",
10
- AWAITING_REPLY: "AWAITING_REPLY",
11
- SLOW_PROCESSING: "SLOW_PROCESSING",
12
- TEMPORARILY_PAUSED: "TEMPORARILY_PAUSED",
13
- };
14
2
  export const PAGE_SIZE = 50;
15
3
  export const MSG_ITEM_PREFIX = "msg-item-";
16
4
  export const MSG_ITEM_CONTENT_PREFIX = "msg-item-content-";
5
+ export const adminUserId = "2c0388c5-787d-453c-830c-603d17b85393";
@@ -1 +1 @@
1
- {"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../src/context/ChatContext.tsx"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,CAAC;AAG9B,OAAO,EACL,eAAe,EACf,iBAAiB,EAGlB,MAAM,eAAe,CAAC;AAQvB,eAAO,MAAM,WAAW,0CAOtB,CAAC;AAEH,eAAO,MAAM,cAAc,uBAAgC,CAAC;AAE5D,eAAO,MAAM,YAAY,GAAI,sBAAsB,iBAAiB,4CAuDnE,CAAC"}
1
+ {"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../src/context/ChatContext.tsx"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,CAAC;AAG9B,OAAO,EACL,eAAe,EACf,iBAAiB,EAGlB,MAAM,eAAe,CAAC;AASvB,eAAO,MAAM,WAAW,0CAOtB,CAAC;AAEH,eAAO,MAAM,cAAc,uBAAgC,CAAC;AAE5D,eAAO,MAAM,YAAY,GAAI,sBAAsB,iBAAiB,4CAyDnE,CAAC"}
@@ -7,6 +7,7 @@ import { DChatSDK } from "../constants/sdk";
7
7
  import MainLayout from "../layout";
8
8
  import useAuthStore from "../store/auth";
9
9
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
10
+ import { ConfigProvider } from "antd";
10
11
  const queryClient = new QueryClient();
11
12
  export const ChatContext = createContext({
12
13
  user: null,
@@ -56,5 +57,5 @@ export const ChatProvider = ({ children, config }) => {
56
57
  getSelfUserInfo,
57
58
  updateConnectStatus,
58
59
  updateSyncStatus,
59
- }, children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(MainLayout, { children: children }) }) }));
60
+ }, children: _jsx(ConfigProvider, { getPopupContainer: (triggerNode) => document.body, children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(MainLayout, { children: children }) }) }) }));
60
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useGlobalEvent.d.ts","sourceRoot":"","sources":["../../../src/hooks/global/useGlobalEvent.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,cAAc,YA0N1B,CAAC"}
1
+ {"version":3,"file":"useGlobalEvent.d.ts","sourceRoot":"","sources":["../../../src/hooks/global/useGlobalEvent.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,cAAc,YAkP1B,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { useEffect } from "react";
2
2
  import { DChatSDK } from "../../constants/sdk";
3
3
  import { CbEvents, MessageType, SessionType, } from "@openim/wasm-client-sdk";
4
- import { ConnectStatus, CustomType, SyncStatus } from "../../types/chat";
4
+ import { BusinessNotificationType, ConnectStatus, CustomType, SyncStatus, } from "../../types/chat";
5
5
  import { pushNewMessage, updateOneMessage } from "../message/useMessage";
6
6
  import { useChatContext } from "../../context/ChatContext";
7
7
  import useConversationStore from "../../store/conversation";
8
8
  import useAuthStore from "../../store/auth";
9
9
  import { useRefetchChatToken } from "../../hooks/init/useChatToken";
10
+ import { updateSession } from "../session/useUpdateSession";
10
11
  const notPushType = [MessageType.TypingMessage, MessageType.RevokeMessage];
11
12
  export const useGlobalEvent = () => {
12
13
  const { user } = useChatContext();
@@ -120,6 +121,15 @@ export const useGlobalEvent = () => {
120
121
  const syncFailedHandler = () => {
121
122
  updateSyncStatus(SyncStatus.Failed);
122
123
  };
124
+ const businessNotificationHandler = ({ data, }) => {
125
+ switch (data.key) {
126
+ case BusinessNotificationType.SESSION_STATE_UPDATED:
127
+ updateSession(JSON.parse(data.data || "{}"));
128
+ break;
129
+ default:
130
+ break;
131
+ }
132
+ };
123
133
  const setIMListener = () => {
124
134
  //account
125
135
  DChatSDK.on(CbEvents.OnUserTokenExpired, userTokenHandler);
@@ -138,6 +148,8 @@ export const useGlobalEvent = () => {
138
148
  // conversation
139
149
  DChatSDK.on(CbEvents.OnConversationChanged, conversationChangeHandler);
140
150
  DChatSDK.on(CbEvents.OnNewConversation, newConversationHandler);
151
+ //busines notification
152
+ DChatSDK.on(CbEvents.OnRecvCustomBusinessMessage, businessNotificationHandler);
141
153
  };
142
154
  const disposeIMListener = () => {
143
155
  //account
@@ -156,6 +168,8 @@ export const useGlobalEvent = () => {
156
168
  // conversation
157
169
  DChatSDK.off(CbEvents.OnConversationChanged, conversationChangeHandler);
158
170
  DChatSDK.off(CbEvents.OnNewConversation, newConversationHandler);
171
+ //busines notification
172
+ DChatSDK.off(CbEvents.OnRecvCustomBusinessMessage, businessNotificationHandler);
159
173
  };
160
174
  // conversation
161
175
  const conversationChangeHandler = ({ data }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAQ7E,eAAO,MAAM,kBAAkB,eAa9B,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,gBAAgB,MAAM,EACtB,oBAAoB,MAAM;;;;;qBAML,WAAW,EAAE;;;;;;qBAAb,WAAW,EAAE;;;;;;CAsMnC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,SACpB,CAAC;AAChC,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,SACpB,CAAC;AAElC,eAAO,MAAM,kBAAkB,GAC7B,aAAa,WAAW,EAAE,EAC1B,SAAS,WAAW,EACpB,WAAW,MAAM,GAAG,MAAM,KACzB,WAAW,GAAG,SAiBhB,CAAC"}
1
+ {"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAQ7E,eAAO,MAAM,kBAAkB,eAa9B,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,gBAAgB,MAAM,EACtB,oBAAoB,MAAM;;;;;qBAML,WAAW,EAAE;;;;;;qBAAb,WAAW,EAAE;;;;;;CAsMnC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,SACpB,CAAC;AAChC,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,SACpB,CAAC;AAElC,eAAO,MAAM,kBAAkB,GAC7B,aAAa,WAAW,EAAE,EAC1B,SAAS,WAAW,EACpB,WAAW,MAAM,GAAG,MAAM,KACzB,WAAW,GAAG,SAkBhB,CAAC"}
@@ -181,13 +181,14 @@ export const getVisibleNeighbor = (allMessages, current, direction) => {
181
181
  const currentIndex = allMessages.findIndex((m) => m.clientMsgID === current.clientMsgID);
182
182
  if (currentIndex === -1)
183
183
  return undefined;
184
- let index = direction === "prev" ? currentIndex + 1 : currentIndex - 1;
184
+ const step = direction === "prev" ? 1 : -1;
185
+ let index = currentIndex + step;
185
186
  while (index >= 0 && index < allMessages.length) {
186
187
  const candidate = allMessages[index];
187
188
  if (visibleTypeMessage.includes(candidate.contentType)) {
188
189
  return candidate;
189
190
  }
190
- index = direction === "prev" ? index - 1 : index + 1;
191
+ index += step;
191
192
  }
192
193
  return undefined;
193
194
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAKlC,eAAO,MAAM,iBAAiB,GAAU,MAAM,MAAM,gCAanD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,MAAM,oBAAoB,gCAaxE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,iBAAiB,eAAe,gCAazE,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,MAAM,oBAAoB,gCAaxE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAU,MAAM,mBAAmB,gCAatE,CAAC;AAEF,eAAO,MAAM,cAAc;gDAiCpB;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB;wDAsBE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,UAAU,EAAE,CAAC;KACrB;CAyGJ,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,eAEvC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KAUM,iBACN,CAAC"}
1
+ {"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,WAAW,EAIZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAEL,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAMlC,eAAO,MAAM,iBAAiB,GAAU,MAAM,MAAM,gCAanD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,MAAM,oBAAoB,gCAaxE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,iBAAiB,eAAe,gCAazE,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,MAAM,oBAAoB,gCAaxE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAU,MAAM,mBAAmB,gCAatE,CAAC;AAEF,eAAO,MAAM,cAAc;gDAiCpB;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB;wDAmCE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,UAAU,EAAE,CAAC;KACrB;CAyGJ,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,eAEvC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KAUM,iBACN,CAAC"}
@@ -7,6 +7,7 @@ import { pushNewMessage, updateOneMessage } from "./useMessage";
7
7
  import { emit } from "../../utils/events";
8
8
  import useConversationStore from "../../store/conversation";
9
9
  import useAuthStore from "../../store/auth";
10
+ import { extractLinks } from "../../utils/common";
10
11
  export const createTextMessage = async (text) => {
11
12
  let textMessage = await DChatSDK.createTextMessage(text, new Date().getTime().toString())
12
13
  .then(({ data }) => {
@@ -90,7 +91,19 @@ export const useSendMessage = () => {
90
91
  const extendMessageInfo = generateExtendMessageInfo({
91
92
  richText,
92
93
  });
93
- const messageItem = Object.assign(Object.assign({}, textMessage), { ex: JSON.stringify(extendMessageInfo) || "{}" });
94
+ const urls = extractLinks(plainText);
95
+ const isUrlMessage = urls.length > 0;
96
+ let messageItem = Object.assign(Object.assign({}, textMessage), { ex: JSON.stringify(extendMessageInfo) || "{}" });
97
+ // if (isUrlMessage) {
98
+ // messageItem = {
99
+ // ...messageItem,
100
+ // contentType: CustomMessageType.URL,
101
+ // content: JSON.stringify({
102
+ // content: plainText,
103
+ // url: urls,
104
+ // }),
105
+ // } as unknown as MessageItem;
106
+ // }
94
107
  sendMessage(messageItem);
95
108
  }, [recvID, groupID, user, sendMessage]);
96
109
  const sendMergeMessage = useCallback(async ({ richText, plainText, files, }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useGetSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useGetSession.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAA+B,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAOpE,eAAO,MAAM,aAAa,GACxB,QAAQ,cAAc,EACtB,UAAU;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FhC,CAAC"}
1
+ {"version":3,"file":"useGetSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useGetSession.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAA+B,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAOpE,eAAO,MAAM,aAAa,GACxB,QAAQ,cAAc,EACtB,UAAU;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FhC,CAAC"}
@@ -33,6 +33,7 @@ export const useGetSession = (filter, options) => {
33
33
  page: pageParam,
34
34
  pageSize: (options === null || options === void 0 ? void 0 : options.pageSize) || PAGE_SIZE,
35
35
  searchTerm: filter.searchTerm,
36
+ conversationIds: filter.conversationIds,
36
37
  };
37
38
  const res = await apiInstance.post(ENDPOINTS.chatService.getSessionsByTagOrStatus, params);
38
39
  //FIND NEW CONVERSATIONS
@@ -0,0 +1,10 @@
1
+ import { UpdateSessionResponse } from "../../types/dto";
2
+ interface UpdateSessionParams {
3
+ sessionId: string;
4
+ status?: string;
5
+ tag?: string;
6
+ }
7
+ export declare const useUpdateSession: () => import("@tanstack/react-query").UseMutationResult<any, Error, UpdateSessionParams, unknown>;
8
+ export declare const updateSession: (data: UpdateSessionResponse) => void;
9
+ export {};
10
+ //# sourceMappingURL=useUpdateSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useUpdateSession.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,gBAAgB,mGAczB,CAAC;AAEL,eAAO,MAAM,aAAa,GAAI,MAAM,qBAAqB,SAC3B,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { useMutation } from "@tanstack/react-query";
3
+ import { QUERY_KEYS } from "../../services/query";
4
+ import { apiInstance } from "../../services/api";
5
+ import { ENDPOINTS } from "../../services/routes";
6
+ import useAuthStore from "../../store/auth";
7
+ import { emit } from "../../utils/events";
8
+ export const useUpdateSession = () => useMutation({
9
+ mutationKey: [QUERY_KEYS.UPDATE_SESSION],
10
+ mutationFn: async ({ sessionId, status, tag }) => {
11
+ const res = await apiInstance.put(ENDPOINTS.chatService.updateSession(sessionId), {
12
+ status,
13
+ tag,
14
+ applicationType: useAuthStore.getState().applicationType,
15
+ });
16
+ return res.data;
17
+ },
18
+ });
19
+ export const updateSession = (data) => emit("UPDATE_SESSION", data);
@@ -7,17 +7,19 @@ export const useDChatAuth = () => {
7
7
  const initAuthStore = useAuthStore((state) => state.initAuthStore);
8
8
  const resetConversationStore = useConversationStore((state) => state.resetConversationStore);
9
9
  const logout = async () => {
10
- await Promise.resolve(DChatSDK.deleteAllMsgFromLocal());
11
- await Promise.resolve(resetConversationStore());
12
- await Promise.resolve(initAuthStore({
13
- chatToken: "",
14
- accessToken: "",
15
- apiAddress: "",
16
- wsAddress: "",
17
- platformID: Platform.Web,
18
- userID: "",
19
- applicationType: DChatApplicationType.OBEFE,
20
- }));
10
+ const results = await Promise.allSettled([
11
+ DChatSDK.deleteAllMsgFromLocal(),
12
+ resetConversationStore(),
13
+ initAuthStore({
14
+ chatToken: "",
15
+ accessToken: "",
16
+ apiAddress: "",
17
+ wsAddress: "",
18
+ platformID: Platform.Web,
19
+ userID: "",
20
+ applicationType: DChatApplicationType.OBEFE,
21
+ }),
22
+ ]);
21
23
  const res = await DChatSDK.logout();
22
24
  return res;
23
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.tsx"],"names":[],"mappings":"AAKA,OAAO,iBAAiB,CAAC;AAOzB,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AACD,QAAA,MAAM,UAAU,GAAI,cAAc,eAAe,4CAMhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.tsx"],"names":[],"mappings":"AAIA,OAAO,iBAAiB,CAAC;AAKzB,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AACD,QAAA,MAAM,UAAU,GAAI,cAAc,eAAe,4CAKhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -3,11 +3,9 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useGlobalEvent } from "../hooks/global/useGlobalEvent";
4
4
  import dayjs from "dayjs";
5
5
  import "dayjs/locale/vi";
6
- import { useChatContext } from "../context/ChatContext";
7
6
  import { useSyncUsersInfo } from "../hooks/user/useUsersInfo";
8
7
  dayjs.locale("vi");
9
8
  const MainLayout = ({ children }) => {
10
- const { syncStatus, connectStatus } = useChatContext();
11
9
  useGlobalEvent();
12
10
  useSyncUsersInfo();
13
11
  return _jsx(_Fragment, { children: children });
@@ -17,11 +17,19 @@
17
17
  "unassigned": "Chưa phân công",
18
18
  "waiting_process": "Chờ xử lý",
19
19
  "in_process": "Đang xử lý",
20
- "completed": "Đã đóng",
20
+ "completed": "Hoàn thành",
21
21
  "awaiting_reply": "Chưa trả lời",
22
22
  "slow_processing": "Chậm xử lý",
23
23
  "temporarily_paused": "Tạm chờ",
24
24
  "see_more": "Xem thêm",
25
25
  "err_get_conversation": "Lỗi khi lấy thông tin cuộc trò chuyện",
26
- "enter_message": "Nhập tin nhắn"
26
+ "enter_message": "Nhập tin nhắn",
27
+ "update_session_status_title": "Cập nhật status",
28
+ "update_session_tag_title": "Cập nhật tag",
29
+ "cancel": "Hủy",
30
+ "update": "Cập nhật",
31
+ "update_session_status_failed": "Cập nhật status không thành công",
32
+ "update_session_tag_failed": "Cập nhật tag không thành công",
33
+ "customer": "Khách hàng",
34
+ "you": "Bạn"
27
35
  }
@@ -3,5 +3,6 @@ export declare const QUERY_KEYS: {
3
3
  GET_SESSION_SUMMARY: string;
4
4
  GET_SESSION_BY_TAG_OR_STATUS: string;
5
5
  SEARCH_MESSAGE: string;
6
+ UPDATE_SESSION: string;
6
7
  };
7
8
  //# sourceMappingURL=query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/services/query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;CAKtB,CAAC"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/services/query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC"}
@@ -3,4 +3,5 @@ export const QUERY_KEYS = {
3
3
  GET_SESSION_SUMMARY: "GET_SESSION_SUMMARY",
4
4
  GET_SESSION_BY_TAG_OR_STATUS: "GET_SESSION_BY_TAG_OR_STATUS",
5
5
  SEARCH_MESSAGE: "SEARCH_MESSAGE",
6
+ UPDATE_SESSION: "UPDATE_SESSION",
6
7
  };
@@ -4,6 +4,7 @@ export declare const ENDPOINTS: {
4
4
  getSessionSummary: string;
5
5
  getSessionsByTagOrStatus: string;
6
6
  searchMessage: string;
7
+ updateSession: (sessionId: string) => string;
7
8
  };
8
9
  identityService: {
9
10
  getToken: string;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/services/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAarB,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/services/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;mCAMS,MAAM;;;;;;;;CASpC,CAAC"}
@@ -4,6 +4,7 @@ export const ENDPOINTS = {
4
4
  getSessionSummary: "chat-service/v1/crm/sessions/assigned/summary",
5
5
  getSessionsByTagOrStatus: "chat-service/v1/crm/sessions/assigned/query",
6
6
  searchMessage: "chat-service/v1/messages/search",
7
+ updateSession: (sessionId) => `chat-service/v1/crm/sessions/${sessionId}`,
7
8
  },
8
9
  identityService: {
9
10
  getToken: "/identity-service/v1/identity/get-token",
@@ -1,8 +1,8 @@
1
1
  import { create } from "zustand";
2
- import { SESSION_STATUS_ENUM } from "../constants";
2
+ import { SessionStatus } from "../types/chat";
3
3
  const useSessionStore = create((set, get) => ({
4
4
  filterSummary: {
5
- status: SESSION_STATUS_ENUM.IN_PROCESS,
5
+ status: SessionStatus.IN_PROCESS,
6
6
  tag: undefined,
7
7
  },
8
8
  setFilterSummary: (filterSummary) => set({ filterSummary }),
@@ -1 +1 @@
1
- *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-7{left:1.75rem}.right-\[-8px\]{right:-8px}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-\[-8px\]{top:-8px}.\!z-\[9999\]{z-index:9999!important}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-\[-4px\]{margin-bottom:-4px}.ml-2{margin-left:.5rem}.mt-0\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.aspect-square{aspect-ratio:1/1}.\!h-full{height:100%!important}.h-5{height:1.25rem}.h-8{height:2rem}.h-\[32px\]{height:32px}.h-\[36px\]{height:36px}.h-\[48px\]{height:48px}.h-\[600px\]{height:600px}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-\[140px\]{max-height:140px}.min-h-\[64px\]{min-height:64px}.w-1{width:.25rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[320px\]{width:320px}.w-\[32px\]{width:32px}.w-\[36px\]{width:36px}.w-\[400px\]{width:400px}.w-\[48px\]{width:48px}.w-full{width:100%}.min-w-0{min-width:0}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-\[0\.8\]{flex:0.8}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-px{gap:1px}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.bg-black\/30{background-color:rgba(0,0,0,.3)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-2{padding-bottom:.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pt-1{padding-top:.25rem}.text-center{text-align:center}.text-right{text-align:right}.\!align-\[-4px\]{vertical-align:-4px!important}.\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.\!text-amber-500{--tw-text-opacity:1!important;color:rgb(245 158 11/var(--tw-text-opacity,1))!important}.\!text-orange-400{--tw-text-opacity:1!important;color:rgb(251 146 60/var(--tw-text-opacity,1))!important}.\!text-purple-500{--tw-text-opacity:1!important;color:rgb(168 85 247/var(--tw-text-opacity,1))!important}.\!text-red-500{--tw-text-opacity:1!important;color:rgb(239 68 68/var(--tw-text-opacity,1))!important}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ant-tabs-tab{margin:0!important;min-width:80px!important;justify-content:center!important;align-items:center!important}.ant-tabs-content,.ant-tabs-content-holder,.ant-tabs-tabpane{height:100%}.zoom-in-out-element{animation:zoom-in-zoom-out 1.5s ease none}@keyframes zoom-in-zoom-out{0%{scale:100%}25%{scale:125%}50%{scale:100%}75%{scale:125%}to{scale:100%}}.hover\:rounded-sm:hover{border-radius:.125rem}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:text-base{font-size:1rem;line-height:1.5rem}}
1
+ *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-7{left:1.75rem}.right-\[-8px\]{right:-8px}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-\[-8px\]{top:-8px}.\!z-\[9999\]{z-index:9999!important}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-\[-4px\]{margin-bottom:-4px}.ml-2{margin-left:.5rem}.mt-0\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.aspect-square{aspect-ratio:1/1}.\!h-full{height:100%!important}.h-2{height:.5rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-\[32px\]{height:32px}.h-\[36px\]{height:36px}.h-\[48px\]{height:48px}.h-\[600px\]{height:600px}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-\[140px\]{max-height:140px}.min-h-\[64px\]{min-height:64px}.w-1{width:.25rem}.w-2{width:.5rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[320px\]{width:320px}.w-\[32px\]{width:32px}.w-\[36px\]{width:36px}.w-\[400px\]{width:400px}.w-\[48px\]{width:48px}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[64px\]{min-width:64px}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-\[0\.8\]{flex:0.8}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-px{gap:1px}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-black\/30{background-color:rgba(0,0,0,.3)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-2{padding-bottom:.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pt-1{padding-top:.25rem}.text-center{text-align:center}.text-right{text-align:right}.\!align-\[-4px\]{vertical-align:-4px!important}.\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.\!text-amber-500{--tw-text-opacity:1!important;color:rgb(245 158 11/var(--tw-text-opacity,1))!important}.\!text-orange-400{--tw-text-opacity:1!important;color:rgb(251 146 60/var(--tw-text-opacity,1))!important}.\!text-purple-500{--tw-text-opacity:1!important;color:rgb(168 85 247/var(--tw-text-opacity,1))!important}.\!text-red-500{--tw-text-opacity:1!important;color:rgb(239 68 68/var(--tw-text-opacity,1))!important}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ant-tabs-tab{margin:0!important;min-width:80px!important;justify-content:center!important;align-items:center!important}.ant-tabs-content,.ant-tabs-content-holder,.ant-tabs-tabpane{height:100%}.zoom-in-out-element{animation:zoom-in-zoom-out 1.5s ease none}@keyframes zoom-in-zoom-out{0%{scale:100%}25%{scale:125%}50%{scale:100%}75%{scale:125%}to{scale:100%}}.no-transform{transform:none!important;perspective:none!important;filter:none!important}.hover\:rounded-sm:hover{border-radius:.125rem}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:text-base{font-size:1rem;line-height:1.5rem}}
@@ -1,4 +1,4 @@
1
- import { FileMsgParamsByURL, ImageMsgParamsByURL, Platform, SelfUserInfo, VideoMsgParamsByURL } from "@openim/wasm-client-sdk";
1
+ import { FileMsgParamsByURL, ImageMsgParamsByURL, MessageType, Platform, SelfUserInfo, VideoMsgParamsByURL } from "@openim/wasm-client-sdk";
2
2
  import { UploadFile } from "antd";
3
3
  export declare enum DChatApplicationType {
4
4
  OBEFE = "OBEFE"
@@ -20,6 +20,10 @@ export declare enum CustomType {
20
20
  CallingCancel = 203,
21
21
  CallingHungup = 204
22
22
  }
23
+ export declare enum CustomMessageType {
24
+ URL = 160
25
+ }
26
+ export type DChatMessageType = CustomMessageType | MessageType;
23
27
  export interface ChatContextType {
24
28
  user: SelfUserInfo | null;
25
29
  connectStatus: ConnectStatus;
@@ -94,4 +98,19 @@ export interface DChatInitAndLoginConfig {
94
98
  userID: string;
95
99
  applicationType: DChatApplicationType;
96
100
  }
101
+ export declare enum SessionStatus {
102
+ UNASSIGNED = "UNASSIGNED",
103
+ WAITING_PROCESS = "WAITING_PROCESS",
104
+ IN_PROCESS = "IN_PROCESS",
105
+ COMPLETED = "COMPLETED"
106
+ }
107
+ export declare enum SessionTag {
108
+ NONE = "NONE",
109
+ SLOW_PROCESSING = "SLOW_PROCESSING",
110
+ AWAITING_REPLY = "AWAITING_REPLY",
111
+ TEMPORARILY_PAUSED = "TEMPORARILY_PAUSED"
112
+ }
113
+ export declare enum BusinessNotificationType {
114
+ SESSION_STATE_UPDATED = "SESSION_STATE_UPDATED"
115
+ }
97
116
  //# sourceMappingURL=chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/types/chat.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/types/chat.ts"],"names":[],"mappings":"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"}
@@ -22,3 +22,25 @@ export var CustomType;
22
22
  CustomType[CustomType["CallingCancel"] = 203] = "CallingCancel";
23
23
  CustomType[CustomType["CallingHungup"] = 204] = "CallingHungup";
24
24
  })(CustomType || (CustomType = {}));
25
+ export var CustomMessageType;
26
+ (function (CustomMessageType) {
27
+ CustomMessageType[CustomMessageType["URL"] = 160] = "URL";
28
+ })(CustomMessageType || (CustomMessageType = {}));
29
+ export var SessionStatus;
30
+ (function (SessionStatus) {
31
+ SessionStatus["UNASSIGNED"] = "UNASSIGNED";
32
+ SessionStatus["WAITING_PROCESS"] = "WAITING_PROCESS";
33
+ SessionStatus["IN_PROCESS"] = "IN_PROCESS";
34
+ SessionStatus["COMPLETED"] = "COMPLETED";
35
+ })(SessionStatus || (SessionStatus = {}));
36
+ export var SessionTag;
37
+ (function (SessionTag) {
38
+ SessionTag["NONE"] = "NONE";
39
+ SessionTag["SLOW_PROCESSING"] = "SLOW_PROCESSING";
40
+ SessionTag["AWAITING_REPLY"] = "AWAITING_REPLY";
41
+ SessionTag["TEMPORARILY_PAUSED"] = "TEMPORARILY_PAUSED";
42
+ })(SessionTag || (SessionTag = {}));
43
+ export var BusinessNotificationType;
44
+ (function (BusinessNotificationType) {
45
+ BusinessNotificationType["SESSION_STATE_UPDATED"] = "SESSION_STATE_UPDATED";
46
+ })(BusinessNotificationType || (BusinessNotificationType = {}));
@@ -1,6 +1,6 @@
1
1
  import { MessageItem, MessageType } from "@openim/wasm-client-sdk";
2
- import { SessionStatus, SessionStatusItem, Tag, TagItem } from "../store/type";
3
- import { DChatApplicationType } from "./chat";
2
+ import { SessionStatusItem, TagItem } from "../store/type";
3
+ import { BusinessNotificationType, DChatApplicationType, SessionStatus, SessionTag } from "./chat";
4
4
  export interface BaseResponse<T> {
5
5
  statusCode: number;
6
6
  message: any;
@@ -37,10 +37,27 @@ export interface ISessionSummaryResponse {
37
37
  }
38
38
  export interface SessionByTagOrStatusRequest {
39
39
  applicationType: DChatApplicationType;
40
- tag?: Tag;
40
+ tag?: SessionTag;
41
41
  status?: SessionStatus;
42
42
  page: number;
43
43
  pageSize: number;
44
44
  searchTerm?: string;
45
+ conversationIds?: string[];
46
+ }
47
+ export interface UpdateSessionResponse {
48
+ id: string;
49
+ botId: string;
50
+ ownerId: string;
51
+ supporterId?: string;
52
+ conversationId: string;
53
+ status: SessionStatus;
54
+ startSeq: number;
55
+ endSeq: number;
56
+ tag: SessionTag;
57
+ applicationType: DChatApplicationType;
58
+ }
59
+ export interface BusinessNotification<T> {
60
+ data: T;
61
+ key: BusinessNotificationType;
45
62
  }
46
63
  //# sourceMappingURL=dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../src/types/dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAe,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,oBAAoB,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,SAAS,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B;IAC1C,eAAe,EAAE,oBAAoB,CAAC;IACtC,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../src/types/dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,UAAU,EACX,MAAM,QAAQ,CAAC;AAEhB,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,oBAAoB,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,SAAS,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B;IAC1C,eAAe,EAAE,oBAAoB,CAAC;IACtC,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;IAChB,eAAe,EAAE,oBAAoB,CAAC;CACvC;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC;IACR,GAAG,EAAE,wBAAwB,CAAC;CAC/B"}
@@ -1,9 +1,10 @@
1
1
  export declare function renderFileSize(bytes: number): string;
2
- export declare const parseLatestMessage: (latestMsg: string, currentUserId?: string) => string;
2
+ export declare const parseLatestMessage: (latestMsg: string, currentUserId?: string, t?: any) => string;
3
3
  export declare const highlightSearch: (text: string, keyword: string, maxLength?: number) => string;
4
4
  interface FormatOptions {
5
5
  hasTime?: boolean;
6
6
  }
7
7
  export declare function formatTimestamp(timestamp: number, options?: FormatOptions): string;
8
+ export declare function extractLinks(text: string): string[];
8
9
  export {};
9
10
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAGA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAapD;AAED,eAAO,MAAM,kBAAkB,GAC7B,WAAW,MAAM,EACjB,gBAAgB,MAAM,WAgCvB,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,kBAAc,WA2Cf,CAAC;AAEF,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,aAAa,GACtB,MAAM,CAiBR"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":"AAGA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAapD;AAED,eAAO,MAAM,kBAAkB,GAC7B,WAAW,MAAM,EACjB,gBAAgB,MAAM,EACtB,IAAI,GAAG,WAgCR,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,kBAAc,WA2Cf,CAAC;AAEF,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,aAAa,GACtB,MAAM,CAiBR;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAKnD"}
@@ -12,7 +12,7 @@ export function renderFileSize(bytes) {
12
12
  }
13
13
  return `${size.toFixed(1)} ${units[index]}`;
14
14
  }
15
- export const parseLatestMessage = (latestMsg, currentUserId) => {
15
+ export const parseLatestMessage = (latestMsg, currentUserId, t) => {
16
16
  var _a;
17
17
  if (!latestMsg)
18
18
  return "";
@@ -20,7 +20,7 @@ export const parseLatestMessage = (latestMsg, currentUserId) => {
20
20
  const msgData = JSON.parse(latestMsg);
21
21
  const contentType = msgData === null || msgData === void 0 ? void 0 : msgData.contentType;
22
22
  const isMe = currentUserId && msgData.sendID === currentUserId;
23
- const sender = isMe ? "Me" : (msgData === null || msgData === void 0 ? void 0 : msgData.senderNickname) || msgData.sendID;
23
+ const sender = isMe ? t("you") : t("customer");
24
24
  switch (contentType) {
25
25
  case MessageType.TextMessage:
26
26
  if ((_a = msgData.textElem) === null || _a === void 0 ? void 0 : _a.content) {
@@ -93,3 +93,8 @@ export function formatTimestamp(timestamp, options) {
93
93
  // khác năm
94
94
  return hasTime ? date.format(`HH:mm DD/MM YYYY`) : date.format("DD/MM YYYY");
95
95
  }
96
+ export function extractLinks(text) {
97
+ // Regex match http:// hoặc https:// và domain
98
+ const urlRegex = /(https?:\/\/[^\s]+)/g;
99
+ return text.match(urlRegex) || [];
100
+ }
@@ -1,9 +1,11 @@
1
1
  import { MessageItem } from "@openim/wasm-client-sdk";
2
+ import { UpdateSessionResponse } from "../types/dto";
2
3
  type EmitterEvents = {
3
4
  CHAT_LIST_SCROLL_TO_BOTTOM: void;
4
5
  CHAT_LIST_SCROLL_TO_MESSAGE: string;
5
6
  PUSH_NEW_MSG: MessageItem;
6
7
  UPDATE_ONE_MSG: MessageItem;
8
+ UPDATE_SESSION: UpdateSessionResponse;
7
9
  };
8
10
  declare const emitter: import("mitt").Emitter<EmitterEvents>;
9
11
  export declare const emit: {
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,KAAK,aAAa,GAAG;IACnB,0BAA0B,EAAE,IAAI,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;IAEpC,YAAY,EAAE,WAAW,CAAC;IAC1B,cAAc,EAAE,WAAW,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,OAAO,uCAAwB,CAAC;AAEtC,eAAO,MAAM,IAAI;;;CAAe,CAAC;AAEjC,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,KAAK,aAAa,GAAG;IACnB,0BAA0B,EAAE,IAAI,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;IAEpC,YAAY,EAAE,WAAW,CAAC;IAC1B,cAAc,EAAE,WAAW,CAAC;IAE5B,cAAc,EAAE,qBAAqB,CAAC;CACvC,CAAC;AAEF,QAAA,MAAM,OAAO,uCAAwB,CAAC;AAEtC,eAAO,MAAM,IAAI;;;CAAe,CAAC;AAEjC,eAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@droppii-org/chat-sdk",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "Droppii React Chat SDK",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",