@tencentcloud/sdk-mcp 1.3.9 → 1.4.1

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 (514) hide show
  1. package/index.js +1 -1
  2. package/index.js.map +1 -1
  3. package/package.json +2 -2
  4. package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/android-faq.md} +75 -308
  5. package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +2 -2
  6. package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/flutter-faq.md} +83 -315
  7. package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/ios-faq.md} +76 -313
  8. package/resource/doc/{tuicallkit/vue/faq.md → callkit/faq/web-faq.md} +78 -311
  9. package/resource/doc/callkit/preset/android/api.md +330 -0
  10. package/resource/doc/{tuicallkit → callkit/preset}/android/integration.md +63 -420
  11. package/resource/doc/callkit/preset/flutter/api.md +401 -0
  12. package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +53 -273
  13. package/resource/doc/callkit/preset/ios/api.md +282 -0
  14. package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +39 -120
  15. package/resource/doc/callkit/preset/react/api.md +600 -0
  16. package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +6 -6
  17. package/resource/doc/callkit/preset/vue/api.md +600 -0
  18. package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +5 -5
  19. package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -37
  20. package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
  21. package/resource/doc/{chatuikit → chatkit}/android/integration.md +30 -126
  22. package/resource/doc/chatkit/faq/android_sdk/client-api.md +280 -0
  23. package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +4 -17
  24. package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -2
  25. package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +183 -0
  26. package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
  27. package/resource/doc/chatkit/faq/ios_sdk/client-api.md +279 -0
  28. package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +1 -1
  29. package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +4 -4
  30. package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
  31. package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +20 -95
  32. package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -37
  33. package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
  34. package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +78 -280
  35. package/resource/doc/{chatuikit/vue → chatkit/react}/components/avatar.md +0 -1
  36. package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +7 -12
  37. package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +10 -17
  38. package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +1 -1
  39. package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -1
  40. package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +122 -703
  41. package/resource/doc/chatkit/react/components/conversation-actions.md +174 -0
  42. package/resource/doc/chatkit/react/components/conversation-list.md +333 -0
  43. package/resource/doc/chatkit/react/components/conversation-preview.md +116 -0
  44. package/resource/doc/chatkit/react/components/conversation-search.md +57 -0
  45. package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -186
  46. package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +21 -113
  47. package/resource/doc/chatkit/react/components/search.md +282 -0
  48. package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +5 -26
  49. package/resource/doc/{chatuikit → chatkit}/react/integration.md +37 -104
  50. package/resource/doc/{chatuikit/react → chatkit/vue}/components/avatar.md +0 -1
  51. package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -13
  52. package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +13 -18
  53. package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +1 -2
  54. package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -1
  55. package/resource/doc/chatkit/vue/components/contact-list.md +271 -0
  56. package/resource/doc/chatkit/vue/components/conversation-actions.md +228 -0
  57. package/resource/doc/{chatuikit → chatkit}/vue/components/conversation-list.md +42 -316
  58. package/resource/doc/chatkit/vue/components/conversation-preview.md +213 -0
  59. package/resource/doc/chatkit/vue/components/conversation-search.md +50 -0
  60. package/resource/doc/{chatuikit → chatkit}/vue/components/message-input.md +1 -23
  61. package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -134
  62. package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
  63. package/resource/doc/chatkit/vue/components/tuikit.md +45 -0
  64. package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +4 -4
  65. package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
  66. package/resource/doc/{chatuikit → chatkit}/vue/integration.md +53 -121
  67. package/resource/doc/livekit/core-sdk/live/android/api-reference/AudioEffectStore.md +283 -0
  68. package/resource/doc/livekit/core-sdk/live/android/api-reference/BarrageStore.md +148 -0
  69. package/resource/doc/livekit/core-sdk/live/android/api-reference/BattleStore.md +316 -0
  70. package/resource/doc/livekit/core-sdk/live/android/api-reference/CameraView.md +57 -0
  71. package/resource/doc/livekit/core-sdk/live/android/api-reference/CoGuestStore.md +419 -0
  72. package/resource/doc/livekit/core-sdk/live/android/api-reference/CoHostStore.md +325 -0
  73. package/resource/doc/livekit/core-sdk/live/android/api-reference/DeviceStore.md +436 -0
  74. package/resource/doc/livekit/core-sdk/live/android/api-reference/GiftStore.md +165 -0
  75. package/resource/doc/livekit/core-sdk/live/android/api-reference/LikeStore.md +49 -0
  76. package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveAudienceStore.md +239 -0
  77. package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveCoreView.md +74 -0
  78. package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveSeatStore.md +417 -0
  79. package/resource/doc/livekit/core-sdk/live/android/api-reference/LoginStore.md +207 -0
  80. package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +17 -88
  81. package/resource/doc/livekit/{live → core-sdk/live}/android/live-audio-effect.md +34 -192
  82. package/resource/doc/livekit/{live → core-sdk/live}/android/live-barrage.md +26 -139
  83. package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +16 -99
  84. package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +54 -161
  85. package/resource/doc/livekit/{live → core-sdk/live}/android/live-gift.md +75 -455
  86. package/resource/doc/livekit/{live → core-sdk/live}/android/live-host-interaction.md +91 -338
  87. package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +108 -492
  88. package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +27 -165
  89. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/AudioEffectStore.md +279 -0
  90. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BarrageStore.md +158 -0
  91. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BaseBeautyStore.md +155 -0
  92. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BattleStore.md +304 -0
  93. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoGuestStore.md +394 -0
  94. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoHostStore.md +303 -0
  95. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/DeviceStore.md +410 -0
  96. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/GiftStore.md +160 -0
  97. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LikeStore.md +51 -0
  98. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveAudienceStore.md +231 -0
  99. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveCoreView.md +143 -0
  100. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveSeatStore.md +375 -0
  101. package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LoginStore.md +170 -0
  102. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +13 -91
  103. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -177
  104. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +18 -102
  105. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -164
  106. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -161
  107. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +66 -460
  108. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
  109. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-integration.md +160 -543
  110. package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +22 -161
  111. package/resource/doc/livekit/core-sdk/live/ios/api-reference/AudioEffectStore.md +287 -0
  112. package/resource/doc/livekit/core-sdk/live/ios/api-reference/BarrageStore.md +165 -0
  113. package/resource/doc/livekit/core-sdk/live/ios/api-reference/BaseBeautyStore.md +143 -0
  114. package/resource/doc/livekit/core-sdk/live/ios/api-reference/BattleStore.md +298 -0
  115. package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoGuestStore.md +349 -0
  116. package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoHostStore.md +297 -0
  117. package/resource/doc/livekit/core-sdk/live/ios/api-reference/DeviceStore.md +471 -0
  118. package/resource/doc/livekit/core-sdk/live/ios/api-reference/GiftStore.md +179 -0
  119. package/resource/doc/livekit/core-sdk/live/ios/api-reference/LikeStore.md +49 -0
  120. package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveAudienceStore.md +238 -0
  121. package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveCoreView.md +74 -0
  122. package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveSeatStore.md +412 -0
  123. package/resource/doc/livekit/core-sdk/live/ios/api-reference/LoginStore.md +173 -0
  124. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +23 -96
  125. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +33 -195
  126. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +35 -150
  127. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +20 -105
  128. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +35 -140
  129. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +77 -457
  130. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +70 -317
  131. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +90 -473
  132. package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +28 -163
  133. package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audience-list.md +17 -88
  134. package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audio-effect.md +34 -192
  135. package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-barrage.md +26 -139
  136. package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-co-guest-interaction.md +53 -262
  137. package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-gift.md +75 -455
  138. package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-host-interaction.md +60 -272
  139. package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-integration.md +63 -440
  140. package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-room-list.md +23 -151
  141. package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audience-list.md +13 -91
  142. package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audio-effect.md +34 -177
  143. package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-barrage.md +18 -102
  144. package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-co-guest-interaction.md +44 -201
  145. package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-gift.md +66 -460
  146. package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-integration.md +57 -419
  147. package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-room-list.md +24 -157
  148. package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audience-list.md +23 -96
  149. package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audio-effect.md +33 -195
  150. package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-barrage.md +35 -150
  151. package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-co-guest-interaction.md +45 -254
  152. package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-gift.md +77 -457
  153. package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-host-interaction.md +52 -261
  154. package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +478 -0
  155. package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-room-list.md +36 -167
  156. package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audience-list.md +15 -45
  157. package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audio-effect.md +23 -137
  158. package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-barrage.md +25 -131
  159. package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-co-guest-interaction.md +70 -366
  160. package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-gift.md +70 -424
  161. package/resource/doc/livekit/core-sdk/voice/uni-app/voice-integration.md +323 -0
  162. package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-room-list.md +24 -116
  163. package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -3
  164. package/resource/doc/livekit/preset/live/vue/api-reference/index.md +780 -0
  165. package/resource/doc/livekit/preset/live/vue/components/barrage.md +291 -0
  166. package/resource/doc/livekit/{live → preset/live}/vue/components/co-guest-panel.md +9 -48
  167. package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +27 -145
  168. package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +13 -76
  169. package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +33 -224
  170. package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +211 -0
  171. package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
  172. package/resource/doc/livekit/preset/live/vue/live-list-integration.md +244 -0
  173. package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +301 -0
  174. package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +307 -0
  175. package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +754 -0
  176. package/resource/doc/roomkit/android/features/call-user-to-room.md +234 -0
  177. package/resource/doc/roomkit/android/features/room-participant-state.md +850 -0
  178. package/resource/doc/roomkit/android/features/room-state.md +358 -0
  179. package/resource/doc/roomkit/android/features/schedule-room.md +336 -0
  180. package/resource/doc/roomkit/android/integration.md +433 -0
  181. package/resource/doc/roomkit/{common/error_code.md → faq/common/error-code.md} +1 -1
  182. package/resource/doc/roomkit/flutter/features/call-user-to-room.md +228 -0
  183. package/resource/doc/roomkit/flutter/features/room-participant-state.md +796 -0
  184. package/resource/doc/roomkit/flutter/features/room-state.md +324 -0
  185. package/resource/doc/roomkit/flutter/features/schedule-room.md +324 -0
  186. package/resource/doc/roomkit/flutter/integration.md +405 -0
  187. package/resource/doc/roomkit/ios/features/call-user-to-room.md +226 -0
  188. package/resource/doc/roomkit/ios/features/room-participant-state.md +821 -0
  189. package/resource/doc/roomkit/ios/features/room-state.md +320 -0
  190. package/resource/doc/roomkit/ios/features/schedule-room.md +318 -0
  191. package/resource/doc/roomkit/ios/integration.md +384 -0
  192. package/resource/doc/roomkit/vue/faq.md +1 -0
  193. package/resource/doc/roomkit/vue/features/call-user-to-room.md +17 -53
  194. package/resource/doc/roomkit/vue/features/device-detection.md +30 -48
  195. package/resource/doc/roomkit/vue/features/device-state.md +24 -44
  196. package/resource/doc/roomkit/vue/features/free-beauty-panel.md +13 -36
  197. package/resource/doc/roomkit/vue/features/room-chat.md +31 -89
  198. package/resource/doc/roomkit/vue/features/room-participant-state.md +28 -50
  199. package/resource/doc/roomkit/vue/features/room-state.md +25 -36
  200. package/resource/doc/roomkit/vue/features/room-view.md +30 -127
  201. package/resource/doc/roomkit/vue/features/schedule-room.md +9 -40
  202. package/resource/doc/roomkit/vue/features/screen-share.md +22 -90
  203. package/resource/doc/roomkit/vue/features/virtual-background.md +13 -34
  204. package/resource/doc/roomkit/vue/integration.md +21 -80
  205. package/resource/doc/rtcengine/faq/common/userSig.md +17 -141
  206. package/resource/doc/rtcengine/faq/web/web.md +15 -22
  207. package/resource/doc/rtcengine/web/api.md +17 -21
  208. package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +4 -10
  209. package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +4 -8
  210. package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +3 -3
  211. package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -3
  212. package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +6 -6
  213. package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +2 -2
  214. package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +2 -4
  215. package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +1 -2
  216. package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +2 -6
  217. package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +13 -14
  218. package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +10 -90
  219. package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -8
  220. package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +31 -35
  221. package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +0 -2
  222. package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +7 -49
  223. package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -1
  224. package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -3
  225. package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +20 -20
  226. package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +1 -1
  227. package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +4 -4
  228. package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
  229. package/resource/doc/trtc/C++/ITRTCCloud.md +718 -2847
  230. package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
  231. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +207 -1041
  232. package/resource/doc/trtc/C++/ITXDeviceManager.md +127 -768
  233. package/resource/doc/trtc/C++/TRTCCloudCallback.md +634 -2259
  234. package/resource/doc/trtc/C++/TRTCTypeDef.md +726 -3465
  235. package/resource/doc/trtc/C++/TXLiteAVCode.md +117 -916
  236. package/resource/doc/trtc/android/TRTCCloud.md +638 -2612
  237. package/resource/doc/trtc/android/TRTCCloudDef.md +769 -3697
  238. package/resource/doc/trtc/android/TRTCCloudListener.md +609 -2070
  239. package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
  240. package/resource/doc/trtc/android/TXAudioEffectManager.md +207 -1049
  241. package/resource/doc/trtc/android/TXBeautyManager.md +127 -704
  242. package/resource/doc/trtc/android/TXDeviceManager.md +51 -318
  243. package/resource/doc/trtc/android/TXLiteAVCode.md +115 -900
  244. package/resource/doc/trtc/iOS/TRTCCloud.md +726 -2930
  245. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +580 -2099
  246. package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
  247. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +179 -896
  248. package/resource/doc/trtc/iOS/TXBeautyManager.md +128 -710
  249. package/resource/doc/trtc/iOS/TXDeviceManager.md +129 -772
  250. package/resource/doc/trtc/iOS/TXLiteAVCode.md +117 -915
  251. package/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +747 -3559
  252. package/server.js +1 -5
  253. package/server.js.map +1 -1
  254. package/tools/call/get_callkit_api.js +32 -0
  255. package/tools/call/get_callkit_api.js.map +1 -0
  256. package/tools/call/get_native_call_uikit_integration.js +34 -0
  257. package/tools/call/get_native_call_uikit_integration.js.map +1 -0
  258. package/tools/call/{get-web-call-integration.js → get_web_call_uikit_integration.js} +13 -8
  259. package/tools/call/get_web_call_uikit_integration.js.map +1 -0
  260. package/tools/chat/get_native_chat_uikit_feature_detail.js +34 -0
  261. package/tools/chat/get_native_chat_uikit_feature_detail.js.map +1 -0
  262. package/tools/chat/get_native_chat_uikit_integration.js +45 -0
  263. package/tools/chat/get_native_chat_uikit_integration.js.map +1 -0
  264. package/tools/chat/get_web_chat_uikit_component_detail.js +34 -0
  265. package/tools/chat/get_web_chat_uikit_component_detail.js.map +1 -0
  266. package/tools/chat/get_web_chat_uikit_integration.js +45 -0
  267. package/tools/chat/get_web_chat_uikit_integration.js.map +1 -0
  268. package/tools/common/get_faq.js +265 -0
  269. package/tools/common/get_faq.js.map +1 -0
  270. package/tools/common/{get-usersig.js → get_usersig.js} +6 -3
  271. package/tools/common/get_usersig.js.map +1 -0
  272. package/tools/common/present_framework_choice.js +63 -0
  273. package/tools/common/present_framework_choice.js.map +1 -0
  274. package/tools/common/record_skill_session.js +58 -0
  275. package/tools/common/record_skill_session.js.map +1 -0
  276. package/tools/definitions/get_callkit_api_def.js +28 -0
  277. package/tools/definitions/get_callkit_api_def.js.map +1 -0
  278. package/tools/definitions/get_faq_def.js +18 -19
  279. package/tools/definitions/get_faq_def.js.map +1 -1
  280. package/tools/definitions/get_native_call_uikit_integration_def.js +15 -34
  281. package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
  282. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +31 -0
  283. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +1 -0
  284. package/tools/definitions/get_native_chat_uikit_integration_def.js +16 -41
  285. package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
  286. package/tools/definitions/get_native_livekit_core_features_def.js +33 -0
  287. package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
  288. package/tools/definitions/get_native_livekit_core_integration_def.js +33 -0
  289. package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -0
  290. package/tools/definitions/get_native_trtc_sdk_docs_def.js +32 -0
  291. package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +1 -0
  292. package/tools/definitions/get_usersig_def.js +17 -24
  293. package/tools/definitions/get_usersig_def.js.map +1 -1
  294. package/tools/definitions/get_web_call_uikit_integration_def.js +15 -7
  295. package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
  296. package/tools/definitions/get_web_chat_uikit_component_detail_def.js +17 -49
  297. package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
  298. package/tools/definitions/get_web_chat_uikit_integration_def.js +16 -19
  299. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
  300. package/tools/definitions/get_web_live_uikit_integration_def.js +13 -18
  301. package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
  302. package/tools/definitions/get_web_livekit_api_def.js +27 -0
  303. package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
  304. package/tools/definitions/get_web_livekit_component_detail_def.js +29 -0
  305. package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
  306. package/tools/definitions/get_web_room_uikit_integration_def.js +13 -46
  307. package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
  308. package/tools/definitions/get_web_roomkit_feature_detail_def.js +30 -0
  309. package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
  310. package/tools/definitions/get_web_trtc_sdk_api_def.js +25 -0
  311. package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
  312. package/tools/definitions/get_web_trtc_sdk_integration_def.js +25 -0
  313. package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
  314. package/tools/definitions/get_web_trtc_sdk_plugin_def.js +25 -0
  315. package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
  316. package/tools/definitions/present_framework_choice_def.js +23 -12
  317. package/tools/definitions/present_framework_choice_def.js.map +1 -1
  318. package/tools/definitions/record_skill_session_def.js +31 -0
  319. package/tools/definitions/record_skill_session_def.js.map +1 -0
  320. package/tools/index.js +49 -61
  321. package/tools/index.js.map +1 -1
  322. package/tools/live/get_native_livekit_core_features.js +65 -0
  323. package/tools/live/get_native_livekit_core_features.js.map +1 -0
  324. package/tools/live/get_native_livekit_core_integration.js +59 -0
  325. package/tools/live/get_native_livekit_core_integration.js.map +1 -0
  326. package/tools/live/get_web_live_uikit_integration.js +48 -0
  327. package/tools/live/get_web_live_uikit_integration.js.map +1 -0
  328. package/tools/live/get_web_livekit_api.js +32 -0
  329. package/tools/live/get_web_livekit_api.js.map +1 -0
  330. package/tools/live/get_web_livekit_component_detail.js +34 -0
  331. package/tools/live/get_web_livekit_component_detail.js.map +1 -0
  332. package/tools/room/{get-web-room-integration.js → get_web_room_uikit_integration.js} +13 -14
  333. package/tools/room/get_web_room_uikit_integration.js.map +1 -0
  334. package/tools/room/{get-web-room-feature-detail.js → get_web_roomkit_feature_detail.js} +30 -31
  335. package/tools/room/get_web_roomkit_feature_detail.js.map +1 -0
  336. package/tools/rtcengine/get_web_trtc_sdk_api.js +31 -0
  337. package/tools/rtcengine/get_web_trtc_sdk_api.js.map +1 -0
  338. package/tools/rtcengine/get_web_trtc_sdk_integration.js +31 -0
  339. package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +1 -0
  340. package/tools/rtcengine/get_web_trtc_sdk_plugin.js +31 -0
  341. package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +1 -0
  342. package/tools/trtc/get_native_trtc_sdk_docs.js +73 -0
  343. package/tools/trtc/get_native_trtc_sdk_docs.js.map +1 -0
  344. package/utils/generate-structured-result.js +61 -17
  345. package/utils/generate-structured-result.js.map +1 -1
  346. package/utils/report-cls-client.js +21 -1
  347. package/utils/report-cls-client.js.map +1 -1
  348. package/utils/report-es-client.js +1 -1
  349. package/resource/doc/chatuikit/android/workflow.md +0 -713
  350. package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1376
  351. package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -860
  352. package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1371
  353. package/resource/doc/chatuikit/flutter/workflow.md +0 -816
  354. package/resource/doc/chatuikit/iOS/workflow.md +0 -0
  355. package/resource/doc/chatuikit/react/components/conversation-list.md +0 -765
  356. package/resource/doc/chatuikit/react/components/search.md +0 -885
  357. package/resource/doc/chatuikit/react/create-group.md +0 -22
  358. package/resource/doc/chatuikit/react/init.md +0 -25
  359. package/resource/doc/chatuikit/react/workflow.md +0 -254
  360. package/resource/doc/chatuikit/uniapp-app/faq.md +0 -0
  361. package/resource/doc/chatuikit/uniapp-app/integration.md +0 -619
  362. package/resource/doc/chatuikit/uniapp-app/workflow.md +0 -576
  363. package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
  364. package/resource/doc/chatuikit/vue/components/tuikit.md +0 -110
  365. package/resource/doc/chatuikit/vue/create-group.md +0 -26
  366. package/resource/doc/chatuikit/vue/init.md +0 -35
  367. package/resource/doc/chatuikit/vue/workflow.md +0 -395
  368. package/resource/doc/livekit/live/android/workflow.md +0 -322
  369. package/resource/doc/livekit/live/flutter/workflow.md +0 -353
  370. package/resource/doc/livekit/live/ios/workflow.md +0 -352
  371. package/resource/doc/livekit/live/vue/components/barrage.md +0 -615
  372. package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -442
  373. package/resource/doc/livekit/live/vue/faq.md +0 -0
  374. package/resource/doc/livekit/live/vue/live-list-integration.md +0 -195
  375. package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -293
  376. package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -381
  377. package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -598
  378. package/resource/doc/livekit/live/vue/states/live-state.md +0 -2656
  379. package/resource/doc/livekit/live/vue/workflow.md +0 -219
  380. package/resource/doc/livekit/voice/android/workflow.md +0 -333
  381. package/resource/doc/livekit/voice/flutter/workflow.md +0 -359
  382. package/resource/doc/livekit/voice/ios/voice-integration.md +0 -853
  383. package/resource/doc/livekit/voice/ios/workflow.md +0 -358
  384. package/resource/doc/livekit/voice/uni-app/voice-integration.md +0 -613
  385. package/resource/doc/livekit/voice/uni-app/workflow.md +0 -369
  386. package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -334
  387. package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -434
  388. package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -685
  389. package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -712
  390. package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -284
  391. package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +0 -849
  392. package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +0 -1046
  393. package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +0 -460
  394. package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +0 -558
  395. package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +0 -879
  396. package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -668
  397. package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -456
  398. package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -332
  399. package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
  400. package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -328
  401. package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -505
  402. package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
  403. package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -676
  404. package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
  405. package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -820
  406. package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1065
  407. package/resource/doc/roomkit/vue/features/workflow.md +0 -553
  408. package/resource/doc/roomkit/vue/workflow.md +0 -733
  409. package/resource/doc/tuicallkit/android/workflow.md +0 -432
  410. package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -786
  411. package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -663
  412. package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -932
  413. package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -926
  414. package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -452
  415. package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -779
  416. package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -635
  417. package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
  418. package/resource/doc/tuicallkit/react/api.md +0 -1512
  419. package/resource/doc/tuicallkit/react/faq.md +0 -986
  420. package/resource/doc/tuicallkit/vue/api.md +0 -1512
  421. package/tools/call/get-native-call-integration.js +0 -43
  422. package/tools/call/get-native-call-integration.js.map +0 -1
  423. package/tools/call/get-web-call-api.js +0 -27
  424. package/tools/call/get-web-call-api.js.map +0 -1
  425. package/tools/call/get-web-call-integration.js.map +0 -1
  426. package/tools/chat/get-native-chat-feature-detail.js +0 -30
  427. package/tools/chat/get-native-chat-feature-detail.js.map +0 -1
  428. package/tools/chat/get-native-chat-integration.js +0 -45
  429. package/tools/chat/get-native-chat-integration.js.map +0 -1
  430. package/tools/chat/get-web-chat-component-detail.js +0 -31
  431. package/tools/chat/get-web-chat-component-detail.js.map +0 -1
  432. package/tools/chat/get-web-chat-integration.js +0 -45
  433. package/tools/chat/get-web-chat-integration.js.map +0 -1
  434. package/tools/chat/get-web-chat-uikit-init.js +0 -28
  435. package/tools/chat/get-web-chat-uikit-init.js.map +0 -1
  436. package/tools/chat/get-web-create-group-doc.js +0 -28
  437. package/tools/chat/get-web-create-group-doc.js.map +0 -1
  438. package/tools/common/get-faq.js +0 -91
  439. package/tools/common/get-faq.js.map +0 -1
  440. package/tools/common/get-usersig.js.map +0 -1
  441. package/tools/common/present-framework-choice.js +0 -16
  442. package/tools/common/present-framework-choice.js.map +0 -1
  443. package/tools/common/present-scenario-choice.js +0 -16
  444. package/tools/common/present-scenario-choice.js.map +0 -1
  445. package/tools/common/record-prompt.js +0 -55
  446. package/tools/common/record-prompt.js.map +0 -1
  447. package/tools/common/record-result.js +0 -60
  448. package/tools/common/record-result.js.map +0 -1
  449. package/tools/definitions/get_native_chat_feature_detail_def.js +0 -32
  450. package/tools/definitions/get_native_chat_feature_detail_def.js.map +0 -1
  451. package/tools/definitions/get_native_live_api_def.js +0 -22
  452. package/tools/definitions/get_native_live_api_def.js.map +0 -1
  453. package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -109
  454. package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +0 -1
  455. package/tools/definitions/get_native_live_uikit_integration_def.js +0 -75
  456. package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
  457. package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -63
  458. package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
  459. package/tools/definitions/get_trtc_native_api_def.js +0 -17
  460. package/tools/definitions/get_trtc_native_api_def.js.map +0 -1
  461. package/tools/definitions/get_web_call_uikit_api_def.js +0 -23
  462. package/tools/definitions/get_web_call_uikit_api_def.js.map +0 -1
  463. package/tools/definitions/get_web_chat_uikit_init_def.js +0 -23
  464. package/tools/definitions/get_web_chat_uikit_init_def.js.map +0 -1
  465. package/tools/definitions/get_web_create_group_doc_def.js +0 -18
  466. package/tools/definitions/get_web_create_group_doc_def.js.map +0 -1
  467. package/tools/definitions/get_web_live_state_detail_def.js +0 -19
  468. package/tools/definitions/get_web_live_state_detail_def.js.map +0 -1
  469. package/tools/definitions/get_web_live_uikit_component_detail_def.js +0 -27
  470. package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +0 -1
  471. package/tools/definitions/get_web_room_feature_detail_def.js +0 -92
  472. package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
  473. package/tools/definitions/present_scenario_choice_def.js +0 -53
  474. package/tools/definitions/present_scenario_choice_def.js.map +0 -1
  475. package/tools/definitions/record_prompt_def.js +0 -58
  476. package/tools/definitions/record_prompt_def.js.map +0 -1
  477. package/tools/definitions/record_result_def.js +0 -46
  478. package/tools/definitions/record_result_def.js.map +0 -1
  479. package/tools/live/get-native-live-uikit-integration.js +0 -177
  480. package/tools/live/get-native-live-uikit-integration.js.map +0 -1
  481. package/tools/live/get-web-live-component-detail.js +0 -31
  482. package/tools/live/get-web-live-component-detail.js.map +0 -1
  483. package/tools/live/get-web-live-state-detail.js +0 -31
  484. package/tools/live/get-web-live-state-detail.js.map +0 -1
  485. package/tools/live/get-web-live-uikit-integration.js +0 -52
  486. package/tools/live/get-web-live-uikit-integration.js.map +0 -1
  487. package/tools/live/get_native_live_uikit_extra_features.js +0 -105
  488. package/tools/live/get_native_live_uikit_extra_features.js.map +0 -1
  489. package/tools/live/get_native_live_uikit_interaction.js +0 -194
  490. package/tools/live/get_native_live_uikit_interaction.js.map +0 -1
  491. package/tools/native_live/get-native-live-api.js +0 -31
  492. package/tools/native_live/get-native-live-api.js.map +0 -1
  493. package/tools/room/get-web-room-feature-detail.js.map +0 -1
  494. package/tools/room/get-web-room-integration.js.map +0 -1
  495. package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +0 -28
  496. package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +0 -1
  497. package/tools/rtcengine/get-trtc-sdk-faq.js +0 -32
  498. package/tools/rtcengine/get-trtc-sdk-faq.js.map +0 -1
  499. package/tools/rtcengine/get-trtc-web-sdk-api.js +0 -28
  500. package/tools/rtcengine/get-trtc-web-sdk-api.js.map +0 -1
  501. package/tools/rtcengine/get-trtc-web-sdk-faq.js +0 -30
  502. package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +0 -1
  503. package/tools/rtcengine/get-trtc-web-sdk-integration.js +0 -29
  504. package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +0 -1
  505. package/tools/rtcengine/get-trtc-web-sdk-plugin.js +0 -45
  506. package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +0 -1
  507. package/tools/trtc/get-trtc-native-api.js +0 -31
  508. package/tools/trtc/get-trtc-native-api.js.map +0 -1
  509. package/utils/handle-component-name.js +0 -33
  510. package/utils/handle-component-name.js.map +0 -1
  511. /package/resource/doc/{rtcengine/web → callkit/core-sdk}/.gitkeep +0 -0
  512. /package/resource/doc/{chatuikit → chatkit}/faq/common/server_error_code.md +0 -0
  513. /package/resource/doc/{chatuikit → chatkit}/flutter/faq.md +0 -0
  514. /package/resource/doc/{chatuikit → chatkit}/react/faq.md +0 -0
@@ -0,0 +1,174 @@
1
+ `ConversationActions` 组件负责对于单条会话进行操作,默认支持会话删除、会话置顶/取消置顶、会话免打扰/取消免打扰功能。
2
+
3
+ ## 基础使用
4
+
5
+ 当在 `ConversationList` 使用 `ConversationActions` 时,您可以通过 `ConversationList` 顶层 `actionsConfig` 参数直接进行自定义,`actionsConfig` 支持对于默认会话操作功能开关、事件响应、新增自定义操作项、基础 UI 定制等。
6
+
7
+ 如您需要更高阶的定制,您可以通过 `ConversationActions` 自定义新的组件。
8
+
9
+ ### 使用 actionsConfig 基础定制
10
+ ``` typescript
11
+ import { UIKitProvider, ConversationList } from "@tencentcloud/chat-uikit-react";
12
+ import type { ConversationModel } from "@tencentcloud/chat-uikit-react";
13
+
14
+ const App = () => {
15
+ return (
16
+ <UIKitProvider>
17
+ <ConversationList
18
+ actionsConfig={{
19
+ enablePin: false,
20
+ onConversationDelete: (conversation: ConversationModel) => { console.log('Delete conversation success'); },
21
+ customConversationActions: {
22
+ 'custom-actions-1': {
23
+ label: 'custom-actions',
24
+ onClick: (conversation: ConversationModel) => { console.log(conversation); },
25
+ },
26
+ },
27
+ }}/>
28
+ </UIKitProvider>
29
+ );
30
+ }
31
+ ```
32
+
33
+ ### 自定义 ConversationActions 组件
34
+ ``` typescript
35
+ import { UIKitProvider, ConversationList, ConversationActions } from "@tencentcloud/chat-uikit-react";
36
+ import type { ConversationActionsProps } from '@tencentcloud/chat-uikit-react';
37
+
38
+ const CustomConversationActions = (props: ConversationActionsProps) => {
39
+ return <ConversationActions {...props} enableDelete={false} />;
40
+ };
41
+
42
+ const App = () => {
43
+ return (
44
+ <UIKitProvider>
45
+ <ConversationList
46
+ style={{ maxWidth: '300px', height: '600px' }}
47
+ ConversationActions={CustomConversationActions}
48
+ />
49
+ </UIKitProvider>
50
+ );
51
+ }
52
+ ```
53
+
54
+ ## Props
55
+
56
+ `ConversationActions` 组件的接口类型 `ConversationActionsProps` 基于 `ConversationActionsConfig` 接口进行扩展。
57
+ | ##### **IConversationActionsProps** | | | |
58
+ | --- | --- | --- | --- |
59
+ | **参数名** | **类型** | **默认值** | **说明** |
60
+ | **conversation*****(Required)*** | `ConversationModel` | - | 必选参数,表示当前渲染会话操作对应的会话。 |
61
+ | className | `String` | - | 自定义根元素的类名。 |
62
+ | style | `React.CSSProperties` | - | 自定义根元素的样式。 |
63
+ | ##### IConversationActionsConfig | | | |
64
+ | **参数名** | **类型** | **默认值** | **说明** |
65
+ | enablePin | `Boolean` | `true` | 是否显示置顶功能按钮。 |
66
+ | enableMute | `Boolean` | `true` | 是否显示免打扰功能按钮。 |
67
+ | enableDelete | `Boolean` | `true` | 是否显示删除功能按钮。 |
68
+ | onConversationPin | `(conversation: ConversationModel, e?: React.MouseEvent) => void` | - | 自定义置顶/取消置顶会话的行为。 |
69
+ | onConversationMute | `(conversation: ConversationModel, e?: React.MouseEvent)`<br>`=> void` | - | 自定义免打扰/取消免打扰会话的行为。 |
70
+ | onConversationDelete | `(conversation: ConversationModel, e?: React.MouseEvent) => void` | - | 自定义删除会话的行为。 |
71
+ | customConversationActions | `Record<string, ``ConversationActionItem``>` | - | 自定义会话操作项。 |
72
+ | PopupIcon | `ReactElement` | - | 自定义动作弹窗的图标。 |
73
+ | PopupElements | `ReactElement[]` | - | 自定义动作弹窗的内容。 |
74
+ | onClick | `(e: React.MouseEvent, key?: string, conversation?: ConversationModel) => void` | - | 点击动作项时的回调函数。 |
75
+
76
+ ## 自定义组件
77
+
78
+ ### 基础功能开关
79
+
80
+ 通过设置 `enablePin`, `enableDelete` 和 `enableMute` 参数,您可以灵活地控制 `ConversationActions` 中的会话置顶、会话免打扰和会话删除的显示。
81
+ ``` typescript
82
+ <ConversationActions enablePin={false} />
83
+ ```
84
+ ``` typescript
85
+ <ConversationActions enableDelete={false} />
86
+ ```
87
+ ``` typescript
88
+ <ConversationActions enableMute={false} />
89
+ ```
90
+ | `enablePin={false}` | `enableDelete={false}` | `enableMute={false} ` |
91
+ | --- | --- | --- |
92
+ | | | |
93
+
94
+ ### 事件响应
95
+
96
+ `ConversationActions` 组件默认支持会话删除、会话置顶/取消置顶、会话免打扰/取消免打扰功能,如已有功能的事件响应不符合您的需求,您可以自定义事件响应处理函数并进行覆盖; 除了支持对于功能事件响应的自定义外,您还可以通过 onClick 获取基础点击事件响应。
97
+ ``` typescript
98
+ import { ConversationList, ConversationActions, Toast } from '@tencentcloud/chat-uikit-react';
99
+ import type { ConversationActionsProps, ConversationModel } from '@tencentcloud/chat-uikit-react';
100
+
101
+ const CustomConversationActions = (props: ConversationActionsProps) => {
102
+ return (
103
+ <ConversationActions
104
+ {...props}
105
+ onConversationDelete={(conversation: ConversationModel) => {
106
+ conversation.deleteConversation().then(() => {
107
+ Toast({ text: 'delete conversation successfully!', type: 'info' });
108
+ }).catch(() => {
109
+ Toast({ text: 'delete conversation failed!', type: 'error' });
110
+ });
111
+ }}
112
+ />
113
+ );
114
+ };
115
+
116
+ <ConversationList ConversationActions={CustomConversationActions} />
117
+ ```
118
+
119
+ ### customConversationActions
120
+
121
+ `customConversationActions` 用于在 ConversationActions 上新增自定义操作项列表。
122
+ | ##### ConversationActionItem | | | |
123
+ | --- | --- | --- | --- |
124
+ | **参数名** | **类型** | **默认值** | **说明** |
125
+ | enable | `Boolean` | `true` | 是否启用自定义操作项。 |
126
+ | label | `String` | - | 自定义操作项的展示内容。 |
127
+ | onClick | `(conversation: ConversationModel, e?: React.MouseEvent) => void` | - | 点击自定义操作项时的回调函数。 |
128
+
129
+ 以下是使用 `customConversationActions` 新增自定义操作项的示例:
130
+ ``` typescript
131
+ import { ConversationList, ConversationActions } from '@tencentcloud/chat-uikit-react';
132
+ import type { ConversationActionsProps, ConversationModel } from '@tencentcloud/chat-uikit-react';
133
+
134
+ const CustomConversationActions = (props: ConversationActionsProps) => {
135
+ return (
136
+ <ConversationActions
137
+ {...props}
138
+ customConversationActions={{
139
+ 'custom-actions-1': {
140
+ label: 'custom-actions',
141
+ onClick: (conversation: ConversationModel) => { console.log(conversation); },
142
+ },
143
+ }}
144
+ />
145
+ );
146
+ };
147
+
148
+ <ConversationList ConversationActions={CustomConversationActions} />
149
+ ```
150
+ | **修改前** | **修改后** |
151
+ | --- | --- |
152
+ | | |
153
+
154
+ ### UI 界面定制
155
+
156
+ 您可以通过 `PopupIcon` 参数定制唤醒弹出按钮样式,通过 `PopupElements` 定制弹出内容。
157
+
158
+ 以下是在默认的 `ConversationActions` 组件的基础上进行二次开发,为其定制新的唤起按钮样式代码示例:
159
+ ``` typescript
160
+ import { ConversationList, ConversationActions, ConversationActionsProps } from '@tencentcloud/chat-uikit-react';
161
+ import type { ConversationActionsProps } from '@tencentcloud/chat-uikit-react';
162
+
163
+ const CustomConversationActions = (props: ConversationActionsProps) => {
164
+ const customIcon = <div> 自定义 Icon </div>
165
+ return (
166
+ <ConversationActions {...props} PopupIcon={customIcon} />
167
+ );
168
+ };
169
+
170
+ <ConversationList ConversationActions={CustomConversationActions} />
171
+ ```
172
+ | **修改前** | **修改后** |
173
+ | --- | --- |
174
+ | | |
@@ -0,0 +1,333 @@
1
+ ## 组件概述
2
+
3
+ `ConversationList` 组件主要负责会话列表功能,它包含了 Header 部分和 List 部分,具有搜索会话、创建会话、会话置顶、会话删除等功能。
4
+
5
+ 本文档将详细介绍该组件的基础使用,组件定制,自由组合以及组件的 props 参数列表。
6
+ | **会话列表** | **会话操作** | **会话搜索** | **创建会话** |
7
+ | --- | --- | --- | --- |
8
+ | | | | |
9
+
10
+ ## 组件构成
11
+
12
+ `ConversationList` 组件包含以下内容:
13
+ - `ConversationSearch` - 会话搜索
14
+
15
+ - `ConversationList UI` - 会话列表容器
16
+
17
+ - `ConversationPreview` - 单条会话信息展示
18
+
19
+ - `ConversationActions` - 单条会话操作
20
+
21
+ ## 基础使用
22
+
23
+ `ConversationList` 组件没有任何必须属性,您可以通过以下代码使用 `ConversationList`。
24
+ ``` typescript
25
+ import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-react';
26
+
27
+ const App = () => {
28
+ return (
29
+ <UIKitProvider>
30
+ <ConversationList />
31
+ </UIKitProvider>
32
+ );
33
+ };
34
+ ```
35
+
36
+ ## 自定义组件
37
+
38
+ `ConversationList` 为用户自定义提供了丰富且多维度的 Props 接口,允许用户自定义功能、UI、模块等。
39
+
40
+ `ConversationList` 组件提供了多个可替换的子组件,允许用户自定义 `Header`, `List`, `ConversationPreview`, `ConversationCreate`, `ConversationSearch`, `ConversationActions`, `Avatar`, `Placeholder` 等。同时,用户还可以利用默认子组件进行二次开发定制。
41
+
42
+ ### 基础功能开关
43
+
44
+ 通过设置 `enableSearch`, `enableCreate` 和 `enableActions` 参数,您可以灵活地控制 `ConversationList` 中的搜索会话、创建会话和会话操作功能的显示。
45
+ ``` typescript
46
+ <ConversationList enableSearch={false} />
47
+ ```
48
+ ``` typescript
49
+ <ConversationList enableCreate={false} />
50
+ ```
51
+ ``` typescript
52
+ <ConversationList enableActions={false} />
53
+ ```
54
+ | `enableSearch={false}` | `enableCreate={false}` | `enableActions={false}` |
55
+ | --- | --- | --- |
56
+ | | | |
57
+
58
+ ### 数据筛选和排序
59
+
60
+ ConversationList 组件提供了 `filterConversation` 和 `sortConversation` 属性,可以让您对会话列表数据进行筛选和排序。
61
+
62
+ #### 筛选会话
63
+
64
+ 要筛选会话列表数据,您可以给 `filterConversation` 属性传递一个筛选函数。这个函数接收一个 ConversationModel 数组作为参数,然后应该返回一个新数组,只包含符合您筛选条件的会话。
65
+
66
+ 下面是一个使用 `filterConversation` 属性来只显示“包含未读消息”的会话的例子:
67
+ ``` typescript
68
+ import { ConversationList } from '@tencentcloud/chat-uikit-react';
69
+ import type { ConversationModel } from '@tencentcloud/chat-uikit-react';
70
+
71
+ <ConversationList
72
+ filter={(conversationList: ConversationModel[]) =>
73
+ conversationList.filter(conversation => conversation.unreadCount > 0)}
74
+ />
75
+ ```
76
+
77
+ #### 排序会话
78
+
79
+ 要排序会话列表数据,您可以给 `sortConversation` 属性传递一个排序函数。这个函数接收一个 ConversationModel 数组作为参数,然后应该返回一个新数组,按照您的排序标准对会话进行排序。
80
+
81
+ 下面是一个使用 `sortConversation` 属性来按照“最新消息时间倒序”排序会话列表的例子:
82
+ ``` typescript
83
+ import { ConversationList } from '@tencentcloud/chat-uikit-react';
84
+ import type { ConversationModel } from '@tencentcloud/chat-uikit-react';
85
+
86
+ <ConversationList
87
+ sort={(conversationList: ConversationModel[]) =>
88
+ conversationList.sort(
89
+ (a, b) => (+(b?.lastMessage?.lastTime || 0)) - (+(a?.lastMessage?.lastTime || 0)),
90
+ )}
91
+ />
92
+ ```
93
+
94
+ 通过使用 `filter` 和 `sort` 属性,您可以根据您的需求有效地筛选和排序会话列表数据。
95
+
96
+ ### 自定义 actionsConfig
97
+
98
+ 利用 actionsConfig 对 ConversationActions 的基础功能进行控制。
99
+
100
+ 更多定制请详情参见 ConversationActions 章节。
101
+ ``` typescript
102
+ import { ConversationList } from '@tencentcloud/chat-uikit-react';
103
+ import type { ConversationModel } from '@tencentcloud/chat-uikit-react';
104
+
105
+ <ConversationList
106
+ actionsConfig={{
107
+ enablePin: false,
108
+ onConversationDelete: (conversation: ConversationModel) => { console.log('Delete conversation success'); },
109
+ customConversationActions: {
110
+ 'custom-actions-1': {
111
+ label: 'custom-actions',
112
+ onClick: (conversation: ConversationModel) => { console.log(conversation); },
113
+ },
114
+ },
115
+ }}
116
+ />
117
+ ```
118
+ | `enablePin: false` | `enableDelete: false` | `enableMute: false` | `customConversationActions` |
119
+ | --- | --- | --- | --- |
120
+ | | | | |
121
+
122
+ ### 自定义 Placeholder
123
+
124
+ 您可以通过传入 `PlaceholderEmptyList`、`PlaceholderLoading` 以及 `PlaceholderLoadError` 来定制不同状态下的列表展示。
125
+
126
+ 以下是定制一个新的 `PlaceholderLoading` 示例:
127
+ ``` typescript
128
+ import { ConversationList } from '@tencentcloud/chat-uikit-react';
129
+
130
+ <ConversationList
131
+ PlaceholderEmptyList={<div>Empty List!!!</div>}
132
+ />
133
+ ```
134
+
135
+ ### 自定义 Header
136
+
137
+ `ConversationListHeader` 负责 ConversationList Header 部分的渲染工作,作为包裹层渲染默认 `ConversationSearch` 与 `ConversationCreate` 。您可以通过传入 left、right 等属性进行自定义,同时,您也可以自定义整个组件。
138
+
139
+ #### Props
140
+ | **参数名** | **类型** | **默认值** | **说明** |
141
+ | --- | --- | --- | --- |
142
+ | children | `ReactNode` | - | 自定义会话列表头部中心组件。<br>在 `<ConversationList>` 中使用时,会默认传入 `<ConversationSearch>` 和 `<ConversationCreate>` 。 |
143
+ | left | `ReactElement` | - | 自定义会话列表头部左侧组件。 |
144
+ | right | `ReactElement` | - | 自定义会话列表头部右侧组件。 |
145
+ | className | `String` | - | 指定根元素类的 CSS 自定义名称。 |
146
+ | style | `React.CSSProperties` | - | 指定根元素样式的自定义样式。 |
147
+
148
+ #### 基础定制
149
+
150
+ 以下是在 Header 组件右侧添加一个新的功能按钮示例。
151
+ ``` typescript
152
+ import {
153
+ ConversationList,
154
+ ConversationListHeader,
155
+ } from '@tencentcloud/chat-uikit-react';
156
+ import type { ConversationListHeaderProps } from '@tencentcloud/chat-uikit-react';
157
+
158
+ const CustomConversationListHeader = (props: ConversationListHeaderProps) => {
159
+ const CustomIcon = <div>自定义 Icon </div>;
160
+ return (
161
+ <ConversationListHeader {...props} right={CustomIcon} />
162
+ );
163
+ };
164
+
165
+ <ConversationList Header={CustomConversationListHeader} />
166
+ ```
167
+
168
+ #### 高阶定制
169
+
170
+ 以下是实现一个简易的会话分组功能,按照全部会话、未读会话、单聊会话、群会话四个维度进行区分,通过点击不同分组按钮执行不同的筛选规则。
171
+ | **修改前** | **修改后** |
172
+ | --- | --- |
173
+ | | |
174
+
175
+ 【React】
176
+ ``` typescript
177
+ import { useState } from 'react';
178
+ import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
179
+ import { ConversationList, UIKitProvider } from '@tencentcloud/chat-uikit-react';
180
+ import type { ConversationListHeaderProps, ConversationModel } from '@tencentcloud/chat-uikit-react';
181
+
182
+ const App = () => {
183
+ const [currentFilter, setCurrentFilter] = useState<string>('all');
184
+ const conversationGroupFilter: Record<string, (conversationList: ConversationModel[]) => ConversationModel[]> = {
185
+ all: (conversationList: ConversationModel[]) => conversationList,
186
+ unread: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.unreadCount > 0),
187
+ c2c: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.type === TUIChatEngine.TYPES.CONV_C2C),
188
+ group: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.type === TUIChatEngine.TYPES.CONV_GROUP),
189
+ };
190
+
191
+ const CustomConversationListHeader = (props: IConversationListHeaderProps) => {
192
+ return (
193
+ <div className="conversation-group-wrapper">
194
+ <button className={currentFilter === 'all' ? 'btn-active' : 'btn-default'} onClick={() => setCurrentFilter('all')}>All</button>
195
+ <button className={currentFilter === 'unread' ? 'btn-active' : 'btn-default'} onClick={() => setCurrentFilter('unread')}>Unread</button>
196
+ <button className={currentFilter === 'c2c' ? 'btn-active' : 'btn-default'} onClick={() => setCurrentFilter('c2c')}>C2C</button>
197
+ <button className={currentFilter === 'group' ? 'btn-active' : 'btn-default'} onClick={() => setCurrentFilter('group')}>Group</button>
198
+ </div>
199
+ );
200
+ };
201
+
202
+ return (
203
+ <UIKitProvider>
204
+ <ConversationList
205
+ style={{ maxWidth: '300px', height: '600px' }}
206
+ Header={CustomConversationListHeader}
207
+ filter={conversationGroupFilter[currentFilter]}
208
+ />
209
+ </UIKitProvider>
210
+ );
211
+ };
212
+ ```
213
+
214
+ 【CSS】
215
+ ``` scss
216
+ .conversation-group-wrapper {
217
+ display: flex;
218
+ justify-content: space-around;
219
+ align-items: center;
220
+ margin: 10px;
221
+ font-size: 14px;
222
+ .btn-default{
223
+ display: flex;
224
+ padding: 5px 10px;
225
+ border: 1px solid #b3b3b4;
226
+ color: #3b3d43;
227
+ background-color: transparent;
228
+ border-radius: 2px;
229
+ }
230
+ .btn-active{
231
+ display: flex;
232
+ padding: 5px 10px;
233
+ border: 1px solid #1c66e5;
234
+ color: #1c66e5;
235
+ background-color: transparent;
236
+ border-radius: 2px;
237
+ }
238
+ }
239
+ ```
240
+
241
+ ### 自定义 List
242
+
243
+ `ConversationListContent` 负责 ConversationList 主列表部分的渲染工作。
244
+
245
+ 作为包裹层默认渲染 Context 中计算好的当前会话列表显示数据 `filteredAndSortedConversationList`。
246
+
247
+ #### Props
248
+ | **参数名** | **类型** | **默认值** | **说明** |
249
+ | --- | --- | --- | --- |
250
+ | children | `ReactNode` | - | 自定义会话列表内容区域组件。<br>在 `<ConversationList> `中使用时,会默认传入 `filteredAndSortedConversationList` 遍历的 `` 列表。 |
251
+ | empty | `Boolean` | `false` | 空会话列表标识位, 在 `<ConversationList>` 中使用时,会判断`filteredAndSortedConversationList.length === 0` 并传入。 |
252
+ | loading | `Boolean` | `false` | 会话列表加载中标识位,在 `<ConversationList>` 中使用时,使用 `useConversationList() `获取 `isLoading` 并传入。 |
253
+ | error | `Boolean` | `false` | 会话列表加载错误标识位,在 `<ConversationList>` 中使用时,使用 `useConversationList() `获取 `isLoadError` 并传入。 |
254
+ | PlaceholderEmptyList | `ReactNode` | `` | 自定义会话列表为空时的占位元素。 |
255
+ | PlaceholderLoading | `ReactNode` | `` | 自定义会话列表加载中的占位元素。 |
256
+ | PlaceholderLoadError | `ReactNode` | `` | 自定义会话列表加载错误时的占位元素。 |
257
+ | className | `String` | - | 指定根元素类的 CSS 自定义名称。 |
258
+ | style | `React.CSSProperties` | - | 指定根元素样式的自定义样式。 |
259
+
260
+ #### 基础定制
261
+
262
+ `List` 组件不同状态 UI 效果如下,在 `ConversationList` 内部已处理好每种状态的触发时机。
263
+
264
+ 同时,您可以通过自定义传入 `empty`、`loading`、`error` 来控制组件状态。
265
+ ``` typescript
266
+ import { ConversationList, ConversationListContent } from '@tencentcloud/chat-uikit-react';
267
+ import type { ConversationListContentProps } from '@tencentcloud/chat-uikit-react';
268
+
269
+ const CustomConversationListContent = (props: ConversationListContentProps) => {
270
+ return <ConversationListContent {...props} loading={true} />;
271
+ };
272
+
273
+ <ConversationList List={CustomConversationListContent} />
274
+ ```
275
+ | `default` | `empty={true}` | `loading={true}` | `error={true}` |
276
+ | --- | --- | --- | --- |
277
+ | | | | |
278
+
279
+ ### 自定义 ConversationPreview
280
+
281
+ 详情请参见 ConversationPreview 章节。
282
+ ``` typescript
283
+ <ConversationList ConversationPreview={CustomConversationPreview} />
284
+ ```
285
+
286
+ ### 自定义 ConversationActions
287
+
288
+ 详情请参见 ConversationActions 章节。
289
+ ``` typescript
290
+ <ConversationList ConversationActions={CustomConversationActions} />
291
+ ```
292
+
293
+ ### 自定义 ConversationSearch
294
+
295
+ 详情请参见 ConversationSearch 章节。
296
+ ``` typescript
297
+ <ConversationList ConversationSearch={CustomConversationSearch} />
298
+ ```
299
+
300
+ ### 自定义 ConversationCreate
301
+ ``` typescript
302
+ <ConversationList ConversationCreate={CustomConversationCreate} />
303
+ ```
304
+
305
+ ### 自定义 Avatar
306
+ ``` typescript
307
+ <ConversationList Avatar={CustomAvatar} />
308
+ ```
309
+
310
+ ## APIs/Props
311
+ | **参数名** | **类型** | **默认值** | **说明** |
312
+ | --- | --- | --- | --- |
313
+ | enableSearch | `Boolean` | `true` | 控制会话搜索功能是否显示。 |
314
+ | enableCreate | `Boolean` | `true` | 控制创建会话功能是否显示。 |
315
+ | enableActions | `Boolean` | `true` | 控制会话操作功能是否显示。 |
316
+ | actionsConfig | `ConversationActionsConfig` | - | 用于自定义会话操作配置。 |
317
+ | Header | `ReactElement` | `Header` | 自定义 Header 组件。 |
318
+ | List | `ReactElement` | `List` | 自定义会话列表组件。 |
319
+ | Preview | `ReactElement` | ConversationPreview | 自定义会话预览组件。 |
320
+ | ConversationCreate | `ReactElement` | `ConversationCreate` | 自定义创建会话组件。 |
321
+ | ConversationSearch | `ReactElement` | ConversationSearch | 自定义会话搜索组件。 |
322
+ | ConversationActions | `ReactElement` | ConversationActions | 自定义会话操作组件。 |
323
+ | Avatar | `ReactElement` | `Avatar` | 自定义头像组件。 |
324
+ | PlaceholderEmptyList | `ReactNode` | `` | 自定义会话列表为空时的占位元素。 |
325
+ | PlaceholderLoading | `ReactNode` | `` | 自定义会话列表加载中的占位元素。 |
326
+ | PlaceholderLoadError | `ReactNode` | `` | 自定义会话列表加载错误时的占位元素。 |
327
+ | filter | `(conversationList: ConversationModel[]) => ConversationModel[]` | - | 用于筛选会话列表的函数。 |
328
+ | sort | `(conversationList: ConversationModel[]) => ConversationModel[]` | - | 用于排序会话列表的函数。 |
329
+ | onConversationSelect | `(conversation: ConversationModel) => void;` | - | 点击会话后的回调函数,参数为所点击的会话对象。 |
330
+ | onBeforeCreateConversation | `(params: CreateParams) => CreateParams;` | - | 创建会话前执行的自定义操作,参数为创建会话所需的参数。 |
331
+ | onConversationCreate | `(conversation: ConversationModel) => void;` | - | 会话创建后的回调函数,参数为创建的会话对象。 |
332
+ | className | `String` | - | 指定根元素类的 CSS 自定义名称。 |
333
+ | style | `React.CSSProperties` | - | 指定根元素样式的自定义样式。 |
@@ -0,0 +1,116 @@
1
+ `ConversationPreview` 用于对于会话列表中单条会话内容进行预览,组件负责显示会话信息、未读计数以及提供会话操作功能。
2
+
3
+ 借助原子化的信息展示组件,您可以自由地设计和组合出您所期望的 `ConversationPreview` 布局。
4
+
5
+ 同时,您还可以通过 `onConversationSelect` 函数来自定义选中会话时的行为。
6
+
7
+ ### 基础使用
8
+
9
+ 您可以使用 `ConversationList` 的 `Preview` 属性来自定义会话列表中每个单独会话的预览项,如果没有指定 `Preview` 属性,系统将自动采用 `ConversationPreviewUI` 组件作为默认值。
10
+ ``` typescript
11
+ import { ConversationList, ConversationPreviewUI } from '@tencentcloud/chat-uikit-react';
12
+ import type { ConversationPreviewUIProps } from '@tencentcloud/chat-uikit-react';
13
+
14
+ const CustomConversationPreview = (props: ConversationPreviewUIProps) => {
15
+ const { Title } = props;
16
+ return (
17
+ <ConversationPreviewUI {...props}>
18
+ {Title}
19
+ <div>Your custom preview UI</div>
20
+ </ConversationPreviewUI>
21
+ );
22
+ };
23
+
24
+ <ConversationList Preview={CustomConversationPreviewUI}></ConversationList>
25
+ ```
26
+
27
+ ### Props
28
+ | **参数名** | **类型** | **默认值** | **说明** |
29
+ | --- | --- | --- | --- |
30
+ | **conversation*****(Required)*** | `ConversationModel` | - | 必选参数,标识当前渲染的会话列表项。 |
31
+ | isSelected | `Boolean` | `false` | 控制会话列表项 UI 是否处于选中状态。 |
32
+ | enableActions | `Boolean` | `true` | 控制会话操作功能是否显示。 |
33
+ | actionsConfig | ConversationActionsConfig | - | 用于自定义会话操作配置。 |
34
+ | highlightMatchString | `String` | - | 会话列表项 Title 高亮匹配关键词,常用于会话搜索结果高亮。 |
35
+ | Title | `String \\| JSX.Element` | `ConversationPreviewTitle` | 渲染会话列表项标题区域。 |
36
+ | LastMessageAbstract | `String \\| JSX.Element` | `ConversationPreviewAbstract` | 渲染会话列表项最新消息摘要区域。 |
37
+ | LastMessageTimestamp | `String \\| JSX.Element` | `ConversationPreviewTimestamp` | 渲染会话列表项最新消息时间戳区域。 |
38
+ | Unread | `String \\| JSX.Element` | `ConversationPreviewUnread` | 渲染会话列表项消息未读标识区域。 |
39
+ | ConversationActions | `ReactElement` | `ConversationActions` | 渲染会话列表项会话操作区域。 |
40
+ | Avatar | `ReactElement` | `Avatar` | 渲染会话列表项头像区域。 |
41
+ | onConversationSelect | `(conversation: ConversationModel) => void;` | - | 指定在选择对话列表中的对话时接收回调的属性。 |
42
+ | className | `String` | - | 指定根元素类的 CSS 自定义名称。 |
43
+ | style | `React.CSSProperties` | - | 指定根元素样式的自定义样式。 |
44
+
45
+ ## 自定义案例
46
+
47
+ ### 类 Discord 风格
48
+
49
+ Discord 是一个流行的聊天应用程序,类似于 Skype 或 Telegram。Discord 中的聊天内容如下图所示:
50
+
51
+ 通过对 `ConversationPreview` 布局、功能以及样式的定制,我们可以快速实现类 Discord 效果。
52
+
53
+ 【React】
54
+ 1. 定制 `ConversationListPreview`
55
+
56
+ 2. 切换主题到深色模式
57
+
58
+ ``` typescript
59
+ import { UIKitProvider, ConversationList, ConversationPreviewUI } from '@tencentcloud/chat-uikit-react';
60
+ import type { ConversationPreviewUIProps } from '@tencentcloud/chat-uikit-react';
61
+
62
+ const CustomConversationPreview = (props: ConversationPreviewUIProps) => {
63
+ const { Title } = props;
64
+ return (
65
+ <ConversationPreviewUI {...props}>
66
+ <span> # </span>
67
+ <span>{Title}</span>
68
+ </ConversationPreviewUI>
69
+ );
70
+ };
71
+
72
+ const App = () => {
73
+ <UIKitProvider theme={'dark'}>
74
+ <ConversationList
75
+ style={{ maxWidth: '300px', height: '600px' }}
76
+ Preview={CustomConversationPreviewUI}
77
+ />
78
+ ...
79
+ </UIKitProvider>
80
+ }
81
+ ```
82
+
83
+ 【CSS】
84
+ ``` scss
85
+ .custom-preview-ui {
86
+ height: 34px;
87
+ border-radius: 6px;
88
+ padding: 10px;
89
+ margin: 0 10px;
90
+ .custom-preview-ui__tag {
91
+ margin-right: 10px;
92
+ font-size: 16px;
93
+ color: #b3b3b4;
94
+ }
95
+ .custom-preview-ui__title {
96
+ font-size: 14px;
97
+ color: #b3b3b4;
98
+ }
99
+ &.uikit-conversation-preview--active {
100
+ background-color: #3b3d43;
101
+ .custom-preview-ui__tag {
102
+ color: #ffffff;
103
+ }
104
+ .custom-preview-ui__title {
105
+ .uikit-conversation-preview__title {
106
+ color: #ffffff;
107
+ }
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ `ConversationListPreview` 定制后效果如下:
114
+ | **修改前** | **修改后** |
115
+ | --- | --- |
116
+ | | |
@@ -0,0 +1,57 @@
1
+ `ConversationSearch` 是使用的 Search 组件,支持用户、群组、消息的搜索功能。它集成了搜索框、高级搜索、搜索结果展示等功能。
2
+
3
+ ## 基础使用
4
+ ``` typescript
5
+ import {
6
+ UIKitProvider,
7
+ ConversationList,
8
+ ConversationSearch,
9
+ } from '@tencentcloud/chat-uikit-react';
10
+
11
+ import type {
12
+ ConversationSearchProps,
13
+ SearchResultItem,
14
+ } from '@tencentcloud/chat-uikit-react';
15
+
16
+ const CustomConversationSearch = (props: ConversationSearchProps) => {
17
+ const onSelectResult = (data: SearchResultItem, type: ISearchType) => {
18
+ console.warn(`Select Search Result: ${JSON.stringify(data)}, type: ${type}`);
19
+ };
20
+ return (
21
+ <ConversationSearch {...props} onResultItemClick={onSelectResult} />
22
+ );
23
+ };
24
+
25
+ const App = () => {
26
+ return (
27
+ <UIKitProvider>
28
+ <ConversationList
29
+ style={{ maxWidth: '300px', height: '600px' }}
30
+ ConversationSearch={CustomConversationSearch}
31
+ />
32
+ </UIKitProvider>
33
+ );
34
+ };
35
+ ```
36
+
37
+ ## Props
38
+ | **参数名** | **类型** | **默认值** | **说明** |
39
+ | --- | --- | --- | --- |
40
+ | visible | `boolean` | `true` | 是否可见 |
41
+ | Search | `ComponentType<SearchProps>` | - | 自定义搜索组件 |
42
+ | variant | `VariantType` | `VariantType.MINI` | 搜索模式:`mini`(迷你)、`standard`(标准)、`embedded`(嵌入式) |
43
+ | SearchBar | `React.ComponentType<SearchBarProps>` | `DefaultSearchBar` | 自定义搜索框组件 |
44
+ | SearchResults | `React.ComponentType<SearchResultsProps>` | `DefaultSearchResults` | 自定义搜索结果组件 |
45
+ | SearchAdvanced | `React.ComponentType<SearchAdvancedProps>` | `DefaultSearchAdvanced` | 自定义高级搜索组件 |
46
+ | SearchResultsPresearch | `React.ComponentType` | - | 搜索前占位符组件 |
47
+ | SearchResultsLoading | `React.ComponentType` | - | 加载中占位符组件 |
48
+ | SearchResultsEmpty | `React.ComponentType` | - | 空结果占位符组件 |
49
+ | SearchResultItem | `React.ComponentType<ResultItemProps>` | - | 自定义搜索结果项组件 |
50
+ | debounceTime | `number` | `300` | 搜索防抖时间(毫秒) |
51
+ | autoFocus | `boolean` | `false` | 是否自动聚焦搜索框 |
52
+ | className | `string` | - | 自定义样式类名 |
53
+ | style | `React.CSSProperties` | - | 自定义样式 |
54
+ | onKeywordChange | `(keyword: string) => void` | - | 搜索关键词变化回调 |
55
+ | onSearchComplete | `(results: Map<SearchType, SearchResult>) => void` | - | 搜索完成回调 |
56
+ | onResultItemClick | `(data: SearchResultItem, type: SearchType) => void` | - | 搜索结果点击回调 |
57
+ | onError | `(error: Error) => void` | - | 搜索错误回调 |