@tencentcloud/chat-uikit-react 2.2.4 → 2.2.6

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 (343) hide show
  1. package/.babelrc +2 -2
  2. package/.eslintrc.js +141 -31
  3. package/.lintstagedrc.json +1 -1
  4. package/.stylelintrc.js +17 -18
  5. package/CHANGELOG.md +19 -2
  6. package/README.md +8 -8
  7. package/dist/cjs/assets/fonts/iconfont.ttf +0 -0
  8. package/dist/cjs/assets/fonts/iconfont.woff +0 -0
  9. package/dist/cjs/assets/fonts/iconfont.woff2 +0 -0
  10. package/dist/cjs/components/Avatar/Avatar.d.ts +4 -4
  11. package/dist/cjs/components/Checkbox/index.d.ts +2 -2
  12. package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  13. package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
  14. package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  15. package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  16. package/dist/cjs/components/ConversationPreview/ConversationListContainer.d.ts +2 -2
  17. package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +8 -8
  18. package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
  19. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.d.ts +2 -2
  20. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  21. package/dist/cjs/components/ConversationPreview/utils.js +1 -1
  22. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.d.ts +3 -3
  23. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
  24. package/dist/cjs/components/Icon/Icon.d.ts +3 -3
  25. package/dist/cjs/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +4 -4
  26. package/dist/cjs/components/Input/Input.d.ts +4 -4
  27. package/dist/cjs/components/Model/index.d.ts +2 -2
  28. package/dist/cjs/components/Plugins/index.d.ts +4 -4
  29. package/dist/cjs/components/Popup/index.d.ts +2 -2
  30. package/dist/cjs/components/Switch/Switch.d.ts +2 -2
  31. package/dist/cjs/components/TUIChat/TUIChat.d.ts +12 -12
  32. package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
  33. package/dist/cjs/components/TUIChatHeader/TUIChatHeader.d.ts +5 -5
  34. package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +1 -1
  35. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +5 -5
  36. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  37. package/dist/cjs/components/TUIContact/TUIContact.d.ts +3 -3
  38. package/dist/cjs/components/TUIContact/TUIContact.js +1 -1
  39. package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +3 -3
  40. package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -1
  41. package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
  42. package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
  43. package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
  44. package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  45. package/dist/cjs/components/TUIContact/TUIContactInfo/groupInfo.js +1 -1
  46. package/dist/cjs/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -1
  47. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.d.ts +3 -3
  48. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  49. package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +1 -1
  50. package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +1 -1
  51. package/dist/cjs/components/TUIContactSearch/hooks/useContactSearch.js +1 -1
  52. package/dist/cjs/components/TUIConversation/TUIConversation.d.ts +2 -2
  53. package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +6 -6
  54. package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
  55. package/dist/cjs/components/TUIConversationList/hooks/useConversationUpdate.js +1 -1
  56. package/dist/cjs/components/TUIManage/TUIManage.d.ts +2 -2
  57. package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
  58. package/dist/cjs/components/TUIMessage/MessageAudio.js +1 -1
  59. package/dist/cjs/components/TUIMessage/MessageAvatar.js +1 -1
  60. package/dist/cjs/components/TUIMessage/MessageBubble.js +1 -1
  61. package/dist/cjs/components/TUIMessage/MessageContext.d.ts +2 -2
  62. package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
  63. package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
  64. package/dist/cjs/components/TUIMessage/MessageName.js +1 -1
  65. package/dist/cjs/components/TUIMessage/MessagePlugins.d.ts +4 -4
  66. package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
  67. package/dist/cjs/components/TUIMessage/MessageProgress.js +1 -1
  68. package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
  69. package/dist/cjs/components/TUIMessage/MessageStatus.js +1 -1
  70. package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
  71. package/dist/cjs/components/TUIMessage/MessageText.js +1 -1
  72. package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
  73. package/dist/cjs/components/TUIMessage/TUIMessage.d.ts +19 -19
  74. package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
  75. package/dist/cjs/components/TUIMessage/TUIMessageDefault.js +1 -1
  76. package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  77. package/dist/cjs/components/TUIMessage/hooks/useMessageReply.js +1 -1
  78. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.d.ts +2 -2
  79. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  80. package/dist/cjs/components/TUIMessageInput/InputQuoteDefalut.js +1 -1
  81. package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
  82. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.d.ts +7 -7
  83. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
  84. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.d.ts +2 -2
  85. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  86. package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  87. package/dist/cjs/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +1 -1
  88. package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  89. package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  90. package/dist/cjs/components/TUIMessageList/TUIMessageList.d.ts +2 -2
  91. package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
  92. package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  93. package/dist/cjs/components/TUIProfile/TUIProfile.d.ts +3 -3
  94. package/dist/cjs/components/TUIProfile/TUIProfile.js +1 -1
  95. package/dist/cjs/components/TUIProfile/TUIProfileDefault.d.ts +2 -2
  96. package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
  97. package/dist/cjs/components/Toast/index.d.ts +2 -2
  98. package/dist/cjs/context/ComponentContext.d.ts +12 -12
  99. package/dist/cjs/context/LanguageContext.js +1 -0
  100. package/dist/cjs/context/TUIChatActionContext.d.ts +3 -3
  101. package/dist/cjs/context/TUIChatStateContext.d.ts +5 -5
  102. package/dist/cjs/context/TUIContactContext.d.ts +4 -4
  103. package/dist/cjs/context/TUIConversationContext.js +1 -1
  104. package/dist/cjs/context/TUIMessageContext.d.ts +17 -17
  105. package/dist/cjs/context/TUIMessageInputContext.d.ts +4 -4
  106. package/dist/cjs/context/ThemeContext.js +1 -0
  107. package/dist/cjs/context/UIKitContext.d.ts +25 -0
  108. package/dist/cjs/context/UIKitContext.js +1 -0
  109. package/dist/cjs/context/UIManagerContext.d.ts +46 -0
  110. package/dist/cjs/context/UIManagerContext.js +1 -0
  111. package/dist/cjs/hooks/useConversation.d.ts +2 -2
  112. package/dist/cjs/index.css +1 -1
  113. package/dist/cjs/index.d.css +984 -1039
  114. package/dist/cjs/index.d.ts +2 -4
  115. package/dist/cjs/index.js +1 -1
  116. package/dist/cjs/locales/en-US/TUIGlobal.js +1 -0
  117. package/dist/cjs/locales/en-US/index.js +1 -1
  118. package/dist/cjs/locales/ja-JP/TUIGlobal.js +1 -0
  119. package/dist/cjs/locales/ja-JP/index.js +1 -1
  120. package/dist/cjs/locales/ko-KR/TUIGlobal.js +1 -0
  121. package/dist/cjs/locales/ko-KR/index.js +1 -1
  122. package/dist/cjs/locales/zh-CN/TUIGlobal.js +1 -0
  123. package/dist/cjs/locales/zh-CN/index.js +1 -1
  124. package/dist/esm/assets/fonts/iconfont.ttf +0 -0
  125. package/dist/esm/assets/fonts/iconfont.woff +0 -0
  126. package/dist/esm/assets/fonts/iconfont.woff2 +0 -0
  127. package/dist/esm/components/Avatar/Avatar.d.ts +4 -4
  128. package/dist/esm/components/Checkbox/index.d.ts +2 -2
  129. package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  130. package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
  131. package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  132. package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  133. package/dist/esm/components/ConversationPreview/ConversationListContainer.d.ts +2 -2
  134. package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +8 -8
  135. package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
  136. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.d.ts +2 -2
  137. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  138. package/dist/esm/components/ConversationPreview/utils.js +1 -1
  139. package/dist/esm/components/ConversationSearch/ConversationSearchResult.d.ts +3 -3
  140. package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
  141. package/dist/esm/components/Icon/Icon.d.ts +3 -3
  142. package/dist/esm/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +4 -4
  143. package/dist/esm/components/Input/Input.d.ts +4 -4
  144. package/dist/esm/components/Model/index.d.ts +2 -2
  145. package/dist/esm/components/Plugins/index.d.ts +4 -4
  146. package/dist/esm/components/Popup/index.d.ts +2 -2
  147. package/dist/esm/components/Switch/Switch.d.ts +2 -2
  148. package/dist/esm/components/TUIChat/TUIChat.d.ts +12 -12
  149. package/dist/esm/components/TUIChat/TUIChat.js +1 -1
  150. package/dist/esm/components/TUIChatHeader/TUIChatHeader.d.ts +5 -5
  151. package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +1 -1
  152. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +5 -5
  153. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  154. package/dist/esm/components/TUIContact/TUIContact.d.ts +3 -3
  155. package/dist/esm/components/TUIContact/TUIContact.js +1 -1
  156. package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +3 -3
  157. package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -1
  158. package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
  159. package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
  160. package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
  161. package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  162. package/dist/esm/components/TUIContact/TUIContactInfo/groupInfo.js +1 -1
  163. package/dist/esm/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -1
  164. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.d.ts +3 -3
  165. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  166. package/dist/esm/components/TUIContact/hooks/useTUIContact.js +1 -1
  167. package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +1 -1
  168. package/dist/esm/components/TUIContactSearch/hooks/useContactSearch.js +1 -1
  169. package/dist/esm/components/TUIConversation/TUIConversation.d.ts +2 -2
  170. package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +6 -6
  171. package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
  172. package/dist/esm/components/TUIConversationList/hooks/useConversationUpdate.js +1 -1
  173. package/dist/esm/components/TUIManage/TUIManage.d.ts +2 -2
  174. package/dist/esm/components/TUIManage/TUIManage.js +1 -1
  175. package/dist/esm/components/TUIMessage/MessageAudio.js +1 -1
  176. package/dist/esm/components/TUIMessage/MessageAvatar.js +1 -1
  177. package/dist/esm/components/TUIMessage/MessageBubble.js +1 -1
  178. package/dist/esm/components/TUIMessage/MessageContext.d.ts +2 -2
  179. package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
  180. package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
  181. package/dist/esm/components/TUIMessage/MessageName.js +1 -1
  182. package/dist/esm/components/TUIMessage/MessagePlugins.d.ts +4 -4
  183. package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
  184. package/dist/esm/components/TUIMessage/MessageProgress.js +1 -1
  185. package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
  186. package/dist/esm/components/TUIMessage/MessageStatus.js +1 -1
  187. package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
  188. package/dist/esm/components/TUIMessage/MessageText.js +1 -1
  189. package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
  190. package/dist/esm/components/TUIMessage/TUIMessage.d.ts +19 -19
  191. package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
  192. package/dist/esm/components/TUIMessage/TUIMessageDefault.js +1 -1
  193. package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  194. package/dist/esm/components/TUIMessage/hooks/useMessageReply.js +1 -1
  195. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.d.ts +2 -2
  196. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  197. package/dist/esm/components/TUIMessageInput/InputQuoteDefalut.js +1 -1
  198. package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
  199. package/dist/esm/components/TUIMessageInput/TUIMessageInput.d.ts +7 -7
  200. package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
  201. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.d.ts +2 -2
  202. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  203. package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  204. package/dist/esm/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +1 -1
  205. package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  206. package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  207. package/dist/esm/components/TUIMessageList/TUIMessageList.d.ts +2 -2
  208. package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
  209. package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  210. package/dist/esm/components/TUIProfile/TUIProfile.d.ts +3 -3
  211. package/dist/esm/components/TUIProfile/TUIProfile.js +1 -1
  212. package/dist/esm/components/TUIProfile/TUIProfileDefault.d.ts +2 -2
  213. package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
  214. package/dist/esm/components/Toast/index.d.ts +2 -2
  215. package/dist/esm/context/ComponentContext.d.ts +12 -12
  216. package/dist/esm/context/LanguageContext.js +1 -0
  217. package/dist/esm/context/TUIChatActionContext.d.ts +3 -3
  218. package/dist/esm/context/TUIChatStateContext.d.ts +5 -5
  219. package/dist/esm/context/TUIContactContext.d.ts +4 -4
  220. package/dist/esm/context/TUIConversationContext.js +1 -1
  221. package/dist/esm/context/TUIMessageContext.d.ts +17 -17
  222. package/dist/esm/context/TUIMessageInputContext.d.ts +4 -4
  223. package/dist/esm/context/ThemeContext.js +1 -0
  224. package/dist/esm/context/UIKitContext.d.ts +25 -0
  225. package/dist/esm/context/UIKitContext.js +1 -0
  226. package/dist/esm/context/UIManagerContext.d.ts +46 -0
  227. package/dist/esm/context/UIManagerContext.js +1 -0
  228. package/dist/esm/hooks/useConversation.d.ts +2 -2
  229. package/dist/esm/index.css +1 -1
  230. package/dist/esm/index.d.css +984 -1039
  231. package/dist/esm/index.d.ts +2 -4
  232. package/dist/esm/index.js +1 -1
  233. package/dist/esm/locales/en-US/TUIGlobal.js +1 -0
  234. package/dist/esm/locales/en-US/index.js +1 -1
  235. package/dist/esm/locales/ja-JP/TUIGlobal.js +1 -0
  236. package/dist/esm/locales/ja-JP/index.js +1 -1
  237. package/dist/esm/locales/ko-KR/TUIGlobal.js +1 -0
  238. package/dist/esm/locales/ko-KR/index.js +1 -1
  239. package/dist/esm/locales/zh-CN/TUIGlobal.js +1 -0
  240. package/dist/esm/locales/zh-CN/index.js +1 -1
  241. package/package.json +9 -7
  242. package/rollup.config.js +13 -2
  243. package/src/assets/fonts/iconfont.ttf +0 -0
  244. package/src/assets/fonts/iconfont.woff +0 -0
  245. package/src/assets/fonts/iconfont.woff2 +0 -0
  246. package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +4 -4
  247. package/src/components/ConversationCreate/ConversationCreate.tsx +2 -2
  248. package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +3 -2
  249. package/src/components/ConversationCreate/styles/ConversationCreatGroupDetail.scss +16 -7
  250. package/src/components/ConversationCreate/styles/index.scss +23 -13
  251. package/src/components/ConversationPreview/ConversationPreview.tsx +21 -21
  252. package/src/components/ConversationPreview/ConversationPreviewContent.tsx +4 -4
  253. package/src/components/ConversationPreview/styles/index.scss +44 -14
  254. package/src/components/ConversationPreview/utils.tsx +36 -28
  255. package/src/components/Input/styles/index.scss +7 -5
  256. package/src/components/Model/styles/layout.scss +3 -3
  257. package/src/components/Plugins/styles/color.scss +17 -3
  258. package/src/components/Popup/styles/layout.scss +2 -1
  259. package/src/components/TUIChat/TUIChat.tsx +4 -3
  260. package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +3 -3
  261. package/src/components/TUIChatHeader/styles/layout.scss +13 -2
  262. package/src/components/TUIContact/TUIContact.tsx +2 -2
  263. package/src/components/TUIContact/TUIContactInfo/TUIContactInfo.tsx +2 -2
  264. package/src/components/TUIContact/TUIContactInfo/basicInfo.tsx +2 -2
  265. package/src/components/TUIContact/TUIContactInfo/blockInfo.tsx +2 -2
  266. package/src/components/TUIContact/TUIContactInfo/friendApplication.tsx +2 -2
  267. package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +4 -3
  268. package/src/components/TUIContact/TUIContactInfo/groupInfo.tsx +3 -3
  269. package/src/components/TUIContact/TUIContactInfo/hooks/useContactInfo.tsx +2 -2
  270. package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +5 -5
  271. package/src/components/TUIContact/hooks/useTUIContact.tsx +2 -2
  272. package/src/components/TUIContactSearch/TUIContactSearch.tsx +2 -2
  273. package/src/components/TUIContactSearch/hooks/useContactSearch.tsx +2 -2
  274. package/src/components/TUIConversationList/TUIConversationList.tsx +3 -4
  275. package/src/components/TUIConversationList/hooks/useConversationUpdate.tsx +2 -2
  276. package/src/components/TUIConversationList/index.scss +25 -7
  277. package/src/components/TUIManage/TUIManage.tsx +3 -3
  278. package/src/components/TUIManage/styles/index.scss +16 -6
  279. package/src/components/TUIMessage/MessageStatus.tsx +2 -2
  280. package/src/components/TUIMessage/MessageText.tsx +16 -15
  281. package/src/components/TUIMessage/hooks/useMessageHandler.ts +2 -2
  282. package/src/components/TUIMessage/hooks/useMessageReply.ts +2 -2
  283. package/src/components/TUIMessage/styles/color.scss +20 -9
  284. package/src/components/TUIMessage/styles/layout.scss +44 -11
  285. package/src/components/TUIMessageInput/TUIMessageInput.tsx +1 -1
  286. package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +2 -2
  287. package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +2 -2
  288. package/src/components/TUIMessageInput/styles/color.scss +25 -6
  289. package/src/components/TUIMessageInput/styles/layout.scss +58 -16
  290. package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +2 -2
  291. package/src/components/TUIMessageList/styles/layout.scss +16 -2
  292. package/src/components/TUIProfile/TUIProfile.tsx +3 -3
  293. package/src/components/TUIProfile/TUIProfileDefault.tsx +2 -2
  294. package/src/components/TUIProfile/styles/layout.scss +33 -16
  295. package/src/components/index.ts +0 -1
  296. package/src/context/LanguageContext.tsx +59 -0
  297. package/src/context/ThemeContext.tsx +61 -0
  298. package/src/context/UIKitContext.tsx +67 -0
  299. package/src/context/UIManagerContext.tsx +163 -0
  300. package/src/context/index.ts +3 -2
  301. package/src/locales/en-US/index.ts +1 -1
  302. package/src/locales/ja-JP/index.ts +2 -0
  303. package/src/locales/ko-KR/TUIGlobal.ts +2 -2
  304. package/src/locales/ko-KR/index.ts +2 -0
  305. package/src/locales/zh-CN/index.ts +2 -2
  306. package/src/styles/colors/_color-dark.scss +35 -0
  307. package/src/styles/colors/_color-light.scss +35 -0
  308. package/src/styles/colors/_color-theme.scss +54 -0
  309. package/src/styles/fonts/icon-font.scss +18 -0
  310. package/src/styles/index.scss +4 -0
  311. package/src/styles/normalize.scss +355 -0
  312. package/dist/cjs/components/Icon/images/chats-selected.svg.js +0 -1
  313. package/dist/cjs/components/Icon/images/chats.svg.js +0 -1
  314. package/dist/cjs/components/Icon/images/contacts-selected.svg.js +0 -1
  315. package/dist/cjs/components/Icon/images/contacts.svg.js +0 -1
  316. package/dist/cjs/components/TUIKit/TUIKit.d.ts +0 -12
  317. package/dist/cjs/components/TUIKit/TUIKit.js +0 -1
  318. package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +0 -21
  319. package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.js +0 -1
  320. package/dist/cjs/components/TUIKit/hooks/useTUIKit.d.ts +0 -43
  321. package/dist/cjs/components/TUIKit/hooks/useTUIKit.js +0 -1
  322. package/dist/cjs/context/TUIKitContext.d.ts +0 -25
  323. package/dist/cjs/context/TUIKitContext.js +0 -1
  324. package/dist/esm/components/Icon/images/chats-selected.svg.js +0 -1
  325. package/dist/esm/components/Icon/images/chats.svg.js +0 -1
  326. package/dist/esm/components/Icon/images/contacts-selected.svg.js +0 -1
  327. package/dist/esm/components/Icon/images/contacts.svg.js +0 -1
  328. package/dist/esm/components/TUIKit/TUIKit.d.ts +0 -12
  329. package/dist/esm/components/TUIKit/TUIKit.js +0 -1
  330. package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +0 -21
  331. package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.js +0 -1
  332. package/dist/esm/components/TUIKit/hooks/useTUIKit.d.ts +0 -43
  333. package/dist/esm/components/TUIKit/hooks/useTUIKit.js +0 -1
  334. package/dist/esm/context/TUIKitContext.d.ts +0 -25
  335. package/dist/esm/context/TUIKitContext.js +0 -1
  336. package/src/components/TUIKit/TUIKit.tsx +0 -228
  337. package/src/components/TUIKit/hooks/useCreateTUIKitContext.tsx +0 -48
  338. package/src/components/TUIKit/hooks/useTUIKit.tsx +0 -99
  339. package/src/components/TUIKit/index.ts +0 -3
  340. package/src/components/TUIKit/styles/h5.scss +0 -34
  341. package/src/components/TUIKit/styles/index.scss +0 -112
  342. package/src/components/TUIKit/styles/reset.scss +0 -67
  343. package/src/context/TUIKitContext.tsx +0 -39
@@ -1,4 +1,5 @@
1
- $font-color: #7A7A7A;
1
+ @use "../../../styles/colors/color-theme" as *;
2
+
2
3
  .conversation-list-container {
3
4
  overflow-x: hidden;
4
5
  height: 100%;
@@ -7,7 +8,6 @@ $font-color: #7A7A7A;
7
8
  .conversation-preview-container {
8
9
  display: flex;
9
10
  align-items: center;
10
- background-color: #FFFFFF;
11
11
  border: none;
12
12
  width: 100%;
13
13
  height: 64px;
@@ -15,6 +15,10 @@ $font-color: #7A7A7A;
15
15
  line-height: 17px;
16
16
  padding: 0 20px;
17
17
 
18
+ @include theme() {
19
+ background-color: get(bg-primary);
20
+ }
21
+
18
22
  .content {
19
23
  flex: 1 1 auto;
20
24
  text-align: left;
@@ -29,20 +33,26 @@ $font-color: #7A7A7A;
29
33
  font-family: PingFangSC-Medium;
30
34
  padding: 1px 0;
31
35
  width: 100%;
32
- color: #000;
36
+
37
+ @include theme() {
38
+ color: get(text-primary);
39
+ }
33
40
  }
34
41
 
35
42
  .message {
36
43
  overflow: hidden;
37
44
  text-overflow: ellipsis;
38
45
  white-space: nowrap;
39
- color: $font-color;
40
46
  font-family: PingFangSC-Medium;
41
47
  font-style: normal;
42
48
  font-weight: 400;
43
49
  font-size: 12px;
44
50
  line-height: 14px;
45
51
  padding: 1px 0;
52
+
53
+ @include theme() {
54
+ color: get(text-secondary);
55
+ }
46
56
  }
47
57
  }
48
58
 
@@ -58,13 +68,16 @@ $font-color: #7A7A7A;
58
68
  }
59
69
 
60
70
  .time {
61
- color: $font-color;
62
71
  font-family: PingFangSC-Medium;
63
72
  font-style: normal;
64
73
  font-weight: 400;
65
74
  font-size: 12px;
66
75
  line-height: 14px;
67
76
  padding: 1px 0;
77
+
78
+ @include theme() {
79
+ color: get(text-secondary);
80
+ }
68
81
  }
69
82
 
70
83
  .more--hover {
@@ -96,10 +109,16 @@ $font-color: #7A7A7A;
96
109
  font-weight: 500;
97
110
  box-sizing: border-box;
98
111
 
112
+ &.delete {
113
+ @include theme() {
114
+ color: get(status-danger);
115
+ }
116
+ }
117
+
99
118
  &:hover {
100
- background: #147AFF;
101
- opacity: 0.6;
102
- color: #FFFFFF !important;
119
+ @include theme() {
120
+ background-color: get(bg-active);
121
+ }
103
122
  }
104
123
  }
105
124
  }
@@ -107,18 +126,26 @@ $font-color: #7A7A7A;
107
126
  }
108
127
 
109
128
  &:hover {
110
- background-color: rgba(0, 110, 255, 0.1);
129
+ @include theme() {
130
+ background-color: get(bg-active);
131
+ }
111
132
  }
112
133
 
113
134
  &.conversation-preview-content--pin {
114
- background-color: #F2F2F2D4;
135
+ @include theme() {
136
+ background-color: get(bg-secondary);
137
+ }
115
138
  }
116
139
 
117
140
  &.conversation-preview-content--active {
118
- background-color: rgba(0, 110, 255, 0.1);
141
+ @include theme() {
142
+ background-color: get(bg-active);
143
+ }
119
144
 
120
145
  .title {
121
- color: rgb(20, 122, 255);
146
+ @include theme() {
147
+ color: get(status-info);
148
+ }
122
149
  }
123
150
  }
124
151
 
@@ -126,16 +153,19 @@ $font-color: #7A7A7A;
126
153
  .unread {
127
154
  width: 16px;
128
155
  height: 13px;
129
- background: #FF3742;
130
156
  border-radius: 16px;
131
157
  display: flex;
132
158
  justify-content: center;
133
159
  align-items: center;
134
160
  padding: 2px 5px 1px;
135
- color: #FFFFFF;
136
161
  font-size: 11px;
137
162
  font-weight: 700;
138
163
  margin: 2px 0 2px auto;
164
+ color: #fff;
165
+
166
+ @include theme() {
167
+ background-color: get(status-danger);
168
+ }
139
169
  }
140
170
  }
141
171
  }
@@ -1,10 +1,29 @@
1
1
  import React from 'react';
2
- import { useTranslation } from 'react-i18next';
3
2
  import TencentCloudChat, { Conversation, Group, Profile } from '@tencentcloud/chat';
4
3
  import { defaultGroupAvatarWork, defaultUserAvatar } from '../Avatar';
5
4
  import { formatEmojiString } from '../TUIMessage/utils/emojiMap';
6
5
  import { getTimeStamp } from '../untils';
7
6
 
7
+ interface TProfile extends Profile, Group {}
8
+ export const getMessageProfile = (conversation: Conversation): TProfile => {
9
+ // eslint-disable-next-line
10
+ // @ts-ignore
11
+ if (!conversation) return null;
12
+ let result = {};
13
+ const { type, groupProfile, userProfile } = conversation;
14
+ switch (type) {
15
+ case TencentCloudChat.TYPES.CONV_C2C:
16
+ result = userProfile;
17
+ break;
18
+ case TencentCloudChat.TYPES.CONV_GROUP:
19
+ result = groupProfile;
20
+ break;
21
+ case TencentCloudChat.TYPES.CONV_SYSTEM:
22
+ default:
23
+ }
24
+ return result as TProfile;
25
+ };
26
+
8
27
  export const getDisplayTitle = (
9
28
  conversation: Conversation,
10
29
  searchValue?: string,
@@ -25,15 +44,22 @@ export const getDisplayTitle = (
25
44
  default:
26
45
  title = '';
27
46
  }
28
- const handleTitle = (str:string) => {
47
+ const handleTitle = (str: string) => {
29
48
  const tempStr = str.toLocaleLowerCase();
30
49
  const pos = searchValue && tempStr.indexOf(searchValue.toLocaleLowerCase());
31
- if (pos === '') return <></>
50
+ const titleList = str.split(new RegExp(`(${searchValue})`, 'gi'));
51
+ if (pos === '') return <></>;
32
52
  return (
33
53
  <div>
34
- <span>{str.slice(0, pos)}</span>
35
- <span style={{ color: highlightColor }}>{pos && str.slice(pos, pos + searchValue.length)}</span>
36
- <span>{pos && str.slice(pos + searchValue.length)}</span>
54
+ {searchValue && titleList.map((textItem: string, index: number) =>
55
+ (textItem.toLowerCase() === searchValue.toLowerCase())
56
+ ? (
57
+ <span key={index} style={{ color: highlightColor }}>{textItem}</span>
58
+ ) : (
59
+ <span key={index}>{textItem}</span>
60
+ ),
61
+ )}
62
+ ;
37
63
  </div>
38
64
  );
39
65
  };
@@ -58,9 +84,9 @@ export const getDisplayImage = (conversation: Conversation) => {
58
84
  return displayImage;
59
85
  };
60
86
  export const getDisplayMessage = (
61
- conversation:Conversation,
62
- myProfile:Profile,
63
- language?:string,
87
+ conversation: Conversation,
88
+ myProfile: Profile,
89
+ language?: string,
64
90
  ) => {
65
91
  const { lastMessage, type } = conversation;
66
92
  const {
@@ -93,25 +119,7 @@ export const getDisplayMessage = (
93
119
  </div>
94
120
  );
95
121
  };
96
- interface TProfile extends Profile, Group {}
97
- export const getMessageProfile = (conversation: Conversation):TProfile => {
98
- // eslint-disable-next-line
99
- // @ts-ignore
100
- if (!conversation) return null;
101
- let result = {};
102
- const { type, groupProfile, userProfile } = conversation;
103
- switch (type) {
104
- case TencentCloudChat.TYPES.CONV_C2C:
105
- result = userProfile;
106
- break;
107
- case TencentCloudChat.TYPES.CONV_GROUP:
108
- result = groupProfile;
109
- break;
110
- case TencentCloudChat.TYPES.CONV_SYSTEM:
111
- default:
112
- }
113
- return result as TProfile;
114
- };
122
+
115
123
  export const getDisplayTime = (conversation: Conversation, language: string) => {
116
124
  const { lastMessage } = conversation;
117
125
  return getTimeStamp(lastMessage.lastTime * 1000, language);
@@ -3,20 +3,22 @@
3
3
  display: flex;
4
4
  align-items: center;
5
5
  border-radius: 10px;
6
- background: rgba(249, 249, 249, 0.94);
6
+ background: rgba(249, 249, 249, 94%);
7
7
  padding: 0 8px;
8
8
  height: 36px;
9
9
  box-sizing: border-box;
10
10
 
11
11
  &.tui-kit-input-box--focus {
12
- outline: 1px solid #147AFF;
12
+ outline: 1px solid #147aff;
13
13
  }
14
+
14
15
  &.tui-kit-input-border--bottom {
15
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
16
+ border-bottom: 1px solid rgba(0, 0, 0, 10%);
16
17
  background-color: #fff;
17
18
  outline: none;
18
19
  border-radius: 0;
19
20
  }
21
+
20
22
  .tui-kit-input {
21
23
  margin-left: 6px;
22
24
  margin-right: auto;
@@ -28,6 +30,7 @@
28
30
  border-radius: 10px;
29
31
  border: none;
30
32
  box-sizing: border-box;
33
+ font-size: 14px;
31
34
 
32
35
  &:focus {
33
36
  border: none;
@@ -36,9 +39,8 @@
36
39
 
37
40
  &::placeholder {
38
41
  font-weight: 400;
39
- color: rgba(67, 60, 63, 0.6);
42
+ color: rgba(67, 60, 63, 60%);
40
43
  padding: 2px 0;
41
44
  }
42
45
  }
43
-
44
46
  }
@@ -1,7 +1,7 @@
1
1
  .model {
2
- background: rgba(#000000, 0.5);
2
+ background: rgba(#000, 0.5);
3
3
  position: fixed;
4
- z-index: 2;
4
+ z-index: 5;
5
5
  width: 100vw;
6
6
  top: 0;
7
7
  left: 0;
@@ -9,4 +9,4 @@
9
9
  display: flex;
10
10
  justify-content: center;
11
11
  align-items: center;
12
- }
12
+ }
@@ -1,7 +1,21 @@
1
+ @use "../../../styles/colors/color-theme" as *;
2
+
1
3
  .plugin-popup {
2
4
  &-box {
3
- background: #FFFFFF;
4
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
5
5
  border-radius: 16px;
6
+
7
+ @include theme() {
8
+ color: get(text-primary);
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);
19
+ }
6
20
  }
7
- }
21
+ }
@@ -1,6 +1,7 @@
1
1
  .popup {
2
2
  opacity: 0;
3
+
3
4
  &-show {
4
5
  opacity: 1;
5
6
  }
6
- }
7
+ }
@@ -10,7 +10,7 @@ import TUIChatEngine, {
10
10
  StoreName,
11
11
  } from '@tencentcloud/chat-uikit-engine';
12
12
  import { JSONStringToParse } from '../untils';
13
- import { useTUIKitContext } from '../../context/TUIKitContext';
13
+ import { useUIKit, useUIManager } from '../../context';
14
14
  import { TUIChatStateContextProvider } from '../../context/TUIChatStateContext';
15
15
  import { TUIChatActionProvider } from '../../context/TUIChatActionContext';
16
16
  import { ComponentProvider, UnknowPorps } from '../../context/ComponentContext';
@@ -79,7 +79,8 @@ function UnMemoizedTUIChat <T extends TUIChatProps>(
79
79
  EmptyPlaceholder = <EmptyStateIndicator listType="chat" />,
80
80
  } = props;
81
81
 
82
- const { conversation: contextConversation, chat } = useTUIKitContext('TUIChat');
82
+ const { chat } = useUIKit();
83
+ const { conversation: contextConversation } = useUIManager('TUIChat');
83
84
 
84
85
  const conversation = propsConversation || contextConversation;
85
86
 
@@ -162,7 +163,7 @@ function TUIChatInner <T extends TUIChatInnerProps>(
162
163
  setHighlightedMessageId,
163
164
  setActiveMessageID,
164
165
  } = useHandleMessage({
165
- // eslint-disable-next-line
166
+ // eslint-disable-next-line
166
167
  // @ts-ignore
167
168
  state,
168
169
  dispatch,
@@ -6,7 +6,7 @@ import { handleDisplayAvatar } from '../untils';
6
6
  import { isH5 } from '../../utils/env';
7
7
  import './styles/index.scss';
8
8
  import { Icon, IconTypes } from '../Icon';
9
- import { useTUIKitContext } from '../../context';
9
+ import { useUIManager } from '../../context';
10
10
 
11
11
  export interface TUIChatHeaderDefaultProps {
12
12
  title?: string,
@@ -32,7 +32,7 @@ function TUIChatHeaderDefaultWithContext <T extends TUIChatHeaderBasicProps>(
32
32
  isLive,
33
33
  opateIcon,
34
34
  } = props;
35
- const { setActiveContact } = useTUIKitContext('TUIContact');
35
+ const { setActiveContact } = useUIManager('TUIContact');
36
36
  const [title, setTitle] = useState(propTitle);
37
37
  const [avatar, setAvatar] = useState<React.ReactElement | string>('');
38
38
 
@@ -82,7 +82,7 @@ function TUIChatHeaderDefaultWithContext <T extends TUIChatHeaderBasicProps>(
82
82
  TUIConversationService.switchConversation('');
83
83
  setActiveContact();
84
84
  };
85
- const { setTUIManageShow } = useTUIKitContext();
85
+ const { setTUIManageShow } = useUIManager();
86
86
  const openTUIManage = () => {
87
87
  setTUIManageShow && setTUIManageShow(true);
88
88
  };
@@ -1,9 +1,16 @@
1
+ @use "../../../styles/colors/color-theme" as *;
2
+
1
3
  .tui-chat-header {
2
4
  padding: 16px 20px;
3
5
  display: flex;
4
6
  flex-direction: row;
5
7
  justify-content: space-between;
6
8
  align-items: center;
9
+
10
+ @include theme() {
11
+ background-color: get(bg-primary);
12
+ }
13
+
7
14
  &-left {
8
15
  display: flex;
9
16
  align-items: center;
@@ -24,7 +31,11 @@
24
31
  font-style: normal;
25
32
  font-weight: 700;
26
33
  font-size: 14px;
27
- line-height: 17px;
34
+
35
+ @include theme() {
36
+ color: get(text-primary);
37
+ }
38
+
28
39
  }
29
40
  .system {
30
41
  height: 32px;
@@ -33,4 +44,4 @@
33
44
 
34
45
  .tui-chat-live-header {
35
46
 
36
- }
47
+ }
@@ -5,7 +5,7 @@ import {
5
5
  TUIContactContextValue,
6
6
  } from '../../context/TUIContactContext';
7
7
  import { isH5 } from '../../utils/env';
8
- import { useTUIKitContext } from '../../context';
8
+ import { useUIManager } from '../../context';
9
9
  import useTUIContact from './hooks/useTUIContact';
10
10
  import { TUIContactList } from './TUIContactList/TUIContactList';
11
11
  import { TUIContactSearch } from '../TUIContactSearch/TUIContactSearch';
@@ -17,7 +17,7 @@ export function UnMemoizedTUIContact<T>(
17
17
  ): React.ReactElement {
18
18
  const { children } = props;
19
19
  const { t } = useTranslation();
20
- const { setActiveContact } = useTUIKitContext('TUIContact');
20
+ const { setActiveContact } = useUIManager('TUIContact');
21
21
  const [isShowAddFriend, setShowAddFriend] = useState(false);
22
22
  const addFriend = () => {
23
23
  setActiveContact();
@@ -1,7 +1,7 @@
1
1
  import React, {
2
2
  PropsWithChildren,
3
3
  } from 'react';
4
- import { useTUIKitContext } from '../../../context';
4
+ import { useUIManager } from '../../../context';
5
5
  import { isH5 } from '../../../utils/env';
6
6
  import { FriendInfo } from './friendInfo';
7
7
  import { BlockInfo } from './blockInfo';
@@ -18,7 +18,7 @@ export function UnMemoizedTUIContactInfo<T extends TUIContactInfoProps>(
18
18
  props: PropsWithChildren<T>,
19
19
  ): React.ReactElement {
20
20
  const { showChats } = props;
21
- const { contactData } = useTUIKitContext('TUIContact');
21
+ const { contactData } = useUIManager('TUIContact');
22
22
  if (!contactData?.type) {
23
23
  return (<> </>);
24
24
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Profile } from '@tencentcloud/chat';
4
4
  import { TUIConversationService } from '@tencentcloud/chat-uikit-engine';
5
- import { useTUIKitContext } from '../../../context';
5
+ import { useUIManager } from '../../../context';
6
6
  import { Icon, IconTypes } from '../../Icon';
7
7
  import { isH5 } from '../../../utils/env';
8
8
 
@@ -19,7 +19,7 @@ export function UnMemoizedBasicInfo<T extends Props>(
19
19
  const {
20
20
  userID, nick, selfSignature, avatar,
21
21
  } = profile;
22
- const { setActiveContact } = useTUIKitContext('TUIContact');
22
+ const { setActiveContact } = useUIManager('TUIContact');
23
23
  const back = () => {
24
24
  TUIConversationService.switchConversation('');
25
25
  setActiveContact();
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Profile } from '@tencentcloud/chat';
4
- import { useTUIKitContext } from '../../../context';
4
+ import { useUIManager } from '../../../context';
5
5
  import { BasicInfo } from './basicInfo';
6
6
  import { Switch } from '../../Switch';
7
7
  import useContactInfo from './hooks/useContactInfo';
@@ -13,7 +13,7 @@ export function UnMemoizedBlockInfo<T extends Props>(
13
13
  props: T,
14
14
  ): React.ReactElement {
15
15
  const { profile } = props;
16
- const { contactData, setActiveContact } = useTUIKitContext('TUIContact');
16
+ const { contactData, setActiveContact } = useUIManager('TUIContact');
17
17
  const { t } = useTranslation();
18
18
  const [isAddToBlocklist, setIsAddToBlocklist] = useState(false);
19
19
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import TencentCloudChat, { FriendApplication } from '@tencentcloud/chat';
4
- import { useTUIKitContext } from '../../../context';
4
+ import { useUIManager } from '../../../context';
5
5
  import { Avatar, defaultUserAvatar } from '../../Avatar';
6
6
  import useContactInfo from './hooks/useContactInfo';
7
7
 
@@ -11,7 +11,7 @@ interface Props {
11
11
  export function UnMemoizedFriendApplication<T extends Props>(
12
12
  props: T,
13
13
  ): React.ReactElement {
14
- const { setActiveContact } = useTUIKitContext('TUIContact');
14
+ const { setActiveContact } = useUIManager('TUIContact');
15
15
  const { t } = useTranslation();
16
16
  const { application } = props;
17
17
  const {
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Friend } from '@tencentcloud/chat';
4
4
  import { TUIConversationService, IConversationModel } from '@tencentcloud/chat-uikit-engine';
5
- import { useTUIKitContext } from '../../../context';
5
+ import { useUIKit, useUIManager } from '../../../context';
6
6
  import { BasicInfo } from './basicInfo';
7
7
  import { Switch } from '../../Switch';
8
8
  import useContactInfo from './hooks/useContactInfo';
@@ -16,9 +16,10 @@ interface Props {
16
16
  export function UnMemoizedFriendInfo<T extends Props>(
17
17
  props: T,
18
18
  ): React.ReactElement {
19
+ const { chat } = useUIKit();
19
20
  const {
20
- chat, contactData, setActiveContact, setActiveConversation,
21
- } = useTUIKitContext('TUIContact');
21
+ contactData, setActiveContact, setActiveConversation,
22
+ } = useUIManager('TUIContact');
22
23
  const { t } = useTranslation();
23
24
  const { friend, showChats } = props;
24
25
  const { userID, profile, remark } = friend;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { TUIConversationService, IGroupModel, IConversationModel } from '@tencentcloud/chat-uikit-engine';
4
- import { useTUIKitContext } from '../../../context';
4
+ import { useUIManager } from '../../../context';
5
5
  import { Icon, IconTypes } from '../../Icon';
6
6
  import { isH5 } from '../../../utils/env';
7
7
  import '../index.scss';
@@ -16,8 +16,8 @@ export function UnMemoizedGroupInfo<T extends Props>(
16
16
  props: T,
17
17
  ): React.ReactElement {
18
18
  const { group, showChats } = props;
19
-
20
- const { setActiveContact, setActiveConversation } = useTUIKitContext('TUIContact');
19
+
20
+ const { setActiveContact, setActiveConversation } = useUIManager('TUIContact');
21
21
  const { t } = useTranslation();
22
22
  const { groupID, name, avatar } = group;
23
23
 
@@ -1,10 +1,10 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import TencentCloudChat from '@tencentcloud/chat';
3
3
  import { Toast } from '../../../Toast';
4
- import { useTUIKitContext } from '../../../../context';
4
+ import { useUIKit } from '../../../../context';
5
5
 
6
6
  function useContactInfo() {
7
- const { chat } = useTUIKitContext('useContactInfo');
7
+ const { chat } = useUIKit('useContactInfo');
8
8
 
9
9
  const removeFromBlocklist = useCallback((userID: string) => {
10
10
  chat.removeFromBlacklist({
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import TencentCloudChat from '@tencentcloud/chat';
4
4
  import { isH5 } from '../../../utils/env';
5
- import { useTUIKitContext, useTUIContactContext } from '../../../context';
5
+ import { useUIManager, useTUIContactContext } from '../../../context';
6
6
  import useContactInfo from '../TUIContactInfo/hooks/useContactInfo';
7
7
  import useTUIContact from '../hooks/useTUIContact';
8
8
  import { Avatar, defaultUserAvatar } from '../../Avatar';
@@ -19,7 +19,7 @@ interface RenderContactListProps {
19
19
  }
20
20
 
21
21
  function UnMemoizedTUIContactList<T>(): React.ReactElement {
22
- const { setActiveContact } = useTUIKitContext();
22
+ const { setActiveContact } = useUIManager();
23
23
  const { t } = useTranslation();
24
24
  const {
25
25
  isShowContactList, friendList, blocklistProfile, friendApplicationList,
@@ -143,21 +143,21 @@ const RenderContactList = ({ type, isShow, setShow, list, title } : RenderContac
143
143
  </div>
144
144
  );
145
145
  })}
146
- <RenderContactList
146
+ <RenderContactList
147
147
  type={'block'}
148
148
  title={t('TUIContact.Blocked List')}
149
149
  isShow={isShowBlocklist}
150
150
  setShow={setShowBlocklist}
151
151
  list={blocklistProfile}
152
152
  />
153
- <RenderContactList
153
+ <RenderContactList
154
154
  type={'group'}
155
155
  title={t('TUIContact.Group List')}
156
156
  setShow={setShowGrouplist}
157
157
  isShow={isShowGrouplist}
158
158
  list={groupList}
159
159
  />
160
- <RenderContactList
160
+ <RenderContactList
161
161
  type={'friend'}
162
162
  title={t('TUIContact.Friends')}
163
163
  setShow={setShowFriends}
@@ -5,10 +5,10 @@ import {
5
5
  StoreName,
6
6
  IGroupModel,
7
7
  } from '@tencentcloud/chat-uikit-engine';
8
- import { useTUIKitContext } from '../../../context';
8
+ import { useUIKit } from '../../../context';
9
9
 
10
10
  function useTUIContact() {
11
- const { chat } = useTUIKitContext();
11
+ const { chat } = useUIKit();
12
12
  const [friendList, setFriendList] = useState([]);
13
13
  const [blockList, setBlockList] = useState([]);
14
14
  const [friendApplicationList, setFriendApplicationList] = useState([]);
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
- import { useTUIKitContext, useTUIContactContext } from '../../context';
3
+ import { useUIManager, useTUIContactContext } from '../../context';
4
4
  import useContactSearch from './hooks/useContactSearch';
5
5
  import { Icon, IconTypes } from '../Icon';
6
6
  import { Avatar, defaultUserAvatar } from '../Avatar';
@@ -8,7 +8,7 @@ import { Input } from '../Input';
8
8
  import './index.scss';
9
9
 
10
10
  export function UnMemoizedTUIContactSearch<T>(): React.ReactElement {
11
- const { chat, setActiveContact } = useTUIKitContext('TUIContactSearch');
11
+ const { setActiveContact } = useUIManager('TUIContactSearch');
12
12
  const { t } = useTranslation();
13
13
  const { friendList, setShowContactList } = useTUIContactContext('TUIContactList');
14
14
  const [isShowSearchResult, setShowSearchResult] = useState(false);
@@ -1,9 +1,9 @@
1
1
  import TencentCloudChat from '@tencentcloud/chat';
2
- import { useTUIKitContext, useTUIContactContext } from '../../../context';
2
+ import { useUIKit, useTUIContactContext } from '../../../context';
3
3
 
4
4
  function useContactSearch() {
5
5
  const { blockList } = useTUIContactContext('TUIContactList');
6
- const { chat } = useTUIKitContext('TUIContactSearch');
6
+ const { chat } = useUIKit('TUIContactSearch');
7
7
 
8
8
  const checkFriend = (info: any): Promise<any> => chat.checkFriend({
9
9
  userIDList: [info?.userID],