@tencentcloud/chat-uikit-react 2.2.6 → 2.2.7
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/CHANGELOG.md +10 -0
- package/dist/cjs/assets/fonts/iconfont.ttf +0 -0
- package/dist/cjs/assets/fonts/iconfont.woff +0 -0
- package/dist/cjs/assets/fonts/iconfont.woff2 +0 -0
- package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
- package/dist/cjs/components/Icon/config.js +1 -1
- package/dist/cjs/components/Icon/images/video-call.svg.js +1 -0
- package/dist/cjs/components/Icon/images/voice-call.svg.js +1 -0
- package/dist/cjs/components/Icon/type.d.ts +3 -1
- package/dist/cjs/components/Icon/type.js +1 -1
- package/dist/cjs/components/TUIChat/TUIChat.d.ts +3 -2
- package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
- package/dist/cjs/components/TUIChat/TUIChatState.js +1 -1
- package/dist/cjs/components/TUIChat/index.js +1 -0
- package/dist/cjs/components/TUIChat/server.js +1 -0
- package/dist/cjs/components/TUIChat/utils.js +1 -0
- package/dist/cjs/components/TUIChatHeader/TUIChatHeader.d.ts +1 -0
- package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +1 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +2 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
- package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageAvatar.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageStatus.js +1 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageReply.js +1 -1
- package/dist/cjs/components/TUIMessage/utils/index.js +1 -1
- package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
- package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
- package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
- package/dist/cjs/components/{untils.js → utils.js} +1 -1
- package/dist/cjs/context/LanguageContext.js +1 -1
- package/dist/cjs/context/TUIChatActionContext.d.ts +2 -1
- package/dist/cjs/context/TUIConversationContext.js +1 -1
- package/dist/cjs/context/ThemeContext.js +1 -1
- package/dist/cjs/context/UIKitContext.d.ts +2 -2
- package/dist/cjs/context/UIKitContext.js +1 -1
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.d.css +589 -259
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en-US/index.js +1 -1
- package/dist/cjs/locales/index.js +1 -1
- package/dist/cjs/locales/ja-JP/index.js +1 -1
- package/dist/cjs/locales/ko-KR/index.js +1 -1
- package/dist/cjs/locales/zh-CN/index.js +1 -1
- package/dist/cjs/locales/zh-TW/TUIChat.js +1 -0
- package/dist/cjs/locales/zh-TW/TUIContact.js +1 -0
- package/dist/cjs/locales/zh-TW/TUIConversation.js +1 -0
- package/dist/cjs/locales/zh-TW/TUIProfile.js +1 -0
- package/dist/cjs/locales/zh-TW/index.js +1 -0
- package/dist/esm/assets/fonts/iconfont.ttf +0 -0
- package/dist/esm/assets/fonts/iconfont.woff +0 -0
- package/dist/esm/assets/fonts/iconfont.woff2 +0 -0
- package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
- package/dist/esm/components/Icon/config.js +1 -1
- package/dist/esm/components/Icon/images/video-call.svg.js +1 -0
- package/dist/esm/components/Icon/images/voice-call.svg.js +1 -0
- package/dist/esm/components/Icon/type.d.ts +3 -1
- package/dist/esm/components/Icon/type.js +1 -1
- package/dist/esm/components/TUIChat/TUIChat.d.ts +3 -2
- package/dist/esm/components/TUIChat/TUIChat.js +1 -1
- package/dist/esm/components/TUIChat/TUIChatState.js +1 -1
- package/dist/esm/components/TUIChat/index.js +1 -0
- package/dist/esm/components/TUIChat/server.js +1 -0
- package/dist/esm/components/TUIChat/utils.js +1 -0
- package/dist/esm/components/TUIChatHeader/TUIChatHeader.d.ts +1 -0
- package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +1 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +2 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
- package/dist/esm/components/TUIContact/hooks/useTUIContact.js +1 -1
- package/dist/esm/components/TUIMessage/MessageAvatar.js +1 -1
- package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
- package/dist/esm/components/TUIMessage/MessageStatus.js +1 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageReply.js +1 -1
- package/dist/esm/components/TUIMessage/utils/index.js +1 -1
- package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
- package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
- package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
- package/dist/esm/components/utils.js +1 -0
- package/dist/esm/context/LanguageContext.js +1 -1
- package/dist/esm/context/TUIChatActionContext.d.ts +2 -1
- package/dist/esm/context/TUIConversationContext.js +1 -1
- package/dist/esm/context/ThemeContext.js +1 -1
- package/dist/esm/context/UIKitContext.d.ts +2 -2
- package/dist/esm/context/UIKitContext.js +1 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.d.css +589 -259
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en-US/index.js +1 -1
- package/dist/esm/locales/index.js +1 -1
- package/dist/esm/locales/ja-JP/index.js +1 -1
- package/dist/esm/locales/ko-KR/index.js +1 -1
- package/dist/esm/locales/zh-CN/index.js +1 -1
- package/dist/esm/locales/zh-TW/TUIChat.js +1 -0
- package/dist/esm/locales/zh-TW/TUIContact.js +1 -0
- package/dist/esm/locales/zh-TW/TUIConversation.js +1 -0
- package/dist/esm/locales/zh-TW/TUIProfile.js +1 -0
- package/dist/esm/locales/zh-TW/index.js +1 -0
- package/package.json +2 -1
- package/rollup.config.js +1 -1
- package/src/assets/fonts/iconfont.ttf +0 -0
- package/src/assets/fonts/iconfont.woff +0 -0
- package/src/assets/fonts/iconfont.woff2 +0 -0
- package/src/components/Avatar/styles/index.scss +11 -4
- package/src/components/Checkbox/styles/color.scss +17 -6
- package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +5 -5
- package/src/components/ConversationCreate/styles/ConversationCreatGroupDetail.scss +7 -16
- package/src/components/ConversationCreate/styles/conversationCreateSelectView.scss +13 -8
- package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +20 -21
- package/src/components/ConversationCreate/styles/index.scss +30 -17
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +1 -0
- package/src/components/ConversationPreview/styles/index.scss +20 -20
- package/src/components/ConversationPreview/utils.tsx +3 -2
- package/src/components/DivWithEdit/styles/index.scss +30 -10
- package/src/components/Icon/config.ts +14 -4
- package/src/components/Icon/images/video-call.svg +3 -0
- package/src/components/Icon/images/voice-call.svg +3 -0
- package/src/components/Icon/type.ts +2 -0
- package/src/components/Input/styles/index.scss +22 -6
- package/src/components/Plugins/styles/color.scss +3 -11
- package/src/components/Profile/styles/index.scss +12 -3
- package/src/components/TUIChat/TUIChat.tsx +36 -32
- package/src/components/TUIChat/TUIChatState.tsx +41 -41
- package/src/components/TUIChat/index.ts +3 -0
- package/src/components/TUIChat/server.ts +44 -0
- package/src/components/TUIChat/styles/layout.scss +7 -2
- package/src/components/TUIChat/utils.ts +72 -0
- package/src/components/TUIChatHeader/TUIChatHeader.tsx +10 -7
- package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +72 -29
- package/src/components/TUIChatHeader/styles/layout.scss +16 -9
- package/src/components/TUIContact/TUIContactInfo/index.scss +44 -21
- package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +75 -71
- package/src/components/TUIContact/TUIContactList/index.scss +40 -20
- package/src/components/TUIContact/hooks/useTUIContact.tsx +3 -3
- package/src/components/TUIContact/index.scss +30 -11
- package/src/components/TUIContactSearch/index.scss +12 -3
- package/src/components/TUIConversationList/index.scss +3 -4
- package/src/components/TUIManage/styles/index.scss +20 -14
- package/src/components/TUIMessage/MessageAvatar.tsx +7 -7
- package/src/components/TUIMessage/MessageBubble.tsx +22 -21
- package/src/components/TUIMessage/MessageCustom.tsx +26 -5
- package/src/components/TUIMessage/MessageStatus.tsx +5 -5
- package/src/components/TUIMessage/hooks/useMessageHandler.ts +6 -6
- package/src/components/TUIMessage/hooks/useMessageReply.ts +6 -5
- package/src/components/TUIMessage/styles/color.scss +6 -5
- package/src/components/TUIMessage/styles/layout.scss +111 -42
- package/src/components/TUIMessage/utils/index.ts +23 -12
- package/src/components/TUIMessageInput/InputPluginsDefalut.tsx +12 -12
- package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +5 -4
- package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +12 -12
- package/src/components/TUIMessageInput/hooks/useUploadPicker.tsx +4 -4
- package/src/components/TUIMessageInput/styles/color.scss +15 -11
- package/src/components/TUIMessageInput/styles/layout.scss +33 -17
- package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +13 -9
- package/src/components/TUIMessageList/styles/layout.scss +16 -9
- package/src/components/TUIProfile/TUIProfileDefault.tsx +12 -11
- package/src/components/TUIProfile/styles/color.scss +6 -5
- package/src/components/TUIProfile/styles/layout.scss +16 -14
- package/src/components/{untils.ts → utils.ts} +5 -4
- package/src/context/LanguageContext.tsx +5 -4
- package/src/context/TUIChatActionContext.tsx +14 -13
- package/src/context/ThemeContext.tsx +12 -5
- package/src/context/UIKitContext.tsx +11 -2
- package/src/locales/en-US/index.ts +0 -3
- package/src/locales/index.ts +6 -2
- package/src/locales/ja-JP/index.ts +0 -2
- package/src/locales/ko-KR/index.ts +0 -2
- package/src/locales/zh-CN/index.ts +0 -2
- package/src/locales/zh-TW/TUIChat.ts +27 -0
- package/src/locales/zh-TW/TUIContact.ts +29 -0
- package/src/locales/zh-TW/TUIConversation.ts +32 -0
- package/src/locales/zh-TW/TUIProfile.ts +15 -0
- package/src/locales/zh-TW/index.ts +11 -0
- package/src/styles/colors/_color-dark.scss +31 -21
- package/src/styles/colors/_color-light.scss +31 -21
- package/src/styles/colors/_color-theme.scss +32 -21
- package/src/styles/normalize.scss +6 -0
- package/dist/cjs/components/Icon/images/down-arrow.png.js +0 -1
- package/dist/cjs/components/Icon/images/right-arrow.svg.js +0 -1
- package/dist/cjs/components/TUIChat/unitls.js +0 -1
- package/dist/cjs/locales/en-US/TUIGlobal.js +0 -1
- package/dist/cjs/locales/ja-JP/TUIGlobal.js +0 -1
- package/dist/cjs/locales/ko-KR/TUIGlobal.js +0 -1
- package/dist/cjs/locales/zh-CN/TUIGlobal.js +0 -1
- package/dist/esm/components/Icon/images/down-arrow.png.js +0 -1
- package/dist/esm/components/Icon/images/right-arrow.svg.js +0 -1
- package/dist/esm/components/TUIChat/unitls.js +0 -1
- package/dist/esm/components/untils.js +0 -1
- package/dist/esm/locales/en-US/TUIGlobal.js +0 -1
- package/dist/esm/locales/ja-JP/TUIGlobal.js +0 -1
- package/dist/esm/locales/ko-KR/TUIGlobal.js +0 -1
- package/dist/esm/locales/zh-CN/TUIGlobal.js +0 -1
- package/scripts/publish-github.js +0 -60
- package/scripts/publish-intl-demo.js +0 -14
- package/scripts/publish-intl-experience-demo.js +0 -14
- package/src/components/TUIChat/unitls.ts +0 -39
- package/src/locales/en-US/TUIGlobal.ts +0 -6
- package/src/locales/ja-JP/TUIGlobal.ts +0 -6
- package/src/locales/ko-KR/TUIGlobal.ts +0 -6
- package/src/locales/zh-CN/TUIGlobal.ts +0 -6
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
padding: 0 20px;
|
|
17
17
|
|
|
18
18
|
@include theme() {
|
|
19
|
-
background-color: get(bg-
|
|
19
|
+
background-color: get(bg-color-operate);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.content {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
width: 100%;
|
|
36
36
|
|
|
37
37
|
@include theme() {
|
|
38
|
-
color: get(text-primary);
|
|
38
|
+
color: get(text-color-primary);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
padding: 1px 0;
|
|
52
52
|
|
|
53
53
|
@include theme() {
|
|
54
|
-
color: get(text-secondary);
|
|
54
|
+
color: get(text-color-secondary);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.external {
|
|
60
60
|
text-align: right;
|
|
61
|
-
flex: 0
|
|
61
|
+
flex: 0 0 auto;
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
padding: 1px 0;
|
|
77
77
|
|
|
78
78
|
@include theme() {
|
|
79
|
-
color: get(text-secondary);
|
|
79
|
+
color: get(text-color-secondary);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -84,22 +84,25 @@
|
|
|
84
84
|
display: flex;
|
|
85
85
|
justify-content: flex-end;
|
|
86
86
|
flex: 1 1;
|
|
87
|
+
|
|
87
88
|
.icon-more {
|
|
88
89
|
transform: scale(1.5);
|
|
89
|
-
&:hover {
|
|
90
|
-
}
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
.more-handle-box {
|
|
94
93
|
top: 0;
|
|
95
94
|
right: 0;
|
|
96
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, .1);
|
|
97
95
|
bottom: initial;
|
|
98
96
|
padding: 14px 0;
|
|
99
97
|
box-sizing: border-box;
|
|
100
98
|
text-align: start;
|
|
101
99
|
white-space: nowrap;
|
|
102
100
|
|
|
101
|
+
@include theme() {
|
|
102
|
+
background-color: get(dropdown-color-default);
|
|
103
|
+
box-shadow: 0 0 10px get(shadow-color);
|
|
104
|
+
}
|
|
105
|
+
|
|
103
106
|
.more-handle-item {
|
|
104
107
|
font-size: 16px;
|
|
105
108
|
font-family: PingFangSC-Medium;
|
|
@@ -109,15 +112,19 @@
|
|
|
109
112
|
font-weight: 500;
|
|
110
113
|
box-sizing: border-box;
|
|
111
114
|
|
|
115
|
+
@include theme() {
|
|
116
|
+
color: get(text-color-primary);
|
|
117
|
+
}
|
|
118
|
+
|
|
112
119
|
&.delete {
|
|
113
120
|
@include theme() {
|
|
114
|
-
color: get(
|
|
121
|
+
color: get(text-color-error);
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
|
|
118
125
|
&:hover {
|
|
119
126
|
@include theme() {
|
|
120
|
-
background-color: get(
|
|
127
|
+
background-color: get(dropdown-color-hover);
|
|
121
128
|
}
|
|
122
129
|
}
|
|
123
130
|
}
|
|
@@ -127,7 +134,7 @@
|
|
|
127
134
|
|
|
128
135
|
&:hover {
|
|
129
136
|
@include theme() {
|
|
130
|
-
background-color: get(
|
|
137
|
+
background-color: get(list-color-hover);
|
|
131
138
|
}
|
|
132
139
|
}
|
|
133
140
|
|
|
@@ -139,19 +146,12 @@
|
|
|
139
146
|
|
|
140
147
|
&.conversation-preview-content--active {
|
|
141
148
|
@include theme() {
|
|
142
|
-
background-color: get(
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.title {
|
|
146
|
-
@include theme() {
|
|
147
|
-
color: get(status-info);
|
|
148
|
-
}
|
|
149
|
+
background-color: get(list-color-active);
|
|
149
150
|
}
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
&.conversation-preview-content--unread {
|
|
153
154
|
.unread {
|
|
154
|
-
width: 16px;
|
|
155
155
|
height: 13px;
|
|
156
156
|
border-radius: 16px;
|
|
157
157
|
display: flex;
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
color: #fff;
|
|
165
165
|
|
|
166
166
|
@include theme() {
|
|
167
|
-
background-color: get(
|
|
167
|
+
background-color: get(text-color-error);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import TencentCloudChat, { Conversation, Group, Profile } from '@tencentcloud/chat';
|
|
3
3
|
import { defaultGroupAvatarWork, defaultUserAvatar } from '../Avatar';
|
|
4
4
|
import { formatEmojiString } from '../TUIMessage/utils/emojiMap';
|
|
5
|
-
import { getTimeStamp } from '../
|
|
5
|
+
import { getTimeStamp } from '../utils';
|
|
6
6
|
|
|
7
7
|
interface TProfile extends Profile, Group {}
|
|
8
8
|
export const getMessageProfile = (conversation: Conversation): TProfile => {
|
|
@@ -55,7 +55,8 @@ export const getDisplayTitle = (
|
|
|
55
55
|
(textItem.toLowerCase() === searchValue.toLowerCase())
|
|
56
56
|
? (
|
|
57
57
|
<span key={index} style={{ color: highlightColor }}>{textItem}</span>
|
|
58
|
-
)
|
|
58
|
+
)
|
|
59
|
+
: (
|
|
59
60
|
<span key={index}>{textItem}</span>
|
|
60
61
|
),
|
|
61
62
|
)}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.div-with-edit {
|
|
2
4
|
flex: 1;
|
|
3
5
|
display: flex;
|
|
4
6
|
max-width: 100%;
|
|
5
7
|
box-sizing: border-box;
|
|
6
8
|
height: 30px;
|
|
7
|
-
|
|
9
|
+
|
|
10
|
+
&-popup {
|
|
8
11
|
flex: 1;
|
|
9
12
|
display: flex;
|
|
10
13
|
max-width: 100%;
|
|
11
14
|
}
|
|
15
|
+
|
|
12
16
|
.show {
|
|
13
17
|
flex: 1;
|
|
14
18
|
display: flex;
|
|
@@ -16,54 +20,70 @@
|
|
|
16
20
|
justify-content: space-between;
|
|
17
21
|
position: relative;
|
|
18
22
|
word-break: break-all;
|
|
23
|
+
|
|
24
|
+
.icon-edit {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
19
28
|
&:hover {
|
|
20
29
|
.icon-edit {
|
|
21
30
|
display: flex;
|
|
22
31
|
}
|
|
23
32
|
}
|
|
24
|
-
.icon-edit {
|
|
25
|
-
display: none;
|
|
26
|
-
}
|
|
27
33
|
}
|
|
34
|
+
|
|
28
35
|
.icon {
|
|
29
36
|
margin-left: 10px;
|
|
30
37
|
width: 25px;
|
|
31
38
|
}
|
|
39
|
+
|
|
32
40
|
.edit {
|
|
33
41
|
flex: 1;
|
|
34
42
|
display: flex;
|
|
35
43
|
align-items: center;
|
|
36
44
|
justify-content: space-between;
|
|
37
45
|
position: relative;
|
|
38
|
-
border-bottom: 1px solid #EEEEEE;
|
|
39
46
|
padding: 0 10px;
|
|
47
|
+
|
|
48
|
+
@include theme() {
|
|
49
|
+
border-bottom: 1px solid get(stroke-color-primary);
|
|
50
|
+
}
|
|
51
|
+
|
|
40
52
|
input {
|
|
41
53
|
flex: 1;
|
|
42
54
|
font-size: inherit;
|
|
43
55
|
border: none;
|
|
56
|
+
|
|
44
57
|
&:focus {
|
|
45
58
|
border: none;
|
|
46
59
|
outline: none;
|
|
47
60
|
}
|
|
48
61
|
}
|
|
62
|
+
|
|
49
63
|
.select {
|
|
50
64
|
position: absolute;
|
|
51
|
-
box-sizing: border-box;
|
|
52
65
|
min-width: 100%;
|
|
53
66
|
z-index: 2;
|
|
54
|
-
background: #FFFFFF;
|
|
55
|
-
box-shadow: 0 11px 20px 0 rgb(0,0,0.3);
|
|
56
67
|
top: 100%;
|
|
57
68
|
border-radius: 5px;
|
|
58
69
|
padding: 10px 0;
|
|
70
|
+
|
|
71
|
+
@include theme() {
|
|
72
|
+
background: get(dropdown-color-default);
|
|
73
|
+
box-shadow: 0 11px 20px 0 get(shadow-color);
|
|
74
|
+
}
|
|
75
|
+
|
|
59
76
|
&-list {
|
|
60
77
|
&-item {
|
|
61
78
|
padding: 7px 10px;
|
|
79
|
+
|
|
62
80
|
&:hover {
|
|
63
|
-
|
|
81
|
+
@include theme() {
|
|
82
|
+
background: get(dropdown-color-hover);
|
|
83
|
+
}
|
|
64
84
|
}
|
|
65
85
|
}
|
|
66
86
|
}
|
|
67
87
|
}
|
|
68
88
|
}
|
|
69
|
-
}
|
|
89
|
+
}
|
|
@@ -41,19 +41,21 @@ import IconVectorUrl from './images/vector.png';
|
|
|
41
41
|
import IconUnvectorUrl from './images/unvector.png';
|
|
42
42
|
import IconVoiceUrl from './images/voice.png';
|
|
43
43
|
import IconAddCircleUrl from './images/add-friend.svg';
|
|
44
|
+
import IconVideoCallUrl from './images/video-call.svg';
|
|
45
|
+
import IconVoiceCallUrl from './images/voice-call.svg';
|
|
44
46
|
|
|
45
47
|
import { IconTypes } from './type';
|
|
46
48
|
|
|
47
49
|
interface IconConfigItem {
|
|
48
|
-
url: string
|
|
49
|
-
className: string
|
|
50
|
+
url: string;
|
|
51
|
+
className: string;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
interface IconConfig {
|
|
53
|
-
[propName: string]: IconConfigItem
|
|
55
|
+
[propName: string]: IconConfigItem;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
export const ICON_CONFIG:IconConfig = {
|
|
58
|
+
export const ICON_CONFIG: IconConfig = {
|
|
57
59
|
[IconTypes.MORE]: {
|
|
58
60
|
url: IconMoreUrl,
|
|
59
61
|
className: 'tui-kit-icon-more',
|
|
@@ -230,4 +232,12 @@ export const ICON_CONFIG:IconConfig = {
|
|
|
230
232
|
url: IconAddCircleUrl,
|
|
231
233
|
className: 'tui-kit-icon-add-friend',
|
|
232
234
|
},
|
|
235
|
+
[IconTypes.VIDEOCALL]: {
|
|
236
|
+
url: IconVideoCallUrl,
|
|
237
|
+
className: 'tui-kit-icon-video-call',
|
|
238
|
+
},
|
|
239
|
+
[IconTypes.VOICECALL]: {
|
|
240
|
+
url: IconVoiceCallUrl,
|
|
241
|
+
className: 'tui-kit-icon-voice-call',
|
|
242
|
+
},
|
|
233
243
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12.7133 3.78811C12.7133 3.84528 12.654 3.94533 12.5353 4.08826C12.4166 4.23119 12.2894 4.39985 12.1537 4.59424C12.0181 4.78862 11.8909 5.00016 11.7722 5.22885C11.6535 5.45754 11.5942 5.69194 11.5942 5.93207C11.5942 6.17219 11.6535 6.40374 11.7722 6.62671C11.8909 6.84968 12.0181 7.05264 12.1537 7.2356C12.2894 7.41855 12.4166 7.57005 12.5353 7.69011C12.654 7.81018 12.7133 7.88736 12.7133 7.92166V9.72259C12.7133 9.91697 12.6427 10.1371 12.5014 10.3829C12.3601 10.6288 12.1848 10.8603 11.9757 11.0776C11.7666 11.2948 11.5348 11.4749 11.2805 11.6178C11.0261 11.7608 10.7859 11.8322 10.5598 11.8322H2.13229C1.82707 11.8322 1.54728 11.7779 1.29293 11.6693C1.03858 11.5607 0.815315 11.4092 0.623139 11.2148C0.430963 11.0204 0.281177 10.7917 0.173785 10.5287C0.0663918 10.2657 0.0126953 9.97986 0.0126953 9.67113V2.27876C0.0126953 2.05007 0.0635656 1.81281 0.165306 1.56697C0.267047 1.32113 0.411179 1.0953 0.597704 0.889476C0.784228 0.683656 1.00467 0.512139 1.25902 0.374926C1.51337 0.237712 1.79316 0.169106 2.09838 0.169106H10.5259C10.8311 0.169106 11.1166 0.223419 11.3822 0.332046C11.6479 0.440674 11.8796 0.589322 12.0774 0.77799C12.2753 0.966658 12.4307 1.19249 12.5437 1.45548C12.6568 1.71847 12.7133 1.99862 12.7133 2.29591V3.78811ZM17.9869 2.17585V10.0142C17.9869 10.2657 17.9219 10.4887 17.7919 10.6831C17.6619 10.8775 17.4669 10.9747 17.2069 10.9747C17.1164 10.9747 17.0006 10.9404 16.8592 10.8718C16.7179 10.8031 16.5766 10.7231 16.4353 10.6316C16.294 10.5402 16.1612 10.4487 16.0368 10.3572C15.9125 10.2657 15.8221 10.1914 15.7655 10.1342C15.6186 10.0084 15.3953 9.79119 15.0957 9.48246C14.7962 9.17373 14.4938 8.82498 14.1886 8.43621C13.8833 8.04744 13.6149 7.64724 13.3831 7.2356C13.1514 6.82396 13.0355 6.44662 13.0355 6.10358C13.0355 5.76055 13.1598 5.36892 13.4085 4.9287C13.6572 4.48847 13.9568 4.05682 14.3073 3.63374C14.6577 3.21067 15.0251 2.81904 15.4094 2.45885C15.7938 2.09867 16.116 1.8271 16.376 1.64415C16.4777 1.57554 16.6162 1.49264 16.7914 1.39545C16.9666 1.29826 17.1221 1.24966 17.2577 1.24966C17.563 1.24966 17.7608 1.33542 17.8512 1.50694C17.9417 1.67845 17.9869 1.88999 17.9869 2.14155V2.17585Z" fill="#147AFF" style="fill:#147AFF;fill:color(display-p3 0.0784 0.4784 1.0000);fill-opacity:1;"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.820502 1.908L2.4211 0.335447C2.84833 -0.110789 3.54101 -0.110788 3.96825 0.335448L6.55252 3.03465C6.97975 3.48089 6.97975 4.20438 6.55252 4.65061L5.40756 5.84649C5.89906 6.92709 6.58667 7.90985 7.44288 8.73564C8.3911 9.65016 9.50662 10.3341 10.7098 10.7549L11.7569 9.66126C12.1841 9.21502 12.8768 9.21502 13.304 9.66126L15.6796 12.1424C16.1068 12.5887 16.1068 13.3122 15.6796 13.7584L13.9485 15.6199C13.9389 15.6199 13.9581 15.6199 13.9485 15.6199C13.7709 15.8055 13.5385 15.9293 13.2854 15.9734L13.128 16.0008C9.75381 15.9708 6.84954 14.6061 4.36844 12.2132C1.859 9.79292 0.271627 6.98782 0 3.43154C0 2.94579 0.202278 2.48197 0.558263 2.15147L0.820502 1.908Z" fill="#147AFF" style="fill:#147AFF;fill:color(display-p3 0.0784 0.4784 1.0000);fill-opacity:1;"/>
|
|
3
|
+
</svg>
|
|
@@ -1,22 +1,32 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.tui-kit-input-box {
|
|
2
4
|
//width: 100%;
|
|
3
5
|
display: flex;
|
|
4
6
|
align-items: center;
|
|
5
7
|
border-radius: 10px;
|
|
6
|
-
background: rgba(249, 249, 249, 94%);
|
|
7
8
|
padding: 0 8px;
|
|
8
9
|
height: 36px;
|
|
9
10
|
box-sizing: border-box;
|
|
10
11
|
|
|
12
|
+
@include theme() {
|
|
13
|
+
background-color: get(bg-color-input);
|
|
14
|
+
}
|
|
15
|
+
|
|
11
16
|
&.tui-kit-input-box--focus {
|
|
12
|
-
|
|
17
|
+
@include theme() {
|
|
18
|
+
outline: 1px solid get(text-color-link);
|
|
19
|
+
}
|
|
13
20
|
}
|
|
14
21
|
|
|
15
22
|
&.tui-kit-input-border--bottom {
|
|
16
|
-
border-bottom: 1px solid rgba(0, 0, 0, 10%);
|
|
17
|
-
background-color: #fff;
|
|
18
23
|
outline: none;
|
|
19
24
|
border-radius: 0;
|
|
25
|
+
|
|
26
|
+
@include theme() {
|
|
27
|
+
border-bottom: 1px solid get(stroke-color-primary);
|
|
28
|
+
background-color: get(bg-color-operate);
|
|
29
|
+
}
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
.tui-kit-input {
|
|
@@ -32,15 +42,21 @@
|
|
|
32
42
|
box-sizing: border-box;
|
|
33
43
|
font-size: 14px;
|
|
34
44
|
|
|
45
|
+
@include theme() {
|
|
46
|
+
color: get(text-color-primary);
|
|
47
|
+
}
|
|
48
|
+
|
|
35
49
|
&:focus {
|
|
36
50
|
border: none;
|
|
37
51
|
outline: none;
|
|
38
52
|
}
|
|
39
53
|
|
|
40
54
|
&::placeholder {
|
|
41
|
-
font-weight: 400;
|
|
42
|
-
color: rgba(67, 60, 63, 60%);
|
|
43
55
|
padding: 2px 0;
|
|
56
|
+
|
|
57
|
+
@include theme() {
|
|
58
|
+
color: get(text-color-secondary);
|
|
59
|
+
}
|
|
44
60
|
}
|
|
45
61
|
}
|
|
46
62
|
}
|
|
@@ -3,19 +3,11 @@
|
|
|
3
3
|
.plugin-popup {
|
|
4
4
|
&-box {
|
|
5
5
|
border-radius: 16px;
|
|
6
|
+
overflow: hidden;
|
|
6
7
|
|
|
7
8
|
@include theme() {
|
|
8
|
-
color: get(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[data-uikit-theme="light"] & {
|
|
12
|
-
background-color: var(--chat-theme-light-bg-primary);
|
|
13
|
-
box-shadow: var(--chat-theme-light-box-shadow-1);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
[data-uikit-theme="dark"] & {
|
|
17
|
-
background-color: var(--chat-theme-dark-bg-3);
|
|
18
|
-
box-shadow: var(--chat-theme-dark-box-shadow-1);
|
|
9
|
+
background-color: get(dropdown-color-default);
|
|
10
|
+
box-shadow: 0 0 10px 0 get(shadow-color);
|
|
19
11
|
}
|
|
20
12
|
}
|
|
21
13
|
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.profile {
|
|
2
|
-
font-family: PingFangSC-Medium;
|
|
3
|
-
background: #F9FAFB;
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: row;
|
|
6
6
|
justify-content: space-between;
|
|
7
7
|
align-items: center;
|
|
8
8
|
padding: 16px 20px;
|
|
9
|
+
|
|
10
|
+
@include theme() {
|
|
11
|
+
background-color: get(bg-color-operate);
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
.profile-content {
|
|
10
15
|
display: flex;
|
|
11
16
|
align-items: center;
|
|
17
|
+
|
|
12
18
|
.profile-name {
|
|
13
|
-
font-family: PingFangSC-Medium;
|
|
14
19
|
font-weight: 600;
|
|
15
20
|
margin-left: 10px;
|
|
16
21
|
font-size: 14px;
|
|
@@ -18,6 +23,10 @@
|
|
|
18
23
|
white-space: nowrap;
|
|
19
24
|
max-width: 200px;
|
|
20
25
|
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
@include theme() {
|
|
28
|
+
color: get(text-color-primary);
|
|
29
|
+
}
|
|
21
30
|
}
|
|
22
31
|
}
|
|
23
32
|
}
|
|
@@ -9,7 +9,7 @@ import TUIChatEngine, {
|
|
|
9
9
|
TUIStore,
|
|
10
10
|
StoreName,
|
|
11
11
|
} from '@tencentcloud/chat-uikit-engine';
|
|
12
|
-
import { JSONStringToParse } from '../
|
|
12
|
+
import { JSONStringToParse } from '../utils';
|
|
13
13
|
import { useUIKit, useUIManager } from '../../context';
|
|
14
14
|
import { TUIChatStateContextProvider } from '../../context/TUIChatStateContext';
|
|
15
15
|
import { TUIChatActionProvider } from '../../context/TUIChatActionContext';
|
|
@@ -39,41 +39,42 @@ import { TUIMessageInput as TUIMessageInputElement, TUIMessageInputBasicProps }
|
|
|
39
39
|
import { EmptyStateIndicator } from '../EmptyStateIndicator';
|
|
40
40
|
|
|
41
41
|
interface TUIChatProps {
|
|
42
|
-
className?: string
|
|
43
|
-
conversation?: Conversation
|
|
44
|
-
EmptyPlaceholder?: React.ReactElement
|
|
45
|
-
TUIMessage?: React.ComponentType<TUIMessageProps | UnknowPorps
|
|
46
|
-
TUIChatHeader?: React.ComponentType<TUIChatHeaderDefaultProps
|
|
47
|
-
MessageContext?: React.ComponentType<MessageContextProps
|
|
48
|
-
TUIMessageInput?: React.ComponentType<UnknowPorps
|
|
49
|
-
InputPlugins?: React.ComponentType<UnknowPorps
|
|
50
|
-
InputQuote?: React.ComponentType<UnknowPorps
|
|
51
|
-
MessagePlugins?: React.ComponentType<UnknowPorps
|
|
52
|
-
MessageCustomPlugins?: React.ComponentType<UnknowPorps
|
|
53
|
-
MessageTextPlugins?: React.ComponentType<UnknowPorps
|
|
42
|
+
className?: string;
|
|
43
|
+
conversation?: Conversation;
|
|
44
|
+
EmptyPlaceholder?: React.ReactElement;
|
|
45
|
+
TUIMessage?: React.ComponentType<TUIMessageProps | UnknowPorps>;
|
|
46
|
+
TUIChatHeader?: React.ComponentType<TUIChatHeaderDefaultProps>;
|
|
47
|
+
MessageContext?: React.ComponentType<MessageContextProps>;
|
|
48
|
+
TUIMessageInput?: React.ComponentType<UnknowPorps>;
|
|
49
|
+
InputPlugins?: React.ComponentType<UnknowPorps>;
|
|
50
|
+
InputQuote?: React.ComponentType<UnknowPorps>;
|
|
51
|
+
MessagePlugins?: React.ComponentType<UnknowPorps>;
|
|
52
|
+
MessageCustomPlugins?: React.ComponentType<UnknowPorps>;
|
|
53
|
+
MessageTextPlugins?: React.ComponentType<UnknowPorps>;
|
|
54
54
|
onMessageRecevied?: (
|
|
55
|
-
updateMessage: (event?:
|
|
55
|
+
updateMessage: (event?: Message[]) => void,
|
|
56
56
|
event: any,
|
|
57
|
-
) => void
|
|
58
|
-
sendMessage?: (message:Message, options?:any) => Promise<Message
|
|
59
|
-
revokeMessage?: (message:Message) => Promise<Message
|
|
60
|
-
selectedConversation?: (conversation:Conversation) => Promise<Conversation
|
|
61
|
-
filterMessage?: (messageList:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
) => void;
|
|
58
|
+
sendMessage?: (message: Message, options?: any) => Promise<Message>;
|
|
59
|
+
revokeMessage?: (message: Message) => Promise<Message>;
|
|
60
|
+
selectedConversation?: (conversation: Conversation) => Promise<Conversation>;
|
|
61
|
+
filterMessage?: (messageList: IMessageModel[]) => IMessageModel[];
|
|
62
|
+
callButtonClicked?: (callMediaType?: number, callType?: any) => void;
|
|
63
|
+
messageConfig?: TUIMessageProps;
|
|
64
|
+
cloudCustomData?: string;
|
|
65
|
+
TUIMessageInputConfig?: TUIMessageInputBasicProps;
|
|
66
|
+
TUIMessageListConfig?: MessageListProps;
|
|
67
|
+
[propName: string]: any;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
interface TUIChatInnerProps extends TUIChatProps {
|
|
70
|
-
chat?: ChatSDK
|
|
71
|
+
chat?: ChatSDK;
|
|
71
72
|
key?: string;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
function UnMemoizedTUIChat
|
|
75
|
+
function UnMemoizedTUIChat<T extends TUIChatProps>(
|
|
75
76
|
props: PropsWithChildren<T>,
|
|
76
|
-
):React.ReactElement {
|
|
77
|
+
): React.ReactElement {
|
|
77
78
|
const {
|
|
78
79
|
conversation: propsConversation,
|
|
79
80
|
EmptyPlaceholder = <EmptyStateIndicator listType="chat" />,
|
|
@@ -96,9 +97,9 @@ function UnMemoizedTUIChat <T extends TUIChatProps>(
|
|
|
96
97
|
);
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
function TUIChatInner
|
|
100
|
+
function TUIChatInner<T extends TUIChatInnerProps>(
|
|
100
101
|
props: PropsWithChildren<T>,
|
|
101
|
-
):React.ReactElement {
|
|
102
|
+
): React.ReactElement {
|
|
102
103
|
const {
|
|
103
104
|
chat,
|
|
104
105
|
conversation,
|
|
@@ -122,6 +123,7 @@ function TUIChatInner <T extends TUIChatInnerProps>(
|
|
|
122
123
|
cloudCustomData,
|
|
123
124
|
TUIMessageInputConfig,
|
|
124
125
|
TUIMessageListConfig,
|
|
126
|
+
callButtonClicked,
|
|
125
127
|
} = props;
|
|
126
128
|
|
|
127
129
|
const [state, dispatch] = useReducer<any>(chatReducer, {
|
|
@@ -183,7 +185,7 @@ function TUIChatInner <T extends TUIChatInnerProps>(
|
|
|
183
185
|
}, []);
|
|
184
186
|
|
|
185
187
|
const onMessageListUpdated = (list: IMessageModel[]) => {
|
|
186
|
-
const messageList = list.filter(
|
|
188
|
+
const messageList = list.filter(message => !message.isDeleted);
|
|
187
189
|
// eslint-disable-next-line
|
|
188
190
|
// @ts-ignore
|
|
189
191
|
dispatch({
|
|
@@ -223,7 +225,7 @@ function TUIChatInner <T extends TUIChatInnerProps>(
|
|
|
223
225
|
});
|
|
224
226
|
}
|
|
225
227
|
};
|
|
226
|
-
|
|
228
|
+
// eslint-disable-next-line
|
|
227
229
|
// @ts-ignore
|
|
228
230
|
const chatActionContextValue: TUIChatActionContextValue = useMemo(
|
|
229
231
|
() => ({
|
|
@@ -237,6 +239,7 @@ function TUIChatInner <T extends TUIChatInnerProps>(
|
|
|
237
239
|
setActiveMessageID,
|
|
238
240
|
updateUploadPendingMessageList,
|
|
239
241
|
setFirstSendMessage,
|
|
242
|
+
callButtonClicked,
|
|
240
243
|
}),
|
|
241
244
|
[
|
|
242
245
|
editLocalMessage,
|
|
@@ -249,6 +252,7 @@ function TUIChatInner <T extends TUIChatInnerProps>(
|
|
|
249
252
|
setActiveMessageID,
|
|
250
253
|
updateUploadPendingMessageList,
|
|
251
254
|
setFirstSendMessage,
|
|
255
|
+
callButtonClicked,
|
|
252
256
|
],
|
|
253
257
|
);
|
|
254
258
|
|
|
@@ -269,7 +273,7 @@ function TUIChatInner <T extends TUIChatInnerProps>(
|
|
|
269
273
|
|
|
270
274
|
return (
|
|
271
275
|
<div className={`chat ${className}`}>
|
|
272
|
-
|
|
276
|
+
{/* // eslint-disable-next-line
|
|
273
277
|
// @ts-ignore */}
|
|
274
278
|
<TUIChatStateContextProvider value={chatStateContextValue}>
|
|
275
279
|
<TUIChatActionProvider value={chatActionContextValue}>
|