@webinex/chatify 2.0.0-alpha7 → 2.0.0-alpha9
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/Chatify-DGRV4QKP.js +2203 -0
- package/dist/Chatify-DGRV4QKP.js.map +1 -0
- package/dist/Chatify.css +670 -0
- package/dist/audit.css +60 -0
- package/dist/audit.js +242 -0
- package/dist/audit.js.map +1 -0
- package/dist/index.js +97 -0
- package/dist/index.js.map +1 -0
- package/dist/types/audit/AuditChatList.d.ts +9 -0
- package/dist/types/audit/AuditConversationPanel.d.ts +10 -0
- package/dist/types/audit/AuditPanel.d.ts +14 -0
- package/dist/types/audit/AuditPanelCustomizeValue.d.ts +9 -0
- package/dist/types/audit/AuditSearch.d.ts +5 -0
- package/dist/types/audit/AuditSearchValue.d.ts +14 -0
- package/dist/types/audit/auditApi.d.ts +97 -0
- package/dist/types/audit/index.d.ts +17 -0
- package/dist/types/core/api/api.d.ts +17295 -0
- package/dist/{esm/types → types}/core/api/baseApi.d.ts +1 -1
- package/dist/{esm/types → types}/core/client.d.ts +4 -3
- package/dist/{esm/types → types}/core/types.d.ts +25 -0
- package/dist/types/ui/Chat/ChatEditableHeaderName.d.ts +1 -0
- package/dist/types/ui/Chat/ChatHeaderActions.d.ts +1 -0
- package/dist/{esm/types → types}/ui/Chat/ChatView.d.ts +1 -2
- package/dist/types/ui/Chat/Members/ChatMembersButton.d.ts +1 -0
- package/dist/types/ui/Chat/Members/ChatMembersPanel.d.ts +1 -0
- package/dist/types/ui/Chat/Members/ChatMembersPreview.d.ts +1 -0
- package/dist/{esm/types → types}/ui/ChatGroup/ChatGroupPanel.d.ts +2 -2
- package/dist/types/ui/ChatGroup/Create/CreateChatButton.d.ts +1 -0
- package/dist/{esm/types → types}/ui/ChatGroup/Create/CreateChatForm.d.ts +1 -2
- package/dist/types/ui/ChatGroup/Create/CreateChatMemberInput.d.ts +4 -0
- package/dist/types/ui/ChatGroup/Create/CreateChatNameInput.d.ts +4 -0
- package/dist/types/ui/ChatGroup/Create/CreateChatPanel.d.ts +1 -0
- package/dist/types/ui/ChatGroup/Layout/ChatGroupAside.d.ts +1 -0
- package/dist/types/ui/ChatGroup/Layout/ChatGroupBody.d.ts +1 -0
- package/dist/types/ui/ChatGroup/Layout/ChatGroupFooter.d.ts +1 -0
- package/dist/types/ui/ChatGroup/Layout/ChatGroupHeader.d.ts +1 -0
- package/dist/types/ui/ChatGroup/Layout/ChatGroupMain.d.ts +1 -0
- package/dist/types/ui/ChatGroup/List/ChatListPanel.d.ts +1 -0
- package/dist/types/ui/ChatGroup/List/index.d.ts +6 -0
- package/dist/types/ui/Chatify.d.ts +9 -0
- package/dist/{esm/types → types}/ui/Conversation/Conversation.d.ts +2 -3
- package/dist/types/ui/Conversation/ConversationActions.d.ts +1 -0
- package/dist/types/ui/Conversation/ConversationBody.d.ts +1 -0
- package/dist/{esm/types → types}/ui/Conversation/ConversationContext.d.ts +6 -5
- package/dist/types/ui/Conversation/ConversationHeader.d.ts +1 -0
- package/dist/types/ui/Conversation/ConversationName.d.ts +1 -0
- package/dist/types/ui/Conversation/InputBox/InputBox.d.ts +1 -0
- package/dist/types/ui/Conversation/InputBox/InputBoxFile.d.ts +7 -0
- package/dist/types/ui/Conversation/InputBox/InputBoxFileList.d.ts +7 -0
- package/dist/types/ui/Conversation/InputBox/InputFilesBox.d.ts +11 -0
- package/dist/types/ui/Conversation/InputBox/InputSubmitButtonBox.d.ts +6 -0
- package/dist/{esm/types → types}/ui/Conversation/InputBox/InputTextBox.d.ts +1 -1
- package/dist/types/ui/Conversation/Message/MessageAuthor.d.ts +2 -0
- package/dist/types/ui/Conversation/Message/MessageBox.d.ts +5 -0
- package/dist/types/ui/Conversation/Message/MessageContent.d.ts +2 -0
- package/dist/types/ui/Conversation/Message/MessageFile.d.ts +5 -0
- package/dist/types/ui/Conversation/Message/MessageFileList.d.ts +2 -0
- package/dist/types/ui/Conversation/Message/MessageInfoBox.d.ts +2 -0
- package/dist/{esm/types → types}/ui/Conversation/Message/MessageRow.d.ts +1 -1
- package/dist/types/ui/Conversation/Message/MessageText.d.ts +2 -0
- package/dist/types/ui/Conversation/SendingMessage/SendingMessageBox.d.ts +6 -0
- package/dist/types/ui/Conversation/SendingMessage/SendingMessageContent.d.ts +2 -0
- package/dist/types/ui/Conversation/SendingMessage/SendingMessageInfoBox.d.ts +2 -0
- package/dist/types/ui/Conversation/SendingMessage/SendingMessageText.d.ts +2 -0
- package/dist/types/ui/Conversation/SystemMessage/SystemMessageBox.d.ts +5 -0
- package/dist/{esm/types → types}/ui/Conversation/SystemMessage/SystemMessageRow.d.ts +1 -1
- package/dist/types/ui/Thread/ThreadActions.d.ts +1 -0
- package/dist/{esm/types → types}/ui/Thread/ThreadContext.d.ts +1 -1
- package/dist/types/ui/common/Avatar.d.ts +5 -0
- package/dist/types/ui/common/ChatList/ChatList.d.ts +16 -0
- package/dist/types/ui/common/ChatList/ChatListItemAvatar.d.ts +2 -0
- package/dist/types/ui/common/ChatList/ChatListItemBox.d.ts +9 -0
- package/dist/types/ui/common/ChatList/ChatListItemLastMessage.d.ts +2 -0
- package/dist/types/ui/common/ChatList/ChatListItemLastMessageAuthor.d.ts +2 -0
- package/dist/types/ui/common/ChatList/ChatListItemLastMessageContent.d.ts +2 -0
- package/dist/types/ui/common/ChatList/ChatListItemLastMessageSentAt.d.ts +2 -0
- package/dist/types/ui/common/ChatList/ChatListItemName.d.ts +2 -0
- package/dist/types/ui/common/ChatList/ChatListItemUnreadCount.d.ts +2 -0
- package/dist/types/ui/common/ChatList/ChatListValue.d.ts +8 -0
- package/dist/{esm/types/ui/ChatGroup/List → types/ui/common/ChatList}/index.d.ts +1 -0
- package/dist/types/ui/common/Icon.d.ts +21 -0
- package/dist/types/ui/common/MessageSkeleton.d.ts +4 -0
- package/dist/{esm/types → types}/ui/common/index.d.ts +1 -0
- package/dist/{esm/types → types}/ui/customize.d.ts +1 -1
- package/dist/{esm/types → types}/ui/index.d.ts +1 -3
- package/dist/{esm/types → types}/ui/localizer.d.ts +7 -2
- package/package.json +40 -53
- package/src/audit/AuditChatList.tsx +25 -0
- package/src/audit/AuditConversationPanel.tsx +48 -0
- package/src/audit/AuditPanel.tsx +76 -0
- package/src/audit/AuditPanelCustomizeValue.ts +11 -0
- package/src/audit/AuditSearch.tsx +89 -0
- package/src/audit/AuditSearchValue.tsx +42 -0
- package/src/audit/auditApi.tsx +113 -0
- package/src/audit/index.d.ts +18 -0
- package/src/audit/index.tsx +28 -0
- package/src/audit/styles.scss +72 -0
- package/src/core/client.ts +6 -1
- package/src/core/debounce.ts +1 -1
- package/src/core/types.tsx +33 -0
- package/src/styles/aside.scss +0 -136
- package/src/styles/chat-list.scss +138 -0
- package/src/styles/chat.scss +0 -198
- package/src/styles/conversation.scss +200 -0
- package/src/styles/index.scss +2 -0
- package/src/ui/Chat/ChatEditableHeaderName.tsx +1 -1
- package/src/ui/Chat/Members/ChatMembersPreview.tsx +1 -1
- package/src/ui/ChatGroup/ChatGroupPanel.tsx +2 -2
- package/src/ui/ChatGroup/Layout/ChatGroupAside.tsx +2 -2
- package/src/ui/ChatGroup/List/ChatListPanel.tsx +28 -0
- package/src/ui/ChatGroup/List/index.ts +6 -29
- package/src/ui/Chatify.tsx +7 -1
- package/src/ui/Conversation/Conversation.tsx +15 -1
- package/src/ui/Conversation/ConversationActions.tsx +8 -1
- package/src/ui/Conversation/ConversationContext.ts +4 -3
- package/src/ui/Conversation/ConversationHeader.tsx +4 -8
- package/src/ui/Conversation/InputBox/InputBox.tsx +4 -0
- package/src/ui/Conversation/InputBox/InputTextBox.tsx +1 -1
- package/src/ui/Conversation/Message/MessageInfoBox.tsx +1 -1
- package/src/ui/Conversation/ReadObserver/MessageReadObserver.tsx +1 -1
- package/src/ui/common/ChatList/ChatList.tsx +84 -0
- package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemBox.tsx +11 -5
- package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemLastMessageAuthor.tsx +3 -3
- package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemLastMessageContent.tsx +4 -4
- package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemLastMessageSentAt.tsx +1 -1
- package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemUnreadCount.tsx +1 -1
- package/src/ui/common/ChatList/ChatListValue.ts +9 -0
- package/src/ui/common/ChatList/index.ts +32 -0
- package/src/ui/common/Icon.tsx +15 -13
- package/src/ui/common/index.ts +1 -0
- package/src/ui/index.ts +3 -3
- package/src/ui/localizer.tsx +14 -2
- package/dist/css/chatify.css +0 -664
- package/dist/esm/index.js +0 -11
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/core/api/api.d.ts +0 -12696
- package/dist/esm/types/ui/Chat/ChatEditableHeaderName.d.ts +0 -2
- package/dist/esm/types/ui/Chat/ChatHeaderActions.d.ts +0 -2
- package/dist/esm/types/ui/Chat/Members/ChatMembersButton.d.ts +0 -2
- package/dist/esm/types/ui/Chat/Members/ChatMembersPanel.d.ts +0 -2
- package/dist/esm/types/ui/Chat/Members/ChatMembersPreview.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/Create/CreateChatButton.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/Create/CreateChatMemberInput.d.ts +0 -5
- package/dist/esm/types/ui/ChatGroup/Create/CreateChatNameInput.d.ts +0 -5
- package/dist/esm/types/ui/ChatGroup/Create/CreateChatPanel.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupAside.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupBody.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupFooter.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupHeader.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupMain.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/List/ChatList.d.ts +0 -2
- package/dist/esm/types/ui/ChatGroup/List/ChatListItemAvatar.d.ts +0 -3
- package/dist/esm/types/ui/ChatGroup/List/ChatListItemBox.d.ts +0 -6
- package/dist/esm/types/ui/ChatGroup/List/ChatListItemLastMessage.d.ts +0 -3
- package/dist/esm/types/ui/ChatGroup/List/ChatListItemLastMessageAuthor.d.ts +0 -3
- package/dist/esm/types/ui/ChatGroup/List/ChatListItemLastMessageContent.d.ts +0 -3
- package/dist/esm/types/ui/ChatGroup/List/ChatListItemLastMessageSentAt.d.ts +0 -3
- package/dist/esm/types/ui/ChatGroup/List/ChatListItemName.d.ts +0 -3
- package/dist/esm/types/ui/ChatGroup/List/ChatListItemUnreadCount.d.ts +0 -3
- package/dist/esm/types/ui/Chatify.d.ts +0 -8
- package/dist/esm/types/ui/Conversation/ConversationActions.d.ts +0 -2
- package/dist/esm/types/ui/Conversation/ConversationBody.d.ts +0 -2
- package/dist/esm/types/ui/Conversation/ConversationHeader.d.ts +0 -2
- package/dist/esm/types/ui/Conversation/ConversationName.d.ts +0 -2
- package/dist/esm/types/ui/Conversation/InputBox/InputBox.d.ts +0 -2
- package/dist/esm/types/ui/Conversation/InputBox/InputBoxFile.d.ts +0 -8
- package/dist/esm/types/ui/Conversation/InputBox/InputBoxFileList.d.ts +0 -8
- package/dist/esm/types/ui/Conversation/InputBox/InputFilesBox.d.ts +0 -12
- package/dist/esm/types/ui/Conversation/InputBox/InputSubmitButtonBox.d.ts +0 -7
- package/dist/esm/types/ui/Conversation/Message/MessageAuthor.d.ts +0 -3
- package/dist/esm/types/ui/Conversation/Message/MessageBox.d.ts +0 -6
- package/dist/esm/types/ui/Conversation/Message/MessageContent.d.ts +0 -3
- package/dist/esm/types/ui/Conversation/Message/MessageFile.d.ts +0 -6
- package/dist/esm/types/ui/Conversation/Message/MessageFileList.d.ts +0 -3
- package/dist/esm/types/ui/Conversation/Message/MessageInfoBox.d.ts +0 -3
- package/dist/esm/types/ui/Conversation/Message/MessageText.d.ts +0 -3
- package/dist/esm/types/ui/Conversation/SendingMessage/SendingMessageBox.d.ts +0 -7
- package/dist/esm/types/ui/Conversation/SendingMessage/SendingMessageContent.d.ts +0 -3
- package/dist/esm/types/ui/Conversation/SendingMessage/SendingMessageInfoBox.d.ts +0 -3
- package/dist/esm/types/ui/Conversation/SendingMessage/SendingMessageText.d.ts +0 -3
- package/dist/esm/types/ui/Conversation/SystemMessage/SystemMessageBox.d.ts +0 -6
- package/dist/esm/types/ui/Thread/ThreadActions.d.ts +0 -2
- package/dist/esm/types/ui/common/Avatar.d.ts +0 -6
- package/dist/esm/types/ui/common/Icon.d.ts +0 -22
- package/dist/esm/types/ui/common/MessageSkeleton.d.ts +0 -5
- package/dist/index.d.ts +0 -13363
- package/src/ui/ChatGroup/List/ChatList.tsx +0 -41
- /package/dist/{esm/types → types}/core/api/index.d.ts +0 -0
- /package/dist/{esm/types → types}/core/constants.d.ts +0 -0
- /package/dist/{esm/types → types}/core/debounce.d.ts +0 -0
- /package/dist/{esm/types → types}/core/index.d.ts +0 -0
- /package/dist/{esm/types → types}/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Chat/ChatContext.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Chat/ChatPanel.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Chat/Members/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Chat/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/ChatGroup/ChatGroupContext.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/ChatGroup/Create/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/ChatGroup/Layout/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/ChatGroup/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/InputBox/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/Message/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/NextObserver/NextMessagesObserver.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/NextObserver/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/ReadObserver/MessageReadObserver.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/ReadObserver/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/SendingMessage/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/SystemMessage/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Conversation/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Thread/ThreadPanel.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/Thread/index.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/color.d.ts +0 -0
- /package/dist/{esm/types → types}/ui/useFormatter.d.ts +0 -0
- /package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemAvatar.tsx +0 -0
- /package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemLastMessage.tsx +0 -0
- /package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemName.tsx +0 -0
package/src/core/client.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
Thread,
|
|
17
17
|
ThreadMessage,
|
|
18
18
|
ThreadWatchListItem as ThreadListItem,
|
|
19
|
+
UpdateAccountRequest,
|
|
19
20
|
} from './types';
|
|
20
21
|
|
|
21
22
|
export interface ChatifySignalRConfig {
|
|
@@ -159,7 +160,7 @@ export class ChatifyClient {
|
|
|
159
160
|
return () => this._reconnectSubscribers.filter((x) => x !== subscriber);
|
|
160
161
|
};
|
|
161
162
|
|
|
162
|
-
|
|
163
|
+
public get axios() {
|
|
163
164
|
return this._config.axios;
|
|
164
165
|
}
|
|
165
166
|
|
|
@@ -168,6 +169,10 @@ export class ChatifyClient {
|
|
|
168
169
|
return data;
|
|
169
170
|
};
|
|
170
171
|
|
|
172
|
+
public updateAccount = async (request: UpdateAccountRequest) => {
|
|
173
|
+
await this.axios.put(`account/${encodeURIComponent(request.id)}`, request);
|
|
174
|
+
};
|
|
175
|
+
|
|
171
176
|
public chats = async () => {
|
|
172
177
|
const { data } = await this.axios.get<ChatListItem[]>('chat');
|
|
173
178
|
return data;
|
package/src/core/debounce.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface DebounceConfig<T> {
|
|
|
17
17
|
export class Debounce<T> {
|
|
18
18
|
private _enqueued: DebounceInternalValue<T>[] = [];
|
|
19
19
|
private _processing: DebounceInternalValue<T>[] = [];
|
|
20
|
-
private _timeoutByGroup: Record<string,
|
|
20
|
+
private _timeoutByGroup: Record<string, number> = {};
|
|
21
21
|
private _subscribers: ((value: Debounce<T>) => any)[] = [];
|
|
22
22
|
|
|
23
23
|
constructor(public config: DebounceConfig<T>) {}
|
package/src/core/types.tsx
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
|
+
export interface Optional<TValue> {
|
|
2
|
+
hasValue: boolean;
|
|
3
|
+
value?: TValue | null;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
export interface File {
|
|
2
7
|
name: string;
|
|
3
8
|
bytes: number;
|
|
4
9
|
ref: string;
|
|
5
10
|
}
|
|
6
11
|
|
|
12
|
+
export interface Period {
|
|
13
|
+
start: string;
|
|
14
|
+
end: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface AutoReply {
|
|
18
|
+
text: string;
|
|
19
|
+
period: Period;
|
|
20
|
+
}
|
|
21
|
+
|
|
7
22
|
export interface Account {
|
|
8
23
|
id: string;
|
|
9
24
|
name: string;
|
|
10
25
|
avatar: string;
|
|
26
|
+
autoReply: AutoReply | null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface UpdateAccountRequest {
|
|
30
|
+
id: string;
|
|
31
|
+
autoReply?: Optional<AutoReply> | null;
|
|
32
|
+
name?: Optional<string> | null;
|
|
33
|
+
avatar?: Optional<string> | null;
|
|
34
|
+
active?: Optional<boolean> | null;
|
|
11
35
|
}
|
|
12
36
|
|
|
13
37
|
export interface MessageBase {
|
|
@@ -87,6 +111,10 @@ export function chatId(messageId: string) {
|
|
|
87
111
|
return messageId.slice(0, 36);
|
|
88
112
|
}
|
|
89
113
|
|
|
114
|
+
export function messageSequencePart(id: string) {
|
|
115
|
+
return id.slice(37);
|
|
116
|
+
}
|
|
117
|
+
|
|
90
118
|
export interface ThreadWatchListItem {
|
|
91
119
|
id: string;
|
|
92
120
|
name: string;
|
|
@@ -117,6 +145,11 @@ export interface SendThreadMessageRequest {
|
|
|
117
145
|
body: MessageBody;
|
|
118
146
|
}
|
|
119
147
|
|
|
148
|
+
export interface ListSegment<T> {
|
|
149
|
+
items: T[];
|
|
150
|
+
total: number;
|
|
151
|
+
}
|
|
152
|
+
|
|
120
153
|
export type SystemMessageText =
|
|
121
154
|
| 'chatify://chat-created'
|
|
122
155
|
| 'chatify://member-added'
|
package/src/styles/aside.scss
CHANGED
|
@@ -23,140 +23,4 @@
|
|
|
23
23
|
z-index: 1;
|
|
24
24
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
.wxchtf-chat-list.ant-menu {
|
|
28
|
-
flex: 1 1 auto;
|
|
29
|
-
height: 100px;
|
|
30
|
-
overflow-y: auto;
|
|
31
|
-
border-inline-end: none;
|
|
32
|
-
padding-bottom: 2rem;
|
|
33
|
-
|
|
34
|
-
@include mixins.scrollbar();
|
|
35
|
-
|
|
36
|
-
.ant-menu-item + .ant-menu-item {
|
|
37
|
-
margin-top: 8px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ant-menu-item {
|
|
41
|
-
padding: 0;
|
|
42
|
-
height: unset;
|
|
43
|
-
margin: 0;
|
|
44
|
-
margin-left: 8px;
|
|
45
|
-
width: calc(100% - 16px);
|
|
46
|
-
border-radius: 8px;
|
|
47
|
-
line-height: 1.5;
|
|
48
|
-
|
|
49
|
-
&.ant-menu-item-selected {
|
|
50
|
-
background-color: #e4f7f7;
|
|
51
|
-
|
|
52
|
-
.wxchtf-chat-name {
|
|
53
|
-
font-weight: 600;
|
|
54
|
-
color: inherit;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.wxchtf-chat {
|
|
59
|
-
padding-inline: 10px;
|
|
60
|
-
padding-block: 8.5px;
|
|
61
|
-
position: relative;
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-flow: row nowrap;
|
|
64
|
-
align-items: center;
|
|
65
|
-
|
|
66
|
-
&.--unread {
|
|
67
|
-
.wxchtf-chat-last {
|
|
68
|
-
font-weight: bold;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.wxchtf-chat-name {
|
|
72
|
-
font-weight: bold;
|
|
73
|
-
max-width: 100%;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.wxchtf-chat-info {
|
|
78
|
-
min-width: 0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.wxchtf-chat-name {
|
|
82
|
-
display: inline-block;
|
|
83
|
-
font-weight: 500;
|
|
84
|
-
color: rgba(0, 0, 0, 0.88);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.wxchtf-chat-avatar {
|
|
88
|
-
background-color: var(--background-color);
|
|
89
|
-
width: 42px;
|
|
90
|
-
height: 42px;
|
|
91
|
-
line-height: 40px;
|
|
92
|
-
text-align: center;
|
|
93
|
-
color: var(--color);
|
|
94
|
-
border-radius: 50%;
|
|
95
|
-
margin-right: 11px;
|
|
96
|
-
flex: none;
|
|
97
|
-
|
|
98
|
-
.anticon {
|
|
99
|
-
font-size: 20px;
|
|
100
|
-
line-height: 42px;
|
|
101
|
-
height: 42px;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.wxchtf-unread-count {
|
|
106
|
-
background-color: #ff4d4f;
|
|
107
|
-
border-radius: 50%;
|
|
108
|
-
width: 16px;
|
|
109
|
-
height: 16px;
|
|
110
|
-
padding: 0;
|
|
111
|
-
font-size: 10px;
|
|
112
|
-
position: absolute;
|
|
113
|
-
top: 32px;
|
|
114
|
-
right: 13px;
|
|
115
|
-
color: white;
|
|
116
|
-
line-height: 16px;
|
|
117
|
-
font-weight: bold;
|
|
118
|
-
text-align: center;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.wxchtf-chat-last {
|
|
122
|
-
$size: 25px;
|
|
123
|
-
color: #0e0f1799;
|
|
124
|
-
|
|
125
|
-
font-style: italic;
|
|
126
|
-
overflow: hidden;
|
|
127
|
-
text-overflow: ellipsis;
|
|
128
|
-
white-space: nowrap;
|
|
129
|
-
line-height: $size;
|
|
130
|
-
|
|
131
|
-
.wxchtf-chat-last-author {
|
|
132
|
-
display: inline-block;
|
|
133
|
-
margin-right: 0.5rem;
|
|
134
|
-
|
|
135
|
-
.ant-avatar {
|
|
136
|
-
display: inline-block;
|
|
137
|
-
border: none;
|
|
138
|
-
margin-right: 5px;
|
|
139
|
-
|
|
140
|
-
@include mixins.avatarSize($size);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&::after {
|
|
144
|
-
content: ':';
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.wxchtf-chat-last-message {
|
|
149
|
-
display: inline;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.wxchtf-chat-last-sent-at {
|
|
153
|
-
position: absolute;
|
|
154
|
-
top: 7px;
|
|
155
|
-
right: 13px;
|
|
156
|
-
font-size: 0.8em;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
26
|
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
@use './variables.scss' as vars;
|
|
2
|
+
@use './mixins.scss' as mixins;
|
|
3
|
+
|
|
4
|
+
.wxchtf-chat-list.ant-menu {
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
height: 100px;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
border-inline-end: none;
|
|
9
|
+
padding-bottom: 2rem;
|
|
10
|
+
|
|
11
|
+
@include mixins.scrollbar();
|
|
12
|
+
|
|
13
|
+
.ant-menu-item + .ant-menu-item {
|
|
14
|
+
margin-top: 8px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ant-menu-item {
|
|
18
|
+
padding: 0;
|
|
19
|
+
height: unset;
|
|
20
|
+
margin: 0;
|
|
21
|
+
margin-left: 8px;
|
|
22
|
+
width: calc(100% - 16px);
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
line-height: 1.5;
|
|
25
|
+
|
|
26
|
+
&.ant-menu-item-selected {
|
|
27
|
+
background-color: #e4f7f7;
|
|
28
|
+
|
|
29
|
+
.wxchtf-chat-name {
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
color: inherit;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.wxchtf-chat {
|
|
36
|
+
padding-inline: 10px;
|
|
37
|
+
padding-block: 8.5px;
|
|
38
|
+
position: relative;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-flow: row nowrap;
|
|
41
|
+
align-items: center;
|
|
42
|
+
|
|
43
|
+
&.--unread {
|
|
44
|
+
.wxchtf-chat-last {
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.wxchtf-chat-name {
|
|
49
|
+
font-weight: bold;
|
|
50
|
+
max-width: 100%;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.wxchtf-chat-info {
|
|
55
|
+
min-width: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.wxchtf-chat-name {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
font-weight: 500;
|
|
61
|
+
color: rgba(0, 0, 0, 0.88);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.wxchtf-chat-avatar {
|
|
65
|
+
background-color: var(--background-color);
|
|
66
|
+
width: 42px;
|
|
67
|
+
height: 42px;
|
|
68
|
+
line-height: 40px;
|
|
69
|
+
text-align: center;
|
|
70
|
+
color: var(--color);
|
|
71
|
+
border-radius: 50%;
|
|
72
|
+
margin-right: 11px;
|
|
73
|
+
flex: none;
|
|
74
|
+
|
|
75
|
+
.anticon {
|
|
76
|
+
font-size: 20px;
|
|
77
|
+
line-height: 42px;
|
|
78
|
+
height: 42px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.wxchtf-unread-count {
|
|
83
|
+
background-color: #ff4d4f;
|
|
84
|
+
border-radius: 50%;
|
|
85
|
+
width: 16px;
|
|
86
|
+
height: 16px;
|
|
87
|
+
padding: 0;
|
|
88
|
+
font-size: 10px;
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 32px;
|
|
91
|
+
right: 13px;
|
|
92
|
+
color: white;
|
|
93
|
+
line-height: 16px;
|
|
94
|
+
font-weight: bold;
|
|
95
|
+
text-align: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.wxchtf-chat-last {
|
|
99
|
+
$size: 25px;
|
|
100
|
+
color: #0e0f1799;
|
|
101
|
+
|
|
102
|
+
font-style: italic;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
text-overflow: ellipsis;
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
line-height: $size;
|
|
107
|
+
|
|
108
|
+
.wxchtf-chat-last-author {
|
|
109
|
+
display: inline-block;
|
|
110
|
+
margin-right: 0.5rem;
|
|
111
|
+
|
|
112
|
+
.ant-avatar {
|
|
113
|
+
display: inline-block;
|
|
114
|
+
border: none;
|
|
115
|
+
margin-right: 5px;
|
|
116
|
+
|
|
117
|
+
@include mixins.avatarSize($size);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&::after {
|
|
121
|
+
content: ':';
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.wxchtf-chat-last-message {
|
|
126
|
+
display: inline;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.wxchtf-chat-last-sent-at {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 7px;
|
|
132
|
+
right: 13px;
|
|
133
|
+
font-size: 0.8em;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
package/src/styles/chat.scss
CHANGED
|
@@ -8,202 +8,4 @@
|
|
|
8
8
|
flex-flow: row nowrap;
|
|
9
9
|
min-width: 0;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
.wxchtf-conversation {
|
|
13
|
-
flex: auto;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-flow: row nowrap;
|
|
16
|
-
min-width: 0;
|
|
17
|
-
|
|
18
|
-
.wxchtf-conversation-main {
|
|
19
|
-
flex: 1;
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-flow: column nowrap;
|
|
22
|
-
min-width: 0;
|
|
23
|
-
|
|
24
|
-
.wxchtf-conversation-header {
|
|
25
|
-
padding: 15px 20px;
|
|
26
|
-
line-height: 24px;
|
|
27
|
-
z-index: 2;
|
|
28
|
-
box-shadow: 0px 2px 4px 0px rgba(88, 99, 107, 0.04), 0px 1px 9px -1px rgba(88, 99, 107, 0.04),
|
|
29
|
-
0px 1px 2px 0px rgba(88, 99, 107, 0.06);
|
|
30
|
-
|
|
31
|
-
.wxchtf-conversation-name {
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
font-size: 16px;
|
|
34
|
-
flex: none;
|
|
35
|
-
|
|
36
|
-
&.--editable {
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.wxchtf-conversation-actions {
|
|
42
|
-
display: inline-flex;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.wxchtf-chat-members {
|
|
46
|
-
display: inline-flex;
|
|
47
|
-
gap: 6px;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.wxchtf-conversation-body {
|
|
52
|
-
flex: 1 1 auto;
|
|
53
|
-
height: 100px;
|
|
54
|
-
overflow-y: auto;
|
|
55
|
-
background: white;
|
|
56
|
-
padding: 2rem 1rem;
|
|
57
|
-
padding-right: 1rem;
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-flow: column-reverse nowrap;
|
|
60
|
-
align-items: center;
|
|
61
|
-
|
|
62
|
-
@include mixins.scrollbar();
|
|
63
|
-
|
|
64
|
-
.wxchtf-message,
|
|
65
|
-
.wxchtf-sending-message,
|
|
66
|
-
.wxchtf-system-message,
|
|
67
|
-
.wxchtf-message-skeleton {
|
|
68
|
-
margin-bottom: 8px;
|
|
69
|
-
max-width: vars.$messageBoxWidth;
|
|
70
|
-
width: 100%;
|
|
71
|
-
|
|
72
|
-
&:first-child {
|
|
73
|
-
margin-bottom: 0;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.wxchtf-message,
|
|
78
|
-
.wxchtf-sending-message {
|
|
79
|
-
display: flex;
|
|
80
|
-
flex-flow: row nowrap;
|
|
81
|
-
align-items: flex-start;
|
|
82
|
-
|
|
83
|
-
& > div {
|
|
84
|
-
min-width: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&:not(.--my) {
|
|
88
|
-
.wxchtf-message-content,
|
|
89
|
-
.wxchtf-sending-message-content {
|
|
90
|
-
border-bottom-left-radius: 0;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.--my {
|
|
95
|
-
direction: rtl;
|
|
96
|
-
justify-content: flex-start;
|
|
97
|
-
|
|
98
|
-
.wxchtf-message-author {
|
|
99
|
-
display: none;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.wxchtf-message-content,
|
|
103
|
-
.wxchtf-sending-message-content {
|
|
104
|
-
direction: ltr;
|
|
105
|
-
border-bottom-right-radius: 0;
|
|
106
|
-
background-color: vars.$myMessageBackground;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.wxchtf-message-info-box {
|
|
110
|
-
text-align: right;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.wxchtf-message-author {
|
|
115
|
-
margin-right: 15px;
|
|
116
|
-
flex: none;
|
|
117
|
-
|
|
118
|
-
.ant-avatar {
|
|
119
|
-
@include mixins.avatarSize(vars.$avatarSize);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.wxchtf-message-info-box,
|
|
124
|
-
.wxchtf-sending-message-info-box {
|
|
125
|
-
text-align: left;
|
|
126
|
-
margin-bottom: 3px;
|
|
127
|
-
|
|
128
|
-
.wxchtf-message-author-name,
|
|
129
|
-
.wxchtf-message-sent-at,
|
|
130
|
-
.wxchtf-message-read-box,
|
|
131
|
-
.wxchtf-sending-message-sending-box {
|
|
132
|
-
display: inline-block;
|
|
133
|
-
font-size: 0.85em;
|
|
134
|
-
opacity: 0.5;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.wxchtf-message-sent-at,
|
|
138
|
-
.wxchtf-message-read-box,
|
|
139
|
-
.wxchtf-sending-message-sending-box {
|
|
140
|
-
margin-left: 5px;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.wxchtf-message-content,
|
|
145
|
-
.wxchtf-sending-message-content {
|
|
146
|
-
width: fit-content;
|
|
147
|
-
min-width: 300px;
|
|
148
|
-
max-width: 70%;
|
|
149
|
-
padding: 12px 19px;
|
|
150
|
-
background: white;
|
|
151
|
-
background-color: vars.$messageBackground;
|
|
152
|
-
display: block;
|
|
153
|
-
white-space: pre-wrap;
|
|
154
|
-
overflow-wrap: break-word;
|
|
155
|
-
border-radius: 24px;
|
|
156
|
-
|
|
157
|
-
.wxchtf-message-text {
|
|
158
|
-
line-height: 21px;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.wxchtf-system-message {
|
|
164
|
-
font-style: italic;
|
|
165
|
-
position: relative;
|
|
166
|
-
text-align: center;
|
|
167
|
-
color: #0e0f1799;
|
|
168
|
-
|
|
169
|
-
.wxchtf-text,
|
|
170
|
-
.wxchtf-timestamp {
|
|
171
|
-
position: relative;
|
|
172
|
-
z-index: 1;
|
|
173
|
-
padding-inline: 8px;
|
|
174
|
-
display: inline-block;
|
|
175
|
-
font-size: 0.85em;
|
|
176
|
-
background-color: white;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.wxchtf-timestamp {
|
|
180
|
-
padding-left: 10px;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.wxchtf-message-skeleton {
|
|
185
|
-
display: flex;
|
|
186
|
-
flex-flow: row nowrap;
|
|
187
|
-
align-items: flex-end;
|
|
188
|
-
|
|
189
|
-
.wxchtf-avatar {
|
|
190
|
-
margin-right: 15px;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.wxchtf-avatar .ant-skeleton-avatar {
|
|
194
|
-
width: vars.$avatarSize;
|
|
195
|
-
height: vars.$avatarSize;
|
|
196
|
-
line-height: vars.$avatarSize;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.wxchtf-content {
|
|
200
|
-
width: 300px;
|
|
201
|
-
height: 100px;
|
|
202
|
-
border-radius: vars.$messageBorderRadius;
|
|
203
|
-
border-bottom-left-radius: 0;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
11
|
}
|