@droppii-org/chat-sdk 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/biz-inbox/BizInboxHeader.d.ts +3 -0
- package/dist/components/biz-inbox/BizInboxHeader.d.ts.map +1 -0
- package/dist/components/biz-inbox/BizInboxHeader.js +8 -0
- package/dist/components/biz-inbox/BizThreadAvatar.d.ts +10 -0
- package/dist/components/biz-inbox/BizThreadAvatar.d.ts.map +1 -0
- package/dist/components/biz-inbox/BizThreadAvatar.js +8 -0
- package/dist/components/biz-inbox/BizThreadCard.d.ts +8 -0
- package/dist/components/biz-inbox/BizThreadCard.d.ts.map +1 -0
- package/dist/components/biz-inbox/BizThreadCard.js +25 -0
- package/dist/components/biz-inbox/BizThreadList.d.ts +11 -0
- package/dist/components/biz-inbox/BizThreadList.d.ts.map +1 -0
- package/dist/components/biz-inbox/BizThreadList.js +35 -0
- package/dist/components/biz-inbox/BizThreadTitle.d.ts +8 -0
- package/dist/components/biz-inbox/BizThreadTitle.d.ts.map +1 -0
- package/dist/components/biz-inbox/BizThreadTitle.js +6 -0
- package/dist/components/biz-inbox/index.d.ts +10 -0
- package/dist/components/biz-inbox/index.d.ts.map +1 -0
- package/dist/components/biz-inbox/index.js +5 -0
- package/dist/components/bizThreadDetail/BizMessageBubble.d.ts +10 -0
- package/dist/components/bizThreadDetail/BizMessageBubble.d.ts.map +1 -0
- package/dist/components/bizThreadDetail/BizMessageBubble.js +11 -0
- package/dist/components/bizThreadDetail/BizMessageList.d.ts +3 -0
- package/dist/components/bizThreadDetail/BizMessageList.d.ts.map +1 -0
- package/dist/components/bizThreadDetail/BizMessageList.js +28 -0
- package/dist/components/bizThreadDetail/BizThreadDetailHeader.d.ts.map +1 -1
- package/dist/components/bizThreadDetail/BizThreadDetailHeader.js +4 -4
- package/dist/components/bizThreadDetail/BizThreadDetailInput.d.ts +2 -3
- package/dist/components/bizThreadDetail/BizThreadDetailInput.d.ts.map +1 -1
- package/dist/components/bizThreadDetail/BizThreadDetailInput.js +137 -10
- package/dist/components/bizThreadDetail/index.d.ts +3 -0
- package/dist/components/bizThreadDetail/index.d.ts.map +1 -1
- package/dist/components/bizThreadDetail/index.js +2 -0
- package/dist/components/bizThreadDetail/item/BizMessageItem.d.ts +8 -0
- package/dist/components/bizThreadDetail/item/BizMessageItem.d.ts.map +1 -0
- package/dist/components/bizThreadDetail/item/BizMessageItem.js +20 -0
- package/dist/components/cannedResponse/CannedResponseBody.js +2 -2
- package/dist/components/cannedResponse/CannedResponseFooter.js +1 -1
- package/dist/components/cannedResponse/CannedResponseHeader.js +1 -1
- package/dist/components/cannedResponse/team/TeamItem.d.ts.map +1 -1
- package/dist/components/cannedResponse/team/TeamItem.js +1 -1
- package/dist/components/chatBubble/ChatBubble.js +1 -1
- package/dist/components/conversation/ConversationBySessionItem.d.ts.map +1 -1
- package/dist/components/conversation/DeskConversationList.js +3 -3
- package/dist/components/mediaCollection/FileCollection.js +1 -1
- package/dist/components/mediaCollection/LinkCollection.js +1 -1
- package/dist/components/mediaCollection/VideoCollection.js +1 -1
- package/dist/components/mediaCollection/index.js +1 -1
- package/dist/components/message/GroupMembersDrawer.d.ts.map +1 -1
- package/dist/components/message/GroupMembersDrawer.js +1 -1
- package/dist/components/message/MessageHeader.d.ts.map +1 -1
- package/dist/components/message/MessageHeader.js +3 -3
- package/dist/components/message/MessageInfiniteScroll.d.ts +15 -0
- package/dist/components/message/MessageInfiniteScroll.d.ts.map +1 -0
- package/dist/components/message/MessageInfiniteScroll.js +20 -0
- package/dist/components/message/MessageList.d.ts.map +1 -1
- package/dist/components/message/MessageList.js +8 -76
- package/dist/components/message/SelectSession.js +1 -1
- package/dist/components/message/UnassignedSessionFooter.js +2 -2
- package/dist/components/message/footer/ActionBar.js +1 -1
- package/dist/components/message/footer/FilePreview.js +1 -1
- package/dist/components/message/footer/MediaActions.js +1 -1
- package/dist/components/message/footer/QuotedMessage.js +1 -1
- package/dist/components/message/footer/index.d.ts.map +1 -1
- package/dist/components/message/footer/index.js +1 -1
- package/dist/components/message/item/FileMessage.js +1 -1
- package/dist/components/message/item/QuoteMessage.js +2 -2
- package/dist/components/message/item/TextMessage.js +1 -1
- package/dist/components/message/item/index.js +1 -1
- package/dist/components/richTextEditor/RichTextEditor.js +4 -4
- package/dist/components/searchConversation/SearchAll.js +1 -1
- package/dist/components/searchConversation/SearchDrawer.js +1 -1
- package/dist/components/searchConversation/item/SearchItemAsUser.d.ts.map +1 -1
- package/dist/components/session/DeskAssignedSession.js +1 -1
- package/dist/components/session/DeskTeamInbox.js +1 -1
- package/dist/components/session/SessionFilterMenu.d.ts.map +1 -1
- package/dist/components/session/sessionMenuItems.d.ts.map +1 -1
- package/dist/components/session/sessionMenuItems.js +1 -1
- package/dist/components/thread/AssignConfirmModal.d.ts.map +1 -1
- package/dist/components/thread/ManualAssignPopover.js +1 -1
- package/dist/components/thread/SessionSection.d.ts.map +1 -1
- package/dist/components/thread/SessionSection.js +1 -1
- package/dist/components/thread/UserSection.js +1 -1
- package/dist/context/ChatContext.d.ts.map +1 -1
- package/dist/hooks/biz/index.d.ts +1 -0
- package/dist/hooks/biz/index.d.ts.map +1 -1
- package/dist/hooks/biz/index.js +1 -0
- package/dist/hooks/biz/useBizConversationList.d.ts.map +1 -1
- package/dist/hooks/biz/useBizSendMessage.d.ts +4 -0
- package/dist/hooks/biz/useBizSendMessage.d.ts.map +1 -0
- package/dist/hooks/biz/useBizSendMessage.js +61 -0
- package/dist/hooks/biz/useCreateBizConversation.d.ts.map +1 -1
- package/dist/hooks/cannedResponse/useFetchCannedCategories.d.ts.map +1 -1
- package/dist/hooks/cannedResponse/useFetchCannedResponse.d.ts.map +1 -1
- package/dist/hooks/conversation/useConversation.js +1 -1
- package/dist/hooks/global/useGlobalEvent.js +2 -2
- package/dist/hooks/message/useMessageListScroll.d.ts +29 -0
- package/dist/hooks/message/useMessageListScroll.d.ts.map +1 -0
- package/dist/hooks/message/useMessageListScroll.js +88 -0
- package/dist/hooks/message/usePullSessionMessages.d.ts.map +1 -1
- package/dist/hooks/message/useSendMessage.d.ts.map +1 -1
- package/dist/hooks/message/useSendMessage.js +1 -1
- package/dist/hooks/search/useSearchMessage.d.ts.map +1 -1
- package/dist/hooks/session/useAssignSession.d.ts.map +1 -1
- package/dist/hooks/session/useCloseSession.d.ts.map +1 -1
- package/dist/hooks/session/useCreateNote.d.ts.map +1 -1
- package/dist/hooks/session/useGetLabelSession.d.ts.map +1 -1
- package/dist/hooks/session/useGetListSessionByConversation.d.ts.map +1 -1
- package/dist/hooks/session/useGetSession.d.ts.map +1 -1
- package/dist/hooks/session/useGetSessionSummary.d.ts.map +1 -1
- package/dist/hooks/session/useGetTeamSessionSummary.d.ts.map +1 -1
- package/dist/hooks/session/useGetTeamSessionSummary.js +14 -8
- package/dist/hooks/session/useGetTeamSupporters.d.ts.map +1 -1
- package/dist/hooks/session/useGetUserSideInfo.d.ts.map +1 -1
- package/dist/hooks/session/useJoinSession.d.ts.map +1 -1
- package/dist/hooks/session/useLeaveConversation.d.ts.map +1 -1
- package/dist/hooks/session/useReopenOrCreateSession.d.ts.map +1 -1
- package/dist/hooks/session/useSessionLatestPreview.d.ts.map +1 -1
- package/dist/hooks/session/useSessionLatestPreview.js +1 -1
- package/dist/hooks/session/useSortedSessions.d.ts.map +1 -1
- package/dist/hooks/session/useUpdateNote.d.ts.map +1 -1
- package/dist/hooks/session/useUpdateSession.d.ts.map +1 -1
- package/dist/hooks/session/useUpdateSessionInfo.d.ts.map +1 -1
- package/dist/hooks/team/useFetchMyTeam.d.ts.map +1 -1
- package/dist/hooks/user/useCurrentUserAccountType.d.ts.map +1 -1
- package/dist/hooks/user/useUpdateFcmToken.d.ts.map +1 -1
- package/dist/hooks/user/useUpdateFcmToken.js +1 -1
- package/dist/locales/i18n.js +3 -3
- package/dist/locales/i18n.ts +3 -3
- package/dist/locales/vi/biz-inbox.json +20 -0
- package/dist/screens/bizMessage/index.d.ts.map +1 -1
- package/dist/screens/bizMessage/index.js +4 -4
- package/dist/screens/bizThreadDetail/index.d.ts.map +1 -1
- package/dist/screens/bizThreadDetail/index.js +2 -2
- package/dist/store/bizConversation.d.ts.map +1 -1
- package/dist/store/bizMessageDraft.d.ts +8 -0
- package/dist/store/bizMessageDraft.d.ts.map +1 -0
- package/dist/store/bizMessageDraft.js +23 -0
- package/dist/store/type.d.ts +111 -0
- package/dist/store/type.d.ts.map +1 -0
- package/dist/store/type.js +1 -0
- package/dist/styles/global.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/chat.d.ts +1 -0
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/dto.d.ts +1 -1
- package/dist/types/dto.d.ts.map +1 -1
- package/dist/utils/bizConversation.d.ts.map +1 -1
- package/dist/utils/bizMessage.d.ts +15 -0
- package/dist/utils/bizMessage.d.ts.map +1 -0
- package/dist/utils/bizMessage.js +23 -0
- package/dist/utils/events.d.ts +1 -0
- package/dist/utils/events.d.ts.map +1 -1
- package/dist/utils/messageTransform.d.ts.map +1 -1
- package/package.json +126 -126
|
@@ -3,11 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState, useEffect, useRef } from "react";
|
|
4
4
|
import { useSearchParams } from "next/navigation";
|
|
5
5
|
import { Input, Empty, Drawer, Button, Spin } from "antd";
|
|
6
|
-
import { Icon } from "
|
|
6
|
+
import { Icon } from "../../components/icon";
|
|
7
7
|
import useConversationStore from "../../store/conversation";
|
|
8
8
|
import { useTranslation } from "react-i18next";
|
|
9
9
|
import { useBoolean, useDebounce } from "ahooks";
|
|
10
|
-
import SearchConversation from "
|
|
10
|
+
import SearchConversation from "../../components/searchConversation";
|
|
11
11
|
import useSessionStore from "../../store/session";
|
|
12
12
|
import InfiniteScroll from "react-infinite-scroll-component";
|
|
13
13
|
import ConversationBySessionItem from "./ConversationBySessionItem";
|
|
@@ -17,7 +17,7 @@ import { useSessionLatestPreview } from "../../hooks/session/useSessionLatestPre
|
|
|
17
17
|
import { useGetTeamSessionSummary } from "../../hooks/session/useGetTeamSessionSummary";
|
|
18
18
|
import { DChatSDK } from "../../constants/sdk";
|
|
19
19
|
import emitter from "../../utils/events";
|
|
20
|
-
import { getFilterConfig } from "
|
|
20
|
+
import { getFilterConfig } from "../../components/session/sessionMenuItems";
|
|
21
21
|
const DeskConversationList = () => {
|
|
22
22
|
var _a, _b;
|
|
23
23
|
const searchInputRef = useRef(null);
|
|
@@ -8,7 +8,7 @@ import dayjs from "dayjs";
|
|
|
8
8
|
import useConversationStore from "../../store/conversation";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import { documentIcon } from "../../assets/svg";
|
|
11
|
-
import { shortenFileName } from "
|
|
11
|
+
import { shortenFileName } from "../../components/message/footer/FilePreview";
|
|
12
12
|
import { renderFileSize } from "../../utils/common";
|
|
13
13
|
const FileCollection = () => {
|
|
14
14
|
const { t } = useTranslation();
|
|
@@ -7,7 +7,7 @@ import { useCallback, useEffect, useState } from "react";
|
|
|
7
7
|
import dayjs from "dayjs";
|
|
8
8
|
import InfiniteScroll from "react-infinite-scroll-component";
|
|
9
9
|
import { MessageType, SessionType } from "@openim/wasm-client-sdk";
|
|
10
|
-
import { Icon } from "
|
|
10
|
+
import { Icon } from "../../components/icon";
|
|
11
11
|
import { DChatSDK } from "../../constants/sdk";
|
|
12
12
|
import { useChatContext } from "../../context/ChatContext";
|
|
13
13
|
import { message as antdMessage } from "antd";
|
|
@@ -8,7 +8,7 @@ import dayjs from "dayjs";
|
|
|
8
8
|
import useConversationStore from "../../store/conversation";
|
|
9
9
|
import { useBoolean } from "ahooks";
|
|
10
10
|
import { images } from "../../constants/images";
|
|
11
|
-
import { Icon } from "
|
|
11
|
+
import { Icon } from "../../components/icon";
|
|
12
12
|
import { useTranslation } from "react-i18next";
|
|
13
13
|
const VideoCollection = () => {
|
|
14
14
|
const { t } = useTranslation();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useBoolean } from "ahooks";
|
|
4
4
|
import { Button, Drawer, Tabs } from "antd";
|
|
5
|
-
import { Icon } from "
|
|
5
|
+
import { Icon } from "../../components/icon";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
import ImageCollection from "./ImageCollection";
|
|
8
8
|
import VideoCollection from "./VideoCollection";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupMembersDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/message/GroupMembersDrawer.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GroupMembersDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/message/GroupMembersDrawer.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAK/C,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAsCD,QAAA,MAAM,kBAAkB,GAAI,wDAKzB,uBAAuB,4CA0OzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -8,7 +8,7 @@ import useAuthStore from "../../store/auth";
|
|
|
8
8
|
import useConversationStore from "../../store/conversation";
|
|
9
9
|
import { useGroupMembers } from "../../hooks/group/useGroupMembers";
|
|
10
10
|
import { useLeaveConversation } from "../../hooks/session/useLeaveConversation";
|
|
11
|
-
import { Icon } from "
|
|
11
|
+
import { Icon } from "../../components/icon";
|
|
12
12
|
const getMemberDisplayName = (member) => {
|
|
13
13
|
return member.nickname || member.userID || "";
|
|
14
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageHeader.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"MessageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageHeader.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAM/C,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC3B;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,wCAIpB,kBAAkB,4CA6MpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Avatar, Button, message } from "antd";
|
|
4
|
-
import { Icon } from "
|
|
4
|
+
import { Icon } from "../../components/icon";
|
|
5
5
|
import { useConversationDisplayData } from "../../hooks/conversation/useConversation";
|
|
6
6
|
import useConversationStore from "../../store/conversation";
|
|
7
|
-
import MediaCollection from "
|
|
7
|
+
import MediaCollection from "../../components/mediaCollection";
|
|
8
8
|
import { useEffect, useMemo, useState } from "react";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import { SessionStatus, SessionTag } from "../../types/chat";
|
|
11
11
|
import SelectSession from "./SelectSession";
|
|
12
12
|
import { useUpdateSession } from "../../hooks/session/useUpdateSession";
|
|
13
13
|
import useAuthStore from "../../store/auth";
|
|
14
|
-
import SearchDrawer from "
|
|
14
|
+
import SearchDrawer from "../../components/searchConversation/SearchDrawer";
|
|
15
15
|
import { isGroupSession } from "../../utils/imCommon";
|
|
16
16
|
import GroupMembersDrawer from "./GroupMembersDrawer";
|
|
17
17
|
const MessageHeader = ({ onClose, currentSession, isJoined, }) => {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode, Ref } from "react";
|
|
2
|
+
import type { MessageListLoadState } from "../../hooks/message/useMessageListScroll";
|
|
3
|
+
export interface MessageInfiniteScrollProps {
|
|
4
|
+
scrollRef: Ref<HTMLDivElement>;
|
|
5
|
+
scrollableTargetId: string;
|
|
6
|
+
loadState: MessageListLoadState;
|
|
7
|
+
onLoadMoreOld: () => void;
|
|
8
|
+
onScroll: (e: React.UIEvent<HTMLDivElement>) => void;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
empty?: ReactNode;
|
|
11
|
+
containerClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const MessageInfiniteScroll: ({ scrollRef, scrollableTargetId, loadState, onLoadMoreOld, onScroll, children, empty, containerClassName, }: MessageInfiniteScrollProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default MessageInfiniteScroll;
|
|
15
|
+
//# sourceMappingURL=MessageInfiniteScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageInfiniteScroll.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageInfiniteScroll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAkBjF,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,oBAAoB,CAAC;IAChC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,qBAAqB,GAAI,6GAS5B,0BAA0B,4CA8B5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Spin } from "antd";
|
|
4
|
+
import InfiniteScroll from "react-infinite-scroll-component";
|
|
5
|
+
const scrollContainerStyle = {
|
|
6
|
+
height: "100%",
|
|
7
|
+
overflowY: "auto",
|
|
8
|
+
overflowX: "hidden",
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column-reverse",
|
|
11
|
+
paddingBottom: 12,
|
|
12
|
+
};
|
|
13
|
+
const infiniteScrollStyle = {
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column-reverse",
|
|
16
|
+
minWidth: 0,
|
|
17
|
+
width: "100%",
|
|
18
|
+
};
|
|
19
|
+
const MessageInfiniteScroll = ({ scrollRef, scrollableTargetId, loadState, onLoadMoreOld, onScroll, children, empty, containerClassName, }) => (_jsx("div", { id: scrollableTargetId, ref: scrollRef, className: containerClassName, style: scrollContainerStyle, children: empty && loadState.messageList.length === 0 ? (empty) : (_jsx(InfiniteScroll, { dataLength: loadState.messageList.length, next: onLoadMoreOld, style: infiniteScrollStyle, inverse: true, hasMore: loadState.hasMoreOld, loader: _jsx("div", { className: "flex items-center justify-center py-2", children: _jsx(Spin, {}) }), scrollableTarget: scrollableTargetId, onScroll: (e) => onScroll(e), children: children })) }));
|
|
20
|
+
export default MessageInfiniteScroll;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageList.tsx"],"names":[],"mappings":"AA2BA,UAAU,gBAAgB;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CAoQ3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -2,35 +2,31 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useConversationMessages } from "../../hooks/message/useConversationMessages";
|
|
4
4
|
import { Button, Empty, Modal, Spin } from "antd";
|
|
5
|
-
import { useCallback, useEffect,
|
|
5
|
+
import { useCallback, useEffect, useState } from "react";
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
7
|
import isToday from "dayjs/plugin/isToday";
|
|
8
8
|
import emitter from "../../utils/events";
|
|
9
9
|
import MessageItem from "./item";
|
|
10
|
-
import
|
|
10
|
+
import MessageInfiniteScroll from "./MessageInfiniteScroll";
|
|
11
11
|
import MessageHeader from "./MessageHeader";
|
|
12
12
|
import MessageFooter from "./footer";
|
|
13
13
|
import UnassignedSessionFooter from "./UnassignedSessionFooter";
|
|
14
14
|
import { images } from "../../constants/images";
|
|
15
15
|
import { useTranslation } from "react-i18next";
|
|
16
16
|
import useConversationStore from "../../store/conversation";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { useBoolean } from "ahooks";
|
|
18
|
+
import { useMessageListScroll } from "../../hooks/message/useMessageListScroll";
|
|
19
19
|
import { MSG_ITEM_CONTENT_PREFIX, MSG_ITEM_PREFIX } from "../../constants";
|
|
20
|
-
import { markConversationMessageAsRead } from "../../hooks/conversation/useConversation";
|
|
21
20
|
import { useChatContext } from "../../context/ChatContext";
|
|
22
21
|
import { useRevokeMessage } from "../../hooks/message/useRevokeMessage";
|
|
23
22
|
import { useConversationSessionState } from "../../hooks/session/useConversationSessionState";
|
|
24
23
|
import { useJoinGroupFlow } from "../../hooks/session/useJoinGroupFlow";
|
|
25
24
|
import { ConnectStatus, SessionStatus } from "../../types/chat";
|
|
26
25
|
dayjs.extend(isToday);
|
|
27
|
-
const BOTTOM_THRESHOLD = -5;
|
|
28
26
|
const MessageList = (props) => {
|
|
29
|
-
var _a;
|
|
30
27
|
const { t } = useTranslation();
|
|
31
28
|
const { user, connectStatus } = useChatContext();
|
|
32
29
|
const { onClose, conversationId, searchClientMsgID, openCreateCannedModal } = props;
|
|
33
|
-
const scrollRef = useRef(null);
|
|
34
30
|
const conversationData = useConversationStore((state) => state.conversationData);
|
|
35
31
|
const setQuotedMessage = useConversationStore((state) => state.setQuotedMessage);
|
|
36
32
|
const setSearchClientMsgID = useConversationStore((state) => state.setSearchClientMsgID);
|
|
@@ -47,12 +43,14 @@ const MessageList = (props) => {
|
|
|
47
43
|
groupId,
|
|
48
44
|
sessionId: latestConversationSession === null || latestConversationSession === void 0 ? void 0 : latestConversationSession.id,
|
|
49
45
|
});
|
|
50
|
-
const
|
|
46
|
+
const messageController = useConversationMessages({
|
|
51
47
|
conversationId,
|
|
52
48
|
searchClientMsgID,
|
|
53
49
|
restrictToLastSession: shouldRestrictToLastSession,
|
|
54
50
|
customerUserID,
|
|
55
51
|
});
|
|
52
|
+
const { loadState, moreNewLoading } = messageController;
|
|
53
|
+
const { scrollRef, loadMoreOldMessage, handleInfiniteScroll, scrollToBottom } = useMessageListScroll(Object.assign({ conversationId, userId: user === null || user === void 0 ? void 0 : user.userID }, messageController));
|
|
56
54
|
const handleOpenRevoke = useCallback((clientMsgID) => {
|
|
57
55
|
setSelectedItem(clientMsgID);
|
|
58
56
|
openConfirmRevoke();
|
|
@@ -70,32 +68,6 @@ const MessageList = (props) => {
|
|
|
70
68
|
revokeMessage,
|
|
71
69
|
handleCloseRevoke,
|
|
72
70
|
]);
|
|
73
|
-
const handleMarkConversationMessageAsRead = useCallback(() => {
|
|
74
|
-
var _a, _b, _c, _d, _e;
|
|
75
|
-
const lastMessage = (_b = (_a = latestLoadState === null || latestLoadState === void 0 ? void 0 : latestLoadState.current) === null || _a === void 0 ? void 0 : _a.messageList) === null || _b === void 0 ? void 0 : _b[0];
|
|
76
|
-
if (!((_c = latestLoadState === null || latestLoadState === void 0 ? void 0 : latestLoadState.current) === null || _c === void 0 ? void 0 : _c.hasMoreNew) &&
|
|
77
|
-
!moreNewLoading &&
|
|
78
|
-
(lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.isRead) === false &&
|
|
79
|
-
(lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.sendID) !== (user === null || user === void 0 ? void 0 : user.userID) &&
|
|
80
|
-
isNumber((_d = scrollRef.current) === null || _d === void 0 ? void 0 : _d.scrollTop) &&
|
|
81
|
-
((_e = scrollRef.current) === null || _e === void 0 ? void 0 : _e.scrollTop) >= BOTTOM_THRESHOLD) {
|
|
82
|
-
markConversationMessageAsRead(conversationId);
|
|
83
|
-
}
|
|
84
|
-
}, [conversationId, moreNewLoading, user === null || user === void 0 ? void 0 : user.userID]);
|
|
85
|
-
const scrollToBottom = () => {
|
|
86
|
-
handleMarkConversationMessageAsRead();
|
|
87
|
-
setTimeout(() => {
|
|
88
|
-
var _a, _b, _c, _d;
|
|
89
|
-
if (isNumber((_a = scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollTop) &&
|
|
90
|
-
((_b = scrollRef.current) === null || _b === void 0 ? void 0 : _b.scrollTop) >= BOTTOM_THRESHOLD) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
(_c = scrollRef.current) === null || _c === void 0 ? void 0 : _c.scrollTo({
|
|
94
|
-
top: (_d = scrollRef.current) === null || _d === void 0 ? void 0 : _d.scrollHeight,
|
|
95
|
-
behavior: "smooth",
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
71
|
const scrollToMessage = (clientMsgID) => {
|
|
100
72
|
setTimeout(() => {
|
|
101
73
|
const targetElement = document.getElementById(`${MSG_ITEM_PREFIX}${clientMsgID}`);
|
|
@@ -126,16 +98,6 @@ const MessageList = (props) => {
|
|
|
126
98
|
setSearchClientMsgID(clientMsgID);
|
|
127
99
|
}
|
|
128
100
|
}, [scrollToMessage, loadState.messageList, setSearchClientMsgID]);
|
|
129
|
-
const loadMoreOldMessage = () => {
|
|
130
|
-
if (!loadState.hasMoreOld || moreOldLoading)
|
|
131
|
-
return;
|
|
132
|
-
getMoreOldMessages();
|
|
133
|
-
};
|
|
134
|
-
const { run: loadMoreNewMessage } = useDebounceFn(() => {
|
|
135
|
-
if (!loadState.hasMoreNew || moreNewLoading)
|
|
136
|
-
return;
|
|
137
|
-
getMoreNewMessages();
|
|
138
|
-
}, { wait: 200 });
|
|
139
101
|
useEffect(() => {
|
|
140
102
|
emitter.on("CHAT_LIST_SCROLL_TO_BOTTOM", scrollToBottom);
|
|
141
103
|
emitter.on("CHAT_LIST_SCROLL_TO_MESSAGE", scrollToMessage);
|
|
@@ -155,18 +117,6 @@ const MessageList = (props) => {
|
|
|
155
117
|
emitter.off("UPDATE_SESSION", handler);
|
|
156
118
|
};
|
|
157
119
|
}, [conversationId, refetchConversationSessions]);
|
|
158
|
-
useEffect(() => {
|
|
159
|
-
if (!loadState.hasMoreNew &&
|
|
160
|
-
!loadState.initLoading &&
|
|
161
|
-
loadState.messageList.length > 0) {
|
|
162
|
-
handleMarkConversationMessageAsRead();
|
|
163
|
-
}
|
|
164
|
-
}, [
|
|
165
|
-
loadState.messageList.length,
|
|
166
|
-
loadState.hasMoreNew,
|
|
167
|
-
loadState.initLoading,
|
|
168
|
-
handleMarkConversationMessageAsRead,
|
|
169
|
-
]);
|
|
170
120
|
useEffect(() => {
|
|
171
121
|
if (!openMenuId)
|
|
172
122
|
return;
|
|
@@ -185,24 +135,6 @@ const MessageList = (props) => {
|
|
|
185
135
|
backgroundSize: "cover",
|
|
186
136
|
backgroundPosition: "center",
|
|
187
137
|
overflowX: "hidden",
|
|
188
|
-
}, children: [_jsx(MessageHeader, { onClose: onClose, currentSession: latestConversationSession, isJoined: isJoined }), _jsx("div", { id: "
|
|
189
|
-
height: "100%",
|
|
190
|
-
overflowY: "auto",
|
|
191
|
-
overflowX: "hidden",
|
|
192
|
-
display: "flex",
|
|
193
|
-
flexDirection: "column-reverse",
|
|
194
|
-
paddingBottom: 12,
|
|
195
|
-
}, children: _jsx(InfiniteScroll, { dataLength: ((_a = loadState.messageList) === null || _a === void 0 ? void 0 : _a.length) || 0, next: loadMoreOldMessage, style: {
|
|
196
|
-
display: "flex",
|
|
197
|
-
flexDirection: "column-reverse",
|
|
198
|
-
minWidth: 0,
|
|
199
|
-
width: "100%",
|
|
200
|
-
}, inverse: true, hasMore: loadState.hasMoreOld, loader: _jsx("div", { className: "flex items-center justify-center py-2", children: _jsx(Spin, {}) }), scrollableTarget: "scrollableMessagesDiv", onScroll: (e) => {
|
|
201
|
-
const target = e.target;
|
|
202
|
-
if (target.scrollTop > BOTTOM_THRESHOLD) {
|
|
203
|
-
handleMarkConversationMessageAsRead();
|
|
204
|
-
loadMoreNewMessage();
|
|
205
|
-
}
|
|
206
|
-
}, children: loadState.messageList.map((message, _, array) => (_jsx(MessageItem, { message: message, allMessages: array, contextMenuOpen: openMenuId === message.clientMsgID, onContextMenuOpenChange: (open) => setOpenMenuId(open ? message.clientMsgID : null), onRevokeMessage: handleOpenRevoke, onQuoteMessage: setQuotedMessage, onPressQuoteMessage: onPressQuoteMessage }, message.clientMsgID))) }) }), moreNewLoading && (_jsx("div", { className: "flex items-center justify-center py-2", children: _jsx(Spin, {}) })), isCheckingMembership ? (_jsx("div", { className: "border-t bg-white py-4 flex items-center justify-center", children: _jsx(Spin, {}) })) : (latestConversationSession === null || latestConversationSession === void 0 ? void 0 : latestConversationSession.status) === SessionStatus.UNASSIGNED ? (_jsx(UnassignedSessionFooter, { sessionId: latestConversationSession.id, teamId: latestConversationSession.teamId })) : shouldRestrictToLastSession ? (_jsxs("div", { className: "border-t bg-white py-4 flex flex-col items-center gap-2", children: [_jsx("p", { className: "text-sm text-gray-500", children: t("join_group_required") }), _jsx(Button, { type: "primary", onClick: joinGroup, loading: isJoining, children: t("join_group") })] })) : (_jsx(MessageFooter, { currentSession: latestConversationSession, openCreateCannedModal: openCreateCannedModal })), _jsx(Modal, { centered: true, open: showConfirmRevoke, onOk: onRevokeMessage, onCancel: handleCloseRevoke, title: t("revoke_message_confirm_title"), okText: t("revoke"), cancelText: t("cancel"), okType: "danger", confirmLoading: isRevoking, getContainer: false, forceRender: true, children: _jsx("p", { children: t("revoke_message_confirm_message") }) })] }));
|
|
138
|
+
}, children: [_jsx(MessageHeader, { onClose: onClose, currentSession: latestConversationSession, isJoined: isJoined }), _jsx(MessageInfiniteScroll, { scrollRef: scrollRef, scrollableTargetId: "scrollableMessagesDiv", loadState: loadState, onLoadMoreOld: loadMoreOldMessage, onScroll: handleInfiniteScroll, children: loadState.messageList.map((message, _, array) => (_jsx(MessageItem, { message: message, allMessages: array, contextMenuOpen: openMenuId === message.clientMsgID, onContextMenuOpenChange: (open) => setOpenMenuId(open ? message.clientMsgID : null), onRevokeMessage: handleOpenRevoke, onQuoteMessage: setQuotedMessage, onPressQuoteMessage: onPressQuoteMessage }, message.clientMsgID))) }), moreNewLoading && (_jsx("div", { className: "flex items-center justify-center py-2", children: _jsx(Spin, {}) })), isCheckingMembership ? (_jsx("div", { className: "border-t bg-white py-4 flex items-center justify-center", children: _jsx(Spin, {}) })) : (latestConversationSession === null || latestConversationSession === void 0 ? void 0 : latestConversationSession.status) === SessionStatus.UNASSIGNED ? (_jsx(UnassignedSessionFooter, { sessionId: latestConversationSession.id, teamId: latestConversationSession.teamId })) : shouldRestrictToLastSession ? (_jsxs("div", { className: "border-t bg-white py-4 flex flex-col items-center gap-2", children: [_jsx("p", { className: "text-sm text-gray-500", children: t("join_group_required") }), _jsx(Button, { type: "primary", onClick: joinGroup, loading: isJoining, children: t("join_group") })] })) : (_jsx(MessageFooter, { currentSession: latestConversationSession, openCreateCannedModal: openCreateCannedModal })), _jsx(Modal, { centered: true, open: showConfirmRevoke, onOk: onRevokeMessage, onCancel: handleCloseRevoke, title: t("revoke_message_confirm_title"), okText: t("revoke"), cancelText: t("cancel"), okType: "danger", confirmLoading: isRevoking, getContainer: false, forceRender: true, children: _jsx("p", { children: t("revoke_message_confirm_message") }) })] }));
|
|
207
139
|
};
|
|
208
140
|
export default MessageList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Select } from "antd";
|
|
4
|
-
import { Icon } from "
|
|
4
|
+
import { Icon } from "../../components/icon";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
const SelectSession = ({ options, value, onChange, excludeOptions, placeholder, }) => {
|
|
7
7
|
const selectedOption = options.find((option) => option.value === value);
|
|
@@ -4,8 +4,8 @@ import { Button, message as antdMessage } from "antd";
|
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { useAssignSession } from "../../hooks/session/useAssignSession";
|
|
6
6
|
import useAuthStore from "../../store/auth";
|
|
7
|
-
import ManualAssignPopover from "
|
|
8
|
-
import { Icon } from "
|
|
7
|
+
import ManualAssignPopover from "../../components/thread/ManualAssignPopover";
|
|
8
|
+
import { Icon } from "../../components/icon";
|
|
9
9
|
const UnassignedSessionFooter = ({ sessionId, teamId, }) => {
|
|
10
10
|
const { t } = useTranslation();
|
|
11
11
|
const userID = useAuthStore((state) => state.userID);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { Button } from "antd";
|
|
5
|
-
import { Icon } from "
|
|
5
|
+
import { Icon } from "../../../components/icon";
|
|
6
6
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
7
7
|
import { $createParagraphNode, $getRoot, $getSelection, $isRangeSelection, } from "lexical";
|
|
8
8
|
import { $generateHtmlFromNodes } from "@lexical/html";
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useCallback } from "react";
|
|
4
4
|
import { useMessageFooterContext } from ".";
|
|
5
5
|
import { Button } from "antd";
|
|
6
|
-
import { Icon } from "
|
|
6
|
+
import { Icon } from "../../../components/icon";
|
|
7
7
|
import { documentIcon } from "../../../assets/svg";
|
|
8
8
|
const documentTypes = [
|
|
9
9
|
"application/pdf",
|
|
@@ -7,7 +7,7 @@ import { Button, Upload, message as antdMessage } from "antd";
|
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { useTranslation } from "react-i18next";
|
|
9
9
|
import EmojiPicker from "./EmojiPicker";
|
|
10
|
-
import { Icon } from "
|
|
10
|
+
import { Icon } from "../../../components/icon";
|
|
11
11
|
import { validateFile, validateVideoLimit, } from "../../../utils/fileValidation";
|
|
12
12
|
import { DOCUMENT_TYPES } from "./editorConfig";
|
|
13
13
|
import CannedResponseIcon from "../../../assets/svg/cannedResponse";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import useConversationStore from "../../../store/conversation";
|
|
4
|
-
import { Icon } from "
|
|
4
|
+
import { Icon } from "../../../components/icon";
|
|
5
5
|
import { useCallback } from "react";
|
|
6
6
|
import { Button } from "antd";
|
|
7
7
|
import { useChatContext } from "../../../context/ChatContext";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/footer/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAe,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/footer/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAe,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAKrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAkB/C,UAAU,kBAAkB;IAC1B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC;AASD,eAAO,MAAM,oBAAoB,mDAY/B,CAAC;AAEH,eAAO,MAAM,uBAAuB,gCAAyC,CAAC;AAE9E,QAAA,MAAM,qBAAqB,GAAI,4CAG5B,kBAAkB,4CA8QpB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -15,7 +15,7 @@ import FilePreview from "./FilePreview";
|
|
|
15
15
|
import { useTranslation } from "react-i18next";
|
|
16
16
|
import PasteAndDropPlugin from "./PasteAndDropPlugin";
|
|
17
17
|
import { QuotedMessageFooter } from "./QuotedMessage";
|
|
18
|
-
import CannedResponse from "
|
|
18
|
+
import CannedResponse from "../../../components/cannedResponse";
|
|
19
19
|
import { CannedResponseTriggerPlugin } from "./CannedResponsePlugin";
|
|
20
20
|
import { useBoolean } from "ahooks";
|
|
21
21
|
import useAuthStore from "../../../store/auth";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { shortenFileName } from "
|
|
2
|
+
import { shortenFileName } from "../../../components/message/footer/FilePreview";
|
|
3
3
|
import { documentIcon } from "../../../assets/svg";
|
|
4
4
|
const FileMessageItem = (props) => {
|
|
5
5
|
var _a;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { generateContentBasedOnMessageType } from "../../../utils/common";
|
|
3
|
-
import { Icon } from "
|
|
3
|
+
import { Icon } from "../../../components/icon";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import MediaPreviewIcon from "
|
|
6
|
+
import MediaPreviewIcon from "../../../components/message/MediaPreviewIcon";
|
|
7
7
|
import useAuthStore from "../../../store/auth";
|
|
8
8
|
import { useCallback, useMemo } from "react";
|
|
9
9
|
import useConversationStore from "../../../store/conversation";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { MessageType } from "@openim/wasm-client-sdk";
|
|
4
|
-
import
|
|
4
|
+
import useAuthStore from "../../../store/auth";
|
|
5
5
|
import { sanitizeHtml } from "../../../utils/common";
|
|
6
6
|
const TextMessageItem = (props) => {
|
|
7
7
|
var _a, _b, _c;
|
|
@@ -18,7 +18,7 @@ import { Trans, useTranslation } from "react-i18next";
|
|
|
18
18
|
import UrlTextMessageItem from "./UrlTextMessage";
|
|
19
19
|
import MessageStatusIndicator from "./MessageStatusIndicator";
|
|
20
20
|
import { useSendMessage, isMediaResendable, } from "../../../hooks/message/useSendMessage";
|
|
21
|
-
import { Icon } from "
|
|
21
|
+
import { Icon } from "../../../components/icon";
|
|
22
22
|
import RevokeMessageItem from "./RevokeMessage";
|
|
23
23
|
import QuoteMessageItem from "./QuoteMessage";
|
|
24
24
|
import SystemLogMessageItem from "./SystemLogMessage";
|
|
@@ -12,10 +12,10 @@ import { $generateHtmlFromNodes, $generateNodesFromDOM } from "@lexical/html";
|
|
|
12
12
|
import { $getRoot } from "lexical";
|
|
13
13
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
14
14
|
import { useEffect } from "react";
|
|
15
|
-
import { ToolbarPlugin } from "
|
|
16
|
-
import MediaActions from "
|
|
17
|
-
import { FilePreviewList } from "
|
|
18
|
-
import { editorTheme, editorNodes, editorOnError, } from "
|
|
15
|
+
import { ToolbarPlugin } from "../../components/message/footer/ToolbarPlugin";
|
|
16
|
+
import MediaActions from "../../components/message/footer/MediaActions";
|
|
17
|
+
import { FilePreviewList } from "../../components/message/footer/FilePreview";
|
|
18
|
+
import { editorTheme, editorNodes, editorOnError, } from "../../components/message/footer/editorConfig";
|
|
19
19
|
const EDITOR_CONFIG = {
|
|
20
20
|
namespace: "CannedResponseEditor",
|
|
21
21
|
theme: editorTheme,
|
|
@@ -4,7 +4,7 @@ import clsx from "clsx";
|
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { useSearchMessage } from "../../hooks/search/useSearchMessage";
|
|
6
6
|
import { MessageType } from "@openim/wasm-client-sdk";
|
|
7
|
-
import { Icon } from "
|
|
7
|
+
import { Icon } from "../../components/icon";
|
|
8
8
|
import SearchItemAsMessage from "./item/SearchItemAsMessage";
|
|
9
9
|
import { useGetSession } from "../../hooks/session/useGetSession";
|
|
10
10
|
import SearchItemAsUser from "./item/SearchItemAsUser";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Drawer, Input } from "antd";
|
|
3
|
-
import { Icon } from "
|
|
3
|
+
import { Icon } from "../../components/icon";
|
|
4
4
|
import { useIsMobile } from "../../hooks/common/useIsMobile";
|
|
5
5
|
import useBoolean from "ahooks/lib/useBoolean";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchItemAsUser.d.ts","sourceRoot":"","sources":["../../../../src/components/searchConversation/item/SearchItemAsUser.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SearchItemAsUser.d.ts","sourceRoot":"","sources":["../../../../src/components/searchConversation/item/SearchItemAsUser.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKhD,UAAU,qBAAqB;IAC7B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,4CAyCrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { useBoolean } from "ahooks";
|
|
|
4
4
|
import { Button, Layout } from "antd";
|
|
5
5
|
import { useCallback, useEffect } from "react";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
|
-
import { Icon } from "
|
|
7
|
+
import { Icon } from "../../components/icon";
|
|
8
8
|
import { useGetSessionSummary } from "../../hooks/session/useGetSessionSummary";
|
|
9
9
|
import useSessionStore from "../../store/session";
|
|
10
10
|
import emitter from "../../utils/events";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { Icon } from "
|
|
5
|
+
import { Icon } from "../../components/icon";
|
|
6
6
|
import { useGetTeamSessionSummary } from "../../hooks/session/useGetTeamSessionSummary";
|
|
7
7
|
import useSessionStore from "../../store/session";
|
|
8
8
|
import emitter from "../../utils/events";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionFilterMenu.d.ts","sourceRoot":"","sources":["../../../src/components/session/SessionFilterMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SessionFilterMenu.d.ts","sourceRoot":"","sources":["../../../src/components/session/SessionFilterMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGtD,UAAU,sBAAsB;IAC9B,OAAO,EAAE,uBAAuB,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,cAAc,CAAC;IAC9B,cAAc,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAaD,QAAA,MAAM,iBAAiB,GAAI,uFAOxB,sBAAsB,4CAiCxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionMenuItems.d.ts","sourceRoot":"","sources":["../../../src/components/session/sessionMenuItems.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sessionMenuItems.d.ts","sourceRoot":"","sources":["../../../src/components/session/sessionMenuItems.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,KAAK,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EA0DvD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,oCACQ,CAAC;AAEpD,UAAU,4BAA4B;IACpC,OAAO,EAAE,uBAAuB,CAAC;IACjC,CAAC,EAAE,SAAS,CAAC;IACb,cAAc,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AA0BD,eAAO,MAAM,qBAAqB,GAAI,oDAKnC,4BAA4B,KAAG,QAAQ,EA4CzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/thread/AssignConfirmModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AssignConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/thread/AssignConfirmModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,UAAU,uBAAuB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,QAAA,MAAM,kBAAkB,GAAI,4DAOzB,uBAAuB,4CAwDzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { useState } from "react";
|
|
|
3
3
|
import { Popover, Input, Avatar, Spin, Badge, Divider } from "antd";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import { Icon } from "
|
|
6
|
+
import { Icon } from "../../components/icon";
|
|
7
7
|
import { useGetTeamSupporters } from "../../hooks/session/useGetTeamSupporters";
|
|
8
8
|
import { useAssignSession, useAutoAssignSession, } from "../../hooks/session/useAssignSession";
|
|
9
9
|
import { message as antdMessage } from "antd";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionSection.d.ts","sourceRoot":"","sources":["../../../src/components/thread/SessionSection.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SessionSection.d.ts","sourceRoot":"","sources":["../../../src/components/thread/SessionSection.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAqB/D,eAAO,MAAM,iBAAiB,GAAI,wBAG/B;IACD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;CACnB,4CAkNA,CAAC;AAiDF,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,cAAc,GAAI,yBAAyB,mBAAmB,4CAmDnE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useBoolean, useDebounce } from "ahooks";
|
|
3
|
-
import { Icon } from "
|
|
3
|
+
import { Icon } from "../../components/icon";
|
|
4
4
|
import { Button, Select, Spin, Tag, Input, message, Avatar } from "antd";
|
|
5
5
|
import ManualAssignPopover from "./ManualAssignPopover";
|
|
6
6
|
import { useGetLabelSession } from "../../hooks/session/useGetLabelSession";
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Avatar, Input, message } from "antd";
|
|
3
3
|
import { useGetUserSideInfo } from "../../hooks/session/useGetUserSideInfo";
|
|
4
4
|
import useConversationStore from "../../store/conversation";
|
|
5
|
-
import { Icon } from "
|
|
5
|
+
import { Icon } from "../../components/icon";
|
|
6
6
|
import { useCreateNote } from "../../hooks/session/useCreateNote";
|
|
7
7
|
import { useUpdateNote } from "../../hooks/session/useUpdateNote";
|
|
8
8
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -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,
|
|
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,cAAc,CAAC;AAStB,eAAO,MAAM,WAAW,0CAOtB,CAAC;AAEH,eAAO,MAAM,cAAc,uBAAgC,CAAC;AAE5D,eAAO,MAAM,YAAY,GAAI,sBAAsB,iBAAiB,4CA0DnE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { useBizConversationList } from "./useBizConversationList";
|
|
2
2
|
export { useCreateBizConversation } from "./useCreateBizConversation";
|
|
3
|
+
export { useBizSendMessage } from "./useBizSendMessage";
|
|
3
4
|
export type { CreateBizConversationInput } from "./useCreateBizConversation";
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/biz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/biz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/hooks/biz/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBizConversationList.d.ts","sourceRoot":"","sources":["../../../src/hooks/biz/useBizConversationList.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useBizConversationList.d.ts","sourceRoot":"","sources":["../../../src/hooks/biz/useBizConversationList.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,UAAU,4BAA4B;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,4BAA4B;IACpC,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,sBAAsB,GACjC,QAAQ,4BAA4B,KACnC,4BA6CF,CAAC"}
|