@droppii-org/chat-sdk 0.0.67 → 0.0.69

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 (50) hide show
  1. package/dist/components/message/item/TextMessage.d.ts +1 -1
  2. package/dist/components/message/item/TextMessage.d.ts.map +1 -1
  3. package/dist/components/message/item/TextMessage.js +8 -2
  4. package/dist/components/thread/SessionSection.d.ts +12 -0
  5. package/dist/components/thread/SessionSection.d.ts.map +1 -0
  6. package/dist/components/thread/SessionSection.js +107 -0
  7. package/dist/components/thread/ThreadInfo.d.ts.map +1 -1
  8. package/dist/components/thread/ThreadInfo.js +18 -75
  9. package/dist/components/thread/UserSection.d.ts +3 -0
  10. package/dist/components/thread/UserSection.d.ts.map +1 -0
  11. package/dist/components/thread/UserSection.js +81 -0
  12. package/dist/constants/index.d.ts +1 -1
  13. package/dist/constants/index.d.ts.map +1 -1
  14. package/dist/constants/index.js +1 -1
  15. package/dist/hooks/global/useGlobalEvent.d.ts.map +1 -1
  16. package/dist/hooks/global/useGlobalEvent.js +12 -1
  17. package/dist/hooks/session/useCloseSession.d.ts +3 -0
  18. package/dist/hooks/session/useCloseSession.d.ts.map +1 -0
  19. package/dist/hooks/session/useCloseSession.js +16 -0
  20. package/dist/hooks/session/useGetLabelSession.d.ts +3 -0
  21. package/dist/hooks/session/useGetLabelSession.d.ts.map +1 -0
  22. package/dist/hooks/session/useGetLabelSession.js +17 -0
  23. package/dist/hooks/session/useGetListSessionByConversation.d.ts +9 -0
  24. package/dist/hooks/session/useGetListSessionByConversation.d.ts.map +1 -0
  25. package/dist/hooks/session/useGetListSessionByConversation.js +24 -0
  26. package/dist/hooks/session/useUpdateNote.d.ts.map +1 -1
  27. package/dist/hooks/session/useUpdateSessionInfo.d.ts +10 -0
  28. package/dist/hooks/session/useUpdateSessionInfo.d.ts.map +1 -0
  29. package/dist/hooks/session/useUpdateSessionInfo.js +24 -0
  30. package/dist/index.d.ts +4 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +4 -0
  33. package/dist/locales/vi/common.json +38 -1
  34. package/dist/services/query.d.ts +4 -0
  35. package/dist/services/query.d.ts.map +1 -1
  36. package/dist/services/query.js +4 -0
  37. package/dist/services/routes.d.ts +4 -0
  38. package/dist/services/routes.d.ts.map +1 -1
  39. package/dist/services/routes.js +4 -0
  40. package/dist/styles/global.css +1 -1
  41. package/dist/tsconfig.tsbuildinfo +1 -1
  42. package/dist/types/chat.d.ts +3 -1
  43. package/dist/types/chat.d.ts.map +1 -1
  44. package/dist/types/chat.js +2 -0
  45. package/dist/types/dto.d.ts +29 -0
  46. package/dist/types/dto.d.ts.map +1 -1
  47. package/dist/utils/common.d.ts +1 -1
  48. package/dist/utils/common.d.ts.map +1 -1
  49. package/dist/utils/common.js +11 -1
  50. package/package.json +2 -1
@@ -2,6 +2,6 @@ import { MessageItem } from "@openim/wasm-client-sdk";
2
2
  interface TextMessageItemProps {
3
3
  message: MessageItem;
4
4
  }
5
- declare const TextMessageItem: (props: TextMessageItemProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const TextMessageItem: (props: TextMessageItemProps) => import("react/jsx-runtime").JSX.Element | null;
6
6
  export default TextMessageItem;
7
7
  //# sourceMappingURL=TextMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/TextMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,WAAW,CAAC;CACtB;AACD,QAAA,MAAM,eAAe,GAAI,OAAO,oBAAoB,4CA4BnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"TextMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/TextMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAe,MAAM,yBAAyB,CAAC;AAInE,UAAU,oBAAoB;IAC5B,OAAO,EAAE,WAAW,CAAC;CACtB;AACD,QAAA,MAAM,eAAe,GAAI,OAAO,oBAAoB,mDAiCnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,8 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { MessageType } from "@openim/wasm-client-sdk";
4
+ import { useAuthStore } from "../../..";
3
5
  const TextMessageItem = (props) => {
4
6
  var _a, _b, _c;
5
7
  const { message } = props;
8
+ const isCrm = useAuthStore((state) => state.isCrm);
6
9
  let extendMessageInfo = null;
7
10
  try {
8
11
  extendMessageInfo = JSON.parse((message === null || message === void 0 ? void 0 : message.ex) || "{}");
@@ -11,11 +14,14 @@ const TextMessageItem = (props) => {
11
14
  extendMessageInfo = {};
12
15
  console.error("Failed to parse extendMessageInfo", error);
13
16
  }
17
+ if ((message === null || message === void 0 ? void 0 : message.contentType) === MessageType.CustomMessage && !isCrm) {
18
+ return null;
19
+ }
14
20
  if (Object.keys(extendMessageInfo).length > 0 &&
15
21
  (extendMessageInfo === null || extendMessageInfo === void 0 ? void 0 : extendMessageInfo.messageInfo)) {
16
22
  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 break-all", dangerouslySetInnerHTML: { __html: htmlContent } }));
23
+ return (_jsx("div", { className: "!text-sm sm:text-base break-words whitespace-pre-line flex-1", dangerouslySetInnerHTML: { __html: htmlContent } }));
18
24
  }
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) || "" }));
25
+ 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) || "" }));
20
26
  };
21
27
  export default TextMessageItem;
@@ -0,0 +1,12 @@
1
+ import { ISessionResponse } from "../../types/dto";
2
+ export declare const SessionDetailCard: ({ session, isActive, }: {
3
+ session: ISessionResponse;
4
+ isActive: boolean;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ interface SessionSectionProps {
7
+ sessions: ISessionResponse[];
8
+ isLoading: boolean;
9
+ }
10
+ declare const SessionSection: ({ sessions, isLoading }: SessionSectionProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default SessionSection;
12
+ //# sourceMappingURL=SessionSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionSection.d.ts","sourceRoot":"","sources":["../../../src/components/thread/SessionSection.tsx"],"names":[],"mappings":"AASA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAcnE,eAAO,MAAM,iBAAiB,GAAI,wBAG/B;IACD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;CACnB,4CAwKA,CAAC;AAgCF,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,cAAc,GAAI,yBAAyB,mBAAmB,4CAgCnE,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useBoolean, useDebounce } from "ahooks";
3
+ import { Icon } from "../icon";
4
+ import { Button, Select, Spin, Tag, Input, message, Avatar } from "antd";
5
+ import { useGetLabelSession } from "../../hooks/session/useGetLabelSession";
6
+ import { useUpdateSessionInfo } from "../../hooks/session/useUpdateSessionInfo";
7
+ import { useCloseSession } from "../../hooks/session/useCloseSession";
8
+ import { useQueryClient } from "@tanstack/react-query";
9
+ import { QUERY_KEYS } from "../../services/query";
10
+ import { useEffect, useState } from "react";
11
+ const { TextArea } = Input;
12
+ const formatSessionDate = (dateString) => {
13
+ if (!dateString)
14
+ return "";
15
+ const date = new Date(dateString);
16
+ const hours = String(date.getHours()).padStart(2, "0");
17
+ const minutes = String(date.getMinutes()).padStart(2, "0");
18
+ const day = String(date.getDate()).padStart(2, "0");
19
+ const month = String(date.getMonth() + 1).padStart(2, "0");
20
+ return `${hours}:${minutes} ${day}/${month}`;
21
+ };
22
+ export const SessionDetailCard = ({ session, isActive, }) => {
23
+ var _a, _b, _c, _d, _e;
24
+ const queryClient = useQueryClient();
25
+ const { data: availableLabels, isLoading: isLoadingLabels } = useGetLabelSession();
26
+ const { mutate: updateSession } = useUpdateSessionInfo();
27
+ const { mutate: closeSession, isPending: isClosing } = useCloseSession();
28
+ const [note, setNote] = useState(session.note || "");
29
+ const [issueDetail, setIssueDetail] = useState(session.issueDetail || "");
30
+ const debouncedNote = useDebounce(note, { wait: 1000 });
31
+ const debouncedIssueDetail = useDebounce(issueDetail, { wait: 1000 });
32
+ useEffect(() => {
33
+ setNote(session.note || "");
34
+ setIssueDetail(session.issueDetail || "");
35
+ }, [session.note, session.issueDetail]);
36
+ useEffect(() => {
37
+ if (debouncedNote !== (session.note || "")) {
38
+ updateSession({ sessionId: session.id, note: debouncedNote }, {
39
+ onSuccess: () => {
40
+ queryClient.invalidateQueries({
41
+ queryKey: [QUERY_KEYS.GET_LIST_SESSION_BY_CONVERSATION],
42
+ });
43
+ },
44
+ });
45
+ }
46
+ }, [debouncedNote, session.note, session.id, updateSession, queryClient]);
47
+ useEffect(() => {
48
+ if (debouncedIssueDetail !== (session.issueDetail || "")) {
49
+ updateSession({
50
+ sessionId: session.id,
51
+ issueDetail: debouncedIssueDetail,
52
+ }, {
53
+ onSuccess: () => {
54
+ queryClient.invalidateQueries({
55
+ queryKey: [QUERY_KEYS.GET_LIST_SESSION_BY_CONVERSATION],
56
+ });
57
+ },
58
+ });
59
+ }
60
+ }, [
61
+ debouncedIssueDetail,
62
+ session.issueDetail,
63
+ session.id,
64
+ updateSession,
65
+ queryClient,
66
+ ]);
67
+ const handleUpdateLabels = (labelIds) => {
68
+ updateSession({ sessionId: session.id, labelIds }, {
69
+ onSuccess: () => {
70
+ queryClient.invalidateQueries({
71
+ queryKey: [QUERY_KEYS.GET_LIST_SESSION_BY_CONVERSATION],
72
+ });
73
+ },
74
+ });
75
+ };
76
+ const handleCloseSession = () => {
77
+ closeSession(session.id, {
78
+ onSuccess: () => {
79
+ message.success("Đóng phiên chat thành công");
80
+ queryClient.invalidateQueries({
81
+ queryKey: [QUERY_KEYS.GET_LIST_SESSION_BY_CONVERSATION],
82
+ });
83
+ },
84
+ onError: () => {
85
+ message.error("Đóng phiên chat thất bại");
86
+ },
87
+ });
88
+ };
89
+ const labelOptions = availableLabels === null || availableLabels === void 0 ? void 0 : availableLabels.map((label) => ({
90
+ value: label.id,
91
+ label: label.name,
92
+ }));
93
+ return (_jsxs("div", { className: `p-3 border rounded-lg shadow-md ${isActive ? "border-blue-500" : "border-gray-300"}`, children: [_jsxs("div", { className: "flex justify-between items-start mb-3", children: [_jsx("div", { className: "flex items-center gap-2", children: _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Icon, { icon: "chat-square-b", size: 16, className: "text-gray-500" }), _jsxs("p", { className: "font-semibold text-sm", children: ["Session ", session.order] })] }), _jsx("p", { className: "text-xs text-gray-400", children: formatSessionDate(session.closedDate || session.createdDate) })] }) }), isActive ? (_jsx(Tag, { color: "processing", children: "\u0110ang ho\u1EA1t \u0111\u1ED9ng" })) : (_jsx(Avatar, { src: (_a = session.supporter) === null || _a === void 0 ? void 0 : _a.avatar, size: 24, children: ((_d = (_c = (_b = session.supporter) === null || _b === void 0 ? void 0 : _b.username) === null || _c === void 0 ? void 0 : _c.charAt) === null || _d === void 0 ? void 0 : _d.call(_c, 0)) || "A" }))] }), _jsxs("div", { className: "flex flex-col gap-3 text-sm", children: [_jsxs("div", { className: "flex items-center gap-2 text-gray-500", children: [_jsx(Icon, { icon: "tag-o", size: 16, className: "mt-1" }), _jsx(Select, { mode: "multiple", loading: isLoadingLabels, className: "w-full", placeholder: "Th\u00EAm th\u1EBB...", options: labelOptions, value: (_e = session.labels) === null || _e === void 0 ? void 0 : _e.map((label) => label.id), onChange: handleUpdateLabels, removeIcon: true })] }), _jsxs("div", { className: "flex items-start gap-2 text-gray-500", children: [_jsx(Icon, { icon: "info-circle-o", size: 16, className: "mt-1" }), _jsx(TextArea, { value: issueDetail, onChange: (e) => setIssueDetail(e.target.value), placeholder: "V\u1EA5n \u0111\u1EC1 c\u1EE5 th\u1EC3...", className: "border-none !shadow-none py-0 px-2", autoSize: { minRows: 1, maxRows: 3 } })] }), _jsxs("div", { className: "flex items-start gap-2 text-gray-500", children: [_jsx(Icon, { icon: "paper-o", size: 16, className: "mt-1" }), _jsx(TextArea, { value: note, onChange: (e) => setNote(e.target.value), placeholder: "Ghi ch\u00FA...", className: "border-none !shadow-none py-0 px-2", autoSize: { minRows: 1, maxRows: 3 } })] })] }), isActive && (_jsx(Button, { type: "primary", block: true, className: "mt-4", onClick: handleCloseSession, loading: isClosing, children: "\u0110\u00F3ng" }))] }));
94
+ };
95
+ const ClosedSessionItem = ({ session }) => {
96
+ var _a, _b, _c, _d;
97
+ const [isExpanded, { setTrue }] = useBoolean(false);
98
+ if (isExpanded) {
99
+ return (_jsx("div", { children: _jsx(SessionDetailCard, { session: session, isActive: false }) }));
100
+ }
101
+ return (_jsxs("div", { className: "flex justify-between items-center p-2 rounded-md hover:bg-gray-100 cursor-pointer", onClick: setTrue, children: [_jsxs("div", { className: "flex items-center gap-2 text-sm", children: [_jsx(Icon, { icon: "chat-square-b", size: 16, className: "text-gray-500" }), _jsxs("span", { className: "font-semibold", children: ["Session ", session.order] }), _jsx("span", { className: "text-gray-400 text-xs", children: formatSessionDate(session.closedDate || session.createdDate) })] }), _jsx(Avatar, { src: (_a = session.supporter) === null || _a === void 0 ? void 0 : _a.avatar, size: 24, children: ((_d = (_c = (_b = session.supporter) === null || _b === void 0 ? void 0 : _b.username) === null || _c === void 0 ? void 0 : _c.charAt) === null || _d === void 0 ? void 0 : _d.call(_c, 0)) || "A" })] }));
102
+ };
103
+ const SessionSection = ({ sessions, isLoading }) => {
104
+ const [isOpen, { toggle }] = useBoolean(true);
105
+ return (_jsxs("div", { className: "flex flex-col border-b", children: [_jsxs("div", { role: "button", onClick: toggle, className: "flex items-center justify-between px-4 py-2 rounded-md hover:bg-gray-100 sticky top-0 bg-white z-10", children: [_jsx("h3", { className: "font-bold text-gray-500 text-xs tracking-wider", children: "SESSIONS" }), _jsx(Icon, { icon: isOpen ? "angle-up-o" : "angle-down-o", size: 18 })] }), isOpen && (_jsx("div", { className: "px-4 pt-2 pb-4", children: isLoading ? (_jsx("div", { className: "text-center mt-4", children: _jsx(Spin, {}) })) : (_jsx("div", { className: "flex flex-col gap-1", children: sessions.map((session) => (_jsx(ClosedSessionItem, { session: session }, session.id))) })) }))] }));
106
+ };
107
+ export default SessionSection;
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadInfo.d.ts","sourceRoot":"","sources":["../../../src/components/thread/ThreadInfo.tsx"],"names":[],"mappings":"AAaA,QAAA,MAAM,UAAU,sDA+If,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ThreadInfo.d.ts","sourceRoot":"","sources":["../../../src/components/thread/ThreadInfo.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,UAAU,sDAsCf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,84 +1,27 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Avatar, Input, message } from "antd";
3
- import { useGetUserSideInfo } from "../../hooks/session/useGetUserSideInfo";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
2
  import useConversationStore from "../../store/conversation";
5
- import { Icon } from "../icon";
6
- import { useCreateNote } from "../../hooks/session/useCreateNote";
7
- import { useUpdateNote } from "../../hooks/session/useUpdateNote";
8
- import { useEffect, useRef, useState } from "react";
9
- import { useTranslation } from "react-i18next";
10
- import { useBoolean } from "ahooks";
11
- const { TextArea } = Input;
3
+ import UserSection from "./UserSection";
4
+ import SessionSection, { SessionDetailCard } from "./SessionSection";
5
+ import { useGetListSessionByConversation } from "../../hooks/session/useGetListSessionByConversation";
6
+ import { useMemo } from "react";
12
7
  const ThreadInfo = () => {
13
- var _a, _b, _c, _d, _e, _f, _g;
14
- const { t } = useTranslation();
15
8
  const conversationData = useConversationStore((state) => state.conversationData);
16
- const exConversationInfo = JSON.parse((conversationData === null || conversationData === void 0 ? void 0 : conversationData.ex) || "{}");
17
9
  const conversationId = (conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationID) || "";
18
- const userId = ((_b = (_a = exConversationInfo === null || exConversationInfo === void 0 ? void 0 : exConversationInfo.sessionInfo) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.ownerId) || "";
19
- const { data } = useGetUserSideInfo(conversationId, userId);
20
- const { mutate: createNote } = useCreateNote();
21
- const { mutate: updateNote } = useUpdateNote();
22
- const [isOpen, { toggle }] = useBoolean(true);
23
- const initialNote = (_d = (_c = data === null || data === void 0 ? void 0 : data.note) === null || _c === void 0 ? void 0 : _c.content) !== null && _d !== void 0 ? _d : "";
24
- const [noteValue, setNoteValue] = useState(initialNote);
25
- const timerRef = useRef(null);
26
- useEffect(() => {
27
- var _a, _b;
28
- setNoteValue((_b = (_a = data === null || data === void 0 ? void 0 : data.note) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : "");
29
- // eslint-disable-next-line react-hooks/exhaustive-deps
30
- }, [(_e = data === null || data === void 0 ? void 0 : data.note) === null || _e === void 0 ? void 0 : _e.content, conversationId, userId]);
31
- const scheduleSave = (value) => {
32
- if (timerRef.current) {
33
- window.clearTimeout(timerRef.current);
34
- }
35
- timerRef.current = window.setTimeout(() => {
36
- var _a, _b, _c;
37
- const prev = (_b = (_a = data === null || data === void 0 ? void 0 : data.note) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : "";
38
- if (value === prev)
39
- return;
40
- if (!prev) {
41
- createNote({
42
- conversationId,
43
- content: value,
44
- targetId: userId,
45
- }, {
46
- onSuccess: () => {
47
- message.success(t("note_created"));
48
- },
49
- onError: () => {
50
- message.error(t("create_note_failed"));
51
- },
52
- });
53
- }
54
- else {
55
- updateNote({
56
- noteId: ((_c = data === null || data === void 0 ? void 0 : data.note) === null || _c === void 0 ? void 0 : _c.id) || "",
57
- content: value,
58
- }, {
59
- onSuccess: () => {
60
- message.success(t("note_updated"));
61
- },
62
- onError: () => {
63
- message.error(t("update_note_failed"));
64
- },
65
- });
66
- }
67
- }, 1000);
68
- };
10
+ const { data: sessions, isLoading } = useGetListSessionByConversation({
11
+ conversationId,
12
+ page: 1,
13
+ pageSize: 50,
14
+ });
15
+ const { closedSessions, activeSession } = useMemo(() => {
16
+ if (!sessions)
17
+ return { closedSessions: [], activeSession: null };
18
+ const active = sessions.find((s) => !s.isClosed);
19
+ const closed = sessions.filter((s) => s.isClosed);
20
+ return { closedSessions: closed, activeSession: active };
21
+ }, [sessions]);
69
22
  if (!conversationId) {
70
23
  return null;
71
24
  }
72
- return (_jsx("div", { className: "h-full w-[300px] bg-white shadow-md", children: _jsxs("div", { className: "flex flex-col gap-3 border-b px-4 py-3", children: [_jsxs("div", { role: "button", onClick: toggle, className: "flex items-center gap-3 bg-white flex-wrap", children: [_jsx(Avatar, { src: data === null || data === void 0 ? void 0 : data.avatar, className: "min-w-6 min-h-6", children: ((_g = (_f = data === null || data === void 0 ? void 0 : data.fullName) === null || _f === void 0 ? void 0 : _f.charAt) === null || _g === void 0 ? void 0 : _g.call(_f, 0)) || "A" }), _jsx("div", { className: "flex flex-col overflow-hidden flex-1", children: _jsxs("p", { className: "text-sm truncate", children: [(data === null || data === void 0 ? void 0 : data.fullName) || "", "(", data === null || data === void 0 ? void 0 : data.username, ")"] }) }), _jsx(Icon, { icon: isOpen ? "angle-up-o" : "angle-down-o", size: 18 })] }), isOpen && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex justify-between items-center gap-2", children: [_jsxs("p", { className: "text-sm flex items-center gap-3 flex-1 min-w-0", children: [" ", _jsx("span", { className: "font-light w-16 text-gray-400 flex-shrink-0", children: "User ID" }), _jsx("span", { className: "truncate", children: (data === null || data === void 0 ? void 0 : data.id) || "" }), " "] }), _jsx(Icon, { icon: "copy-o", size: 16, onClick: () => {
73
- navigator.clipboard.writeText((data === null || data === void 0 ? void 0 : data.id) || "");
74
- message.success(t("copied_to_clipboard"));
75
- } })] }), _jsxs("div", { className: "flex justify-between items-center gap-2", children: [_jsxs("p", { className: "text-sm truncate flex gap-3", children: [_jsx("span", { className: "font-light text-gray-400 w-16", children: "Username" }), (data === null || data === void 0 ? void 0 : data.username) || ""] }), _jsx(Icon, { icon: "copy-o", size: 16, onClick: () => {
76
- navigator.clipboard.writeText((data === null || data === void 0 ? void 0 : data.id) || "");
77
- message.success(t("copied_to_clipboard"));
78
- } })] }), _jsxs("div", { className: "flex justify-between", children: [_jsx("p", { className: "text-sm flex gap-3", children: _jsx("span", { className: "font-light text-gray-400 w-16", children: "Note" }) }), _jsx(TextArea, { value: noteValue, placeholder: t("add_note"), className: "border-none py-0", autoSize: { minRows: 1, maxRows: 6 }, onChange: (e) => {
79
- const v = e.target.value;
80
- setNoteValue(v);
81
- scheduleSave(v);
82
- } })] })] }))] }) }));
25
+ return (_jsxs("div", { className: "h-full w-[330px] bg-white shadow-md flex flex-col relative", children: [_jsxs("div", { className: `flex-grow overflow-y-auto ${activeSession ? "pb-60" : ""}`, children: [_jsx(UserSection, {}), _jsx(SessionSection, { sessions: closedSessions, isLoading: isLoading })] }), activeSession && (_jsx("div", { className: "absolute bottom-0 left-0 right-0 p-4 z-20 bg-white backdrop-blur-sm", children: _jsx(SessionDetailCard, { session: activeSession, isActive: true }) }))] }));
83
26
  };
84
27
  export default ThreadInfo;
@@ -0,0 +1,3 @@
1
+ declare const UserSection: () => import("react/jsx-runtime").JSX.Element;
2
+ export default UserSection;
3
+ //# sourceMappingURL=UserSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserSection.d.ts","sourceRoot":"","sources":["../../../src/components/thread/UserSection.tsx"],"names":[],"mappings":"AAYA,QAAA,MAAM,WAAW,+CAwIhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Avatar, Input, message } from "antd";
3
+ import { useGetUserSideInfo } from "../../hooks/session/useGetUserSideInfo";
4
+ import useConversationStore from "../../store/conversation";
5
+ import { Icon } from "../icon";
6
+ import { useCreateNote } from "../../hooks/session/useCreateNote";
7
+ import { useUpdateNote } from "../../hooks/session/useUpdateNote";
8
+ import { useEffect, useRef, useState } from "react";
9
+ import { useTranslation } from "react-i18next";
10
+ import { useBoolean } from "ahooks";
11
+ const { TextArea } = Input;
12
+ const UserSection = () => {
13
+ var _a, _b, _c, _d, _e, _f, _g;
14
+ const { t } = useTranslation();
15
+ const conversationData = useConversationStore((state) => state.conversationData);
16
+ const exConversationInfo = JSON.parse((conversationData === null || conversationData === void 0 ? void 0 : conversationData.ex) || "{}");
17
+ const timerRef = useRef(null);
18
+ const conversationId = (conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationID) || "";
19
+ const userId = ((_b = (_a = exConversationInfo === null || exConversationInfo === void 0 ? void 0 : exConversationInfo.sessionInfo) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.ownerId) || "";
20
+ const { data } = useGetUserSideInfo(conversationId, userId);
21
+ const { mutate: createNote } = useCreateNote();
22
+ const { mutate: updateNote } = useUpdateNote();
23
+ const initialNote = (_d = (_c = data === null || data === void 0 ? void 0 : data.note) === null || _c === void 0 ? void 0 : _c.content) !== null && _d !== void 0 ? _d : "";
24
+ const [noteValue, setNoteValue] = useState(initialNote);
25
+ const [isOpen, { toggle }] = useBoolean(true);
26
+ const scheduleSave = (value) => {
27
+ if (timerRef.current) {
28
+ window.clearTimeout(timerRef.current);
29
+ }
30
+ timerRef.current = window.setTimeout(() => {
31
+ var _a, _b, _c;
32
+ const prev = (_b = (_a = data === null || data === void 0 ? void 0 : data.note) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : "";
33
+ if (value === prev)
34
+ return;
35
+ if (!prev) {
36
+ createNote({
37
+ conversationId,
38
+ content: value,
39
+ targetId: userId,
40
+ }, {
41
+ onSuccess: () => {
42
+ message.success(t("note_created"));
43
+ },
44
+ onError: () => {
45
+ message.error(t("create_note_failed"));
46
+ },
47
+ });
48
+ }
49
+ else {
50
+ updateNote({
51
+ noteId: ((_c = data === null || data === void 0 ? void 0 : data.note) === null || _c === void 0 ? void 0 : _c.id) || "",
52
+ content: value,
53
+ }, {
54
+ onSuccess: () => {
55
+ message.success(t("note_updated"));
56
+ },
57
+ onError: () => {
58
+ message.error(t("update_note_failed"));
59
+ },
60
+ });
61
+ }
62
+ }, 1000);
63
+ };
64
+ useEffect(() => {
65
+ var _a, _b;
66
+ setNoteValue((_b = (_a = data === null || data === void 0 ? void 0 : data.note) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : "");
67
+ // eslint-disable-next-line react-hooks/exhaustive-deps
68
+ }, [(_e = data === null || data === void 0 ? void 0 : data.note) === null || _e === void 0 ? void 0 : _e.content, conversationId, userId]);
69
+ return (_jsxs("div", { className: "flex flex-col gap-3 border-b px-4 py-3", children: [_jsxs("div", { role: "button", onClick: toggle, className: "flex items-center gap-3 bg-white flex-wrap", children: [_jsx(Avatar, { src: data === null || data === void 0 ? void 0 : data.avatar, className: "min-w-6 min-h-6", children: ((_g = (_f = data === null || data === void 0 ? void 0 : data.fullName) === null || _f === void 0 ? void 0 : _f.charAt) === null || _g === void 0 ? void 0 : _g.call(_f, 0)) || "A" }), _jsx("div", { className: "flex flex-col overflow-hidden flex-1", children: _jsxs("p", { className: "text-sm truncate", children: [(data === null || data === void 0 ? void 0 : data.fullName) || "", "(", data === null || data === void 0 ? void 0 : data.username, ")"] }) }), _jsx(Icon, { icon: isOpen ? "angle-up-o" : "angle-down-o", size: 18 })] }), isOpen && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex justify-between items-center gap-2", children: [_jsxs("p", { className: "text-sm flex items-center gap-3 flex-1 min-w-0", children: [" ", _jsx("span", { className: "font-light w-16 text-gray-400 flex-shrink-0", children: "User ID" }), _jsx("span", { className: "truncate", children: (data === null || data === void 0 ? void 0 : data.id) || "" }), " "] }), _jsx(Icon, { icon: "copy-o", size: 16, onClick: () => {
70
+ navigator.clipboard.writeText((data === null || data === void 0 ? void 0 : data.id) || "");
71
+ message.success(t("copied_to_clipboard"));
72
+ } })] }), _jsxs("div", { className: "flex justify-between items-center gap-2", children: [_jsxs("p", { className: "text-sm truncate flex gap-3", children: [_jsx("span", { className: "font-light text-gray-400 w-16", children: "Username" }), (data === null || data === void 0 ? void 0 : data.username) || ""] }), _jsx(Icon, { icon: "copy-o", size: 16, onClick: () => {
73
+ navigator.clipboard.writeText((data === null || data === void 0 ? void 0 : data.id) || "");
74
+ message.success(t("copied_to_clipboard"));
75
+ } })] }), _jsxs("div", { className: "flex justify-between", children: [_jsx("p", { className: "text-sm flex gap-3", children: _jsx("span", { className: "font-light text-gray-400 w-16", children: "Note" }) }), _jsx(TextArea, { value: noteValue, placeholder: t("add_note"), className: "border-none py-0", autoSize: { minRows: 1, maxRows: 6 }, onChange: (e) => {
76
+ const v = e.target.value;
77
+ setNoteValue(v);
78
+ scheduleSave(v);
79
+ } })] })] }))] }));
80
+ };
81
+ export default UserSection;
@@ -1,4 +1,4 @@
1
- export declare const coreWasmPath = "https://droppii.blob.core.windows.net/droppii-production-public/openIM.wasm";
1
+ export declare const coreWasmPath = "https://droppiistg.blob.core.windows.net/droppii-stg-public/livechat/openIM.wasm";
2
2
  export declare const PAGE_SIZE = 50;
3
3
  export declare const MSG_ITEM_PREFIX = "msg-item-";
4
4
  export declare const MSG_ITEM_CONTENT_PREFIX = "msg-item-content-";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,gFACsD,CAAC;AAEhF,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,qFAC2D,CAAC;AAErF,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,uBAAuB,sBAAsB,CAAC"}
@@ -1,4 +1,4 @@
1
- export const coreWasmPath = "https://droppii.blob.core.windows.net/droppii-production-public/openIM.wasm";
1
+ export const coreWasmPath = "https://droppiistg.blob.core.windows.net/droppii-stg-public/livechat/openIM.wasm";
2
2
  export const PAGE_SIZE = 50;
3
3
  export const MSG_ITEM_PREFIX = "msg-item-";
4
4
  export const MSG_ITEM_CONTENT_PREFIX = "msg-item-content-";
@@ -1 +1 @@
1
- {"version":3,"file":"useGlobalEvent.d.ts","sourceRoot":"","sources":["../../../src/hooks/global/useGlobalEvent.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,cAAc,YAkP1B,CAAC"}
1
+ {"version":3,"file":"useGlobalEvent.d.ts","sourceRoot":"","sources":["../../../src/hooks/global/useGlobalEvent.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,cAAc,YA4P1B,CAAC"}
@@ -8,9 +8,12 @@ import useConversationStore from "../../store/conversation";
8
8
  import useAuthStore from "../../store/auth";
9
9
  import { useRefetchChatToken } from "../../hooks/init/useChatToken";
10
10
  import { updateSession } from "../session/useUpdateSession";
11
+ import { QUERY_KEYS } from "../../services/query";
12
+ import { useQueryClient } from "@tanstack/react-query";
11
13
  const notPushType = [MessageType.TypingMessage, MessageType.RevokeMessage];
12
14
  export const useGlobalEvent = () => {
13
15
  const { user } = useChatContext();
16
+ const queryClient = useQueryClient();
14
17
  const { updateConnectStatus, updateSyncStatus, getSelfUserInfo } = useChatContext();
15
18
  const updateConversationList = useConversationStore((state) => state.updateConversationList);
16
19
  const getConversationListByReq = useConversationStore((state) => state.getConversationListByReq);
@@ -44,7 +47,8 @@ export const useGlobalEvent = () => {
44
47
  const handleNewMessage = (newServerMsg) => {
45
48
  if (newServerMsg.contentType === MessageType.CustomMessage) {
46
49
  const customData = JSON.parse(newServerMsg.customElem.data);
47
- if (CustomType.CallingInvite <= customData.customType &&
50
+ if (customData &&
51
+ CustomType.CallingInvite <= customData.customType &&
48
52
  customData.customType <= CustomType.CallingHungup) {
49
53
  return;
50
54
  }
@@ -123,10 +127,17 @@ export const useGlobalEvent = () => {
123
127
  updateSyncStatus(SyncStatus.Failed);
124
128
  };
125
129
  const businessNotificationHandler = ({ data, }) => {
130
+ console.log(data.key, "business notification");
126
131
  switch (data.key) {
127
132
  case BusinessNotificationType.SESSION_STATE_UPDATED:
128
133
  updateSession(JSON.parse(data.data || "{}"));
129
134
  break;
135
+ case BusinessNotificationType.SESSION_CREATED:
136
+ updateSession(JSON.parse(data.data || "{}"));
137
+ queryClient.invalidateQueries({
138
+ queryKey: [QUERY_KEYS.GET_LIST_SESSION_BY_CONVERSATION],
139
+ });
140
+ break;
130
141
  default:
131
142
  break;
132
143
  }
@@ -0,0 +1,3 @@
1
+ import { BaseResponse } from "../../types/dto";
2
+ export declare const useCloseSession: () => import("@tanstack/react-query").UseMutationResult<BaseResponse<boolean>, Error, string, unknown>;
3
+ //# sourceMappingURL=useCloseSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCloseSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useCloseSession.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,eAAO,MAAM,eAAe,wGAexB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { useMutation } from "@tanstack/react-query";
2
+ import { QUERY_KEYS } from "../../services/query";
3
+ import { apiInstance } from "../../services/api";
4
+ import { ENDPOINTS } from "../../services/routes";
5
+ import useAuthStore from "../../store/auth";
6
+ export const useCloseSession = () => useMutation({
7
+ mutationKey: [QUERY_KEYS.CLOSE_SESSION],
8
+ mutationFn: async (sessionId) => {
9
+ const res = await apiInstance.post(ENDPOINTS.chatService.closeSession(sessionId), null, {
10
+ params: {
11
+ applicationType: useAuthStore.getState().applicationType,
12
+ },
13
+ });
14
+ return res === null || res === void 0 ? void 0 : res.data;
15
+ },
16
+ });
@@ -0,0 +1,3 @@
1
+ import { ILabelResponse } from "../../types/dto";
2
+ export declare const useGetLabelSession: () => import("@tanstack/react-query").UseQueryResult<ILabelResponse[], Error>;
3
+ //# sourceMappingURL=useGetLabelSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetLabelSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useGetLabelSession.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG/D,eAAO,MAAM,kBAAkB,+EAc3B,CAAC"}
@@ -0,0 +1,17 @@
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
+ import { DChatApplicationType } from "../../types/chat";
6
+ export const useGetLabelSession = () => useQuery({
7
+ queryKey: [QUERY_KEYS.GET_LABEL_SESSION],
8
+ queryFn: async () => {
9
+ var _a;
10
+ const res = await apiInstance.get(ENDPOINTS.chatService.getLabelSession, {
11
+ params: {
12
+ applicationType: DChatApplicationType.OBEFE,
13
+ },
14
+ });
15
+ return (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.data;
16
+ },
17
+ });
@@ -0,0 +1,9 @@
1
+ import { ISessionResponse } from "../../types/dto";
2
+ interface GetListSessionParams {
3
+ conversationId: string;
4
+ page?: number;
5
+ pageSize?: number;
6
+ }
7
+ export declare const useGetListSessionByConversation: ({ conversationId, page, pageSize, }: GetListSessionParams) => import("@tanstack/react-query").UseQueryResult<ISessionResponse[], Error>;
8
+ export {};
9
+ //# sourceMappingURL=useGetListSessionByConversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetListSessionByConversation.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useGetListSessionByConversation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGjE,UAAU,oBAAoB;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,+BAA+B,GAAI,qCAI7C,oBAAoB,8EAqBnB,CAAC"}
@@ -0,0 +1,24 @@
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
+ import { DChatApplicationType } from "../../types/chat";
6
+ export const useGetListSessionByConversation = ({ conversationId, page = 1, pageSize = 50, }) => useQuery({
7
+ queryKey: [
8
+ QUERY_KEYS.GET_LIST_SESSION_BY_CONVERSATION,
9
+ conversationId,
10
+ { page, pageSize },
11
+ ],
12
+ queryFn: async () => {
13
+ var _a;
14
+ const res = await apiInstance.get(ENDPOINTS.chatService.listSessionByConversation(conversationId), {
15
+ params: {
16
+ applicationType: DChatApplicationType.OBEFE,
17
+ page,
18
+ pageSize,
19
+ },
20
+ });
21
+ return (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.data;
22
+ },
23
+ enabled: !!conversationId,
24
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"useUpdateNote.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useUpdateNote.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAA4B,MAAM,iBAAiB,CAAC;AAGzE,eAAO,MAAM,aAAa;YAOZ,MAAM;aACL,MAAM;WAejB,CAAC"}
1
+ {"version":3,"file":"useUpdateNote.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useUpdateNote.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,eAAO,MAAM,aAAa;YAOZ,MAAM;aACL,MAAM;WAejB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { BaseResponse } from "../../types/dto";
2
+ interface IUpdateSessionInfoPayload {
3
+ labelIds?: string[];
4
+ issueDetail?: string;
5
+ sessionId: string;
6
+ note?: string;
7
+ }
8
+ export declare const useUpdateSessionInfo: () => import("@tanstack/react-query").UseMutationResult<BaseResponse<boolean>, Error, IUpdateSessionInfoPayload, unknown>;
9
+ export {};
10
+ //# sourceMappingURL=useUpdateSessionInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateSessionInfo.d.ts","sourceRoot":"","sources":["../../../src/hooks/session/useUpdateSessionInfo.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,oBAAoB,2HAa7B,CAAC"}
@@ -0,0 +1,24 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { useMutation } from "@tanstack/react-query";
13
+ import { QUERY_KEYS } from "../../services/query";
14
+ import { apiInstance } from "../../services/api";
15
+ import { ENDPOINTS } from "../../services/routes";
16
+ import useAuthStore from "../../store/auth";
17
+ export const useUpdateSessionInfo = () => useMutation({
18
+ mutationKey: [QUERY_KEYS.UPDATE_SESSION_INFO],
19
+ mutationFn: async (_a) => {
20
+ var { sessionId } = _a, data = __rest(_a, ["sessionId"]);
21
+ const res = await apiInstance.put(ENDPOINTS.chatService.updateSessionInfo(sessionId), Object.assign(Object.assign({}, data), { applicationType: useAuthStore.getState().applicationType }));
22
+ return res === null || res === void 0 ? void 0 : res.data;
23
+ },
24
+ });
package/dist/index.d.ts CHANGED
@@ -6,6 +6,10 @@ import { Icon } from "./components/icon";
6
6
  import useUserStore from "./store/user";
7
7
  import { DChatInitAndLoginConfig, DChatApplicationType } from "./types/chat";
8
8
  import useAuthStore from "./store/auth";
9
+ export * from "ahooks";
10
+ export { isNil } from "lodash";
11
+ export { default as qs } from "query-string";
12
+ export * from "antd/es/table";
9
13
  export { ChatProvider, useChatContext } from "./context/ChatContext";
10
14
  export { DChatDeskMessage, DChatBubble, Icon };
11
15
  export { useDChatAuth } from "./hooks/user/useAuth";
@@ -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,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,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,YAAY,MAAM,cAAc,CAAC;AAGxC,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;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC;AAI5D,OAAO,EACL,QAAQ,IAAI,aAAa,EACzB,QAAQ,IAAI,aAAa,EACzB,WAAW,IAAI,gBAAgB,GAChC,CAAC;AAEF,YAAY,EAAE,uBAAuB,EAAE,CAAC"}
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,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,cAAc,CAAC;AAC7C,cAAc,eAAe,CAAC;AAG9B,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;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC;AAI5D,OAAO,EACL,QAAQ,IAAI,aAAa,EACzB,QAAQ,IAAI,aAAa,EACzB,WAAW,IAAI,gBAAgB,GAChC,CAAC;AAEF,YAAY,EAAE,uBAAuB,EAAE,CAAC"}