@droppii-org/chat-sdk 0.0.31 → 0.0.33
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/chatBubble/ChatBubble.d.ts.map +1 -1
- package/dist/components/chatBubble/ChatBubble.js +1 -1
- package/dist/components/conversation/ConversationBySessionItem.d.ts +7 -0
- package/dist/components/conversation/ConversationBySessionItem.d.ts.map +1 -0
- package/dist/components/conversation/ConversationBySessionItem.js +97 -0
- package/dist/components/conversation/DeskConversationList.d.ts.map +1 -1
- package/dist/components/conversation/DeskConversationList.js +32 -102
- package/dist/components/mediaCollection/FileCollection.d.ts.map +1 -1
- package/dist/components/mediaCollection/FileCollection.js +3 -5
- package/dist/components/mediaCollection/ImageCollection.d.ts.map +1 -1
- package/dist/components/mediaCollection/ImageCollection.js +21 -7
- package/dist/components/mediaCollection/VideoCollection.d.ts.map +1 -1
- package/dist/components/mediaCollection/VideoCollection.js +2 -5
- package/dist/components/mediaCollection/index.d.ts +2 -1
- package/dist/components/mediaCollection/index.d.ts.map +1 -1
- package/dist/components/mediaCollection/index.js +17 -13
- package/dist/components/message/footer/ToolbarPlugin.d.ts.map +1 -1
- package/dist/components/message/footer/ToolbarPlugin.js +2 -5
- package/dist/components/searchConversation/SearchAll.d.ts +3 -0
- package/dist/components/searchConversation/SearchAll.d.ts.map +1 -0
- package/dist/components/searchConversation/SearchAll.js +8 -0
- package/dist/components/searchConversation/SearchConversationAsMessages.d.ts +3 -0
- package/dist/components/searchConversation/SearchConversationAsMessages.d.ts.map +1 -0
- package/dist/components/searchConversation/SearchConversationAsMessages.js +8 -0
- package/dist/components/searchConversation/SearchConversationAsUsers.d.ts +3 -0
- package/dist/components/searchConversation/SearchConversationAsUsers.d.ts.map +1 -0
- package/dist/components/searchConversation/SearchConversationAsUsers.js +8 -0
- package/dist/components/searchConversation/index.d.ts +8 -0
- package/dist/components/searchConversation/index.d.ts.map +1 -0
- package/dist/components/searchConversation/index.js +38 -0
- package/dist/components/session/DeskAssignedSession.d.ts +3 -0
- package/dist/components/session/DeskAssignedSession.d.ts.map +1 -0
- package/dist/components/session/DeskAssignedSession.js +118 -0
- package/dist/hooks/conversation/useConversation.js +1 -1
- package/dist/hooks/search/useSearchConversation.d.ts +2 -0
- package/dist/hooks/search/useSearchConversation.d.ts.map +1 -0
- package/dist/hooks/search/useSearchConversation.js +1 -0
- package/dist/hooks/session/useGetSessionByTagOrStatus.d.ts +220 -0
- package/dist/hooks/session/useGetSessionByTagOrStatus.d.ts.map +1 -0
- package/dist/hooks/session/useGetSessionByTagOrStatus.js +72 -0
- package/dist/hooks/session/useGetSessionSummary.d.ts +3 -0
- package/dist/hooks/session/useGetSessionSummary.d.ts.map +1 -0
- package/dist/hooks/session/useGetSessionSummary.js +14 -0
- package/dist/hooks/user/useAuth.d.ts.map +1 -1
- package/dist/hooks/user/useAuth.js +14 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/locales/vi/common.json +16 -1
- package/dist/screens/chatBubble/index.d.ts.map +1 -1
- package/dist/screens/chatBubble/index.js +16 -7
- package/dist/screens/deskMessage/index.js +2 -2
- package/dist/services/query.d.ts +2 -0
- package/dist/services/query.d.ts.map +1 -1
- package/dist/services/query.js +2 -0
- package/dist/services/routes.d.ts +1 -1
- package/dist/services/routes.js +1 -1
- package/dist/store/conversation.d.ts.map +1 -1
- package/dist/store/conversation.js +12 -11
- package/dist/store/session.d.ts +8 -0
- package/dist/store/session.d.ts.map +1 -0
- package/dist/store/session.js +10 -0
- package/dist/styles/global.css +1 -1
- package/dist/types/dto.d.ts +20 -0
- package/dist/types/dto.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Tabs } from "antd";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import SearchConversationAll from "./SearchAll";
|
|
7
|
+
import SearchConversationAsUsers from "./SearchConversationAsUsers";
|
|
8
|
+
import SearchConversationAsMessages from "./SearchConversationAsMessages";
|
|
9
|
+
export var SearchConversationTabKey;
|
|
10
|
+
(function (SearchConversationTabKey) {
|
|
11
|
+
SearchConversationTabKey["All"] = "all";
|
|
12
|
+
SearchConversationTabKey["Users"] = "users";
|
|
13
|
+
SearchConversationTabKey["Messages"] = "messages";
|
|
14
|
+
})(SearchConversationTabKey || (SearchConversationTabKey = {}));
|
|
15
|
+
const SearchConversation = () => {
|
|
16
|
+
const { t } = useTranslation();
|
|
17
|
+
const items = useMemo(() => {
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
key: SearchConversationTabKey.All,
|
|
21
|
+
label: t("all"),
|
|
22
|
+
children: _jsx(SearchConversationAll, {}),
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: SearchConversationTabKey.Users,
|
|
26
|
+
label: t("users"),
|
|
27
|
+
children: _jsx(SearchConversationAsUsers, {}),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: SearchConversationTabKey.Messages,
|
|
31
|
+
label: t("messages"),
|
|
32
|
+
children: _jsx(SearchConversationAsMessages, {}),
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
}, [t]);
|
|
36
|
+
return (_jsx("div", { children: _jsx(Tabs, { defaultActiveKey: SearchConversationTabKey.All, items: items }) }));
|
|
37
|
+
};
|
|
38
|
+
export default SearchConversation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeskAssignedSession.d.ts","sourceRoot":"","sources":["../../../src/components/session/DeskAssignedSession.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,mBAAmB,+CAkNxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useBoolean } from "ahooks";
|
|
4
|
+
import { Button, Layout, Menu } from "antd";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
import { SESSION_STATUS_ENUM, TAG_ENUM } from "../../constants";
|
|
8
|
+
import { Icon } from "../icon";
|
|
9
|
+
import { useGetSessionSummary } from "../../hooks/session/useGetSessionSummary";
|
|
10
|
+
import useSessionStore from "../../store/session";
|
|
11
|
+
import clsx from "clsx";
|
|
12
|
+
const { Sider } = Layout;
|
|
13
|
+
const DeskAssignedSession = () => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const [collapsed, { toggle }] = useBoolean(false);
|
|
16
|
+
const setFilterSummary = useSessionStore((state) => state.setFilterSummary);
|
|
17
|
+
const { data: sessionSummary } = useGetSessionSummary();
|
|
18
|
+
const menuItems = useMemo(() => {
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
label: t("active_sessions"),
|
|
23
|
+
key: "ACTIVE_SESSIONS",
|
|
24
|
+
icon: _jsx(Icon, { icon: "chat-dot-o", size: 20 }),
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
label: t("unassigned"),
|
|
28
|
+
key: SESSION_STATUS_ENUM.UNASSIGNED,
|
|
29
|
+
icon: (_jsx(Icon, { icon: "user-del-o", size: 18, className: "text-orange-500" })),
|
|
30
|
+
onClick: () => {
|
|
31
|
+
setFilterSummary({
|
|
32
|
+
status: SESSION_STATUS_ENUM.UNASSIGNED,
|
|
33
|
+
tag: undefined,
|
|
34
|
+
});
|
|
35
|
+
},
|
|
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
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: t("slow_processing"),
|
|
40
|
+
key: TAG_ENUM.SLOW_PROCESSING,
|
|
41
|
+
icon: (_jsx(Icon, { icon: "warning-square-o", size: 18, className: "text-red-500" })),
|
|
42
|
+
onClick: () => {
|
|
43
|
+
setFilterSummary({
|
|
44
|
+
status: undefined,
|
|
45
|
+
tag: TAG_ENUM.SLOW_PROCESSING,
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_d = (_c = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _c === void 0 ? void 0 : _c.find((s) => s.type === TAG_ENUM.SLOW_PROCESSING)) === null || _d === void 0 ? void 0 : _d.count) || "" })),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: t("waiting_process"),
|
|
52
|
+
key: SESSION_STATUS_ENUM.WAITING_PROCESS,
|
|
53
|
+
icon: (_jsx(Icon, { icon: "time-circle-o", size: 18, className: "text-orange-400" })),
|
|
54
|
+
onClick: () => {
|
|
55
|
+
setFilterSummary({
|
|
56
|
+
status: SESSION_STATUS_ENUM.WAITING_PROCESS,
|
|
57
|
+
tag: undefined,
|
|
58
|
+
});
|
|
59
|
+
},
|
|
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
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: t("awaiting_reply"),
|
|
64
|
+
key: TAG_ENUM.AWAITING_REPLY,
|
|
65
|
+
icon: (_jsx(Icon, { icon: "arrow-reply-o", size: 18, className: "text-purple-500" })),
|
|
66
|
+
onClick: () => {
|
|
67
|
+
setFilterSummary({
|
|
68
|
+
status: undefined,
|
|
69
|
+
tag: TAG_ENUM.AWAITING_REPLY,
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_h = (_g = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _g === void 0 ? void 0 : _g.find((s) => s.type === TAG_ENUM.AWAITING_REPLY)) === null || _h === void 0 ? void 0 : _h.count) || "" })),
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: t("in_process"),
|
|
76
|
+
key: SESSION_STATUS_ENUM.IN_PROCESS,
|
|
77
|
+
icon: _jsx(Icon, { icon: "play-circle-o", size: 18 }),
|
|
78
|
+
onClick: () => {
|
|
79
|
+
setFilterSummary({
|
|
80
|
+
status: SESSION_STATUS_ENUM.IN_PROCESS,
|
|
81
|
+
tag: undefined,
|
|
82
|
+
});
|
|
83
|
+
},
|
|
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
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: t("temporarily_paused"),
|
|
88
|
+
key: TAG_ENUM.TEMPORARILY_PAUSED,
|
|
89
|
+
icon: _jsx(Icon, { icon: "pause-o", size: 18 }),
|
|
90
|
+
onClick: () => {
|
|
91
|
+
setFilterSummary({
|
|
92
|
+
status: undefined,
|
|
93
|
+
tag: TAG_ENUM.TEMPORARILY_PAUSED,
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_m = (_l = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _l === void 0 ? void 0 : _l.find((s) => s.type === TAG_ENUM.TEMPORARILY_PAUSED)) === null || _m === void 0 ? void 0 : _m.count) || "" })),
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
expandIcon: undefined,
|
|
100
|
+
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) || "" })),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: t("closed_sessions"),
|
|
104
|
+
key: "CLOSED_SESSIONS",
|
|
105
|
+
icon: _jsx(Icon, { icon: "check-square-o", size: 20 }),
|
|
106
|
+
onClick: () => {
|
|
107
|
+
setFilterSummary({
|
|
108
|
+
status: SESSION_STATUS_ENUM.COMPLETED,
|
|
109
|
+
tag: undefined,
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
extra: (_jsx("span", { className: "text-xs text-gray-500", children: ((_r = (_q = sessionSummary === null || sessionSummary === void 0 ? void 0 : sessionSummary.sessionStatuses) === null || _q === void 0 ? void 0 : _q.find((s) => s.type === SESSION_STATUS_ENUM.COMPLETED)) === null || _r === void 0 ? void 0 : _r.count) || "" })),
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
}, [sessionSummary]);
|
|
116
|
+
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.UNASSIGNED], defaultOpenKeys: ["ACTIVE_SESSIONS"], mode: "inline", items: menuItems, inlineIndent: 12 })] }));
|
|
117
|
+
};
|
|
118
|
+
export default DeskAssignedSession;
|
|
@@ -62,7 +62,7 @@ export const useConversationDisplayData = (conversation) => {
|
|
|
62
62
|
? `${userInfo === null || userInfo === void 0 ? void 0 : userInfo.nickname}${((_c = (_b = exUserInfo === null || exUserInfo === void 0 ? void 0 : exUserInfo.userInfo) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.username)
|
|
63
63
|
? ` (${(_e = (_d = exUserInfo === null || exUserInfo === void 0 ? void 0 : exUserInfo.userInfo) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.username})`
|
|
64
64
|
: ""}`
|
|
65
|
-
: conversation === null || conversation === void 0 ? void 0 : conversation.showName,
|
|
65
|
+
: (conversation === null || conversation === void 0 ? void 0 : conversation.showName) || "",
|
|
66
66
|
};
|
|
67
67
|
}, [conversation, userInfo]);
|
|
68
68
|
return Object.assign({}, conversationDisplayData);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSearchConversation.d.ts","sourceRoot":"","sources":["../../../src/hooks/search/useSearchConversation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,YAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const useSearchConversationAsUsers = () => { };
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { BaseResponse } from "../../types/dto";
|
|
2
|
+
import { IFilterSummary, ISessionByStatus } from "../../store/type";
|
|
3
|
+
export declare const useGetSessionByTagOrStatus: (filter: IFilterSummary) => {
|
|
4
|
+
error: Error;
|
|
5
|
+
isError: true;
|
|
6
|
+
isPending: false;
|
|
7
|
+
isLoadingError: false;
|
|
8
|
+
isRefetchError: true;
|
|
9
|
+
isSuccess: false;
|
|
10
|
+
isPlaceholderData: false;
|
|
11
|
+
status: "error";
|
|
12
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
13
|
+
hasPreviousPage: boolean;
|
|
14
|
+
isFetchNextPageError: boolean;
|
|
15
|
+
isFetchPreviousPageError: boolean;
|
|
16
|
+
isFetchingPreviousPage: boolean;
|
|
17
|
+
dataUpdatedAt: number;
|
|
18
|
+
errorUpdatedAt: number;
|
|
19
|
+
failureCount: number;
|
|
20
|
+
failureReason: Error | null;
|
|
21
|
+
errorUpdateCount: number;
|
|
22
|
+
isFetched: boolean;
|
|
23
|
+
isFetchedAfterMount: boolean;
|
|
24
|
+
isFetching: boolean;
|
|
25
|
+
isInitialLoading: boolean;
|
|
26
|
+
isPaused: boolean;
|
|
27
|
+
isRefetching: boolean;
|
|
28
|
+
isStale: boolean;
|
|
29
|
+
isEnabled: boolean;
|
|
30
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
31
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
32
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>>;
|
|
33
|
+
data: import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown> | undefined;
|
|
34
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
35
|
+
hasNextPage: boolean;
|
|
36
|
+
isFetchingNextPage: boolean;
|
|
37
|
+
isLoading: boolean;
|
|
38
|
+
dataFlatten: ISessionByStatus[];
|
|
39
|
+
} | {
|
|
40
|
+
error: null;
|
|
41
|
+
isError: false;
|
|
42
|
+
isPending: false;
|
|
43
|
+
isLoadingError: false;
|
|
44
|
+
isRefetchError: false;
|
|
45
|
+
isFetchNextPageError: false;
|
|
46
|
+
isFetchPreviousPageError: false;
|
|
47
|
+
isSuccess: true;
|
|
48
|
+
isPlaceholderData: false;
|
|
49
|
+
status: "success";
|
|
50
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
51
|
+
hasPreviousPage: boolean;
|
|
52
|
+
isFetchingPreviousPage: boolean;
|
|
53
|
+
dataUpdatedAt: number;
|
|
54
|
+
errorUpdatedAt: number;
|
|
55
|
+
failureCount: number;
|
|
56
|
+
failureReason: Error | null;
|
|
57
|
+
errorUpdateCount: number;
|
|
58
|
+
isFetched: boolean;
|
|
59
|
+
isFetchedAfterMount: boolean;
|
|
60
|
+
isFetching: boolean;
|
|
61
|
+
isInitialLoading: boolean;
|
|
62
|
+
isPaused: boolean;
|
|
63
|
+
isRefetching: boolean;
|
|
64
|
+
isStale: boolean;
|
|
65
|
+
isEnabled: boolean;
|
|
66
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
67
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
68
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>>;
|
|
69
|
+
data: import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown> | undefined;
|
|
70
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
71
|
+
hasNextPage: boolean;
|
|
72
|
+
isFetchingNextPage: boolean;
|
|
73
|
+
isLoading: boolean;
|
|
74
|
+
dataFlatten: ISessionByStatus[];
|
|
75
|
+
} | {
|
|
76
|
+
error: Error;
|
|
77
|
+
isError: true;
|
|
78
|
+
isPending: false;
|
|
79
|
+
isLoadingError: true;
|
|
80
|
+
isRefetchError: false;
|
|
81
|
+
isFetchNextPageError: false;
|
|
82
|
+
isFetchPreviousPageError: false;
|
|
83
|
+
isSuccess: false;
|
|
84
|
+
isPlaceholderData: false;
|
|
85
|
+
status: "error";
|
|
86
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
87
|
+
hasPreviousPage: boolean;
|
|
88
|
+
isFetchingPreviousPage: boolean;
|
|
89
|
+
dataUpdatedAt: number;
|
|
90
|
+
errorUpdatedAt: number;
|
|
91
|
+
failureCount: number;
|
|
92
|
+
failureReason: Error | null;
|
|
93
|
+
errorUpdateCount: number;
|
|
94
|
+
isFetched: boolean;
|
|
95
|
+
isFetchedAfterMount: boolean;
|
|
96
|
+
isFetching: boolean;
|
|
97
|
+
isInitialLoading: boolean;
|
|
98
|
+
isPaused: boolean;
|
|
99
|
+
isRefetching: boolean;
|
|
100
|
+
isStale: boolean;
|
|
101
|
+
isEnabled: boolean;
|
|
102
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
103
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
104
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>>;
|
|
105
|
+
data: import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown> | undefined;
|
|
106
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
107
|
+
hasNextPage: boolean;
|
|
108
|
+
isFetchingNextPage: boolean;
|
|
109
|
+
isLoading: boolean;
|
|
110
|
+
dataFlatten: ISessionByStatus[];
|
|
111
|
+
} | {
|
|
112
|
+
error: null;
|
|
113
|
+
isError: false;
|
|
114
|
+
isPending: true;
|
|
115
|
+
isLoadingError: false;
|
|
116
|
+
isRefetchError: false;
|
|
117
|
+
isFetchNextPageError: false;
|
|
118
|
+
isFetchPreviousPageError: false;
|
|
119
|
+
isSuccess: false;
|
|
120
|
+
isPlaceholderData: false;
|
|
121
|
+
status: "pending";
|
|
122
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
123
|
+
hasPreviousPage: boolean;
|
|
124
|
+
isFetchingPreviousPage: boolean;
|
|
125
|
+
dataUpdatedAt: number;
|
|
126
|
+
errorUpdatedAt: number;
|
|
127
|
+
failureCount: number;
|
|
128
|
+
failureReason: Error | null;
|
|
129
|
+
errorUpdateCount: number;
|
|
130
|
+
isFetched: boolean;
|
|
131
|
+
isFetchedAfterMount: boolean;
|
|
132
|
+
isFetching: boolean;
|
|
133
|
+
isInitialLoading: boolean;
|
|
134
|
+
isPaused: boolean;
|
|
135
|
+
isRefetching: boolean;
|
|
136
|
+
isStale: boolean;
|
|
137
|
+
isEnabled: boolean;
|
|
138
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
139
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
140
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>>;
|
|
141
|
+
data: import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown> | undefined;
|
|
142
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
143
|
+
hasNextPage: boolean;
|
|
144
|
+
isFetchingNextPage: boolean;
|
|
145
|
+
isLoading: boolean;
|
|
146
|
+
dataFlatten: ISessionByStatus[];
|
|
147
|
+
} | {
|
|
148
|
+
error: null;
|
|
149
|
+
isError: false;
|
|
150
|
+
isPending: true;
|
|
151
|
+
isLoadingError: false;
|
|
152
|
+
isRefetchError: false;
|
|
153
|
+
isFetchNextPageError: false;
|
|
154
|
+
isFetchPreviousPageError: false;
|
|
155
|
+
isSuccess: false;
|
|
156
|
+
isPlaceholderData: false;
|
|
157
|
+
status: "pending";
|
|
158
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
159
|
+
hasPreviousPage: boolean;
|
|
160
|
+
isFetchingPreviousPage: boolean;
|
|
161
|
+
dataUpdatedAt: number;
|
|
162
|
+
errorUpdatedAt: number;
|
|
163
|
+
failureCount: number;
|
|
164
|
+
failureReason: Error | null;
|
|
165
|
+
errorUpdateCount: number;
|
|
166
|
+
isFetched: boolean;
|
|
167
|
+
isFetchedAfterMount: boolean;
|
|
168
|
+
isFetching: boolean;
|
|
169
|
+
isInitialLoading: boolean;
|
|
170
|
+
isPaused: boolean;
|
|
171
|
+
isRefetching: boolean;
|
|
172
|
+
isStale: boolean;
|
|
173
|
+
isEnabled: boolean;
|
|
174
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
175
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
176
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>>;
|
|
177
|
+
data: import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown> | undefined;
|
|
178
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
179
|
+
hasNextPage: boolean;
|
|
180
|
+
isFetchingNextPage: boolean;
|
|
181
|
+
isLoading: boolean;
|
|
182
|
+
dataFlatten: ISessionByStatus[];
|
|
183
|
+
} | {
|
|
184
|
+
isError: false;
|
|
185
|
+
error: null;
|
|
186
|
+
isPending: false;
|
|
187
|
+
isLoadingError: false;
|
|
188
|
+
isRefetchError: false;
|
|
189
|
+
isSuccess: true;
|
|
190
|
+
isPlaceholderData: true;
|
|
191
|
+
isFetchNextPageError: false;
|
|
192
|
+
isFetchPreviousPageError: false;
|
|
193
|
+
status: "success";
|
|
194
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
195
|
+
hasPreviousPage: boolean;
|
|
196
|
+
isFetchingPreviousPage: boolean;
|
|
197
|
+
dataUpdatedAt: number;
|
|
198
|
+
errorUpdatedAt: number;
|
|
199
|
+
failureCount: number;
|
|
200
|
+
failureReason: Error | null;
|
|
201
|
+
errorUpdateCount: number;
|
|
202
|
+
isFetched: boolean;
|
|
203
|
+
isFetchedAfterMount: boolean;
|
|
204
|
+
isFetching: boolean;
|
|
205
|
+
isInitialLoading: boolean;
|
|
206
|
+
isPaused: boolean;
|
|
207
|
+
isRefetching: boolean;
|
|
208
|
+
isStale: boolean;
|
|
209
|
+
isEnabled: boolean;
|
|
210
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
211
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
212
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>>;
|
|
213
|
+
data: import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown> | undefined;
|
|
214
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<BaseResponse<ISessionByStatus[]>, unknown>, Error>>;
|
|
215
|
+
hasNextPage: boolean;
|
|
216
|
+
isFetchingNextPage: boolean;
|
|
217
|
+
isLoading: boolean;
|
|
218
|
+
dataFlatten: ISessionByStatus[];
|
|
219
|
+
};
|
|
220
|
+
//# sourceMappingURL=useGetSessionByTagOrStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetSessionByTagOrStatus.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useGetSessionByTagOrStatus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAA+B,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAKpE,eAAO,MAAM,0BAA0B,GAAI,QAAQ,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EhE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
14
|
+
import { apiInstance } from "../../services/api";
|
|
15
|
+
import { ENDPOINTS } from "../../services/routes";
|
|
16
|
+
import { QUERY_KEYS } from "../../services/query";
|
|
17
|
+
import { useMemo } from "react";
|
|
18
|
+
import useConversationStore from "../../store/conversation";
|
|
19
|
+
import { DChatSDK } from "../../constants/sdk";
|
|
20
|
+
export const useGetSessionByTagOrStatus = (filter) => {
|
|
21
|
+
const _a = useInfiniteQuery({
|
|
22
|
+
initialPageParam: 1,
|
|
23
|
+
queryKey: [QUERY_KEYS.GET_SESSION_BY_TAG_OR_STATUS, filter],
|
|
24
|
+
queryFn: async ({ pageParam = 1 }) => {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
const params = {
|
|
27
|
+
applicationType: "OBEFE",
|
|
28
|
+
tag: filter.tag,
|
|
29
|
+
status: filter.status,
|
|
30
|
+
page: pageParam,
|
|
31
|
+
pageSize: 100,
|
|
32
|
+
};
|
|
33
|
+
const res = await apiInstance.post(ENDPOINTS.chatService.getSessionsByTagOrStatus, params);
|
|
34
|
+
//FIND NEW CONVERSATIONS
|
|
35
|
+
const conversationList = useConversationStore.getState().conversationList;
|
|
36
|
+
const newConversations = (_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.filter((session) => {
|
|
37
|
+
return !conversationList.some((conversation) => conversation.conversationID === session.conversationId);
|
|
38
|
+
});
|
|
39
|
+
if (newConversations === null || newConversations === void 0 ? void 0 : newConversations.length) {
|
|
40
|
+
DChatSDK.getMultipleConversation(newConversations.map((session) => session.conversationId)).then((res) => {
|
|
41
|
+
useConversationStore
|
|
42
|
+
.getState()
|
|
43
|
+
.updateConversationList(res.data, "filter");
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return res.data;
|
|
47
|
+
},
|
|
48
|
+
getNextPageParam: (lastPage) => {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
const currentPage = ((_a = lastPage === null || lastPage === void 0 ? void 0 : lastPage.pageable) === null || _a === void 0 ? void 0 : _a.pageNumber) || 1;
|
|
51
|
+
const totalPages = ((_b = lastPage === null || lastPage === void 0 ? void 0 : lastPage.pageable) === null || _b === void 0 ? void 0 : _b.totalPages) || 1;
|
|
52
|
+
return currentPage + 1 < totalPages ? currentPage + 1 : undefined;
|
|
53
|
+
},
|
|
54
|
+
enabled: !!filter.tag || !!filter.status,
|
|
55
|
+
}), { data, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading } = _a, rest = __rest(_a, ["data", "fetchNextPage", "hasNextPage", "isFetchingNextPage", "isLoading"]);
|
|
56
|
+
const { dataFlatten } = useMemo(() => {
|
|
57
|
+
if (!data)
|
|
58
|
+
return {
|
|
59
|
+
dataFlatten: [],
|
|
60
|
+
};
|
|
61
|
+
const allItems = data.pages.flatMap((page) => page.data);
|
|
62
|
+
return {
|
|
63
|
+
dataFlatten: allItems,
|
|
64
|
+
};
|
|
65
|
+
}, [data]);
|
|
66
|
+
return Object.assign({ data,
|
|
67
|
+
fetchNextPage,
|
|
68
|
+
hasNextPage,
|
|
69
|
+
isFetchingNextPage,
|
|
70
|
+
isLoading,
|
|
71
|
+
dataFlatten }, rest);
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetSessionSummary.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useGetSessionSummary.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAExE,eAAO,MAAM,oBAAoB,sFAY7B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
2
|
+
import { QUERY_KEYS } from "../../services/query";
|
|
3
|
+
import { apiInstance } from "../../services/api";
|
|
4
|
+
import { ENDPOINTS } from "../../services/routes";
|
|
5
|
+
export const useGetSessionSummary = () => useQuery({
|
|
6
|
+
queryKey: [QUERY_KEYS.GET_SESSION_SUMMARY],
|
|
7
|
+
queryFn: async () => {
|
|
8
|
+
var _a;
|
|
9
|
+
const res = await apiInstance.post(ENDPOINTS.chatService.getSessionSummary, {
|
|
10
|
+
applicationType: "OBEFE",
|
|
11
|
+
});
|
|
12
|
+
return (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.data;
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../src/hooks/user/useAuth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../src/hooks/user/useAuth.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;CAoBxB,CAAC"}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import { Platform } from "@openim/wasm-client-sdk";
|
|
1
2
|
import { DChatSDK } from "../../constants/sdk";
|
|
3
|
+
import useAuthStore from "../../store/auth";
|
|
4
|
+
import useConversationStore from "../../store/conversation";
|
|
2
5
|
export const useDChatAuth = () => {
|
|
6
|
+
const initAuthStore = useAuthStore((state) => state.initAuthStore);
|
|
7
|
+
const resetConversationStore = useConversationStore((state) => state.resetConversationStore);
|
|
3
8
|
const logout = async () => {
|
|
4
9
|
const res = await DChatSDK.logout();
|
|
10
|
+
resetConversationStore();
|
|
11
|
+
initAuthStore({
|
|
12
|
+
chatToken: "",
|
|
13
|
+
accessToken: "",
|
|
14
|
+
apiAddress: "",
|
|
15
|
+
wsAddress: "",
|
|
16
|
+
platformID: Platform.Web,
|
|
17
|
+
userID: "",
|
|
18
|
+
});
|
|
5
19
|
return res;
|
|
6
20
|
};
|
|
7
21
|
return { logout };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,12 +4,11 @@ import DChatBubble from "./screens/chatBubble";
|
|
|
4
4
|
import { Platform, LogLevel, SessionType } from "@openim/wasm-client-sdk";
|
|
5
5
|
import { Icon } from "./components/icon";
|
|
6
6
|
import useUserStore from "./store/user";
|
|
7
|
-
import useConversationStore from "./store/conversation";
|
|
8
7
|
import { DChatInitAndLoginConfig } from "./types/chat";
|
|
9
8
|
export { ChatProvider, useChatContext } from "./context/ChatContext";
|
|
10
9
|
export { DChatDeskMessage, DChatBubble, Icon };
|
|
11
10
|
export { useDChatAuth } from "./hooks/user/useAuth";
|
|
12
|
-
export { useUserStore
|
|
11
|
+
export { useUserStore };
|
|
13
12
|
export { Platform as DChatPlatform, LogLevel as DChatLogLevel, SessionType as DChatSessionType, };
|
|
14
13
|
export type { DChatInitAndLoginConfig };
|
|
15
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGrE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAG/C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,CAAC;AAIxB,OAAO,EACL,QAAQ,IAAI,aAAa,EACzB,QAAQ,IAAI,aAAa,EACzB,WAAW,IAAI,gBAAgB,GAChC,CAAC;AAEF,YAAY,EAAE,uBAAuB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import "./locales/i18n";
|
|
2
2
|
import DChatDeskMessage from "./screens/deskMessage";
|
|
3
3
|
import DChatBubble from "./screens/chatBubble";
|
|
4
|
-
import { Platform, LogLevel, SessionType
|
|
4
|
+
import { Platform, LogLevel, SessionType } from "@openim/wasm-client-sdk";
|
|
5
5
|
import { Icon } from "./components/icon";
|
|
6
6
|
import useUserStore from "./store/user";
|
|
7
|
-
import useConversationStore from "./store/conversation";
|
|
8
7
|
// Main exports for the SDK
|
|
9
8
|
export { ChatProvider, useChatContext } from "./context/ChatContext";
|
|
10
9
|
//Components
|
|
@@ -12,6 +11,6 @@ export { DChatDeskMessage, DChatBubble, Icon };
|
|
|
12
11
|
//Hooks
|
|
13
12
|
export { useDChatAuth } from "./hooks/user/useAuth";
|
|
14
13
|
//Store
|
|
15
|
-
export { useUserStore
|
|
14
|
+
export { useUserStore };
|
|
16
15
|
// export * from "./types/sdk";
|
|
17
16
|
export { Platform as DChatPlatform, LogLevel as DChatLogLevel, SessionType as DChatSessionType, };
|
|
@@ -5,5 +5,20 @@
|
|
|
5
5
|
"file": "Tập tin",
|
|
6
6
|
"link": "Liên kết",
|
|
7
7
|
"no_conversation_data": "Vui lòng chọn một cuộc trò chuyện",
|
|
8
|
-
"no_media_files": "Không có tập tin phương tiện"
|
|
8
|
+
"no_media_files": "Không có tập tin phương tiện",
|
|
9
|
+
"search": "Tìm kiếm",
|
|
10
|
+
"all": "Tất cả",
|
|
11
|
+
"users": "Người dùng",
|
|
12
|
+
"messages": "Tin nhắn",
|
|
13
|
+
"no_conversation": "Không tìm thấy cuộc trò chuyện",
|
|
14
|
+
"download": "Tải xuống",
|
|
15
|
+
"active_sessions": "Đang mở",
|
|
16
|
+
"closed_sessions": "Đã đóng",
|
|
17
|
+
"unassigned": "Chưa phân công",
|
|
18
|
+
"waiting_process": "Chờ xử lý",
|
|
19
|
+
"in_process": "Đang xử lý",
|
|
20
|
+
"completed": "Đã đóng",
|
|
21
|
+
"awaiting_reply": "Chưa trả lời",
|
|
22
|
+
"slow_processing": "Chậm xử lý",
|
|
23
|
+
"temporarily_paused": "Tạm chờ"
|
|
9
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screens/chatBubble/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screens/chatBubble/index.tsx"],"names":[],"mappings":"AAQA,UAAU,gBAAgB;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,gBAAgB,mDA2C3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|