corp-chat-library-antd-react-socket 1.2.21 → 1.2.23
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_1uhlh_17 .ant-modal-content{padding:0;background-color:#fff;border:1px solid #787878a2;border-radius:15px;overflow:hidden}._chat-modal__title_1uhlh_33{cursor:grab;padding:20px 10px 10px 20px;background:var(--app-top-menu);color:#fff!important;font-weight:400!important}._chat-modal__title_1uhlh_33:active{cursor:grabbing}._chat-input__footer_1uhlh_57{border-top:1px solid #c1c1c1;background:#fff;padding:5px 0;display:flex;gap:5px;justify-content:space-around}._chat-input__footer_1uhlh_57>*{margin:0 auto!important}._sidebar-layout_1uhlh_83{display:flex;flex-direction:column;height:100%;border-right:1px solid #c1c1c1;padding:2px 0}._sidebar-layout_1uhlh_83>*:not(:last-child){border-bottom:1px solid #e6e6e6}._sidebar-layout_1uhlh_83:nth-child(1){border-bottom:none}._chat-list_1uhlh_113::-webkit-scrollbar{display:none}._chat-list_1uhlh_113>*{margin:0;border-bottom:1px solid #e6e6e6;height:86px}._chat-item_1uhlh_139{margin-bottom:12px}._last-message_1uhlh_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_1uhlh_165 ._last-message_1uhlh_147{color:#f3f1f1}._lastMessageLabel_1uhlh_169{font-style:italic}._lastMessageDateTime_1uhlh_173{margin-top:2px;display:flex;align-items:center;gap:6px}._lastMessageDate_1uhlh_173{font-size:11px;line-height:14px;color:#8a8a8a}._lastMessageTime_1uhlh_186{padding:1px 5px;border-radius:4px;background:#607d8b;color:#fff;font-size:11px;line-height:14px;font-weight:600}._lastMessageStatus_1uhlh_196{position:relative;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;color:#6f7b83}._lastMessageStatusRead_1uhlh_206{color:green}._activeChatItem_1uhlh_165 ._lastMessageDate_1uhlh_173{color:#e5e5e5}._activeChatItem_1uhlh_165 ._lastMessageTime_1uhlh_186{background:#fff3;color:#fff}._activeChatItem_1uhlh_165 ._lastMessageStatus_1uhlh_196{color:#fff}._activeChatItem_1uhlh_165 ._lastMessageStatusRead_1uhlh_206{color:#7ee787}._message_1uhlh_230{display:flex;margin-bottom:8px}._myMessage_1uhlh_240{justify-content:flex-end}._otherMessage_1uhlh_248{justify-content:flex-start}._bubble_1uhlh_258{max-width:70%;padding:8px 12px;position:relative}._myMessageBubble_1uhlh_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_1uhlh_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_1uhlh_324{display:block;font-size:12px;font-weight:700;color:#333;margin-bottom:4px}._time_1uhlh_342{font-size:11px;color:#666;text-align:right;margin-top:2px}._chat_header_1uhlh_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_1uhlh_373{display:flex;align-items:center;gap:8px;min-width:0}._chatHeaderAvatar_1uhlh_380,._chatListAvatar_1uhlh_381{flex-shrink:0;background:#607d8b;color:#fff;font-weight:600}._chatHeaderAvatar_1uhlh_380 svg,._chatListAvatar_1uhlh_381 svg{display:block}._chatHeaderUserName_1uhlh_393{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._chatHeaderSkeletonAvatar_1uhlh_399{flex-shrink:0}._chatHeaderSkeletonName_1uhlh_403,._chatHeaderSkeletonId_1uhlh_404{display:flex!important}._chatHeaderSkeletonName_1uhlh_403{width:180px!important;height:18px!important}._chatHeaderSkeletonId_1uhlh_404{width:42px!important;height:18px!important}._lastUpdate_1uhlh_418{font-size:12px;color:#888}._localMessage_1uhlh_424{opacity:.7}._sending_1uhlh_432{color:#1890ff;font-size:11px;font-style:italic}._notification-badge_1uhlh_444{cursor:pointer;transition:background-color .2s}._notification-badge_1uhlh_444:hover{background-color:#1890ff}._chat-layout_1uhlh_464{height:760px;display:flex;overflow:hidden}._chat-layout_1uhlh_464 ._ant-layout-content_1uhlh_471{min-height:0!important}._chat-content_1uhlh_479{flex:1;overflow:hidden}._chatcontentLayout_1uhlh_489{height:100%;display:flex;flex-direction:column}._chat_content_1uhlh_501{display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto}._messagesList_1uhlh_523{flex:1;overflow-y:auto;padding:8px;min-height:0;display:flex;flex-direction:column}._messagesList_1uhlh_523::-webkit-scrollbar,._textArea_1uhlh_545::-webkit-scrollbar{display:none}._textArea_1uhlh_545{min-height:40px;max-height:120px;resize:none;padding:0 2px;width:200px;line-height:40px}._textArea_1uhlh_545::placeholder{color:#999;opacity:.5}._chatItem_1uhlh_581{height:86px;padding:5px;display:flex;align-items:center;justify-content:space-between;gap:8px}._chatItemContent_1uhlh_589{min-width:0;flex:1}._chatListSkeletonAvatar_1uhlh_593{flex-shrink:0}._chatListSkeletonName_1uhlh_597,._chatListSkeletonMessage_1uhlh_598,._chatListSkeletonDate_1uhlh_599,._chatListSkeletonTime_1uhlh_600{display:flex!important}._chatListSkeletonName_1uhlh_597{width:72%!important;height:16px!important;margin-bottom:8px}._chatListSkeletonMessage_1uhlh_598{width:92%!important;height:18px!important;margin-bottom:5px}._chatListSkeletonMeta_1uhlh_616{display:flex;align-items:center;gap:6px}._chatListSkeletonDate_1uhlh_599{width:54px!important;height:14px!important}._chatListSkeletonTime_1uhlh_600{width:42px!important;height:16px!important;border-radius:4px!important}._activeChatItem_1uhlh_165 ._chatListAvatar_1uhlh_381{background:#fff3;color:#fff}._activeChatItem_1uhlh_165{background:var(--app-top-menu);color:#fff;opacity:.8}._chat_body_1uhlh_651{flex:1;display:flex;flex-direction:column;overflow-y:scroll;scrollbar-color:#f5f5f5 #f5f5f5;scrollbar-width:thin;transition:.3s}._chat_body_1uhlh_651:hover{scrollbar-color:var(--sa-primary-color) #f5f5f5}._antd_empty_1uhlh_679{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}._chatSkeleton_1uhlh_687{padding:12px;display:flex;flex-direction:column;gap:12px}._chatSkeletonDivider_1uhlh_694{width:80px!important;height:22px!important;align-self:center;border-radius:12px!important}._chatSkeletonRow_1uhlh_701{width:100%;display:flex;justify-content:flex-start}._chatSkeletonRowSelf_1uhlh_707{justify-content:flex-end}._chatSkeletonRowSelf_1uhlh_707 .ant-skeleton-button{margin-left:auto}._chatSkeletonBubble_1uhlh_715,._chatSkeletonBubbleSelf_1uhlh_716,._chatSkeletonBubbleWide_1uhlh_717{height:44px!important;border-radius:18px!important}._chatSkeletonBubble_1uhlh_715{width:68%!important;display:flex!important}._chatSkeletonBubbleSelf_1uhlh_716{width:58%!important;display:flex!important}._chatSkeletonBubbleWide_1uhlh_717{width:82%!important;display:flex!important}._chat_inputs_1uhlh_737{width:100%;display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;grid-gap:10px;padding:0 10px}._chatInputWrapper_1uhlh_746{width:100%;display:flex;flex-direction:column;gap:4px}._replyComposer_1uhlh_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_1uhlh_766{min-width:0}._replyComposerName_1uhlh_770{color:#1677ff;font-size:12px;font-weight:600;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._replyComposerText_1uhlh_780{color:#333;font-size:12px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._replyComposerClose_1uhlh_789{flex-shrink:0}._replyLink_1uhlh_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_1uhlh_807,._replyLinkText_1uhlh_808{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._replyLinkName_1uhlh_807{color:#1677ff;font-size:12px;font-weight:600;line-height:16px}._replyLinkText_1uhlh_808{color:#333;font-size:12px;line-height:16px}._messageHighlighted_1uhlh_828 ._bubble_1uhlh_258{animation:_messageHighlight_1uhlh_828 4s ease}@keyframes _messageHighlight_1uhlh_828{0%{box-shadow:0 0 #1890ff73}15%{box-shadow:0 0 0 5px #1890ff47}65%{box-shadow:0 0 0 5px #1890ff47}to{box-shadow:0 0 #1890ff00}}._chat-list__container_1uhlh_847{height:100%;overflow-y:scroll;scrollbar-color:#f5f5f5 #f5f5f5;scrollbar-width:thin;transition:.3s}._chat-list__container_1uhlh_847:hover{scrollbar-color:var(--sa-primary-color) #f5f5f5}._files_container_1uhlh_865{display:flex;flex-direction:column;align-items:center;gap:10px}._file_1uhlh_865{width:100%;padding:0 5px;border-radius:5px;color:#333;display:flex;align-items:center;gap:10px}._file_circle_1uhlh_895{background-color:#99bad3;border-radius:50%;padding:10px;display:flex;align-items:center;justify-content:center}._file_circle_1uhlh_895._self_1uhlh_911{background-color:#9ed399}._href_label_1uhlh_917{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|