@tencentcloud/chat-uikit-react 2.2.5 → 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 (405) hide show
  1. package/.eslintrc.js +16 -12
  2. package/.lintstagedrc.json +1 -1
  3. package/CHANGELOG.md +18 -0
  4. package/dist/cjs/assets/fonts/iconfont.ttf +0 -0
  5. package/dist/cjs/assets/fonts/iconfont.woff +0 -0
  6. package/dist/cjs/assets/fonts/iconfont.woff2 +0 -0
  7. package/dist/cjs/components/Avatar/Avatar.d.ts +4 -4
  8. package/dist/cjs/components/Checkbox/index.d.ts +2 -2
  9. package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  10. package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
  11. package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  12. package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  13. package/dist/cjs/components/ConversationPreview/ConversationListContainer.d.ts +2 -2
  14. package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +8 -8
  15. package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
  16. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.d.ts +2 -2
  17. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  18. package/dist/cjs/components/ConversationPreview/utils.js +1 -1
  19. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.d.ts +3 -3
  20. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
  21. package/dist/cjs/components/Icon/Icon.d.ts +3 -3
  22. package/dist/cjs/components/Icon/config.js +1 -1
  23. package/dist/cjs/components/Icon/images/video-call.svg.js +1 -0
  24. package/dist/cjs/components/Icon/images/voice-call.svg.js +1 -0
  25. package/dist/cjs/components/Icon/type.d.ts +3 -1
  26. package/dist/cjs/components/Icon/type.js +1 -1
  27. package/dist/cjs/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +4 -4
  28. package/dist/cjs/components/Input/Input.d.ts +4 -4
  29. package/dist/cjs/components/Model/index.d.ts +2 -2
  30. package/dist/cjs/components/Plugins/index.d.ts +4 -4
  31. package/dist/cjs/components/Popup/index.d.ts +2 -2
  32. package/dist/cjs/components/Switch/Switch.d.ts +2 -2
  33. package/dist/cjs/components/TUIChat/TUIChat.d.ts +15 -14
  34. package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
  35. package/dist/cjs/components/TUIChat/TUIChatState.js +1 -1
  36. package/dist/cjs/components/TUIChat/index.js +1 -0
  37. package/dist/cjs/components/TUIChat/server.js +1 -0
  38. package/dist/cjs/components/TUIChat/utils.js +1 -0
  39. package/dist/cjs/components/TUIChatHeader/TUIChatHeader.d.ts +6 -5
  40. package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +1 -1
  41. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +6 -5
  42. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  43. package/dist/cjs/components/TUIContact/TUIContact.d.ts +3 -3
  44. package/dist/cjs/components/TUIContact/TUIContact.js +1 -1
  45. package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +3 -3
  46. package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -1
  47. package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
  48. package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
  49. package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
  50. package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  51. package/dist/cjs/components/TUIContact/TUIContactInfo/groupInfo.js +1 -1
  52. package/dist/cjs/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -1
  53. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.d.ts +3 -3
  54. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  55. package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +1 -1
  56. package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +1 -1
  57. package/dist/cjs/components/TUIContactSearch/hooks/useContactSearch.js +1 -1
  58. package/dist/cjs/components/TUIConversation/TUIConversation.d.ts +2 -2
  59. package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +6 -6
  60. package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
  61. package/dist/cjs/components/TUIConversationList/hooks/useConversationUpdate.js +1 -1
  62. package/dist/cjs/components/TUIManage/TUIManage.d.ts +2 -2
  63. package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
  64. package/dist/cjs/components/TUIMessage/MessageAudio.js +1 -1
  65. package/dist/cjs/components/TUIMessage/MessageAvatar.js +1 -1
  66. package/dist/cjs/components/TUIMessage/MessageBubble.js +1 -1
  67. package/dist/cjs/components/TUIMessage/MessageContext.d.ts +2 -2
  68. package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
  69. package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
  70. package/dist/cjs/components/TUIMessage/MessageName.js +1 -1
  71. package/dist/cjs/components/TUIMessage/MessagePlugins.d.ts +4 -4
  72. package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
  73. package/dist/cjs/components/TUIMessage/MessageProgress.js +1 -1
  74. package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
  75. package/dist/cjs/components/TUIMessage/MessageStatus.js +1 -1
  76. package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
  77. package/dist/cjs/components/TUIMessage/MessageText.js +1 -1
  78. package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
  79. package/dist/cjs/components/TUIMessage/TUIMessage.d.ts +19 -19
  80. package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
  81. package/dist/cjs/components/TUIMessage/TUIMessageDefault.js +1 -1
  82. package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  83. package/dist/cjs/components/TUIMessage/hooks/useMessageReply.js +1 -1
  84. package/dist/cjs/components/TUIMessage/utils/index.js +1 -1
  85. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.d.ts +2 -2
  86. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  87. package/dist/cjs/components/TUIMessageInput/InputQuoteDefalut.js +1 -1
  88. package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
  89. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.d.ts +7 -7
  90. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
  91. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.d.ts +2 -2
  92. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  93. package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  94. package/dist/cjs/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +1 -1
  95. package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  96. package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  97. package/dist/cjs/components/TUIMessageList/TUIMessageList.d.ts +2 -2
  98. package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
  99. package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  100. package/dist/cjs/components/TUIProfile/TUIProfile.d.ts +3 -3
  101. package/dist/cjs/components/TUIProfile/TUIProfile.js +1 -1
  102. package/dist/cjs/components/TUIProfile/TUIProfileDefault.d.ts +2 -2
  103. package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
  104. package/dist/cjs/components/Toast/index.d.ts +2 -2
  105. package/dist/cjs/components/{untils.js → utils.js} +1 -1
  106. package/dist/cjs/context/ComponentContext.d.ts +12 -12
  107. package/dist/cjs/context/LanguageContext.js +1 -0
  108. package/dist/cjs/context/TUIChatActionContext.d.ts +5 -4
  109. package/dist/cjs/context/TUIChatStateContext.d.ts +5 -5
  110. package/dist/cjs/context/TUIContactContext.d.ts +4 -4
  111. package/dist/cjs/context/TUIConversationContext.js +1 -1
  112. package/dist/cjs/context/TUIMessageContext.d.ts +17 -17
  113. package/dist/cjs/context/TUIMessageInputContext.d.ts +4 -4
  114. package/dist/cjs/context/ThemeContext.js +1 -0
  115. package/dist/cjs/context/UIKitContext.d.ts +25 -0
  116. package/dist/cjs/context/UIKitContext.js +1 -0
  117. package/dist/cjs/context/UIManagerContext.d.ts +46 -0
  118. package/dist/cjs/context/UIManagerContext.js +1 -0
  119. package/dist/cjs/hooks/useConversation.d.ts +2 -2
  120. package/dist/cjs/index.css +1 -2
  121. package/dist/cjs/index.d.css +1345 -1547
  122. package/dist/cjs/index.d.ts +2 -4
  123. package/dist/cjs/index.js +1 -1
  124. package/dist/cjs/locales/en-US/index.js +1 -1
  125. package/dist/cjs/locales/index.js +1 -1
  126. package/dist/cjs/locales/zh-CN/index.js +1 -1
  127. package/dist/cjs/locales/zh-TW/TUIChat.js +1 -0
  128. package/dist/cjs/locales/zh-TW/TUIContact.js +1 -0
  129. package/dist/cjs/locales/zh-TW/TUIConversation.js +1 -0
  130. package/dist/cjs/locales/zh-TW/TUIProfile.js +1 -0
  131. package/dist/cjs/locales/zh-TW/index.js +1 -0
  132. package/dist/esm/assets/fonts/iconfont.ttf +0 -0
  133. package/dist/esm/assets/fonts/iconfont.woff +0 -0
  134. package/dist/esm/assets/fonts/iconfont.woff2 +0 -0
  135. package/dist/esm/components/Avatar/Avatar.d.ts +4 -4
  136. package/dist/esm/components/Checkbox/index.d.ts +2 -2
  137. package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  138. package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
  139. package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  140. package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  141. package/dist/esm/components/ConversationPreview/ConversationListContainer.d.ts +2 -2
  142. package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +8 -8
  143. package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
  144. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.d.ts +2 -2
  145. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  146. package/dist/esm/components/ConversationPreview/utils.js +1 -1
  147. package/dist/esm/components/ConversationSearch/ConversationSearchResult.d.ts +3 -3
  148. package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
  149. package/dist/esm/components/Icon/Icon.d.ts +3 -3
  150. package/dist/esm/components/Icon/config.js +1 -1
  151. package/dist/esm/components/Icon/images/video-call.svg.js +1 -0
  152. package/dist/esm/components/Icon/images/voice-call.svg.js +1 -0
  153. package/dist/esm/components/Icon/type.d.ts +3 -1
  154. package/dist/esm/components/Icon/type.js +1 -1
  155. package/dist/esm/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +4 -4
  156. package/dist/esm/components/Input/Input.d.ts +4 -4
  157. package/dist/esm/components/Model/index.d.ts +2 -2
  158. package/dist/esm/components/Plugins/index.d.ts +4 -4
  159. package/dist/esm/components/Popup/index.d.ts +2 -2
  160. package/dist/esm/components/Switch/Switch.d.ts +2 -2
  161. package/dist/esm/components/TUIChat/TUIChat.d.ts +15 -14
  162. package/dist/esm/components/TUIChat/TUIChat.js +1 -1
  163. package/dist/esm/components/TUIChat/TUIChatState.js +1 -1
  164. package/dist/esm/components/TUIChat/index.js +1 -0
  165. package/dist/esm/components/TUIChat/server.js +1 -0
  166. package/dist/esm/components/TUIChat/utils.js +1 -0
  167. package/dist/esm/components/TUIChatHeader/TUIChatHeader.d.ts +6 -5
  168. package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +1 -1
  169. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +6 -5
  170. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  171. package/dist/esm/components/TUIContact/TUIContact.d.ts +3 -3
  172. package/dist/esm/components/TUIContact/TUIContact.js +1 -1
  173. package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +3 -3
  174. package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -1
  175. package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
  176. package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
  177. package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
  178. package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  179. package/dist/esm/components/TUIContact/TUIContactInfo/groupInfo.js +1 -1
  180. package/dist/esm/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -1
  181. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.d.ts +3 -3
  182. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  183. package/dist/esm/components/TUIContact/hooks/useTUIContact.js +1 -1
  184. package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +1 -1
  185. package/dist/esm/components/TUIContactSearch/hooks/useContactSearch.js +1 -1
  186. package/dist/esm/components/TUIConversation/TUIConversation.d.ts +2 -2
  187. package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +6 -6
  188. package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
  189. package/dist/esm/components/TUIConversationList/hooks/useConversationUpdate.js +1 -1
  190. package/dist/esm/components/TUIManage/TUIManage.d.ts +2 -2
  191. package/dist/esm/components/TUIManage/TUIManage.js +1 -1
  192. package/dist/esm/components/TUIMessage/MessageAudio.js +1 -1
  193. package/dist/esm/components/TUIMessage/MessageAvatar.js +1 -1
  194. package/dist/esm/components/TUIMessage/MessageBubble.js +1 -1
  195. package/dist/esm/components/TUIMessage/MessageContext.d.ts +2 -2
  196. package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
  197. package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
  198. package/dist/esm/components/TUIMessage/MessageName.js +1 -1
  199. package/dist/esm/components/TUIMessage/MessagePlugins.d.ts +4 -4
  200. package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
  201. package/dist/esm/components/TUIMessage/MessageProgress.js +1 -1
  202. package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
  203. package/dist/esm/components/TUIMessage/MessageStatus.js +1 -1
  204. package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
  205. package/dist/esm/components/TUIMessage/MessageText.js +1 -1
  206. package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
  207. package/dist/esm/components/TUIMessage/TUIMessage.d.ts +19 -19
  208. package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
  209. package/dist/esm/components/TUIMessage/TUIMessageDefault.js +1 -1
  210. package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  211. package/dist/esm/components/TUIMessage/hooks/useMessageReply.js +1 -1
  212. package/dist/esm/components/TUIMessage/utils/index.js +1 -1
  213. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.d.ts +2 -2
  214. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  215. package/dist/esm/components/TUIMessageInput/InputQuoteDefalut.js +1 -1
  216. package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
  217. package/dist/esm/components/TUIMessageInput/TUIMessageInput.d.ts +7 -7
  218. package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
  219. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.d.ts +2 -2
  220. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  221. package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  222. package/dist/esm/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +1 -1
  223. package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  224. package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  225. package/dist/esm/components/TUIMessageList/TUIMessageList.d.ts +2 -2
  226. package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
  227. package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  228. package/dist/esm/components/TUIProfile/TUIProfile.d.ts +3 -3
  229. package/dist/esm/components/TUIProfile/TUIProfile.js +1 -1
  230. package/dist/esm/components/TUIProfile/TUIProfileDefault.d.ts +2 -2
  231. package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
  232. package/dist/esm/components/Toast/index.d.ts +2 -2
  233. package/dist/esm/components/utils.js +1 -0
  234. package/dist/esm/context/ComponentContext.d.ts +12 -12
  235. package/dist/esm/context/LanguageContext.js +1 -0
  236. package/dist/esm/context/TUIChatActionContext.d.ts +5 -4
  237. package/dist/esm/context/TUIChatStateContext.d.ts +5 -5
  238. package/dist/esm/context/TUIContactContext.d.ts +4 -4
  239. package/dist/esm/context/TUIConversationContext.js +1 -1
  240. package/dist/esm/context/TUIMessageContext.d.ts +17 -17
  241. package/dist/esm/context/TUIMessageInputContext.d.ts +4 -4
  242. package/dist/esm/context/ThemeContext.js +1 -0
  243. package/dist/esm/context/UIKitContext.d.ts +25 -0
  244. package/dist/esm/context/UIKitContext.js +1 -0
  245. package/dist/esm/context/UIManagerContext.d.ts +46 -0
  246. package/dist/esm/context/UIManagerContext.js +1 -0
  247. package/dist/esm/hooks/useConversation.d.ts +2 -2
  248. package/dist/esm/index.css +1 -2
  249. package/dist/esm/index.d.css +1345 -1547
  250. package/dist/esm/index.d.ts +2 -4
  251. package/dist/esm/index.js +1 -1
  252. package/dist/esm/locales/en-US/index.js +1 -1
  253. package/dist/esm/locales/index.js +1 -1
  254. package/dist/esm/locales/zh-CN/index.js +1 -1
  255. package/dist/esm/locales/zh-TW/TUIChat.js +1 -0
  256. package/dist/esm/locales/zh-TW/TUIContact.js +1 -0
  257. package/dist/esm/locales/zh-TW/TUIConversation.js +1 -0
  258. package/dist/esm/locales/zh-TW/TUIProfile.js +1 -0
  259. package/dist/esm/locales/zh-TW/index.js +1 -0
  260. package/package.json +5 -3
  261. package/rollup.config.js +1 -1
  262. package/src/assets/fonts/iconfont.ttf +0 -0
  263. package/src/assets/fonts/iconfont.woff +0 -0
  264. package/src/assets/fonts/iconfont.woff2 +0 -0
  265. package/src/components/Avatar/styles/index.scss +11 -4
  266. package/src/components/Checkbox/styles/color.scss +17 -6
  267. package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +4 -4
  268. package/src/components/ConversationCreate/ConversationCreate.tsx +2 -2
  269. package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +3 -2
  270. package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +5 -5
  271. package/src/components/ConversationCreate/styles/ConversationCreatGroupDetail.scss +7 -16
  272. package/src/components/ConversationCreate/styles/conversationCreateSelectView.scss +13 -8
  273. package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +20 -21
  274. package/src/components/ConversationCreate/styles/index.scss +30 -17
  275. package/src/components/ConversationPreview/ConversationPreview.tsx +21 -21
  276. package/src/components/ConversationPreview/ConversationPreviewContent.tsx +4 -2
  277. package/src/components/ConversationPreview/styles/index.scss +20 -20
  278. package/src/components/ConversationPreview/utils.tsx +3 -2
  279. package/src/components/DivWithEdit/styles/index.scss +30 -10
  280. package/src/components/Icon/config.ts +14 -4
  281. package/src/components/Icon/images/video-call.svg +3 -0
  282. package/src/components/Icon/images/voice-call.svg +3 -0
  283. package/src/components/Icon/type.ts +2 -0
  284. package/src/components/Input/styles/index.scss +22 -6
  285. package/src/components/Plugins/styles/color.scss +3 -11
  286. package/src/components/Profile/styles/index.scss +12 -3
  287. package/src/components/TUIChat/TUIChat.tsx +40 -35
  288. package/src/components/TUIChat/TUIChatState.tsx +41 -41
  289. package/src/components/TUIChat/index.ts +3 -0
  290. package/src/components/TUIChat/server.ts +44 -0
  291. package/src/components/TUIChat/styles/layout.scss +7 -2
  292. package/src/components/TUIChat/utils.ts +72 -0
  293. package/src/components/TUIChatHeader/TUIChatHeader.tsx +10 -7
  294. package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +74 -31
  295. package/src/components/TUIChatHeader/styles/layout.scss +16 -9
  296. package/src/components/TUIContact/TUIContact.tsx +2 -2
  297. package/src/components/TUIContact/TUIContactInfo/TUIContactInfo.tsx +2 -2
  298. package/src/components/TUIContact/TUIContactInfo/basicInfo.tsx +2 -2
  299. package/src/components/TUIContact/TUIContactInfo/blockInfo.tsx +2 -2
  300. package/src/components/TUIContact/TUIContactInfo/friendApplication.tsx +2 -2
  301. package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +4 -3
  302. package/src/components/TUIContact/TUIContactInfo/groupInfo.tsx +3 -3
  303. package/src/components/TUIContact/TUIContactInfo/hooks/useContactInfo.tsx +2 -2
  304. package/src/components/TUIContact/TUIContactInfo/index.scss +44 -21
  305. package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +80 -76
  306. package/src/components/TUIContact/TUIContactList/index.scss +40 -20
  307. package/src/components/TUIContact/hooks/useTUIContact.tsx +5 -5
  308. package/src/components/TUIContact/index.scss +30 -11
  309. package/src/components/TUIContactSearch/TUIContactSearch.tsx +2 -2
  310. package/src/components/TUIContactSearch/hooks/useContactSearch.tsx +2 -2
  311. package/src/components/TUIContactSearch/index.scss +12 -3
  312. package/src/components/TUIConversationList/TUIConversationList.tsx +3 -4
  313. package/src/components/TUIConversationList/hooks/useConversationUpdate.tsx +2 -2
  314. package/src/components/TUIConversationList/index.scss +3 -4
  315. package/src/components/TUIManage/TUIManage.tsx +3 -3
  316. package/src/components/TUIManage/styles/index.scss +20 -14
  317. package/src/components/TUIMessage/MessageAvatar.tsx +7 -7
  318. package/src/components/TUIMessage/MessageBubble.tsx +22 -21
  319. package/src/components/TUIMessage/MessageCustom.tsx +26 -5
  320. package/src/components/TUIMessage/MessageStatus.tsx +7 -7
  321. package/src/components/TUIMessage/MessageText.tsx +16 -15
  322. package/src/components/TUIMessage/hooks/useMessageHandler.ts +8 -8
  323. package/src/components/TUIMessage/hooks/useMessageReply.ts +8 -7
  324. package/src/components/TUIMessage/styles/color.scss +6 -5
  325. package/src/components/TUIMessage/styles/layout.scss +111 -42
  326. package/src/components/TUIMessage/utils/index.ts +23 -12
  327. package/src/components/TUIMessageInput/InputPluginsDefalut.tsx +12 -12
  328. package/src/components/TUIMessageInput/TUIMessageInput.tsx +1 -1
  329. package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +7 -6
  330. package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +14 -14
  331. package/src/components/TUIMessageInput/hooks/useUploadPicker.tsx +4 -4
  332. package/src/components/TUIMessageInput/styles/color.scss +15 -11
  333. package/src/components/TUIMessageInput/styles/layout.scss +33 -17
  334. package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +15 -11
  335. package/src/components/TUIMessageList/styles/layout.scss +16 -9
  336. package/src/components/TUIProfile/TUIProfile.tsx +3 -3
  337. package/src/components/TUIProfile/TUIProfileDefault.tsx +14 -13
  338. package/src/components/TUIProfile/styles/color.scss +6 -5
  339. package/src/components/TUIProfile/styles/layout.scss +16 -14
  340. package/src/components/index.ts +0 -1
  341. package/src/components/{untils.ts → utils.ts} +5 -4
  342. package/src/context/LanguageContext.tsx +60 -0
  343. package/src/context/TUIChatActionContext.tsx +14 -13
  344. package/src/context/ThemeContext.tsx +68 -0
  345. package/src/context/UIKitContext.tsx +76 -0
  346. package/src/context/UIManagerContext.tsx +163 -0
  347. package/src/context/index.ts +3 -2
  348. package/src/locales/en-US/index.ts +0 -3
  349. package/src/locales/index.ts +6 -2
  350. package/src/locales/zh-CN/index.ts +0 -2
  351. package/src/locales/zh-TW/TUIChat.ts +27 -0
  352. package/src/locales/zh-TW/TUIContact.ts +29 -0
  353. package/src/locales/zh-TW/TUIConversation.ts +32 -0
  354. package/src/locales/zh-TW/TUIProfile.ts +15 -0
  355. package/src/locales/zh-TW/index.ts +11 -0
  356. package/src/styles/colors/_color-dark.scss +31 -21
  357. package/src/styles/colors/_color-light.scss +31 -21
  358. package/src/styles/colors/_color-theme.scss +33 -22
  359. package/src/styles/normalize.scss +6 -0
  360. package/dist/cjs/components/Icon/images/chats-selected.svg.js +0 -1
  361. package/dist/cjs/components/Icon/images/chats.svg.js +0 -1
  362. package/dist/cjs/components/Icon/images/contacts-selected.svg.js +0 -1
  363. package/dist/cjs/components/Icon/images/contacts.svg.js +0 -1
  364. package/dist/cjs/components/Icon/images/down-arrow.png.js +0 -1
  365. package/dist/cjs/components/Icon/images/right-arrow.svg.js +0 -1
  366. package/dist/cjs/components/TUIChat/unitls.js +0 -1
  367. package/dist/cjs/components/TUIKit/TUIKit.d.ts +0 -12
  368. package/dist/cjs/components/TUIKit/TUIKit.js +0 -1
  369. package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +0 -21
  370. package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.js +0 -1
  371. package/dist/cjs/components/TUIKit/hooks/useTUIKit.d.ts +0 -43
  372. package/dist/cjs/components/TUIKit/hooks/useTUIKit.js +0 -1
  373. package/dist/cjs/context/TUIKitContext.d.ts +0 -25
  374. package/dist/cjs/context/TUIKitContext.js +0 -1
  375. package/dist/esm/components/Icon/images/chats-selected.svg.js +0 -1
  376. package/dist/esm/components/Icon/images/chats.svg.js +0 -1
  377. package/dist/esm/components/Icon/images/contacts-selected.svg.js +0 -1
  378. package/dist/esm/components/Icon/images/contacts.svg.js +0 -1
  379. package/dist/esm/components/Icon/images/down-arrow.png.js +0 -1
  380. package/dist/esm/components/Icon/images/right-arrow.svg.js +0 -1
  381. package/dist/esm/components/TUIChat/unitls.js +0 -1
  382. package/dist/esm/components/TUIKit/TUIKit.d.ts +0 -12
  383. package/dist/esm/components/TUIKit/TUIKit.js +0 -1
  384. package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +0 -21
  385. package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.js +0 -1
  386. package/dist/esm/components/TUIKit/hooks/useTUIKit.d.ts +0 -43
  387. package/dist/esm/components/TUIKit/hooks/useTUIKit.js +0 -1
  388. package/dist/esm/components/untils.js +0 -1
  389. package/dist/esm/context/TUIKitContext.d.ts +0 -25
  390. package/dist/esm/context/TUIKitContext.js +0 -1
  391. package/scripts/publish-github.js +0 -60
  392. package/scripts/publish-intl-demo.js +0 -14
  393. package/scripts/publish-intl-experience-demo.js +0 -14
  394. package/src/components/TUIChat/unitls.ts +0 -39
  395. package/src/components/TUIKit/TUIKit.tsx +0 -229
  396. package/src/components/TUIKit/hooks/useCreateTUIKitContext.tsx +0 -48
  397. package/src/components/TUIKit/hooks/useTUIKit.tsx +0 -99
  398. package/src/components/TUIKit/index.ts +0 -3
  399. package/src/components/TUIKit/styles/h5.scss +0 -34
  400. package/src/components/TUIKit/styles/index.scss +0 -132
  401. package/src/context/TUIKitContext.tsx +0 -44
  402. package/src/locales/en-US/TUIGlobal.ts +0 -6
  403. package/src/locales/ja-JP/TUIGlobal.ts +0 -6
  404. package/src/locales/ko-KR/TUIGlobal.ts +0 -6
  405. package/src/locales/zh-CN/TUIGlobal.ts +0 -6
@@ -1,29 +1,39 @@
1
1
  $dark-colors: (
2
2
  // bg
3
- --chat-theme-dark-bg-5: #76777e,
4
- --chat-theme-dark-bg-4: #5d5e67,
5
- --chat-theme-dark-bg-3: #454650,
6
- --chat-theme-dark-bg-2: #2e303a,
7
- --chat-theme-dark-bg-1: #191b26,
8
- --chat-theme-dark-bg-primary: #191b26,
9
- --chat-theme-dark-bg-secondary: #2e303a,
10
- --chat-theme-dark-bg-active: #4e4e4e,
3
+ --uikit-theme-dark-bg-color-topbar: #16171a,
4
+ --uikit-theme-dark-bg-color-operate: #1f2024,
5
+ --uikit-theme-dark-bg-color-input: #2b2c30,
6
+ --uikit-theme-dark-bg-color-bubble-reciprocal: #2b2c30,
7
+ --uikit-theme-dark-bg-color-bubble-own: #5c9dff,
8
+ --uikit-theme-dark-bg-color-default: #16171a,
9
+ --uikit-theme-dark-bg-color-tag-mask: rgba(0, 0, 0, 55%),
10
+ --uikit-theme-dark-bg-color-mask: rgba(0, 0, 0, 55%),
11
11
  // text
12
- --chat-theme-dark-text-5: #000,
13
- --chat-theme-dark-text-4: #666,
14
- --chat-theme-dark-text-3: #7a7a7a,
15
- --chat-theme-dark-text-2: #7a7a7a,
16
- --chat-theme-dark-text-1: #7a7a7a,
17
- --chat-theme-dark-text-primary: #fff,
18
- --chat-theme-dark-text-secondary: #8b8b8b,
19
- // status
20
- --chat-theme-dark-status-info: #147aff,
21
- --chat-theme-dark-status-success: #34c759,
22
- --chat-theme-dark-status-danger: #ff3742,
12
+ --uikit-theme-dark-text-color-primary: rgba(255, 255, 255, 93%),
13
+ --uikit-theme-dark-text-color-secondary: rgba(255, 255, 255, 66%),
14
+ --uikit-theme-dark-text-color-tertiary: rgba(255, 255, 255, 40%),
15
+ --uikit-theme-dark-text-color-disable: rgba(255, 255, 255, 28%),
16
+ --uikit-theme-dark-text-color-link: #4086ff,
17
+ --uikit-theme-dark-text-color-link-hover: #2b6ad6,
18
+ --uikit-theme-dark-text-color-link-disabled: #243047,
19
+ --uikit-theme-dark-text-color-anti-primary: rgba(0, 0, 0, 90%),
20
+ --uikit-theme-dark-text-color-anti-secondary: rgba(0, 0, 0, 55%),
21
+ --uikit-theme-dark-text-color-warning: #e37f32,
22
+ --uikit-theme-dark-text-color-success: #38a673,
23
+ --uikit-theme-dark-text-color-error: #e6594c,
24
+ // dropdown
25
+ --uikit-theme-dark-dropdown-color-default: #2b2c30,
26
+ --uikit-theme-dark-dropdown-color-hover: #3a3c42,
27
+ --uikit-theme-dark-dropdown-color-active: #1f2024,
28
+ // list
29
+ --uikit-theme-dark-list-color-default: #1f2024,
30
+ --uikit-theme-dark-list-color-hover: #2b2c30,
31
+ --uikit-theme-dark-list-color-active: #243047,
23
32
  // border
24
- --chat-theme-dark-border-5: #4e4e4e,
33
+ --uikit-theme-dark-stroke-color-primary: #3a3c42,
34
+ --uikit-theme-dark-stroke-color-secondary: #2b2c30,
25
35
  // box-shadow
26
- --chat-theme-dark-box-shadow-1: (rgba(203, 203, 203, 0.755) 0 3px 8px),
36
+ --uikit-theme-dark-shadow-color: rgba(0, 0, 0, 6%),
27
37
  );
28
38
 
29
39
  :root {
@@ -1,29 +1,39 @@
1
1
  $light-colors: (
2
2
  // bg
3
- --chat-theme-light-bg-5: #999,
4
- --chat-theme-light-bg-4: #b3b3b3,
5
- --chat-theme-light-bg-3: #e5e7eb,
6
- --chat-theme-light-bg-2: #f0f0f0,
7
- --chat-theme-light-bg-1: #fff,
8
- --chat-theme-light-bg-primary: #fff,
9
- --chat-theme-light-bg-secondary: #f0f0f0,
10
- --chat-theme-light-bg-active: #e6f1ff,
3
+ --uikit-theme-light-bg-color-topbar: #f9fafc,
4
+ --uikit-theme-light-bg-color-operate: #fff,
5
+ --uikit-theme-light-bg-color-input: #f0f2f7,
6
+ --uikit-theme-light-bg-color-bubble-reciprocal: #f0f2f7,
7
+ --uikit-theme-light-bg-color-bubble-own: #cce2ff,
8
+ --uikit-theme-light-bg-color-default: #f0f2f7,
9
+ --uikit-theme-light-bg-color-tag-mask: rgba(255, 255, 255, 55%),
10
+ --uikit-theme-light-bg-color-mask: rgba(0, 0, 0, 55%),
11
11
  // text
12
- --chat-theme-light-text-5: #000,
13
- --chat-theme-light-text-4: #666,
14
- --chat-theme-light-text-3: #7a7a7a,
15
- --chat-theme-light-text-2: #7a7a7a,
16
- --chat-theme-light-text-1: #7a7a7a,
17
- --chat-theme-light-text-primary: #000,
18
- --chat-theme-light-text-secondary: #7a7a7a,
19
- // status
20
- --chat-theme-light-status-info: #147aff,
21
- --chat-theme-light-status-success: #34c759,
22
- --chat-theme-light-status-danger: #ff3742,
12
+ --uikit-theme-light-text-color-primary: rgba(0, 0, 0, 93%),
13
+ --uikit-theme-light-text-color-secondary: rgba(0, 0, 0, 66%),
14
+ --uikit-theme-light-text-color-tertiary: rgba(0, 0, 0, 40%),
15
+ --uikit-theme-light-text-color-disable: rgba(0, 0, 0, 28%),
16
+ --uikit-theme-light-text-color-link: #1c66e5,
17
+ --uikit-theme-light-text-color-link-hover: #4588f5,
18
+ --uikit-theme-light-text-color-link-disabled: #cce2ff,
19
+ --uikit-theme-light-text-color-anti-primary: rgba(0, 0, 0, 90%),
20
+ --uikit-theme-light-text-color-anti-secondary: rgba(0, 0, 0, 55%),
21
+ --uikit-theme-light-text-color-warning: #ff7200,
22
+ --uikit-theme-light-text-color-success: #0abf77,
23
+ --uikit-theme-light-text-color-error: #e54545,
24
+ // dropdown
25
+ --uikit-theme-light-dropdown-color-default: #fff,
26
+ --uikit-theme-light-dropdown-color-hover: #f9fafc,
27
+ --uikit-theme-light-dropdown-color-active: #ebf3ff,
28
+ // list
29
+ --uikit-theme-light-list-color-default: #fff,
30
+ --uikit-theme-light-list-color-hover: #f9fafc,
31
+ --uikit-theme-light-list-color-active: #ebf3ff,
23
32
  // border
24
- --chat-theme-light-border-5: #e0e0e0,
33
+ --uikit-theme-light-stroke-color-primary: #f9fafc,
34
+ --uikit-theme-light-stroke-color-secondary: rgba(0, 0, 0, 55%),
25
35
  // box-shadow
26
- --chat-theme-light-box-shadow-1: (rgba(0, 0, 0, 0.24) 0 3px 8px),
36
+ --uikit-theme-light-shadow-color: rgba(0, 0, 0, 6%),
27
37
  );
28
38
 
29
39
  :root {
@@ -1,7 +1,7 @@
1
1
  @use "sass:map";
2
2
  @use "sass:list";
3
3
 
4
- $prefix: "--chat-theme";
4
+ $prefix: "--uikit-theme";
5
5
 
6
6
  $themes: (
7
7
  "light",
@@ -9,26 +9,35 @@ $themes: (
9
9
  );
10
10
 
11
11
  $colors: (
12
- "bg-5",
13
- "bg-4",
14
- "bg-3",
15
- "bg-2",
16
- "bg-1",
17
- "bg-primary",
18
- "bg-secondary",
19
- "bg-active",
20
- "text-5",
21
- "text-4",
22
- "text-3",
23
- "text-2",
24
- "text-1",
25
- "text-primary",
26
- "text-secondary",
27
- "status-info",
28
- "status-success",
29
- "status-danger",
30
- "border-5",
31
- "box-shadow-1",
12
+ "bg-color-topbar",
13
+ "bg-color-operate",
14
+ "bg-color-input",
15
+ "bg-color-bubble-reciprocal",
16
+ "bg-color-bubble-own",
17
+ "bg-color-default",
18
+ "bg-color-tag-mask",
19
+ "bg-color-mask",
20
+ "text-color-primary",
21
+ "text-color-secondary",
22
+ "text-color-tertiary",
23
+ "text-color-disable",
24
+ "text-color-link",
25
+ "text-color-link-hover",
26
+ "text-color-link-disabled",
27
+ "text-color-anti-primary",
28
+ "text-color-anti-secondary",
29
+ "text-color-warning",
30
+ "text-color-success",
31
+ "text-color-error",
32
+ "dropdown-color-default",
33
+ "dropdown-color-hover",
34
+ "dropdown-color-active",
35
+ "list-color-default",
36
+ "list-color-hover",
37
+ "list-color-active",
38
+ "stroke-color-primary",
39
+ "stroke-color-secondary",
40
+ "shadow-color",
32
41
  );
33
42
 
34
43
  $color-map: ();
@@ -38,13 +47,15 @@ $color-map: ();
38
47
 
39
48
  $color-map: () !global;
40
49
 
41
- [data-chat-theme="#{$theme}"] & {
50
+ [data-uikit-theme="#{$theme}"] & {
42
51
  @each $color in $colors {
43
52
  $value: #{$prefix}-#{$theme}-#{$color};
44
53
  $color-map: map.merge($color-map, ($color: var($value))) !global;
45
54
  }
46
55
 
47
56
  @content;
57
+
58
+ transition: background-color 0.3s ease-in-out;
48
59
  }
49
60
  }
50
61
  }
@@ -353,3 +353,9 @@ template {
353
353
  -webkit-font-smoothing: antialiased;
354
354
  -moz-osx-font-smoothing: grayscale;
355
355
  }
356
+
357
+ *,
358
+ *::after,
359
+ *::before {
360
+ box-sizing: border-box;
361
+ }
@@ -1 +0,0 @@
1
- "use strict";module.exports="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6893%2018.3914C21.131%2016.6584%2021.998%2014.4305%2021.998%2012.0001C21.998%206.47721%2017.5209%202.00006%2011.998%202.00006C6.4752%202.00006%201.99805%206.47721%201.99805%2012.0001C1.99805%2017.5229%206.4752%2022.0001%2011.998%2022.0001C14.1036%2022.0001%2016.0571%2021.3493%2017.6686%2020.238C17.6858%2020.2471%2017.7041%2020.2552%2017.7233%2020.262L19.9382%2021.0464C20.2554%2021.1587%2020.5611%2020.853%2020.4488%2020.5358L19.6893%2018.3914Z%22%20fill%3D%22%23147AFF%22%20style%3D%22fill%3A%23147AFF%3Bfill%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bfill-opacity%3A1%3B%22%2F%3E%3Ccircle%20cx%3D%227.00195%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2216.998%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3C%2Fsvg%3E";
@@ -1 +0,0 @@
1
- "use strict";module.exports="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cmask%20id%3D%22path-1-inside-1_91_53001%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6894%2018.3919C21.131%2016.659%2021.998%2014.4311%2021.998%2012.0007C21.998%206.47788%2017.5209%202.00073%2011.998%202.00073C6.4752%202.00073%201.99805%206.47788%201.99805%2012.0007C1.99805%2017.5236%206.4752%2022.0007%2011.998%2022.0007C14.1037%2022.0007%2016.0574%2021.3499%2017.6689%2020.2385C17.6861%2020.2475%2017.7042%2020.2555%2017.7233%2020.2623L19.9382%2021.0467C20.2554%2021.159%2020.5611%2020.8533%2020.4488%2020.5361L19.6894%2018.3919Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M19.6894%2018.3919L18.9207%2017.7524L18.5569%2018.1897L18.7468%2018.7258L19.6894%2018.3919ZM17.6689%2020.2385L18.1349%2019.3537L17.5993%2019.0716L17.1011%2019.4153L17.6689%2020.2385ZM17.7233%2020.2623L18.0571%2019.3196L18.0571%2019.3196L17.7233%2020.2623ZM19.9382%2021.0467L20.272%2020.104H20.272L19.9382%2021.0467ZM20.4488%2020.5361L19.5062%2020.8699V20.8699L20.4488%2020.5361ZM20.998%2012.0007C20.998%2014.1889%2020.2184%2016.1924%2018.9207%2017.7524L20.4582%2019.0315C22.0437%2017.1256%2022.998%2014.6733%2022.998%2012.0007H20.998ZM11.998%203.00073C16.9686%203.00073%2020.998%207.03017%2020.998%2012.0007H22.998C22.998%205.9256%2018.0732%201.00073%2011.998%201.00073V3.00073ZM2.99805%2012.0007C2.99805%207.03017%207.02748%203.00073%2011.998%203.00073V1.00073C5.92291%201.00073%200.998047%205.9256%200.998047%2012.0007H2.99805ZM11.998%2021.0007C7.02748%2021.0007%202.99805%2016.9713%202.99805%2012.0007H0.998047C0.998047%2018.0759%205.92291%2023.0007%2011.998%2023.0007V21.0007ZM17.1011%2019.4153C15.6512%2020.4153%2013.8945%2021.0007%2011.998%2021.0007V23.0007C14.3129%2023.0007%2016.4635%2022.2846%2018.2366%2021.0617L17.1011%2019.4153ZM18.0571%2019.3196C18.0834%2019.3289%2018.1094%2019.3403%2018.1349%2019.3537L17.2028%2021.1233C17.2627%2021.1548%2017.325%2021.1821%2017.3895%2021.2049L18.0571%2019.3196ZM20.272%2020.104L18.0571%2019.3196L17.3895%2021.2049L19.6044%2021.9893L20.272%2020.104ZM19.5062%2020.8699C19.3376%2020.3941%2019.7962%2019.9355%2020.272%2020.104L19.6044%2021.9893C20.7146%2022.3825%2021.7846%2021.3125%2021.3914%2020.2023L19.5062%2020.8699ZM18.7468%2018.7258L19.5062%2020.8699L21.3914%2020.2023L20.6321%2018.0581L18.7468%2018.7258Z%22%20fill%3D%22%23666666%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_91_53001%29%22%2F%3E%3Ccircle%20cx%3D%227.00195%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2216.998%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3C%2Fsvg%3E";
@@ -1 +0,0 @@
1
- "use strict";module.exports="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.60156%209.00028C5.60156%2012.5349%208.46692%2015.4003%2012.0016%2015.4003C15.5362%2015.4003%2018.4016%2012.5349%2018.4016%209.00028C18.4016%205.46564%2015.5362%202.60028%2012.0016%202.60028C8.46692%202.60028%205.60156%205.46564%205.60156%209.00028ZM5.20078%2016.4003C3.8753%2016.4003%202.80078%2017.4748%202.80078%2018.8003C2.80078%2020.1257%203.87529%2021.2003%205.20078%2021.2003H18.8008C20.1263%2021.2003%2021.2008%2020.1257%2021.2008%2018.8003C21.2008%2017.4748%2020.1263%2016.4003%2018.8008%2016.4003H5.20078Z%22%20fill%3D%22%23147AFF%22%20style%3D%22fill%3A%23147AFF%3Bfill%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bfill-opacity%3A1%3B%22%2F%3E%3C%2Fsvg%3E";
@@ -1 +0,0 @@
1
- "use strict";module.exports="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cmask%20id%3D%22path-1-inside-1_251_63695%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.60156%208.99998C5.60156%2012.5346%208.46692%2015.4%2012.0016%2015.4C15.5362%2015.4%2018.4016%2012.5346%2018.4016%208.99998C18.4016%205.46534%2015.5362%202.59998%2012.0016%202.59998C8.46692%202.59998%205.60156%205.46534%205.60156%208.99998ZM5.20078%2016.3999C3.8753%2016.3999%202.80078%2017.4745%202.80078%2018.7999C2.80078%2020.1254%203.87529%2021.1999%205.20078%2021.1999H18.8008C20.1263%2021.1999%2021.2008%2020.1254%2021.2008%2018.7999C21.2008%2017.4745%2020.1263%2016.3999%2018.8008%2016.3999H5.20078Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M12.0016%2014.4C9.01921%2014.4%206.60156%2011.9823%206.60156%208.99998H4.60156C4.60156%2013.0869%207.91464%2016.4%2012.0016%2016.4V14.4ZM17.4016%208.99998C17.4016%2011.9823%2014.9839%2014.4%2012.0016%2014.4V16.4C16.0885%2016.4%2019.4016%2013.0869%2019.4016%208.99998H17.4016ZM12.0016%203.59998C14.9839%203.59998%2017.4016%206.01762%2017.4016%208.99998H19.4016C19.4016%204.91305%2016.0885%201.59998%2012.0016%201.59998V3.59998ZM6.60156%208.99998C6.60156%206.01762%209.01921%203.59998%2012.0016%203.59998V1.59998C7.91464%201.59998%204.60156%204.91305%204.60156%208.99998H6.60156ZM3.80078%2018.7999C3.80078%2018.0267%204.42758%2017.3999%205.20078%2017.3999V15.3999C3.32301%2015.3999%201.80078%2016.9222%201.80078%2018.7999H3.80078ZM5.20078%2020.1999C4.42758%2020.1999%203.80078%2019.5731%203.80078%2018.7999H1.80078C1.80078%2020.6777%203.32301%2022.1999%205.20078%2022.1999V20.1999ZM18.8008%2020.1999H5.20078V22.1999H18.8008V20.1999ZM20.2008%2018.7999C20.2008%2019.5731%2019.574%2020.1999%2018.8008%2020.1999V22.1999C20.6785%2022.1999%2022.2008%2020.6777%2022.2008%2018.7999H20.2008ZM18.8008%2017.3999C19.574%2017.3999%2020.2008%2018.0267%2020.2008%2018.7999H22.2008C22.2008%2016.9222%2020.6786%2015.3999%2018.8008%2015.3999V17.3999ZM5.20078%2017.3999H18.8008V15.3999H5.20078V17.3999Z%22%20fill%3D%22%23666666%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_251_63695%29%22%2F%3E%3C%2Fsvg%3E";
@@ -1 +0,0 @@
1
- "use strict";module.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAACXBIWXMAAAsTAAALEwEAmpwYAAABZWlDQ1BEaXNwbGF5IFAzAAB4nHWQvUvDUBTFT6tS0DqIDh0cMolD1NIKdnFoKxRFMFQFq1OafgltfCQpUnETVyn4H1jBWXCwiFRwcXAQRAcR3Zw6KbhoeN6XVNoi3sfl/Ticc7lcwBtQGSv2AijplpFMxKS11Lrke4OHnlOqZrKooiwK/v276/PR9d5PiFlNu3YQ2U9cl84ul3aeAlN//V3Vn8maGv3f1EGNGRbgkYmVbYsJ3iUeMWgp4qrgvMvHgtMunzuelWSc+JZY0gpqhrhJLKc79HwHl4plrbWD2N6f1VeXxRzqUcxhEyYYilBRgQQF4X/8044/ji1yV2BQLo8CLMpESRETssTz0KFhEjJxCEHqkLhz634PrfvJbW3vFZhtcM4v2tpCAzidoZPV29p4BBgaAG7qTDVUR+qh9uZywPsJMJgChu8os2HmwiF3e38M6Hvh/GMM8B0CdpXzryPO7RqFn4Er/QfBIQM2AAAAUUlEQVR4AYWOAQkAIQxFP5fgIlyEi2oEGxjBCNpAbGAD/YrCkImDt8Hfgw0APuLm1GrsH7Yi5FeRPMkySCQIeWVWO7Hk/yTtciURl+qywfZvAwveD9g2Kx/SAAAAAElFTkSuQmCC";
@@ -1 +0,0 @@
1
- "use strict";module.exports="data:image/svg+xml,%3Csvg%20width%3D%226%22%20height%3D%2210%22%20viewBox%3D%220%200%206%2010%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1.69071%200.283877C1.5751%200.169695%201.42795%200.107415%201.25453%200.107415C0.907683%200.107415%200.629156%200.377298%200.629156%200.719841C0.629156%200.891113%200.702729%201.04681%200.823599%201.16619L4.50226%204.71618L0.8236%208.2558C0.70273%208.37518%200.629157%208.53607%200.629157%208.70215C0.629157%209.04469%200.907684%209.31458%201.25453%209.31458C1.42795%209.31458%201.5751%209.25229%201.69071%209.13811L5.77928%205.19367C5.92643%205.05873%205.99474%204.89265%206%204.71099C6%204.52934%205.92643%204.37364%205.77928%204.23351L1.69071%200.283877Z%22%20fill%3D%22black%22%20style%3D%22fill%3Ablack%3Bfill%3Ablack%3Bfill-opacity%3A1%3B%22%2F%3E%3C%2Fsvg%3E";
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib");require("@tencentcloud/chat"),require("../../constants.js"),require("date-fns"),require("date-fns/locale"),require("@tencentcloud/chat-uikit-engine"),require("react/jsx-runtime"),require("react"),require("../Icon/config.js"),require("../Icon/type.js");exports.handleEditMessage=function(r,n){var t=e.__spreadArray([],r,!0),u=t.findIndex((function(e){return(null==e?void 0:e.ID)===(null==n?void 0:n.ID)}));return t[u]=n,t},exports.handleUploadPendingMessage=function(r,n){var t=e.__spreadArray([],r,!0);t.some((function(e){return e.ID===(null==n?void 0:n.ID)}))||t.push(n);var u=t.findIndex((function(e){return(null==e?void 0:e.ID)===(null==n?void 0:n.ID)}));return t[u]=n,t};
@@ -1,12 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { Conversation } from '@tencentcloud/chat';
3
-
4
- interface ChatProps {
5
- chat?: any;
6
- language?: string;
7
- customClasses?: unknown;
8
- activeConversation?: Conversation;
9
- }
10
- declare function TUIKit<T extends ChatProps>(props: PropsWithChildren<T>): React.ReactElement;
11
-
12
- export { ChatProps, TUIKit };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),a=require("react"),s=require("@tencentcloud/chat-uikit-engine"),n=require("@tencentcloud/tui-core"),r=require("react-i18next"),i=require("../../utils/env.js"),o=require("./hooks/useTUIKit.js"),c=require("./hooks/useCreateTUIKitContext.js"),T=require("../../context/TUIKitContext.js"),l=require("../TUIConversation/TUIConversation.js"),u=require("../TUIChat/TUIChat.js"),I=require("../TUIManage/TUIManage.js"),C=require("../TUIProfile/TUIProfile.js");require("../TUIProfile/TUIProfileDefault.js"),require("@tencentcloud/chat"),require("../../context/TUIMessageContext.js"),require("../Icon/config.js"),require("../Icon/type.js");var U=require("../TUIContact/TUIContactInfo/TUIContactInfo.js"),v=require("../TUIContact/TUIContact.js"),h=require("../../constants.js");require("../../locales/index.js");var d=require("../Icon/images/chats.svg.js"),j=require("../Icon/images/chats-selected.svg.js"),A=require("../Icon/images/contacts.svg.js"),m=require("../Icon/images/contacts-selected.svg.js"),g=[{id:1,name:h.TUIKIT_TABBAR.CHATS,icon:d,selectedIcon:j,value:h.TUIKIT_TABBAR.CHATS},{id:2,name:h.TUIKIT_TABBAR.CONTACTS,icon:A,selectedIcon:m,value:h.TUIKIT_TABBAR.CONTACTS}],x={className:"sample-h5-input",isTransmitter:!0};function _(a){var s=a.moduleValue,n=a.tabbarRender,r=a.setModuleValue;return t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({className:"sample-chat-left-container"},{children:[t.jsx(C.TUIProfile,{className:"sample-chat-profile"}),n,s===h.TUIKIT_TABBAR.CHATS&&t.jsx(l.TUIConversation,{}),s===h.TUIKIT_TABBAR.CONTACTS&&t.jsx(v.TUIContact,{})]})),s===h.TUIKIT_TABBAR.CHATS&&t.jsxs(t.Fragment,{children:[t.jsx(u.TUIChat,{}),t.jsx(I.TUIManage,{})]}),s===h.TUIKIT_TABBAR.CONTACTS&&t.jsx(v.TUIContact,{children:t.jsx(U.TUIContactInfo,{showChats:function(){r(h.TUIKIT_TABBAR.CHATS)}})})]})}function f(a){var s=a.moduleValue,n=a.contactData,r=a.tabbarRender,i=a.currentConversationID,o=a.setModuleValue;return t.jsxs("div",e.__assign({className:"sample-chat-h5"},{children:[!i&&!n&&t.jsxs("div",e.__assign({className:"sample-chat-h5-container"},{children:[t.jsx(C.TUIProfile,{className:"sample-profile"}),r,s===h.TUIKIT_TABBAR.CHATS&&t.jsx(l.TUIConversation,{}),s===h.TUIKIT_TABBAR.CONTACTS&&t.jsx(v.TUIContact,{})]})),s===h.TUIKIT_TABBAR.CHATS&&i&&t.jsxs(t.Fragment,{children:[t.jsx(u.TUIChat,{TUIMessageInputConfig:x}),t.jsx(I.TUIManage,{})]}),s===h.TUIKIT_TABBAR.CONTACTS&&n&&t.jsx(v.TUIContact,{children:t.jsx(U.TUIContactInfo,{showChats:function(){o(h.TUIKIT_TABBAR.CHATS)}})})]}))}exports.TUIKit=function(l){var u=a.useState("chats"),I=u[0],C=u[1],U=r.useTranslation().t,v=l.children,h=l.chat,d=void 0===h?n.TUILogin.getContext().chat:h,j=l.customClasses,A=l.activeConversation,m=l.language,x=void 0===m?"en-US":m;window.tencent_cloud_im_csig_react_uikit_23F_xa=!0;var S=o.useTUIKit({chat:d,activeConversation:A,language:x}),B=S.conversation,q=S.contactData,p=S.setActiveConversation,K=S.myProfile,N=S.TUIManageShow,R=S.setTUIManageShow,w=S.TUIProfileShow,M=S.setTUIProfileShow,P=S.setActiveContact,b=c.useCreateTUIKitContext({chat:d,language:x,conversation:B,contactData:q,setActiveConversation:p,customClasses:j,myProfile:K,TUIManageShow:N,setTUIManageShow:R,TUIProfileShow:w,setTUIProfileShow:M,setActiveContact:P});a.useEffect((function(){return s.TUIStore.watch(s.StoreName.CONV,{currentConversation:V}),function(){s.TUIStore.unwatch(s.StoreName.CONV,{currentConversation:V})}}),[]);var V=function(e){p(null==e?void 0:e.getConversation())},H=t.jsx("div",e.__assign({className:"sample-chat-tab"},{children:g.map((function(a){return t.jsxs("div",e.__assign({className:"sample-chat-tab-container",role:"presentation",onClick:function(){var e;e=a.value,C(e),s.TUIConversationService.switchConversation("")}},{children:[t.jsx("img",{src:I===a.value?a.selectedIcon:a.icon,alt:""}),t.jsx("p",e.__assign({className:"sample-chat-tab-text ".concat(I===a.value?"sample-chat-tab-active":"")},{children:U(a.name)}))]}),a.id)}))}));return t.jsx(T.TUIKitProvider,e.__assign({value:b},{children:t.jsx("div",e.__assign({className:"tui-kit"},{children:v||i.isPC&&t.jsx(_,{moduleValue:I,tabbarRender:H,setModuleValue:C})||i.isH5&&t.jsx(f,{contactData:q,moduleValue:I,tabbarRender:H,currentConversationID:(null==B?void 0:B.conversationID)||"",setModuleValue:C})}))}))};
@@ -1,21 +0,0 @@
1
- import { UseContactParams } from './useTUIKit.js';
2
- import * as _tencentcloud_chat from '@tencentcloud/chat';
3
- import React from 'react';
4
- import { TUIKitContextValue } from '../../../context/TUIKitContext.js';
5
-
6
- declare const useCreateTUIKitContext: (value: TUIKitContextValue) => {
7
- chat: _tencentcloud_chat.ChatSDK;
8
- language: string;
9
- conversation: _tencentcloud_chat.Conversation | undefined;
10
- contactData: UseContactParams;
11
- customClasses: unknown;
12
- setActiveConversation: (conversation?: _tencentcloud_chat.Conversation | undefined) => void;
13
- myProfile: _tencentcloud_chat.Profile | undefined;
14
- TUIManageShow: boolean | undefined;
15
- setTUIManageShow: React.Dispatch<React.SetStateAction<boolean>> | undefined;
16
- TUIProfileShow: boolean | undefined;
17
- setTUIProfileShow: React.Dispatch<React.SetStateAction<boolean>> | undefined;
18
- setActiveContact: (UseContactParams?: UseContactParams) => void;
19
- };
20
-
21
- export { useCreateTUIKitContext };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useCreateTUIKitContext=function(t){var o=t.chat,a=t.language,s=t.conversation,n=t.contactData,r=t.customClasses,c=t.setActiveConversation,i=t.myProfile,u=t.TUIManageShow,l=t.setTUIManageShow,v=t.TUIProfileShow,h=t.setTUIProfileShow,f=t.setActiveContact;return e.useMemo((function(){return{chat:o,language:a,conversation:s,contactData:n,customClasses:r,setActiveConversation:c,myProfile:i,TUIManageShow:u,setTUIManageShow:l,TUIProfileShow:v,setTUIProfileShow:h,setActiveContact:f}}),[a,s,n,r,o,u,v,h,i])};
@@ -1,43 +0,0 @@
1
- import React from 'react';
2
- import { IGroupModel } from '@tencentcloud/chat-uikit-engine';
3
- import { ChatSDK, Conversation, Profile, Friend, FriendApplication } from '@tencentcloud/chat';
4
-
5
- interface blockData {
6
- type: 'block';
7
- data: Profile;
8
- }
9
- interface friendData {
10
- type: 'friend';
11
- data: Friend;
12
- }
13
- interface friendApplicationData {
14
- type: 'friendApplication';
15
- data: FriendApplication;
16
- }
17
- interface addFriendData {
18
- type: 'addFriend';
19
- data: Profile;
20
- }
21
- interface GroupData {
22
- type: 'group';
23
- data: IGroupModel;
24
- }
25
- type UseContactParams = blockData | friendData | friendApplicationData | addFriendData | GroupData | undefined;
26
- interface UseChatParams {
27
- chat: ChatSDK;
28
- activeConversation?: Conversation;
29
- language?: string;
30
- }
31
- declare const useTUIKit: ({ chat, activeConversation: paramsActiveConversation, language, }: UseChatParams) => {
32
- conversation: Conversation | undefined;
33
- contactData: UseContactParams;
34
- setActiveConversation: (activeConversation?: Conversation) => void;
35
- myProfile: Profile | undefined;
36
- TUIManageShow: boolean;
37
- setTUIManageShow: React.Dispatch<React.SetStateAction<boolean>>;
38
- TUIProfileShow: boolean;
39
- setTUIProfileShow: React.Dispatch<React.SetStateAction<boolean>>;
40
- setActiveContact: (actionContactData?: UseContactParams) => void;
41
- };
42
-
43
- export { UseChatParams, UseContactParams, useTUIKit };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@tencentcloud/chat-uikit-engine"),n=require("react-i18next");exports.useTUIKit=function(a){var o=a.chat,i=a.activeConversation,r=a.language,s=n.useTranslation().i18n,c=e.useState(i),u=c[0],f=c[1],l=e.useState(),v=l[0],S=l[1],I=e.useState(!1),g=I[0],h=I[1],T=e.useState(!1),U=T[0],d=T[1],w=e.useState(),D=w[0],P=w[1];e.useEffect((function(){s.changeLanguage(r),t.TUIStore.watch(t.StoreName.USER,{userProfile:function(e){S(e)}})}),[r]);var C=e.useCallback((function(e){e&&(null==o||o.setMessageRead({conversationID:e.conversationID})),u&&(null==e?void 0:e.conversationID)!==u.conversationID&&h(!1),f(e)}),[o]);return e.useEffect((function(){i&&f(i)}),[i]),{conversation:u,contactData:D,setActiveConversation:C,myProfile:v,TUIManageShow:g,setTUIManageShow:h,TUIProfileShow:U,setTUIProfileShow:d,setActiveContact:function(e){P(e)}}};
@@ -1,25 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { ChatSDK, Conversation, Profile } from '@tencentcloud/chat';
3
- import { UseContactParams } from '../components/TUIKit/hooks/useTUIKit.js';
4
-
5
- interface TUIKitContextValue {
6
- chat: ChatSDK;
7
- language: string;
8
- conversation?: Conversation;
9
- contactData?: UseContactParams;
10
- setActiveConversation: (conversation?: Conversation) => void;
11
- customClasses?: unknown;
12
- myProfile?: Profile;
13
- TUIManageShow?: boolean;
14
- setTUIManageShow?: React.Dispatch<React.SetStateAction<boolean>>;
15
- TUIProfileShow?: boolean;
16
- setActiveContact: (UseContactParams?: UseContactParams) => void;
17
- setTUIProfileShow?: React.Dispatch<React.SetStateAction<boolean>>;
18
- }
19
- declare const TUIKitContext: React.Context<TUIKitContextValue | undefined>;
20
- declare function TUIKitProvider({ children, value }: PropsWithChildren<{
21
- value: TUIKitContextValue;
22
- }>): React.ReactElement;
23
- declare const useTUIKitContext: (componentName?: string) => TUIKitContextValue;
24
-
25
- export { TUIKitContext, TUIKitContextValue, TUIKitProvider, useTUIKitContext };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=u(r).default.createContext(void 0);exports.TUIKitContext=n,exports.TUIKitProvider=function(u){var i=u.children,o=u.value;return r.useLayoutEffect((function(){document.documentElement.dataset.chatTheme="light"}),[]),t.jsx(n.Provider,e.__assign({value:o},{children:i}))},exports.useTUIKitContext=function(e){var t=r.useContext(n);return!t&&e?{}:t};
@@ -1 +0,0 @@
1
- var l="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6893%2018.3914C21.131%2016.6584%2021.998%2014.4305%2021.998%2012.0001C21.998%206.47721%2017.5209%202.00006%2011.998%202.00006C6.4752%202.00006%201.99805%206.47721%201.99805%2012.0001C1.99805%2017.5229%206.4752%2022.0001%2011.998%2022.0001C14.1036%2022.0001%2016.0571%2021.3493%2017.6686%2020.238C17.6858%2020.2471%2017.7041%2020.2552%2017.7233%2020.262L19.9382%2021.0464C20.2554%2021.1587%2020.5611%2020.853%2020.4488%2020.5358L19.6893%2018.3914Z%22%20fill%3D%22%23147AFF%22%20style%3D%22fill%3A%23147AFF%3Bfill%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bfill-opacity%3A1%3B%22%2F%3E%3Ccircle%20cx%3D%227.00195%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2216.998%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3C%2Fsvg%3E";export{l as default};
@@ -1 +0,0 @@
1
- var l="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cmask%20id%3D%22path-1-inside-1_91_53001%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6894%2018.3919C21.131%2016.659%2021.998%2014.4311%2021.998%2012.0007C21.998%206.47788%2017.5209%202.00073%2011.998%202.00073C6.4752%202.00073%201.99805%206.47788%201.99805%2012.0007C1.99805%2017.5236%206.4752%2022.0007%2011.998%2022.0007C14.1037%2022.0007%2016.0574%2021.3499%2017.6689%2020.2385C17.6861%2020.2475%2017.7042%2020.2555%2017.7233%2020.2623L19.9382%2021.0467C20.2554%2021.159%2020.5611%2020.8533%2020.4488%2020.5361L19.6894%2018.3919Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M19.6894%2018.3919L18.9207%2017.7524L18.5569%2018.1897L18.7468%2018.7258L19.6894%2018.3919ZM17.6689%2020.2385L18.1349%2019.3537L17.5993%2019.0716L17.1011%2019.4153L17.6689%2020.2385ZM17.7233%2020.2623L18.0571%2019.3196L18.0571%2019.3196L17.7233%2020.2623ZM19.9382%2021.0467L20.272%2020.104H20.272L19.9382%2021.0467ZM20.4488%2020.5361L19.5062%2020.8699V20.8699L20.4488%2020.5361ZM20.998%2012.0007C20.998%2014.1889%2020.2184%2016.1924%2018.9207%2017.7524L20.4582%2019.0315C22.0437%2017.1256%2022.998%2014.6733%2022.998%2012.0007H20.998ZM11.998%203.00073C16.9686%203.00073%2020.998%207.03017%2020.998%2012.0007H22.998C22.998%205.9256%2018.0732%201.00073%2011.998%201.00073V3.00073ZM2.99805%2012.0007C2.99805%207.03017%207.02748%203.00073%2011.998%203.00073V1.00073C5.92291%201.00073%200.998047%205.9256%200.998047%2012.0007H2.99805ZM11.998%2021.0007C7.02748%2021.0007%202.99805%2016.9713%202.99805%2012.0007H0.998047C0.998047%2018.0759%205.92291%2023.0007%2011.998%2023.0007V21.0007ZM17.1011%2019.4153C15.6512%2020.4153%2013.8945%2021.0007%2011.998%2021.0007V23.0007C14.3129%2023.0007%2016.4635%2022.2846%2018.2366%2021.0617L17.1011%2019.4153ZM18.0571%2019.3196C18.0834%2019.3289%2018.1094%2019.3403%2018.1349%2019.3537L17.2028%2021.1233C17.2627%2021.1548%2017.325%2021.1821%2017.3895%2021.2049L18.0571%2019.3196ZM20.272%2020.104L18.0571%2019.3196L17.3895%2021.2049L19.6044%2021.9893L20.272%2020.104ZM19.5062%2020.8699C19.3376%2020.3941%2019.7962%2019.9355%2020.272%2020.104L19.6044%2021.9893C20.7146%2022.3825%2021.7846%2021.3125%2021.3914%2020.2023L19.5062%2020.8699ZM18.7468%2018.7258L19.5062%2020.8699L21.3914%2020.2023L20.6321%2018.0581L18.7468%2018.7258Z%22%20fill%3D%22%23666666%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_91_53001%29%22%2F%3E%3Ccircle%20cx%3D%227.00195%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2216.998%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3C%2Fsvg%3E";export{l as default};
@@ -1 +0,0 @@
1
- var l="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.60156%209.00028C5.60156%2012.5349%208.46692%2015.4003%2012.0016%2015.4003C15.5362%2015.4003%2018.4016%2012.5349%2018.4016%209.00028C18.4016%205.46564%2015.5362%202.60028%2012.0016%202.60028C8.46692%202.60028%205.60156%205.46564%205.60156%209.00028ZM5.20078%2016.4003C3.8753%2016.4003%202.80078%2017.4748%202.80078%2018.8003C2.80078%2020.1257%203.87529%2021.2003%205.20078%2021.2003H18.8008C20.1263%2021.2003%2021.2008%2020.1257%2021.2008%2018.8003C21.2008%2017.4748%2020.1263%2016.4003%2018.8008%2016.4003H5.20078Z%22%20fill%3D%22%23147AFF%22%20style%3D%22fill%3A%23147AFF%3Bfill%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bfill-opacity%3A1%3B%22%2F%3E%3C%2Fsvg%3E";export{l as default};
@@ -1 +0,0 @@
1
- var C="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cmask%20id%3D%22path-1-inside-1_251_63695%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.60156%208.99998C5.60156%2012.5346%208.46692%2015.4%2012.0016%2015.4C15.5362%2015.4%2018.4016%2012.5346%2018.4016%208.99998C18.4016%205.46534%2015.5362%202.59998%2012.0016%202.59998C8.46692%202.59998%205.60156%205.46534%205.60156%208.99998ZM5.20078%2016.3999C3.8753%2016.3999%202.80078%2017.4745%202.80078%2018.7999C2.80078%2020.1254%203.87529%2021.1999%205.20078%2021.1999H18.8008C20.1263%2021.1999%2021.2008%2020.1254%2021.2008%2018.7999C21.2008%2017.4745%2020.1263%2016.3999%2018.8008%2016.3999H5.20078Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M12.0016%2014.4C9.01921%2014.4%206.60156%2011.9823%206.60156%208.99998H4.60156C4.60156%2013.0869%207.91464%2016.4%2012.0016%2016.4V14.4ZM17.4016%208.99998C17.4016%2011.9823%2014.9839%2014.4%2012.0016%2014.4V16.4C16.0885%2016.4%2019.4016%2013.0869%2019.4016%208.99998H17.4016ZM12.0016%203.59998C14.9839%203.59998%2017.4016%206.01762%2017.4016%208.99998H19.4016C19.4016%204.91305%2016.0885%201.59998%2012.0016%201.59998V3.59998ZM6.60156%208.99998C6.60156%206.01762%209.01921%203.59998%2012.0016%203.59998V1.59998C7.91464%201.59998%204.60156%204.91305%204.60156%208.99998H6.60156ZM3.80078%2018.7999C3.80078%2018.0267%204.42758%2017.3999%205.20078%2017.3999V15.3999C3.32301%2015.3999%201.80078%2016.9222%201.80078%2018.7999H3.80078ZM5.20078%2020.1999C4.42758%2020.1999%203.80078%2019.5731%203.80078%2018.7999H1.80078C1.80078%2020.6777%203.32301%2022.1999%205.20078%2022.1999V20.1999ZM18.8008%2020.1999H5.20078V22.1999H18.8008V20.1999ZM20.2008%2018.7999C20.2008%2019.5731%2019.574%2020.1999%2018.8008%2020.1999V22.1999C20.6785%2022.1999%2022.2008%2020.6777%2022.2008%2018.7999H20.2008ZM18.8008%2017.3999C19.574%2017.3999%2020.2008%2018.0267%2020.2008%2018.7999H22.2008C22.2008%2016.9222%2020.6786%2015.3999%2018.8008%2015.3999V17.3999ZM5.20078%2017.3999H18.8008V15.3999H5.20078V17.3999Z%22%20fill%3D%22%23666666%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_251_63695%29%22%2F%3E%3C%2Fsvg%3E";export{C as default};
@@ -1 +0,0 @@
1
- var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAACXBIWXMAAAsTAAALEwEAmpwYAAABZWlDQ1BEaXNwbGF5IFAzAAB4nHWQvUvDUBTFT6tS0DqIDh0cMolD1NIKdnFoKxRFMFQFq1OafgltfCQpUnETVyn4H1jBWXCwiFRwcXAQRAcR3Zw6KbhoeN6XVNoi3sfl/Ticc7lcwBtQGSv2AijplpFMxKS11Lrke4OHnlOqZrKooiwK/v276/PR9d5PiFlNu3YQ2U9cl84ul3aeAlN//V3Vn8maGv3f1EGNGRbgkYmVbYsJ3iUeMWgp4qrgvMvHgtMunzuelWSc+JZY0gpqhrhJLKc79HwHl4plrbWD2N6f1VeXxRzqUcxhEyYYilBRgQQF4X/8044/ji1yV2BQLo8CLMpESRETssTz0KFhEjJxCEHqkLhz634PrfvJbW3vFZhtcM4v2tpCAzidoZPV29p4BBgaAG7qTDVUR+qh9uZywPsJMJgChu8os2HmwiF3e38M6Hvh/GMM8B0CdpXzryPO7RqFn4Er/QfBIQM2AAAAUUlEQVR4AYWOAQkAIQxFP5fgIlyEi2oEGxjBCNpAbGAD/YrCkImDt8Hfgw0APuLm1GrsH7Yi5FeRPMkySCQIeWVWO7Hk/yTtciURl+qywfZvAwveD9g2Kx/SAAAAAElFTkSuQmCC";export{A as default};
@@ -1 +0,0 @@
1
- var l="data:image/svg+xml,%3Csvg%20width%3D%226%22%20height%3D%2210%22%20viewBox%3D%220%200%206%2010%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1.69071%200.283877C1.5751%200.169695%201.42795%200.107415%201.25453%200.107415C0.907683%200.107415%200.629156%200.377298%200.629156%200.719841C0.629156%200.891113%200.702729%201.04681%200.823599%201.16619L4.50226%204.71618L0.8236%208.2558C0.70273%208.37518%200.629157%208.53607%200.629157%208.70215C0.629157%209.04469%200.907684%209.31458%201.25453%209.31458C1.42795%209.31458%201.5751%209.25229%201.69071%209.13811L5.77928%205.19367C5.92643%205.05873%205.99474%204.89265%206%204.71099C6%204.52934%205.92643%204.37364%205.77928%204.23351L1.69071%200.283877Z%22%20fill%3D%22black%22%20style%3D%22fill%3Ablack%3Bfill%3Ablack%3Bfill-opacity%3A1%3B%22%2F%3E%3C%2Fsvg%3E";export{l as default};
@@ -1 +0,0 @@
1
- import{__spreadArray as n}from"tslib";import"@tencentcloud/chat";import"../../constants.js";import"date-fns";import"date-fns/locale";import"@tencentcloud/chat-uikit-engine";import"react/jsx-runtime";import"react";import"../Icon/config.js";import"../Icon/type.js";var t=function(t,o){var r=n([],t,!0),i=r.findIndex((function(n){return(null==n?void 0:n.ID)===(null==o?void 0:o.ID)}));return r[i]=o,r},o=function(t,o){var r=n([],t,!0);r.some((function(n){return n.ID===(null==o?void 0:o.ID)}))||r.push(o);var i=r.findIndex((function(n){return(null==n?void 0:n.ID)===(null==o?void 0:o.ID)}));return r[i]=o,r};export{t as handleEditMessage,o as handleUploadPendingMessage};
@@ -1,12 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { Conversation } from '@tencentcloud/chat';
3
-
4
- interface ChatProps {
5
- chat?: any;
6
- language?: string;
7
- customClasses?: unknown;
8
- activeConversation?: Conversation;
9
- }
10
- declare function TUIKit<T extends ChatProps>(props: PropsWithChildren<T>): React.ReactElement;
11
-
12
- export { ChatProps, TUIKit };
@@ -1 +0,0 @@
1
- import{__assign as t}from"tslib";import{jsx as e,jsxs as o,Fragment as a}from"react/jsx-runtime";import{useState as n,useEffect as r}from"react";import{TUIStore as i,StoreName as c,TUIConversationService as s}from"@tencentcloud/chat-uikit-engine";import{TUILogin as l}from"@tencentcloud/tui-core";import{useTranslation as m}from"react-i18next";import{isPC as u,isH5 as C}from"../../utils/env.js";import{useTUIKit as h}from"./hooks/useTUIKit.js";import{useCreateTUIKitContext as d}from"./hooks/useCreateTUIKitContext.js";import{TUIKitProvider as v}from"../../context/TUIKitContext.js";import{TUIConversation as f}from"../TUIConversation/TUIConversation.js";import{TUIChat as T}from"../TUIChat/TUIChat.js";import{TUIManage as p}from"../TUIManage/TUIManage.js";import{TUIProfile as I}from"../TUIProfile/TUIProfile.js";import"../TUIProfile/TUIProfileDefault.js";import"@tencentcloud/chat";import"../../context/TUIMessageContext.js";import"../Icon/config.js";import"../Icon/type.js";import{TUIContactInfo as g}from"../TUIContact/TUIContactInfo/TUIContactInfo.js";import{TUIContact as U}from"../TUIContact/TUIContact.js";import{TUIKIT_TABBAR as S}from"../../constants.js";import"../../locales/index.js";import j from"../Icon/images/chats.svg.js";import A from"../Icon/images/chats-selected.svg.js";import N from"../Icon/images/contacts.svg.js";import w from"../Icon/images/contacts-selected.svg.js";var b=[{id:1,name:S.CHATS,icon:j,selectedIcon:A,value:S.CHATS},{id:2,name:S.CONTACTS,icon:N,selectedIcon:w,value:S.CONTACTS}],x={className:"sample-h5-input",isTransmitter:!0};function M(n){var r=n.moduleValue,i=n.tabbarRender,c=n.setModuleValue;return o(a,{children:[o("div",t({className:"sample-chat-left-container"},{children:[e(I,{className:"sample-chat-profile"}),i,r===S.CHATS&&e(f,{}),r===S.CONTACTS&&e(U,{})]})),r===S.CHATS&&o(a,{children:[e(T,{}),e(p,{})]}),r===S.CONTACTS&&e(U,{children:e(g,{showChats:function(){c(S.CHATS)}})})]})}function P(n){var r=n.moduleValue,i=n.contactData,c=n.tabbarRender,s=n.currentConversationID,l=n.setModuleValue;return o("div",t({className:"sample-chat-h5"},{children:[!s&&!i&&o("div",t({className:"sample-chat-h5-container"},{children:[e(I,{className:"sample-profile"}),c,r===S.CHATS&&e(f,{}),r===S.CONTACTS&&e(U,{})]})),r===S.CHATS&&s&&o(a,{children:[e(T,{TUIMessageInputConfig:x}),e(p,{})]}),r===S.CONTACTS&&i&&e(U,{children:e(g,{showChats:function(){l(S.CHATS)}})})]}))}function V(a){var f=n("chats"),T=f[0],p=f[1],I=m().t,g=a.children,U=a.chat,S=void 0===U?l.getContext().chat:U,j=a.customClasses,A=a.activeConversation,N=a.language,w=void 0===N?"en-US":N;window.tencent_cloud_im_csig_react_uikit_23F_xa=!0;var x=h({chat:S,activeConversation:A,language:w}),V=x.conversation,D=x.contactData,H=x.setActiveConversation,O=x.myProfile,_=x.TUIManageShow,k=x.setTUIManageShow,R=x.TUIProfileShow,y=x.setTUIProfileShow,K=x.setActiveContact,F=d({chat:S,language:w,conversation:V,contactData:D,setActiveConversation:H,customClasses:j,myProfile:O,TUIManageShow:_,setTUIManageShow:k,TUIProfileShow:R,setTUIProfileShow:y,setActiveContact:K});r((function(){return i.watch(c.CONV,{currentConversation:q}),function(){i.unwatch(c.CONV,{currentConversation:q})}}),[]);var q=function(t){H(null==t?void 0:t.getConversation())},z=e("div",t({className:"sample-chat-tab"},{children:b.map((function(a){return o("div",t({className:"sample-chat-tab-container",role:"presentation",onClick:function(){var t;t=a.value,p(t),s.switchConversation("")}},{children:[e("img",{src:T===a.value?a.selectedIcon:a.icon,alt:""}),e("p",t({className:"sample-chat-tab-text ".concat(T===a.value?"sample-chat-tab-active":"")},{children:I(a.name)}))]}),a.id)}))}));return e(v,t({value:F},{children:e("div",t({className:"tui-kit"},{children:g||u&&e(M,{moduleValue:T,tabbarRender:z,setModuleValue:p})||C&&e(P,{contactData:D,moduleValue:T,tabbarRender:z,currentConversationID:(null==V?void 0:V.conversationID)||"",setModuleValue:p})}))}))}export{V as TUIKit};
@@ -1,21 +0,0 @@
1
- import { UseContactParams } from './useTUIKit.js';
2
- import * as _tencentcloud_chat from '@tencentcloud/chat';
3
- import React from 'react';
4
- import { TUIKitContextValue } from '../../../context/TUIKitContext.js';
5
-
6
- declare const useCreateTUIKitContext: (value: TUIKitContextValue) => {
7
- chat: _tencentcloud_chat.ChatSDK;
8
- language: string;
9
- conversation: _tencentcloud_chat.Conversation | undefined;
10
- contactData: UseContactParams;
11
- customClasses: unknown;
12
- setActiveConversation: (conversation?: _tencentcloud_chat.Conversation | undefined) => void;
13
- myProfile: _tencentcloud_chat.Profile | undefined;
14
- TUIManageShow: boolean | undefined;
15
- setTUIManageShow: React.Dispatch<React.SetStateAction<boolean>> | undefined;
16
- TUIProfileShow: boolean | undefined;
17
- setTUIProfileShow: React.Dispatch<React.SetStateAction<boolean>> | undefined;
18
- setActiveContact: (UseContactParams?: UseContactParams) => void;
19
- };
20
-
21
- export { useCreateTUIKitContext };
@@ -1 +0,0 @@
1
- import{useMemo as t}from"react";var e=function(e){var o=e.chat,a=e.language,n=e.conversation,r=e.contactData,s=e.customClasses,c=e.setActiveConversation,i=e.myProfile,h=e.TUIManageShow,l=e.setTUIManageShow,v=e.TUIProfileShow,f=e.setTUIProfileShow,g=e.setActiveContact;return t((function(){return{chat:o,language:a,conversation:n,contactData:r,customClasses:s,setActiveConversation:c,myProfile:i,TUIManageShow:h,setTUIManageShow:l,TUIProfileShow:v,setTUIProfileShow:f,setActiveContact:g}}),[a,n,r,s,o,h,v,f,i])};export{e as useCreateTUIKitContext};
@@ -1,43 +0,0 @@
1
- import React from 'react';
2
- import { IGroupModel } from '@tencentcloud/chat-uikit-engine';
3
- import { ChatSDK, Conversation, Profile, Friend, FriendApplication } from '@tencentcloud/chat';
4
-
5
- interface blockData {
6
- type: 'block';
7
- data: Profile;
8
- }
9
- interface friendData {
10
- type: 'friend';
11
- data: Friend;
12
- }
13
- interface friendApplicationData {
14
- type: 'friendApplication';
15
- data: FriendApplication;
16
- }
17
- interface addFriendData {
18
- type: 'addFriend';
19
- data: Profile;
20
- }
21
- interface GroupData {
22
- type: 'group';
23
- data: IGroupModel;
24
- }
25
- type UseContactParams = blockData | friendData | friendApplicationData | addFriendData | GroupData | undefined;
26
- interface UseChatParams {
27
- chat: ChatSDK;
28
- activeConversation?: Conversation;
29
- language?: string;
30
- }
31
- declare const useTUIKit: ({ chat, activeConversation: paramsActiveConversation, language, }: UseChatParams) => {
32
- conversation: Conversation | undefined;
33
- contactData: UseContactParams;
34
- setActiveConversation: (activeConversation?: Conversation) => void;
35
- myProfile: Profile | undefined;
36
- TUIManageShow: boolean;
37
- setTUIManageShow: React.Dispatch<React.SetStateAction<boolean>>;
38
- TUIProfileShow: boolean;
39
- setTUIProfileShow: React.Dispatch<React.SetStateAction<boolean>>;
40
- setActiveContact: (actionContactData?: UseContactParams) => void;
41
- };
42
-
43
- export { UseChatParams, UseContactParams, useTUIKit };
@@ -1 +0,0 @@
1
- import{useState as n,useEffect as t,useCallback as o}from"react";import{TUIStore as e,StoreName as a}from"@tencentcloud/chat-uikit-engine";import{useTranslation as i}from"react-i18next";var r=function(r){var c=r.chat,s=r.activeConversation,u=r.language,v=i().i18n,f=n(s),l=f[0],g=f[1],h=n(),I=h[0],m=h[1],w=n(!1),D=w[0],S=w[1],U=n(!1),p=U[0],P=U[1],T=n(),d=T[0],C=T[1];t((function(){v.changeLanguage(u),e.watch(a.USER,{userProfile:function(n){m(n)}})}),[u]);var M=o((function(n){n&&(null==c||c.setMessageRead({conversationID:n.conversationID})),l&&(null==n?void 0:n.conversationID)!==l.conversationID&&S(!1),g(n)}),[c]);return t((function(){s&&g(s)}),[s]),{conversation:l,contactData:d,setActiveConversation:M,myProfile:I,TUIManageShow:D,setTUIManageShow:S,TUIProfileShow:p,setTUIProfileShow:P,setActiveContact:function(n){C(n)}}};export{r as useTUIKit};
@@ -1 +0,0 @@
1
- import{isThisYear as t,format as e,isToday as r,isYesterday as o,formatDistance as a,isThisWeek as n}from"date-fns";import{zhCN as i,enGB as c,ja as f,ko as u}from"date-fns/locale";import l from"@tencentcloud/chat";import{TUIStore as p,StoreName as s}from"@tencentcloud/chat-uikit-engine";import"tslib";import"react/jsx-runtime";import"react";import"./Icon/config.js";import"./Icon/type.js";import{defaultGroupAvatarWork as m,defaultUserAvatar as d}from"./Avatar/default.js";function P(t){if("string"==typeof t)try{return!!JSON.parse(t)}catch(t){return!1}return!1}function C(t){return P(t)?JSON.parse(t):t}var v=function(t,e){void 0===e&&(e=l.TYPES.CONV_C2C);var r=t;if(!t)switch(e){case l.TYPES.CONV_C2C:r=d;break;case l.TYPES.CONV_GROUP:default:r=m}return r},y=function(l,p){void 0===p&&(p="en-US");var s={"zh-CN":i,"en-US":c,"ja-JP":f,"ko-KR":u};return l?t(l)?r(l)?e(l,"p",{locale:s[p]}):o(l)?a(l,new Date,{locale:s[p]}):n(l)?e(l,"eeee",{locale:s[p]}):e(l,"MMM dd",{locale:s[p]}):e(l,"yyyy MMM dd",{locale:s[p]}):""};function S(t){var e=p.getData(s.APP,"tasks");t in e&&!e[t]&&(e[t]=!0,p.update(s.APP,"tasks",e))}export{C as JSONStringToParse,S as enableSampleTaskStatus,y as getTimeStamp,v as handleDisplayAvatar,P as isJSON};
@@ -1,25 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { ChatSDK, Conversation, Profile } from '@tencentcloud/chat';
3
- import { UseContactParams } from '../components/TUIKit/hooks/useTUIKit.js';
4
-
5
- interface TUIKitContextValue {
6
- chat: ChatSDK;
7
- language: string;
8
- conversation?: Conversation;
9
- contactData?: UseContactParams;
10
- setActiveConversation: (conversation?: Conversation) => void;
11
- customClasses?: unknown;
12
- myProfile?: Profile;
13
- TUIManageShow?: boolean;
14
- setTUIManageShow?: React.Dispatch<React.SetStateAction<boolean>>;
15
- TUIProfileShow?: boolean;
16
- setActiveContact: (UseContactParams?: UseContactParams) => void;
17
- setTUIProfileShow?: React.Dispatch<React.SetStateAction<boolean>>;
18
- }
19
- declare const TUIKitContext: React.Context<TUIKitContextValue | undefined>;
20
- declare function TUIKitProvider({ children, value }: PropsWithChildren<{
21
- value: TUIKitContextValue;
22
- }>): React.ReactElement;
23
- declare const useTUIKitContext: (componentName?: string) => TUIKitContextValue;
24
-
25
- export { TUIKitContext, TUIKitContextValue, TUIKitProvider, useTUIKitContext };
@@ -1 +0,0 @@
1
- import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";import e,{useLayoutEffect as n,useContext as o}from"react";var i=e.createContext(void 0);function a(e){var o=e.children,a=e.value;return n((function(){document.documentElement.dataset.chatTheme="light"}),[]),t(i.Provider,r({value:a},{children:o}))}var c=function(r){var t=o(i);return!t&&r?{}:t};export{i as TUIKitContext,a as TUIKitProvider,c as useTUIKitContext};