@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.
Files changed (215) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/assets/fonts/iconfont.ttf +0 -0
  3. package/dist/cjs/assets/fonts/iconfont.woff +0 -0
  4. package/dist/cjs/assets/fonts/iconfont.woff2 +0 -0
  5. package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  6. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  7. package/dist/cjs/components/ConversationPreview/utils.js +1 -1
  8. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
  9. package/dist/cjs/components/Icon/config.js +1 -1
  10. package/dist/cjs/components/Icon/images/video-call.svg.js +1 -0
  11. package/dist/cjs/components/Icon/images/voice-call.svg.js +1 -0
  12. package/dist/cjs/components/Icon/type.d.ts +3 -1
  13. package/dist/cjs/components/Icon/type.js +1 -1
  14. package/dist/cjs/components/TUIChat/TUIChat.d.ts +3 -2
  15. package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
  16. package/dist/cjs/components/TUIChat/TUIChatState.js +1 -1
  17. package/dist/cjs/components/TUIChat/index.js +1 -0
  18. package/dist/cjs/components/TUIChat/server.js +1 -0
  19. package/dist/cjs/components/TUIChat/utils.js +1 -0
  20. package/dist/cjs/components/TUIChatHeader/TUIChatHeader.d.ts +1 -0
  21. package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +1 -1
  22. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +2 -1
  23. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  24. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  25. package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +1 -1
  26. package/dist/cjs/components/TUIMessage/MessageAvatar.js +1 -1
  27. package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
  28. package/dist/cjs/components/TUIMessage/MessageStatus.js +1 -1
  29. package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  30. package/dist/cjs/components/TUIMessage/hooks/useMessageReply.js +1 -1
  31. package/dist/cjs/components/TUIMessage/utils/index.js +1 -1
  32. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  33. package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  34. package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  35. package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  36. package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  37. package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
  38. package/dist/cjs/components/{untils.js → utils.js} +1 -1
  39. package/dist/cjs/context/LanguageContext.js +1 -1
  40. package/dist/cjs/context/TUIChatActionContext.d.ts +2 -1
  41. package/dist/cjs/context/TUIConversationContext.js +1 -1
  42. package/dist/cjs/context/ThemeContext.js +1 -1
  43. package/dist/cjs/context/UIKitContext.d.ts +2 -2
  44. package/dist/cjs/context/UIKitContext.js +1 -1
  45. package/dist/cjs/index.css +1 -1
  46. package/dist/cjs/index.d.css +589 -259
  47. package/dist/cjs/index.js +1 -1
  48. package/dist/cjs/locales/en-US/index.js +1 -1
  49. package/dist/cjs/locales/index.js +1 -1
  50. package/dist/cjs/locales/ja-JP/index.js +1 -1
  51. package/dist/cjs/locales/ko-KR/index.js +1 -1
  52. package/dist/cjs/locales/zh-CN/index.js +1 -1
  53. package/dist/cjs/locales/zh-TW/TUIChat.js +1 -0
  54. package/dist/cjs/locales/zh-TW/TUIContact.js +1 -0
  55. package/dist/cjs/locales/zh-TW/TUIConversation.js +1 -0
  56. package/dist/cjs/locales/zh-TW/TUIProfile.js +1 -0
  57. package/dist/cjs/locales/zh-TW/index.js +1 -0
  58. package/dist/esm/assets/fonts/iconfont.ttf +0 -0
  59. package/dist/esm/assets/fonts/iconfont.woff +0 -0
  60. package/dist/esm/assets/fonts/iconfont.woff2 +0 -0
  61. package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  62. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  63. package/dist/esm/components/ConversationPreview/utils.js +1 -1
  64. package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
  65. package/dist/esm/components/Icon/config.js +1 -1
  66. package/dist/esm/components/Icon/images/video-call.svg.js +1 -0
  67. package/dist/esm/components/Icon/images/voice-call.svg.js +1 -0
  68. package/dist/esm/components/Icon/type.d.ts +3 -1
  69. package/dist/esm/components/Icon/type.js +1 -1
  70. package/dist/esm/components/TUIChat/TUIChat.d.ts +3 -2
  71. package/dist/esm/components/TUIChat/TUIChat.js +1 -1
  72. package/dist/esm/components/TUIChat/TUIChatState.js +1 -1
  73. package/dist/esm/components/TUIChat/index.js +1 -0
  74. package/dist/esm/components/TUIChat/server.js +1 -0
  75. package/dist/esm/components/TUIChat/utils.js +1 -0
  76. package/dist/esm/components/TUIChatHeader/TUIChatHeader.d.ts +1 -0
  77. package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +1 -1
  78. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +2 -1
  79. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  80. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  81. package/dist/esm/components/TUIContact/hooks/useTUIContact.js +1 -1
  82. package/dist/esm/components/TUIMessage/MessageAvatar.js +1 -1
  83. package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
  84. package/dist/esm/components/TUIMessage/MessageStatus.js +1 -1
  85. package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  86. package/dist/esm/components/TUIMessage/hooks/useMessageReply.js +1 -1
  87. package/dist/esm/components/TUIMessage/utils/index.js +1 -1
  88. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  89. package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  90. package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  91. package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  92. package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  93. package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
  94. package/dist/esm/components/utils.js +1 -0
  95. package/dist/esm/context/LanguageContext.js +1 -1
  96. package/dist/esm/context/TUIChatActionContext.d.ts +2 -1
  97. package/dist/esm/context/TUIConversationContext.js +1 -1
  98. package/dist/esm/context/ThemeContext.js +1 -1
  99. package/dist/esm/context/UIKitContext.d.ts +2 -2
  100. package/dist/esm/context/UIKitContext.js +1 -1
  101. package/dist/esm/index.css +1 -1
  102. package/dist/esm/index.d.css +589 -259
  103. package/dist/esm/index.js +1 -1
  104. package/dist/esm/locales/en-US/index.js +1 -1
  105. package/dist/esm/locales/index.js +1 -1
  106. package/dist/esm/locales/ja-JP/index.js +1 -1
  107. package/dist/esm/locales/ko-KR/index.js +1 -1
  108. package/dist/esm/locales/zh-CN/index.js +1 -1
  109. package/dist/esm/locales/zh-TW/TUIChat.js +1 -0
  110. package/dist/esm/locales/zh-TW/TUIContact.js +1 -0
  111. package/dist/esm/locales/zh-TW/TUIConversation.js +1 -0
  112. package/dist/esm/locales/zh-TW/TUIProfile.js +1 -0
  113. package/dist/esm/locales/zh-TW/index.js +1 -0
  114. package/package.json +2 -1
  115. package/rollup.config.js +1 -1
  116. package/src/assets/fonts/iconfont.ttf +0 -0
  117. package/src/assets/fonts/iconfont.woff +0 -0
  118. package/src/assets/fonts/iconfont.woff2 +0 -0
  119. package/src/components/Avatar/styles/index.scss +11 -4
  120. package/src/components/Checkbox/styles/color.scss +17 -6
  121. package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +5 -5
  122. package/src/components/ConversationCreate/styles/ConversationCreatGroupDetail.scss +7 -16
  123. package/src/components/ConversationCreate/styles/conversationCreateSelectView.scss +13 -8
  124. package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +20 -21
  125. package/src/components/ConversationCreate/styles/index.scss +30 -17
  126. package/src/components/ConversationPreview/ConversationPreviewContent.tsx +1 -0
  127. package/src/components/ConversationPreview/styles/index.scss +20 -20
  128. package/src/components/ConversationPreview/utils.tsx +3 -2
  129. package/src/components/DivWithEdit/styles/index.scss +30 -10
  130. package/src/components/Icon/config.ts +14 -4
  131. package/src/components/Icon/images/video-call.svg +3 -0
  132. package/src/components/Icon/images/voice-call.svg +3 -0
  133. package/src/components/Icon/type.ts +2 -0
  134. package/src/components/Input/styles/index.scss +22 -6
  135. package/src/components/Plugins/styles/color.scss +3 -11
  136. package/src/components/Profile/styles/index.scss +12 -3
  137. package/src/components/TUIChat/TUIChat.tsx +36 -32
  138. package/src/components/TUIChat/TUIChatState.tsx +41 -41
  139. package/src/components/TUIChat/index.ts +3 -0
  140. package/src/components/TUIChat/server.ts +44 -0
  141. package/src/components/TUIChat/styles/layout.scss +7 -2
  142. package/src/components/TUIChat/utils.ts +72 -0
  143. package/src/components/TUIChatHeader/TUIChatHeader.tsx +10 -7
  144. package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +72 -29
  145. package/src/components/TUIChatHeader/styles/layout.scss +16 -9
  146. package/src/components/TUIContact/TUIContactInfo/index.scss +44 -21
  147. package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +75 -71
  148. package/src/components/TUIContact/TUIContactList/index.scss +40 -20
  149. package/src/components/TUIContact/hooks/useTUIContact.tsx +3 -3
  150. package/src/components/TUIContact/index.scss +30 -11
  151. package/src/components/TUIContactSearch/index.scss +12 -3
  152. package/src/components/TUIConversationList/index.scss +3 -4
  153. package/src/components/TUIManage/styles/index.scss +20 -14
  154. package/src/components/TUIMessage/MessageAvatar.tsx +7 -7
  155. package/src/components/TUIMessage/MessageBubble.tsx +22 -21
  156. package/src/components/TUIMessage/MessageCustom.tsx +26 -5
  157. package/src/components/TUIMessage/MessageStatus.tsx +5 -5
  158. package/src/components/TUIMessage/hooks/useMessageHandler.ts +6 -6
  159. package/src/components/TUIMessage/hooks/useMessageReply.ts +6 -5
  160. package/src/components/TUIMessage/styles/color.scss +6 -5
  161. package/src/components/TUIMessage/styles/layout.scss +111 -42
  162. package/src/components/TUIMessage/utils/index.ts +23 -12
  163. package/src/components/TUIMessageInput/InputPluginsDefalut.tsx +12 -12
  164. package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +5 -4
  165. package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +12 -12
  166. package/src/components/TUIMessageInput/hooks/useUploadPicker.tsx +4 -4
  167. package/src/components/TUIMessageInput/styles/color.scss +15 -11
  168. package/src/components/TUIMessageInput/styles/layout.scss +33 -17
  169. package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +13 -9
  170. package/src/components/TUIMessageList/styles/layout.scss +16 -9
  171. package/src/components/TUIProfile/TUIProfileDefault.tsx +12 -11
  172. package/src/components/TUIProfile/styles/color.scss +6 -5
  173. package/src/components/TUIProfile/styles/layout.scss +16 -14
  174. package/src/components/{untils.ts → utils.ts} +5 -4
  175. package/src/context/LanguageContext.tsx +5 -4
  176. package/src/context/TUIChatActionContext.tsx +14 -13
  177. package/src/context/ThemeContext.tsx +12 -5
  178. package/src/context/UIKitContext.tsx +11 -2
  179. package/src/locales/en-US/index.ts +0 -3
  180. package/src/locales/index.ts +6 -2
  181. package/src/locales/ja-JP/index.ts +0 -2
  182. package/src/locales/ko-KR/index.ts +0 -2
  183. package/src/locales/zh-CN/index.ts +0 -2
  184. package/src/locales/zh-TW/TUIChat.ts +27 -0
  185. package/src/locales/zh-TW/TUIContact.ts +29 -0
  186. package/src/locales/zh-TW/TUIConversation.ts +32 -0
  187. package/src/locales/zh-TW/TUIProfile.ts +15 -0
  188. package/src/locales/zh-TW/index.ts +11 -0
  189. package/src/styles/colors/_color-dark.scss +31 -21
  190. package/src/styles/colors/_color-light.scss +31 -21
  191. package/src/styles/colors/_color-theme.scss +32 -21
  192. package/src/styles/normalize.scss +6 -0
  193. package/dist/cjs/components/Icon/images/down-arrow.png.js +0 -1
  194. package/dist/cjs/components/Icon/images/right-arrow.svg.js +0 -1
  195. package/dist/cjs/components/TUIChat/unitls.js +0 -1
  196. package/dist/cjs/locales/en-US/TUIGlobal.js +0 -1
  197. package/dist/cjs/locales/ja-JP/TUIGlobal.js +0 -1
  198. package/dist/cjs/locales/ko-KR/TUIGlobal.js +0 -1
  199. package/dist/cjs/locales/zh-CN/TUIGlobal.js +0 -1
  200. package/dist/esm/components/Icon/images/down-arrow.png.js +0 -1
  201. package/dist/esm/components/Icon/images/right-arrow.svg.js +0 -1
  202. package/dist/esm/components/TUIChat/unitls.js +0 -1
  203. package/dist/esm/components/untils.js +0 -1
  204. package/dist/esm/locales/en-US/TUIGlobal.js +0 -1
  205. package/dist/esm/locales/ja-JP/TUIGlobal.js +0 -1
  206. package/dist/esm/locales/ko-KR/TUIGlobal.js +0 -1
  207. package/dist/esm/locales/zh-CN/TUIGlobal.js +0 -1
  208. package/scripts/publish-github.js +0 -60
  209. package/scripts/publish-intl-demo.js +0 -14
  210. package/scripts/publish-intl-experience-demo.js +0 -14
  211. package/src/components/TUIChat/unitls.ts +0 -39
  212. package/src/locales/en-US/TUIGlobal.ts +0 -6
  213. package/src/locales/ja-JP/TUIGlobal.ts +0 -6
  214. package/src/locales/ko-KR/TUIGlobal.ts +0 -6
  215. package/src/locales/zh-CN/TUIGlobal.ts +0 -6
@@ -6,29 +6,32 @@
6
6
  display: flex;
7
7
  align-items: center;
8
8
  cursor: pointer;
9
- font-family: SF Pro Text;
10
9
  font-size: 14px;
11
10
  font-family: PingFangSC-Medium;
12
11
  font-style: normal;
13
12
  font-weight: 500;
14
13
  line-height: 17px;
14
+
15
15
  .avatar {
16
16
  width: 45px;
17
+
17
18
  img {
18
19
  width: 45px;
19
20
  }
20
21
  }
22
+
21
23
  .content {
22
24
  display: flex;
23
25
  flex-direction: column;
24
26
  align-items: flex-start;
27
+
25
28
  .name {
26
29
  display: inline-block;
27
30
  padding-bottom: 3px;
28
31
  max-width: 60%;
29
32
 
30
33
  @include theme() {
31
- color: get(text-primary);
34
+ color: get(text-color-primary);
32
35
  }
33
36
  }
34
37
  }
@@ -40,22 +43,26 @@
40
43
  flex-direction: row;
41
44
  justify-self: flex-start;
42
45
  gap: 10px;
46
+
43
47
  .content {
44
48
  align-items: flex-start;
45
49
  flex: 1;
46
50
  }
47
51
  }
52
+
48
53
  .out {
49
54
  flex: 1;
50
55
  display: flex;
51
56
  gap: 10px;
52
57
  flex-direction: row-reverse;
53
58
  justify-self: flex-end;
59
+
54
60
  .content {
55
61
  align-items: flex-end;
56
62
  flex: 1;
57
63
  }
58
64
  }
65
+
59
66
  .tip {
60
67
  justify-self: center !important;
61
68
  width: auto;
@@ -63,14 +70,17 @@
63
70
 
64
71
  .bubble {
65
72
  padding: 8px 16px;
73
+
66
74
  &-in {
67
- border-radius: 0px 16px 16px 16px;
75
+ border-radius: 0 16px 16px;
76
+
68
77
  &.group {
69
- border-radius: 0px 16px 16px 16px;
78
+ border-radius: 0 16px 16px;
70
79
  }
71
80
  }
81
+
72
82
  &-out {
73
- border-radius: 16px 16px 0 16px;
83
+ border-radius: 16px 16px 0;
74
84
  }
75
85
  }
76
86
 
@@ -78,30 +88,39 @@
78
88
  display: flex;
79
89
  align-items: flex-end;
80
90
  align-self: flex-end;
91
+
81
92
  .time {
82
93
  width: max-content;
83
94
  font-weight: 400;
84
95
  padding: 5px 0 0 10px;
85
96
  font-size: 12px;
86
- font-family: PingFangSC-Medium;
87
97
  line-height: 14px;
88
98
  text-align: right;
89
99
 
90
100
  @include theme() {
91
- color: get(text-secondary);
101
+ color: get(text-color-anti-secondary);
102
+ }
103
+
104
+ .bubble-in & {
105
+ @include theme() {
106
+ color: get(text-color-tertiary);
107
+ }
92
108
  }
93
109
  }
94
110
  }
95
111
 
96
- .message-image, .message-video {
112
+ .message-image,
113
+ .message-video {
97
114
  position: relative;
115
+
98
116
  .message-status {
99
117
  position: absolute;
100
118
  bottom: 10px;
101
119
  right: 10px;
120
+
102
121
  .time {
103
122
  @include theme() {
104
- color: get(text-primary);
123
+ color: get(text-color-primary);
105
124
  }
106
125
  }
107
126
  }
@@ -109,23 +128,19 @@
109
128
 
110
129
  .message-text {
111
130
  display: flex;
131
+
112
132
  &-content {
113
133
  display: inline;
114
134
  word-break: break-word;
115
- font-family: PingFangSC-Regular;
116
- font-style: normal;
117
135
  font-weight: 500;
118
136
  font-size: 14px;
119
- line-height: 24px;
137
+
120
138
  &-p {
121
139
  white-space: pre-wrap;
122
140
  display: inline;
123
141
  vertical-align: middle;
124
-
125
- @include theme() {
126
- color: get(text-primary);
127
- }
128
142
  }
143
+
129
144
  .message-status {
130
145
  display: inline-flex;
131
146
  float: right;
@@ -136,11 +151,9 @@
136
151
 
137
152
  .message-text,
138
153
  .message-tip {
139
- font-family: PingFangSC-Regular;
140
- font-style: normal;
141
154
  font-weight: 500;
142
155
  font-size: 14px;
143
- line-height: 17px;
156
+
144
157
  .text-img {
145
158
  width: 20px;
146
159
  height: 20px;
@@ -149,14 +162,17 @@
149
162
  }
150
163
 
151
164
  .message-image {
152
- background: #FFFFFF;
165
+ background: transparent;
166
+
153
167
  img {
154
168
  max-width: 300px;
155
169
  }
170
+
156
171
  .img-h5 {
157
172
  max-width: 200px;
158
173
  max-height: 200px;
159
174
  }
175
+
160
176
  .big-image {
161
177
  max-width: 90%;
162
178
  max-height: 90%;
@@ -165,18 +181,20 @@
165
181
 
166
182
  .message-video {
167
183
  max-width: 300px;
184
+
168
185
  .snap-video {
169
186
  position: relative;
170
187
  height: 100%;
171
188
  border-radius: 10px;
189
+
172
190
  &::before {
173
191
  position: absolute;
174
192
  z-index: 1;
175
- content: '';
176
- width: 0px;
177
- height: 0px;
193
+ content: "";
194
+ width: 0;
195
+ height: 0;
178
196
  border: 15px solid transparent;
179
- border-left: 20px solid #ffffff;
197
+ border-left: 20px solid #fff;
180
198
  top: 0;
181
199
  left: 0;
182
200
  bottom: 0;
@@ -184,63 +202,75 @@
184
202
  margin: auto;
185
203
  }
186
204
  }
205
+
187
206
  video {
188
207
  width: 100%;
189
208
  height: 100%;
190
209
  border-radius: 10px;
191
210
  }
211
+
192
212
  .play-video {
193
213
  max-width: 95%;
194
214
  max-height: 65%;
195
215
  }
196
216
  }
217
+
197
218
  .message-video.message-video-h5 {
198
219
  max-width: 200px;
199
220
  max-height: 200px;
200
221
  }
222
+
201
223
  .message-file {
202
224
  display: flex;
203
225
  flex-direction: column;
204
226
  border: 1px solid #ddd;
227
+
205
228
  &-main {
206
229
  display: flex;
207
230
  align-items: center;
208
231
  padding: 12px;
209
- background: #FFFFFF;
232
+ background: #fff;
210
233
  border-radius: 4px;
234
+
211
235
  .icon {
212
236
  margin-right: 7px;
213
237
  }
214
238
  }
239
+
215
240
  &-footer {
216
241
  display: flex;
217
242
  justify-content: space-between;
218
243
  align-items: flex-end;
244
+
219
245
  .time {
220
246
  padding-top: 10px;
221
247
  }
222
248
  }
249
+
223
250
  &-size {
224
251
  padding-top: 10px;
225
252
  font-weight: 400;
226
253
  font-size: 12px;
227
254
  font-family: PingFangSC-Medium;
228
255
  line-height: 14px;
229
- color: #7A7A7A;
256
+ color: #7a7a7a;
230
257
  }
231
258
  }
232
259
 
233
260
  .message-merger {
234
261
  display: flex;
235
262
  flex-direction: column;
236
- background: #ECEBEB;
263
+ background: #ecebeb;
264
+
237
265
  h3 {
238
266
  padding-bottom: 4px;
239
267
  border-bottom: 1px solid #a1a1a1;
240
268
  }
269
+
241
270
  &-list {
242
271
  opacity: 0.6;
243
272
  }
273
+
244
274
  &-item {
245
275
  padding-top: 4px;
246
276
  }
@@ -258,7 +288,7 @@
258
288
  }
259
289
 
260
290
  &-out {
261
- border-radius: 16px 16px 0px 16px;
291
+ border-radius: 16px 16px 0;
262
292
  }
263
293
 
264
294
  .message-text {
@@ -279,7 +309,7 @@
279
309
  margin-bottom: 10px;
280
310
 
281
311
  @include theme() {
282
- background-color: get(bg-primary);
312
+ background-color: get(bg-color-operate);
283
313
  }
284
314
 
285
315
  &::before {
@@ -301,7 +331,7 @@
301
331
  padding-bottom: 10px;
302
332
 
303
333
  @include theme() {
304
- color: get(text-primary);
334
+ color: get(text-color-primary);
305
335
  }
306
336
  }
307
337
 
@@ -314,14 +344,17 @@
314
344
  .meesage-bubble {
315
345
  display: flex;
316
346
  align-items: flex-end;
347
+
317
348
  &-status {
318
349
  margin: 3px;
319
350
  }
351
+
320
352
  &-context {
321
353
  display: flex;
322
354
  align-items: center;
323
355
  gap: 10px;
324
- .message-context{
356
+
357
+ .message-context {
325
358
  flex: 1;
326
359
  }
327
360
  }
@@ -332,14 +365,15 @@
332
365
  height: 14px;
333
366
  border-radius: 14px;
334
367
  position: relative;
335
- background: #FA5151;
368
+ background: #fa5151;
336
369
  display: inline-flex;
337
370
  justify-content: center;
338
371
  align-items: center;
372
+
339
373
  &::before {
340
374
  position: absolute;
341
375
  content: "!";
342
- color: #FFFFFF;
376
+ color: #fff;
343
377
  font-size: 12px;
344
378
  font-family: PingFangSC-Medium;
345
379
  }
@@ -348,6 +382,7 @@
348
382
  .message-face {
349
383
  display: flex;
350
384
  flex-direction: column;
385
+
351
386
  .img {
352
387
  max-width: 88px;
353
388
  }
@@ -356,29 +391,35 @@
356
391
  .loading {
357
392
  display: inline-block;
358
393
  position: relative;
359
- .img, video{
394
+
395
+ .img,
396
+ video {
360
397
  min-width: 60px;
361
398
  min-height: 60px;
362
399
  max-width: 300px;
363
400
  border-radius: 10px;
364
401
  }
365
- .img-h5, .video-h5{
402
+
403
+ .img-h5,
404
+ .video-h5 {
366
405
  min-width: 60px;
367
406
  min-height: 60px;
368
407
  max-width: 200px;
369
408
  max-height: 200px;
370
409
  border-radius: 10px;
371
410
  }
411
+
372
412
  &::before {
373
413
  position: absolute;
374
414
  content: "";
375
- background: rgba(#000000, 0.5);
415
+ background: rgba(#000, 0.5);
376
416
  border-radius: 10px;
377
417
  width: 100%;
378
418
  height: 100%;
379
419
  top: 0;
380
420
  left: 0;
381
421
  }
422
+
382
423
  &::after {
383
424
  position: absolute;
384
425
  content: "";
@@ -395,6 +436,7 @@
395
436
  bottom: 0;
396
437
  margin: auto;
397
438
  }
439
+
398
440
  @keyframes spin {
399
441
  0% { transform: rotate(0deg); }
400
442
  100% { transform: rotate(360deg); }
@@ -404,10 +446,12 @@
404
446
  .message-plugin {
405
447
  width: 32px;
406
448
  margin: 0 5px;
449
+
407
450
  .icon-more {
408
451
  transform: scale(1.5);
409
452
  }
410
- .plugin-popup-box{
453
+
454
+ .plugin-popup-box {
411
455
  bottom: auto;
412
456
  top: 100%;
413
457
  overflow: hidden;
@@ -416,6 +460,7 @@
416
460
  &-box {
417
461
  padding: 6px 0;
418
462
  }
463
+
419
464
  &-item {
420
465
  min-width: 144px;
421
466
  padding: 6px 13px;
@@ -426,12 +471,22 @@
426
471
  font-size: 12.8px;
427
472
  font-family: PingFangSC-Medium;
428
473
  line-height: 15px;
474
+
475
+ @include theme() {
476
+ color: get(text-color-primary);
477
+ }
478
+
429
479
  &:hover {
430
- background: rgba(0,110,255,.1);
431
- color: #147aff;
480
+ @include theme() {
481
+ background: get(dropdown-color-hover);
482
+ color: get(text-color-hover);
483
+ }
432
484
  }
485
+
433
486
  .del {
434
- color: #FF584C;
487
+ @include theme() {
488
+ color: get(text-color-error);
489
+ }
435
490
  }
436
491
  }
437
492
  }
@@ -439,6 +494,7 @@
439
494
  .message-custom {
440
495
  display: flex;
441
496
  word-break: break-all;
497
+
442
498
  a {
443
499
  color: #679ce1;
444
500
  text-decoration: none;
@@ -448,6 +504,7 @@
448
504
  font-size: 14px;
449
505
  line-height: 17px;
450
506
  }
507
+
451
508
  p {
452
509
  font-family: PingFangSC-Regular;
453
510
  font-size: 14px;
@@ -458,26 +515,31 @@
458
515
  }
459
516
 
460
517
  .message-revoke {
461
- color: #999999;
518
+ color: #999;
462
519
  }
463
520
 
464
521
  .message-audio {
465
522
  display: flex;
466
523
  align-items: center;
524
+
467
525
  .out {
468
526
  transform: rotate(180deg);
469
527
  }
528
+
470
529
  &-none {
471
530
  display: none;
472
531
  }
532
+
473
533
  &-content {
474
534
  display: flex;
475
535
  align-items: center;
476
536
  gap: 10px;
477
537
  }
538
+
478
539
  &-out {
479
540
  flex-direction: row-reverse;
480
541
  }
542
+
481
543
  .playing {
482
544
  animation: playingAnimation 1s ease-in-out infinite;
483
545
  }
@@ -486,9 +548,11 @@
486
548
  0% {
487
549
  opacity: 1;
488
550
  }
551
+
489
552
  50% {
490
553
  opacity: 0.3;
491
554
  }
555
+
492
556
  100% {
493
557
  opacity: 1;
494
558
  }
@@ -504,16 +568,20 @@
504
568
  opacity: 1;
505
569
  color: #ff9c19;
506
570
  }
571
+
507
572
  25% {
508
573
  opacity: 0.3;
509
574
  }
575
+
510
576
  50% {
511
577
  color: #ff9c19;
512
578
  opacity: 1;
513
579
  }
580
+
514
581
  75% {
515
582
  opacity: 0.3;
516
583
  }
584
+
517
585
  100% {
518
586
  color: #ff9c19;
519
587
  opacity: 1;
@@ -525,13 +593,14 @@
525
593
  height: 5px;
526
594
  display: flex;
527
595
  justify-content: flex-start;
596
+
528
597
  .progress {
529
598
  display: inline-block;
530
599
  width: 0;
531
600
  background: #147aff;
532
601
  height: 5px;
533
602
  border-radius: 2px;
534
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
603
+ box-shadow: 0 0 10px rgba(0, 0, 0, 25%);
535
604
  }
536
605
  }
537
606
 
@@ -1,9 +1,9 @@
1
1
  import TencentCloudChat, { Conversation, Group, Message } from '@tencentcloud/chat';
2
2
  import { decodeText } from './decodeText';
3
3
  import constant, { MESSAGE_STATUS } from '../../../constants';
4
- import { JSONStringToParse } from '../../untils';
4
+ import { JSONStringToParse } from '../../utils';
5
5
 
6
- function t(params:string) {
6
+ function t(params: string) {
7
7
  const str = params.split('.');
8
8
  return str[str.length - 1];
9
9
  }
@@ -141,7 +141,7 @@ export function handleTipMessageShowContext(message: Message) {
141
141
  options.text = handleTipGrpUpdated(message);
142
142
  break;
143
143
  case TencentCloudChat.TYPES.GRP_TIP_MBR_PROFILE_UPDATED:
144
- message.payload.memberList.map((member:any) => {
144
+ message.payload.memberList.map((member: any) => {
145
145
  if (member.muteTime > 0) {
146
146
  options.text = `${t('message.tip.member')}:${member.userID}${t('message.tip.muted')}`;
147
147
  } else {
@@ -222,11 +222,11 @@ export function handleLocationMessageShowContext(item: any) {
222
222
  location.lon = item.payload.longitude.toFixed(6);
223
223
  location.lat = item.payload.latitude.toFixed(6);
224
224
  location.href = 'https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&'
225
- + `pointx=${location.lon}&pointy=${location.lat}&name=${item.payload.description}`;
225
+ + `pointx=${location.lon}&pointy=${location.lat}&name=${item.payload.description}`;
226
226
  location.url = 'https://apis.map.qq.com/ws/staticmap/v2/?'
227
- + `center=${location.lat},${location.lon}&zoom=10&size=300*150&maptype=roadmap&`
228
- + `markers=size:large|color:0xFFCCFF|label:k|${location.lat},${location.lon}&`
229
- + 'key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD';
227
+ + `center=${location.lat},${location.lon}&zoom=10&size=300*150&maptype=roadmap&`
228
+ + `markers=size:large|color:0xFFCCFF|label:k|${location.lat},${location.lon}&`
229
+ + 'key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD';
230
230
  location.description = item.payload.description;
231
231
  return location;
232
232
  }
@@ -286,8 +286,8 @@ export function handleMergerMessageShowContext(item: Message) {
286
286
 
287
287
  // Parse audio and video call messages
288
288
  export function extractCallingInfoFromMessage(message: Message) {
289
- let callingmessage:any = {};
290
- let objectData:any = {};
289
+ let callingmessage: any = {};
290
+ let objectData: any = {};
291
291
  try {
292
292
  callingmessage = JSONStringToParse(message.payload.data);
293
293
  } catch (error) {
@@ -441,13 +441,13 @@ export function isTypingMessage(item: Message) {
441
441
  return false;
442
442
  }
443
443
 
444
- export function formatTime(secondTime:number) {
445
- const time:number = secondTime;
444
+ export function formatTime(secondTime: number) {
445
+ const time: number = secondTime;
446
446
  let newTime; let hour; let minite; let seconds;
447
447
  if (time >= 3600) {
448
448
  hour = parseInt(`${time / 3600}`, 10) < 10 ? `0${parseInt(`${time / 3600}`, 10)}` : parseInt(`${time / 3600}`, 10);
449
449
  minite = parseInt(`${(time % 60) / 60}`, 10) < 10 ? `0${parseInt(`${(time % 60) / 60}`, 10)}` : parseInt(`${(time % 60) / 60}`, 10);
450
- seconds = time % 3600 < 10 ? parseInt(`0${time % 3600}`) : time % 3600;
450
+ seconds = time % 3600 < 10 ? parseInt(`0${time % 3600}`) : time % 3600;
451
451
  if (seconds > 60) {
452
452
  minite = parseInt(`${seconds / 60}`, 10) < 10 ? `0${parseInt(`${seconds / 60}`, 10)}` : parseInt(`${seconds / 60}`, 10);
453
453
  seconds = seconds % 60 < 10 ? `0${seconds % 60}` : seconds % 60;
@@ -463,3 +463,14 @@ export function formatTime(secondTime:number) {
463
463
  }
464
464
  return newTime;
465
465
  }
466
+
467
+ export const isCallMessage = (message: Message): boolean => {
468
+ const payloadData = JSONStringToParse(message?.payload?.data);
469
+ if (payloadData?.businessID === 1 && payloadData?.data) {
470
+ const payloadDataData = JSONStringToParse(payloadData.data);
471
+ if (payloadDataData.businessID === 'av_call') {
472
+ return true;
473
+ }
474
+ }
475
+ return false;
476
+ };
@@ -10,7 +10,7 @@ import { MESSAGE_TYPE_NAME } from '../../constants';
10
10
  import { useTUIMessageInputContext } from '../../context/TUIMessageInputContext';
11
11
  import { Icon, IconTypes } from '../Icon';
12
12
  import { useTUIChatStateContext } from '../../context';
13
- export function InputPluginsDefalut():React.ReactElement {
13
+ export function InputPluginsDefalut(): React.ReactElement {
14
14
  const {
15
15
  sendUploadMessage,
16
16
  pluginConfig: propsPluginConfig,
@@ -20,14 +20,14 @@ export function InputPluginsDefalut():React.ReactElement {
20
20
  const { TUIMessageInputConfig } = useTUIChatStateContext('TUIMessageInput');
21
21
 
22
22
  const propPlugins = propsPluginConfig?.plugins
23
- || TUIMessageInputConfig?.pluginConfig?.plugins || [];
23
+ || TUIMessageInputConfig?.pluginConfig?.plugins || [];
24
24
  const showNumber = propsPluginConfig?.showNumber
25
- || TUIMessageInputConfig?.pluginConfig?.showNumber || 1;
25
+ || TUIMessageInputConfig?.pluginConfig?.showNumber || 1;
26
26
  const MoreIcon = propsPluginConfig?.MoreIcon || TUIMessageInputConfig?.pluginConfig?.MoreIcon;
27
27
 
28
28
  const handlePluginBoolenParams = (
29
- porpsVal?:boolean | undefined,
30
- contextVal?:boolean | undefined,
29
+ porpsVal?: boolean | undefined,
30
+ contextVal?: boolean | undefined,
31
31
  defaultVal?: boolean,
32
32
  ) => {
33
33
  if (typeof (porpsVal) === 'boolean') {
@@ -65,13 +65,13 @@ export function InputPluginsDefalut():React.ReactElement {
65
65
  const ImagePicker = isImagePicker && useUploadElement({
66
66
  children: (
67
67
  <div className="input-plugin-item">
68
- <Icon width={20} height={20} type={IconTypes.IMAGE} />
68
+ <i className="iconfont input-icon">&#xe604;</i>
69
69
  <span>{t('TUIChat.Image')}</span>
70
70
  </div>
71
71
  ),
72
72
  type: 'image',
73
73
  accept: 'image/*',
74
- onChange: (file:HTMLInputElement | File) => {
74
+ onChange: (file: HTMLInputElement | File) => {
75
75
  pluginsRef?.current?.closeMore && pluginsRef.current.closeMore();
76
76
  sendUploadMessage && sendUploadMessage({ file }, MESSAGE_TYPE_NAME.IMAGE);
77
77
  },
@@ -80,13 +80,13 @@ export function InputPluginsDefalut():React.ReactElement {
80
80
  const VideoPicker = isVideoPicker && useUploadElement({
81
81
  children: (
82
82
  <div className="input-plugin-item">
83
- <Icon width={20} height={20} type={IconTypes.VIDEO} />
83
+ <i className="iconfont input-icon">&#xe603;</i>
84
84
  <span>{t('TUIChat.Video')}</span>
85
85
  </div>
86
86
  ),
87
87
  type: 'video',
88
88
  accept: 'video/*',
89
- onChange: (file:HTMLInputElement | File) => {
89
+ onChange: (file: HTMLInputElement | File) => {
90
90
  pluginsRef?.current?.closeMore && pluginsRef.current.closeMore();
91
91
  sendUploadMessage && sendUploadMessage({ file }, MESSAGE_TYPE_NAME.VIDEO);
92
92
  },
@@ -95,20 +95,20 @@ export function InputPluginsDefalut():React.ReactElement {
95
95
  const FilePicker = isFilePicker && useUploadElement({
96
96
  children: (
97
97
  <div className="input-plugin-item">
98
- <Icon width={20} height={20} type={IconTypes.DOCUMENT} />
98
+ <i className="iconfont input-icon">&#xe602;</i>
99
99
  <span>{t('TUIChat.File')}</span>
100
100
  </div>
101
101
  ),
102
102
  type: 'file',
103
103
  accept: 'file/*',
104
- onChange: (file:HTMLInputElement | File) => {
104
+ onChange: (file: HTMLInputElement | File) => {
105
105
  pluginsRef?.current?.closeMore && pluginsRef.current.closeMore();
106
106
  sendUploadMessage && sendUploadMessage({ file }, MESSAGE_TYPE_NAME.FILE);
107
107
  },
108
108
  });
109
109
  const plugins = [
110
110
  isEmojiPicker && <EmojiPicker />, ImagePicker, VideoPicker, FilePicker, ...propPlugins,
111
- ].filter((item) => item);
111
+ ].filter(item => item);
112
112
 
113
113
  return <Plugins ref={pluginsRef} plugins={plugins} showNumber={showNumber} MoreIcon={MoreIcon} />;
114
114
  }