@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.
Files changed (216) hide show
  1. package/dist/Chatify-DGRV4QKP.js +2203 -0
  2. package/dist/Chatify-DGRV4QKP.js.map +1 -0
  3. package/dist/Chatify.css +670 -0
  4. package/dist/audit.css +60 -0
  5. package/dist/audit.js +242 -0
  6. package/dist/audit.js.map +1 -0
  7. package/dist/index.js +97 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/types/audit/AuditChatList.d.ts +9 -0
  10. package/dist/types/audit/AuditConversationPanel.d.ts +10 -0
  11. package/dist/types/audit/AuditPanel.d.ts +14 -0
  12. package/dist/types/audit/AuditPanelCustomizeValue.d.ts +9 -0
  13. package/dist/types/audit/AuditSearch.d.ts +5 -0
  14. package/dist/types/audit/AuditSearchValue.d.ts +14 -0
  15. package/dist/types/audit/auditApi.d.ts +97 -0
  16. package/dist/types/audit/index.d.ts +17 -0
  17. package/dist/types/core/api/api.d.ts +17295 -0
  18. package/dist/{esm/types → types}/core/api/baseApi.d.ts +1 -1
  19. package/dist/{esm/types → types}/core/client.d.ts +4 -3
  20. package/dist/{esm/types → types}/core/types.d.ts +25 -0
  21. package/dist/types/ui/Chat/ChatEditableHeaderName.d.ts +1 -0
  22. package/dist/types/ui/Chat/ChatHeaderActions.d.ts +1 -0
  23. package/dist/{esm/types → types}/ui/Chat/ChatView.d.ts +1 -2
  24. package/dist/types/ui/Chat/Members/ChatMembersButton.d.ts +1 -0
  25. package/dist/types/ui/Chat/Members/ChatMembersPanel.d.ts +1 -0
  26. package/dist/types/ui/Chat/Members/ChatMembersPreview.d.ts +1 -0
  27. package/dist/{esm/types → types}/ui/ChatGroup/ChatGroupPanel.d.ts +2 -2
  28. package/dist/types/ui/ChatGroup/Create/CreateChatButton.d.ts +1 -0
  29. package/dist/{esm/types → types}/ui/ChatGroup/Create/CreateChatForm.d.ts +1 -2
  30. package/dist/types/ui/ChatGroup/Create/CreateChatMemberInput.d.ts +4 -0
  31. package/dist/types/ui/ChatGroup/Create/CreateChatNameInput.d.ts +4 -0
  32. package/dist/types/ui/ChatGroup/Create/CreateChatPanel.d.ts +1 -0
  33. package/dist/types/ui/ChatGroup/Layout/ChatGroupAside.d.ts +1 -0
  34. package/dist/types/ui/ChatGroup/Layout/ChatGroupBody.d.ts +1 -0
  35. package/dist/types/ui/ChatGroup/Layout/ChatGroupFooter.d.ts +1 -0
  36. package/dist/types/ui/ChatGroup/Layout/ChatGroupHeader.d.ts +1 -0
  37. package/dist/types/ui/ChatGroup/Layout/ChatGroupMain.d.ts +1 -0
  38. package/dist/types/ui/ChatGroup/List/ChatListPanel.d.ts +1 -0
  39. package/dist/types/ui/ChatGroup/List/index.d.ts +6 -0
  40. package/dist/types/ui/Chatify.d.ts +9 -0
  41. package/dist/{esm/types → types}/ui/Conversation/Conversation.d.ts +2 -3
  42. package/dist/types/ui/Conversation/ConversationActions.d.ts +1 -0
  43. package/dist/types/ui/Conversation/ConversationBody.d.ts +1 -0
  44. package/dist/{esm/types → types}/ui/Conversation/ConversationContext.d.ts +6 -5
  45. package/dist/types/ui/Conversation/ConversationHeader.d.ts +1 -0
  46. package/dist/types/ui/Conversation/ConversationName.d.ts +1 -0
  47. package/dist/types/ui/Conversation/InputBox/InputBox.d.ts +1 -0
  48. package/dist/types/ui/Conversation/InputBox/InputBoxFile.d.ts +7 -0
  49. package/dist/types/ui/Conversation/InputBox/InputBoxFileList.d.ts +7 -0
  50. package/dist/types/ui/Conversation/InputBox/InputFilesBox.d.ts +11 -0
  51. package/dist/types/ui/Conversation/InputBox/InputSubmitButtonBox.d.ts +6 -0
  52. package/dist/{esm/types → types}/ui/Conversation/InputBox/InputTextBox.d.ts +1 -1
  53. package/dist/types/ui/Conversation/Message/MessageAuthor.d.ts +2 -0
  54. package/dist/types/ui/Conversation/Message/MessageBox.d.ts +5 -0
  55. package/dist/types/ui/Conversation/Message/MessageContent.d.ts +2 -0
  56. package/dist/types/ui/Conversation/Message/MessageFile.d.ts +5 -0
  57. package/dist/types/ui/Conversation/Message/MessageFileList.d.ts +2 -0
  58. package/dist/types/ui/Conversation/Message/MessageInfoBox.d.ts +2 -0
  59. package/dist/{esm/types → types}/ui/Conversation/Message/MessageRow.d.ts +1 -1
  60. package/dist/types/ui/Conversation/Message/MessageText.d.ts +2 -0
  61. package/dist/types/ui/Conversation/SendingMessage/SendingMessageBox.d.ts +6 -0
  62. package/dist/types/ui/Conversation/SendingMessage/SendingMessageContent.d.ts +2 -0
  63. package/dist/types/ui/Conversation/SendingMessage/SendingMessageInfoBox.d.ts +2 -0
  64. package/dist/types/ui/Conversation/SendingMessage/SendingMessageText.d.ts +2 -0
  65. package/dist/types/ui/Conversation/SystemMessage/SystemMessageBox.d.ts +5 -0
  66. package/dist/{esm/types → types}/ui/Conversation/SystemMessage/SystemMessageRow.d.ts +1 -1
  67. package/dist/types/ui/Thread/ThreadActions.d.ts +1 -0
  68. package/dist/{esm/types → types}/ui/Thread/ThreadContext.d.ts +1 -1
  69. package/dist/types/ui/common/Avatar.d.ts +5 -0
  70. package/dist/types/ui/common/ChatList/ChatList.d.ts +16 -0
  71. package/dist/types/ui/common/ChatList/ChatListItemAvatar.d.ts +2 -0
  72. package/dist/types/ui/common/ChatList/ChatListItemBox.d.ts +9 -0
  73. package/dist/types/ui/common/ChatList/ChatListItemLastMessage.d.ts +2 -0
  74. package/dist/types/ui/common/ChatList/ChatListItemLastMessageAuthor.d.ts +2 -0
  75. package/dist/types/ui/common/ChatList/ChatListItemLastMessageContent.d.ts +2 -0
  76. package/dist/types/ui/common/ChatList/ChatListItemLastMessageSentAt.d.ts +2 -0
  77. package/dist/types/ui/common/ChatList/ChatListItemName.d.ts +2 -0
  78. package/dist/types/ui/common/ChatList/ChatListItemUnreadCount.d.ts +2 -0
  79. package/dist/types/ui/common/ChatList/ChatListValue.d.ts +8 -0
  80. package/dist/{esm/types/ui/ChatGroup/List → types/ui/common/ChatList}/index.d.ts +1 -0
  81. package/dist/types/ui/common/Icon.d.ts +21 -0
  82. package/dist/types/ui/common/MessageSkeleton.d.ts +4 -0
  83. package/dist/{esm/types → types}/ui/common/index.d.ts +1 -0
  84. package/dist/{esm/types → types}/ui/customize.d.ts +1 -1
  85. package/dist/{esm/types → types}/ui/index.d.ts +1 -3
  86. package/dist/{esm/types → types}/ui/localizer.d.ts +7 -2
  87. package/package.json +40 -53
  88. package/src/audit/AuditChatList.tsx +25 -0
  89. package/src/audit/AuditConversationPanel.tsx +48 -0
  90. package/src/audit/AuditPanel.tsx +76 -0
  91. package/src/audit/AuditPanelCustomizeValue.ts +11 -0
  92. package/src/audit/AuditSearch.tsx +89 -0
  93. package/src/audit/AuditSearchValue.tsx +42 -0
  94. package/src/audit/auditApi.tsx +113 -0
  95. package/src/audit/index.d.ts +18 -0
  96. package/src/audit/index.tsx +28 -0
  97. package/src/audit/styles.scss +72 -0
  98. package/src/core/client.ts +6 -1
  99. package/src/core/debounce.ts +1 -1
  100. package/src/core/types.tsx +33 -0
  101. package/src/styles/aside.scss +0 -136
  102. package/src/styles/chat-list.scss +138 -0
  103. package/src/styles/chat.scss +0 -198
  104. package/src/styles/conversation.scss +200 -0
  105. package/src/styles/index.scss +2 -0
  106. package/src/ui/Chat/ChatEditableHeaderName.tsx +1 -1
  107. package/src/ui/Chat/Members/ChatMembersPreview.tsx +1 -1
  108. package/src/ui/ChatGroup/ChatGroupPanel.tsx +2 -2
  109. package/src/ui/ChatGroup/Layout/ChatGroupAside.tsx +2 -2
  110. package/src/ui/ChatGroup/List/ChatListPanel.tsx +28 -0
  111. package/src/ui/ChatGroup/List/index.ts +6 -29
  112. package/src/ui/Chatify.tsx +7 -1
  113. package/src/ui/Conversation/Conversation.tsx +15 -1
  114. package/src/ui/Conversation/ConversationActions.tsx +8 -1
  115. package/src/ui/Conversation/ConversationContext.ts +4 -3
  116. package/src/ui/Conversation/ConversationHeader.tsx +4 -8
  117. package/src/ui/Conversation/InputBox/InputBox.tsx +4 -0
  118. package/src/ui/Conversation/InputBox/InputTextBox.tsx +1 -1
  119. package/src/ui/Conversation/Message/MessageInfoBox.tsx +1 -1
  120. package/src/ui/Conversation/ReadObserver/MessageReadObserver.tsx +1 -1
  121. package/src/ui/common/ChatList/ChatList.tsx +84 -0
  122. package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemBox.tsx +11 -5
  123. package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemLastMessageAuthor.tsx +3 -3
  124. package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemLastMessageContent.tsx +4 -4
  125. package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemLastMessageSentAt.tsx +1 -1
  126. package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemUnreadCount.tsx +1 -1
  127. package/src/ui/common/ChatList/ChatListValue.ts +9 -0
  128. package/src/ui/common/ChatList/index.ts +32 -0
  129. package/src/ui/common/Icon.tsx +15 -13
  130. package/src/ui/common/index.ts +1 -0
  131. package/src/ui/index.ts +3 -3
  132. package/src/ui/localizer.tsx +14 -2
  133. package/dist/css/chatify.css +0 -664
  134. package/dist/esm/index.js +0 -11
  135. package/dist/esm/index.js.map +0 -1
  136. package/dist/esm/types/core/api/api.d.ts +0 -12696
  137. package/dist/esm/types/ui/Chat/ChatEditableHeaderName.d.ts +0 -2
  138. package/dist/esm/types/ui/Chat/ChatHeaderActions.d.ts +0 -2
  139. package/dist/esm/types/ui/Chat/Members/ChatMembersButton.d.ts +0 -2
  140. package/dist/esm/types/ui/Chat/Members/ChatMembersPanel.d.ts +0 -2
  141. package/dist/esm/types/ui/Chat/Members/ChatMembersPreview.d.ts +0 -2
  142. package/dist/esm/types/ui/ChatGroup/Create/CreateChatButton.d.ts +0 -2
  143. package/dist/esm/types/ui/ChatGroup/Create/CreateChatMemberInput.d.ts +0 -5
  144. package/dist/esm/types/ui/ChatGroup/Create/CreateChatNameInput.d.ts +0 -5
  145. package/dist/esm/types/ui/ChatGroup/Create/CreateChatPanel.d.ts +0 -2
  146. package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupAside.d.ts +0 -2
  147. package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupBody.d.ts +0 -2
  148. package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupFooter.d.ts +0 -2
  149. package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupHeader.d.ts +0 -2
  150. package/dist/esm/types/ui/ChatGroup/Layout/ChatGroupMain.d.ts +0 -2
  151. package/dist/esm/types/ui/ChatGroup/List/ChatList.d.ts +0 -2
  152. package/dist/esm/types/ui/ChatGroup/List/ChatListItemAvatar.d.ts +0 -3
  153. package/dist/esm/types/ui/ChatGroup/List/ChatListItemBox.d.ts +0 -6
  154. package/dist/esm/types/ui/ChatGroup/List/ChatListItemLastMessage.d.ts +0 -3
  155. package/dist/esm/types/ui/ChatGroup/List/ChatListItemLastMessageAuthor.d.ts +0 -3
  156. package/dist/esm/types/ui/ChatGroup/List/ChatListItemLastMessageContent.d.ts +0 -3
  157. package/dist/esm/types/ui/ChatGroup/List/ChatListItemLastMessageSentAt.d.ts +0 -3
  158. package/dist/esm/types/ui/ChatGroup/List/ChatListItemName.d.ts +0 -3
  159. package/dist/esm/types/ui/ChatGroup/List/ChatListItemUnreadCount.d.ts +0 -3
  160. package/dist/esm/types/ui/Chatify.d.ts +0 -8
  161. package/dist/esm/types/ui/Conversation/ConversationActions.d.ts +0 -2
  162. package/dist/esm/types/ui/Conversation/ConversationBody.d.ts +0 -2
  163. package/dist/esm/types/ui/Conversation/ConversationHeader.d.ts +0 -2
  164. package/dist/esm/types/ui/Conversation/ConversationName.d.ts +0 -2
  165. package/dist/esm/types/ui/Conversation/InputBox/InputBox.d.ts +0 -2
  166. package/dist/esm/types/ui/Conversation/InputBox/InputBoxFile.d.ts +0 -8
  167. package/dist/esm/types/ui/Conversation/InputBox/InputBoxFileList.d.ts +0 -8
  168. package/dist/esm/types/ui/Conversation/InputBox/InputFilesBox.d.ts +0 -12
  169. package/dist/esm/types/ui/Conversation/InputBox/InputSubmitButtonBox.d.ts +0 -7
  170. package/dist/esm/types/ui/Conversation/Message/MessageAuthor.d.ts +0 -3
  171. package/dist/esm/types/ui/Conversation/Message/MessageBox.d.ts +0 -6
  172. package/dist/esm/types/ui/Conversation/Message/MessageContent.d.ts +0 -3
  173. package/dist/esm/types/ui/Conversation/Message/MessageFile.d.ts +0 -6
  174. package/dist/esm/types/ui/Conversation/Message/MessageFileList.d.ts +0 -3
  175. package/dist/esm/types/ui/Conversation/Message/MessageInfoBox.d.ts +0 -3
  176. package/dist/esm/types/ui/Conversation/Message/MessageText.d.ts +0 -3
  177. package/dist/esm/types/ui/Conversation/SendingMessage/SendingMessageBox.d.ts +0 -7
  178. package/dist/esm/types/ui/Conversation/SendingMessage/SendingMessageContent.d.ts +0 -3
  179. package/dist/esm/types/ui/Conversation/SendingMessage/SendingMessageInfoBox.d.ts +0 -3
  180. package/dist/esm/types/ui/Conversation/SendingMessage/SendingMessageText.d.ts +0 -3
  181. package/dist/esm/types/ui/Conversation/SystemMessage/SystemMessageBox.d.ts +0 -6
  182. package/dist/esm/types/ui/Thread/ThreadActions.d.ts +0 -2
  183. package/dist/esm/types/ui/common/Avatar.d.ts +0 -6
  184. package/dist/esm/types/ui/common/Icon.d.ts +0 -22
  185. package/dist/esm/types/ui/common/MessageSkeleton.d.ts +0 -5
  186. package/dist/index.d.ts +0 -13363
  187. package/src/ui/ChatGroup/List/ChatList.tsx +0 -41
  188. /package/dist/{esm/types → types}/core/api/index.d.ts +0 -0
  189. /package/dist/{esm/types → types}/core/constants.d.ts +0 -0
  190. /package/dist/{esm/types → types}/core/debounce.d.ts +0 -0
  191. /package/dist/{esm/types → types}/core/index.d.ts +0 -0
  192. /package/dist/{esm/types → types}/index.d.ts +0 -0
  193. /package/dist/{esm/types → types}/ui/Chat/ChatContext.d.ts +0 -0
  194. /package/dist/{esm/types → types}/ui/Chat/ChatPanel.d.ts +0 -0
  195. /package/dist/{esm/types → types}/ui/Chat/Members/index.d.ts +0 -0
  196. /package/dist/{esm/types → types}/ui/Chat/index.d.ts +0 -0
  197. /package/dist/{esm/types → types}/ui/ChatGroup/ChatGroupContext.d.ts +0 -0
  198. /package/dist/{esm/types → types}/ui/ChatGroup/Create/index.d.ts +0 -0
  199. /package/dist/{esm/types → types}/ui/ChatGroup/Layout/index.d.ts +0 -0
  200. /package/dist/{esm/types → types}/ui/ChatGroup/index.d.ts +0 -0
  201. /package/dist/{esm/types → types}/ui/Conversation/InputBox/index.d.ts +0 -0
  202. /package/dist/{esm/types → types}/ui/Conversation/Message/index.d.ts +0 -0
  203. /package/dist/{esm/types → types}/ui/Conversation/NextObserver/NextMessagesObserver.d.ts +0 -0
  204. /package/dist/{esm/types → types}/ui/Conversation/NextObserver/index.d.ts +0 -0
  205. /package/dist/{esm/types → types}/ui/Conversation/ReadObserver/MessageReadObserver.d.ts +0 -0
  206. /package/dist/{esm/types → types}/ui/Conversation/ReadObserver/index.d.ts +0 -0
  207. /package/dist/{esm/types → types}/ui/Conversation/SendingMessage/index.d.ts +0 -0
  208. /package/dist/{esm/types → types}/ui/Conversation/SystemMessage/index.d.ts +0 -0
  209. /package/dist/{esm/types → types}/ui/Conversation/index.d.ts +0 -0
  210. /package/dist/{esm/types → types}/ui/Thread/ThreadPanel.d.ts +0 -0
  211. /package/dist/{esm/types → types}/ui/Thread/index.d.ts +0 -0
  212. /package/dist/{esm/types → types}/ui/color.d.ts +0 -0
  213. /package/dist/{esm/types → types}/ui/useFormatter.d.ts +0 -0
  214. /package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemAvatar.tsx +0 -0
  215. /package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemLastMessage.tsx +0 -0
  216. /package/src/ui/{ChatGroup/List → common/ChatList}/ChatListItemName.tsx +0 -0
@@ -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
- private get axios() {
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;
@@ -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, NodeJS.Timeout> = {};
20
+ private _timeoutByGroup: Record<string, number> = {};
21
21
  private _subscribers: ((value: Debounce<T>) => any)[] = [];
22
22
 
23
23
  constructor(public config: DebounceConfig<T>) {}
@@ -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'
@@ -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
+ }
@@ -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
  }