corp-chat-library-antd-react-socket 1.2.21 → 1.2.22
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.
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Normalized } from '../types/types.ts';
|
|
1
|
+
import { Normalized, ReplyTarget } from '../types/types.ts';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
export default function ChatIncomingMsg({ message, pasteFileIcon }: {
|
|
3
|
+
export default function ChatIncomingMsg({ message, answeredMessage, onReply, onAnswerClick, pasteFileIcon }: {
|
|
4
4
|
message: Normalized | undefined;
|
|
5
|
+
answeredMessage?: ReplyTarget | null;
|
|
6
|
+
onReply: (message: ReplyTarget) => void;
|
|
7
|
+
onAnswerClick: (messageId: number) => void;
|
|
5
8
|
pasteFileIcon: (extension: string) => React.ReactNode;
|
|
6
9
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { UploadFile } from 'antd';
|
|
2
|
-
|
|
2
|
+
import { ReplyTarget } from '../types/types.ts';
|
|
3
|
+
export declare function ChatInput({ onSend, replyTo, onCancelReply }: {
|
|
3
4
|
onSend: (trimmed: string, fileList: UploadFile[]) => void;
|
|
5
|
+
replyTo: ReplyTarget | null;
|
|
6
|
+
onCancelReply: () => void;
|
|
4
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Normalized } from '../types/types.ts';
|
|
1
|
+
import { Normalized, ReplyTarget } from '../types/types.ts';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
export default function ChatSelfMsg({ message, pasteFileIcon }: {
|
|
3
|
+
export default function ChatSelfMsg({ message, answeredMessage, onAnswerClick, pasteFileIcon }: {
|
|
4
4
|
message: Normalized;
|
|
5
|
+
answeredMessage?: ReplyTarget | null;
|
|
6
|
+
onAnswerClick: (messageId: number) => void;
|
|
5
7
|
pasteFileIcon: (extension: string) => React.ReactNode;
|
|
6
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -144,6 +144,7 @@ export interface File {
|
|
|
144
144
|
export interface Normalized {
|
|
145
145
|
fromId: number;
|
|
146
146
|
id: number;
|
|
147
|
+
answer: number | null;
|
|
147
148
|
text: string;
|
|
148
149
|
files: File[];
|
|
149
150
|
timestamp: number;
|
|
@@ -154,6 +155,11 @@ export interface Normalized {
|
|
|
154
155
|
status: boolean;
|
|
155
156
|
_raw: ChatMessage;
|
|
156
157
|
}
|
|
158
|
+
export interface ReplyTarget {
|
|
159
|
+
id: number;
|
|
160
|
+
text: string;
|
|
161
|
+
senderName: string;
|
|
162
|
+
}
|
|
157
163
|
export interface messagesWithDividersInterface {
|
|
158
164
|
type: string;
|
|
159
165
|
id: string;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--app-top-menu: linear-gradient(178deg, rgba(79, 143, 207, 1) 0%, rgba(41, 92, 143, 1) 100%);--sa-primary-color: #2178fa}.ant-layout-sider-children{margin:0!important;padding:0!important}ol,ul{list-style:none;padding-left:0;margin:0}.
|
|
1
|
+
:root{--app-top-menu: linear-gradient(178deg, rgba(79, 143, 207, 1) 0%, rgba(41, 92, 143, 1) 100%);--sa-primary-color: #2178fa}.ant-layout-sider-children{margin:0!important;padding:0!important}ol,ul{list-style:none;padding-left:0;margin:0}._draggableWrapper_1o3mj_17 .ant-modal-content{padding:0;background-color:#fff;border:1px solid #787878a2;border-radius:15px;overflow:hidden}._chat-modal__title_1o3mj_33{cursor:grab;padding:20px 10px 10px 20px;background:var(--app-top-menu);color:#fff!important;font-weight:400!important}._chat-modal__title_1o3mj_33:active{cursor:grabbing}._chat-input__footer_1o3mj_57{border-top:1px solid #c1c1c1;background:#fff;padding:5px 0;display:flex;gap:5px;justify-content:space-around}._chat-input__footer_1o3mj_57>*{margin:0 auto!important}._sidebar-layout_1o3mj_83{display:flex;flex-direction:column;height:100%;border-right:1px solid #c1c1c1;padding:2px 0}._sidebar-layout_1o3mj_83>*:not(:last-child){border-bottom:1px solid #e6e6e6}._sidebar-layout_1o3mj_83:nth-child(1){border-bottom:none}._chat-list_1o3mj_113::-webkit-scrollbar{display:none}._chat-list_1o3mj_113>*{margin:0;border-bottom:1px solid #e6e6e6;height:86px}._chat-item_1o3mj_139{margin-bottom:12px}._last-message_1o3mj_147{min-height:20px;max-height:36px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;font-size:.9em;color:#555}._activeChatItem_1o3mj_165 ._last-message_1o3mj_147{color:#f3f1f1}._lastMessageLabel_1o3mj_169{font-style:italic}._lastMessageDateTime_1o3mj_173{margin-top:2px;display:flex;align-items:center;gap:6px}._lastMessageDate_1o3mj_173{font-size:11px;line-height:14px;color:#8a8a8a}._lastMessageTime_1o3mj_186{padding:1px 5px;border-radius:4px;background:#607d8b;color:#fff;font-size:11px;line-height:14px;font-weight:600}._lastMessageStatus_1o3mj_196{position:relative;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;color:#6f7b83}._lastMessageStatusRead_1o3mj_206{color:green}._activeChatItem_1o3mj_165 ._lastMessageDate_1o3mj_173{color:#e5e5e5}._activeChatItem_1o3mj_165 ._lastMessageTime_1o3mj_186{background:#fff3;color:#fff}._activeChatItem_1o3mj_165 ._lastMessageStatus_1o3mj_196{color:#fff}._activeChatItem_1o3mj_165 ._lastMessageStatusRead_1o3mj_206{color:#7ee787}._message_1o3mj_230{display:flex;margin-bottom:8px}._myMessage_1o3mj_240{justify-content:flex-end}._otherMessage_1o3mj_248{justify-content:flex-start}._bubble_1o3mj_258{max-width:70%;padding:8px 12px;position:relative}._myMessageBubble_1o3mj_272{border-radius:25px 25px 0;margin:0 7px 0 auto;background:#dcf8c6;color:#000;align-self:flex-end;border:1px solid #e6e6e6;-webkit-box-shadow:9px 10px 15px -5px rgba(34,60,80,.2);-moz-box-shadow:9px 10px 15px -5px rgba(34,60,80,.2);box-shadow:9px 10px 15px -5px #223c5033}._otherMessageBubble_1o3mj_298{border-radius:25px 25px 25px 0;margin-left:7px;background:#e1f8f2;color:#000;border:1px solid #e6e6e6;align-self:flex-start;-webkit-box-shadow:-13px 10px 15px -5px rgba(34,60,80,.2);-moz-box-shadow:-13px 10px 15px -5px rgba(34,60,80,.2);box-shadow:-13px 10px 15px -5px #223c5033}._senderName_1o3mj_324{display:block;font-size:12px;font-weight:700;color:#333;margin-bottom:4px}._time_1o3mj_342{font-size:11px;color:#666;text-align:right;margin-top:2px}._chat_header_1o3mj_358{height:40px;display:flex;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid #f0f0f0;background:#fafafa;flex-shrink:0}._chatHeaderUser_1o3mj_373{display:flex;align-items:center;gap:8px;min-width:0}._chatHeaderAvatar_1o3mj_380,._chatListAvatar_1o3mj_381{flex-shrink:0;background:#607d8b;color:#fff;font-weight:600}._chatHeaderAvatar_1o3mj_380 svg,._chatListAvatar_1o3mj_381 svg{display:block}._chatHeaderUserName_1o3mj_393{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._chatHeaderSkeletonAvatar_1o3mj_399{flex-shrink:0}._chatHeaderSkeletonName_1o3mj_403,._chatHeaderSkeletonId_1o3mj_404{display:flex!important}._chatHeaderSkeletonName_1o3mj_403{width:180px!important;height:18px!important}._chatHeaderSkeletonId_1o3mj_404{width:42px!important;height:18px!important}._lastUpdate_1o3mj_418{font-size:12px;color:#888}._localMessage_1o3mj_424{opacity:.7}._sending_1o3mj_432{color:#1890ff;font-size:11px;font-style:italic}._notification-badge_1o3mj_444{cursor:pointer;transition:background-color .2s}._notification-badge_1o3mj_444:hover{background-color:#1890ff}._chat-layout_1o3mj_464{height:760px;display:flex;overflow:hidden}._chat-layout_1o3mj_464 ._ant-layout-content_1o3mj_471{min-height:0!important}._chat-content_1o3mj_479{flex:1;overflow:hidden}._chatcontentLayout_1o3mj_489{height:100%;display:flex;flex-direction:column}._chat_content_1o3mj_501{display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto}._messagesList_1o3mj_523{flex:1;overflow-y:auto;padding:8px;min-height:0;display:flex;flex-direction:column}._messagesList_1o3mj_523::-webkit-scrollbar,._textArea_1o3mj_545::-webkit-scrollbar{display:none}._textArea_1o3mj_545{min-height:40px;max-height:120px;resize:none;padding:0 2px;width:200px;line-height:40px}._textArea_1o3mj_545::placeholder{color:#999;opacity:.5}._chatItem_1o3mj_581{height:86px;padding:5px;display:flex;align-items:center;justify-content:space-between;gap:8px}._chatItemContent_1o3mj_589{min-width:0;flex:1}._chatListSkeletonAvatar_1o3mj_593{flex-shrink:0}._chatListSkeletonName_1o3mj_597,._chatListSkeletonMessage_1o3mj_598,._chatListSkeletonDate_1o3mj_599,._chatListSkeletonTime_1o3mj_600{display:flex!important}._chatListSkeletonName_1o3mj_597{width:72%!important;height:16px!important;margin-bottom:8px}._chatListSkeletonMessage_1o3mj_598{width:92%!important;height:18px!important;margin-bottom:5px}._chatListSkeletonMeta_1o3mj_616{display:flex;align-items:center;gap:6px}._chatListSkeletonDate_1o3mj_599{width:54px!important;height:14px!important}._chatListSkeletonTime_1o3mj_600{width:42px!important;height:16px!important;border-radius:4px!important}._activeChatItem_1o3mj_165 ._chatListAvatar_1o3mj_381{background:#fff3;color:#fff}._activeChatItem_1o3mj_165{background:var(--app-top-menu);color:#fff;opacity:.8}._chat_body_1o3mj_651{flex:1;display:flex;flex-direction:column;overflow-y:scroll;scrollbar-color:#f5f5f5 #f5f5f5;scrollbar-width:thin;transition:.3s}._chat_body_1o3mj_651:hover{scrollbar-color:var(--sa-primary-color) #f5f5f5}._antd_empty_1o3mj_679{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}._chatSkeleton_1o3mj_687{padding:12px;display:flex;flex-direction:column;gap:12px}._chatSkeletonDivider_1o3mj_694{width:80px!important;height:22px!important;align-self:center;border-radius:12px!important}._chatSkeletonRow_1o3mj_701{width:100%;display:flex;justify-content:flex-start}._chatSkeletonRowSelf_1o3mj_707{justify-content:flex-end}._chatSkeletonRowSelf_1o3mj_707 .ant-skeleton-button{margin-left:auto}._chatSkeletonBubble_1o3mj_715,._chatSkeletonBubbleSelf_1o3mj_716,._chatSkeletonBubbleWide_1o3mj_717{height:44px!important;border-radius:18px!important}._chatSkeletonBubble_1o3mj_715{width:68%!important;display:flex!important}._chatSkeletonBubbleSelf_1o3mj_716{width:58%!important;display:flex!important}._chatSkeletonBubbleWide_1o3mj_717{width:82%!important;display:flex!important}._chat_inputs_1o3mj_737{width:100%;display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;grid-gap:10px;padding:0 10px}._chatInputWrapper_1o3mj_746{width:100%;display:flex;flex-direction:column;gap:4px}._replyComposer_1o3mj_753{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;min-width:0;margin:0 10px;padding:5px 8px 5px 10px;border-left:3px solid #1890ff;border-radius:4px;background:#f5f8fb}._replyComposerContent_1o3mj_766{min-width:0}._replyComposerName_1o3mj_770{color:#1677ff;font-size:12px;font-weight:600;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._replyComposerText_1o3mj_780{color:#333;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._replyComposerClose_1o3mj_789{flex-shrink:0}._replyLink_1o3mj_793{width:100%;display:block;margin:0 0 6px;padding:5px 8px;border:0;border-left:3px solid #1890ff;border-radius:4px;background:#ffffffa6;color:inherit;cursor:pointer;text-align:left}._replyLinkName_1o3mj_807,._replyLinkText_1o3mj_808{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._replyLinkName_1o3mj_807{color:#1677ff;font-size:12px;font-weight:600;line-height:16px}._replyLinkText_1o3mj_808{color:#333;font-size:12px;line-height:16px}._messageHighlighted_1o3mj_828 ._bubble_1o3mj_258{animation:_messageHighlight_1o3mj_828 1.6s ease}@keyframes _messageHighlight_1o3mj_828{0%{box-shadow:0 0 #1890ff73}35%{box-shadow:0 0 0 4px #1890ff40}to{box-shadow:0 0 #1890ff00}}._chat-list__container_1o3mj_844{height:100%;overflow-y:scroll;scrollbar-color:#f5f5f5 #f5f5f5;scrollbar-width:thin;transition:.3s}._chat-list__container_1o3mj_844:hover{scrollbar-color:var(--sa-primary-color) #f5f5f5}._files_container_1o3mj_862{display:flex;flex-direction:column;align-items:center;gap:10px}._file_1o3mj_862{width:100%;padding:0 5px;border-radius:5px;color:#333;display:flex;align-items:center;gap:10px}._file_circle_1o3mj_892{background-color:#99bad3;border-radius:50%;padding:10px;display:flex;align-items:center;justify-content:center}._file_circle_1o3mj_892._self_1o3mj_908{background-color:#9ed399}._href_label_1o3mj_914{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|