@tencent-rtc/mcp 1.4.6 → 1.6.0-beta.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 (552) hide show
  1. package/cursor-setting.png +0 -0
  2. package/knowledge/bm25-cache.js +74 -0
  3. package/knowledge/bm25-cache.js.map +1 -0
  4. package/knowledge/bm25.js +148 -0
  5. package/knowledge/bm25.js.map +1 -0
  6. package/knowledge/build-index.js +70 -0
  7. package/knowledge/build-index.js.map +1 -0
  8. package/knowledge/chunker.js +168 -0
  9. package/knowledge/chunker.js.map +1 -0
  10. package/knowledge/content-loader.js +40 -0
  11. package/knowledge/content-loader.js.map +1 -0
  12. package/knowledge/doc-url-resolver.js +143 -0
  13. package/knowledge/doc-url-resolver.js.map +1 -0
  14. package/knowledge/extractors.js +26 -0
  15. package/knowledge/extractors.js.map +1 -0
  16. package/knowledge/path-meta.js +185 -0
  17. package/knowledge/path-meta.js.map +1 -0
  18. package/knowledge/search/exact-lookup.js +498 -0
  19. package/knowledge/search/exact-lookup.js.map +1 -0
  20. package/knowledge/search/filter-pool.js +105 -0
  21. package/knowledge/search/filter-pool.js.map +1 -0
  22. package/knowledge/search/product-scope-intent.js +41 -0
  23. package/knowledge/search/product-scope-intent.js.map +1 -0
  24. package/knowledge/search/requires-framework.js +82 -0
  25. package/knowledge/search/requires-framework.js.map +1 -0
  26. package/knowledge/search/search-knowledge.js +230 -0
  27. package/knowledge/search/search-knowledge.js.map +1 -0
  28. package/mcp-server-prompt.png +0 -0
  29. package/package.json +1 -1
  30. package/resource/_schema/feature-aliases.yaml +10 -0
  31. package/resource/_schema/goal-tags.yaml +72 -0
  32. package/resource/_schema/products.yaml +19 -0
  33. package/resource/_schema/trtc-intents.yaml +27 -0
  34. package/resource/_schema/types.yaml +43 -0
  35. package/resource/index/component-slugs.json +1 -0
  36. package/resource/index/doc-source-urls.json +1 -0
  37. package/resource/index/manifest.json +1 -0
  38. package/resource/{doc → integration}/callkit/preset/android/integration.md +34 -28
  39. package/resource/integration/callkit/preset/flutter/integration.md +346 -0
  40. package/resource/integration/callkit/preset/ios/integration.md +408 -0
  41. package/resource/integration/callkit/preset/react/integration.md +362 -0
  42. package/resource/integration/callkit/preset/vue/integration.md +356 -0
  43. package/resource/integration/chat/preset/android/integration.md +500 -0
  44. package/resource/integration/chat/preset/flutter/integration.md +370 -0
  45. package/resource/integration/chat/preset/ios/integration.md +566 -0
  46. package/resource/integration/chat/preset/react/integration.md +490 -0
  47. package/resource/integration/chat/preset/vue/integration.md +504 -0
  48. package/resource/{doc → integration}/livekit/preset/live/vue/live-list-integration.md +26 -22
  49. package/resource/{doc → integration}/livekit/preset/live/vue/live-player-desk-integration.md +22 -18
  50. package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +309 -0
  51. package/resource/{doc → integration}/livekit/preset/live/vue/live-pusher-integration.md +47 -39
  52. package/resource/integration/roomkit/preset/vue/integration.md +562 -0
  53. package/resource/knowledge/callkit/core-sdk/android/answer-call.md +828 -0
  54. package/resource/knowledge/callkit/core-sdk/android/make-call.md +897 -0
  55. package/resource/knowledge/callkit/core-sdk/android/offline-push.md +363 -0
  56. package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +1111 -0
  57. package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +1132 -0
  58. package/resource/{doc → knowledge}/callkit/core-sdk/flutter/offline-push.md +174 -151
  59. package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1084 -0
  60. package/resource/knowledge/callkit/core-sdk/ios/make-call.md +1252 -0
  61. package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +534 -0
  62. package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +953 -0
  63. package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +1061 -0
  64. package/resource/knowledge/callkit/faq/android.md +92 -0
  65. package/resource/{doc/callkit/faq/android-faq.md → knowledge/callkit/faq/common.md} +11 -12
  66. package/resource/knowledge/callkit/faq/error-code.md +67 -0
  67. package/resource/knowledge/callkit/faq/flutter.md +52 -0
  68. package/resource/knowledge/callkit/faq/ios.md +104 -0
  69. package/resource/knowledge/callkit/faq/web.md +74 -0
  70. package/resource/knowledge/callkit/preset/android/api.md +412 -0
  71. package/resource/knowledge/callkit/preset/flutter/api.md +22 -0
  72. package/resource/knowledge/callkit/preset/ios/api.md +234 -0
  73. package/resource/knowledge/callkit/preset/web/api.md +83 -0
  74. package/resource/knowledge/chat/preset/android/features/chat-setting.md +74 -0
  75. package/resource/knowledge/chat/preset/android/features/contact-list.md +43 -0
  76. package/resource/knowledge/chat/preset/android/features/conversation-list.md +117 -0
  77. package/resource/knowledge/chat/preset/android/features/language.md +136 -0
  78. package/resource/knowledge/chat/preset/android/features/message-input.md +57 -0
  79. package/resource/knowledge/chat/preset/android/features/message-list.md +142 -0
  80. package/resource/knowledge/chat/preset/android/features/search.md +64 -0
  81. package/resource/knowledge/chat/preset/android/features/theme.md +222 -0
  82. package/resource/knowledge/chat/preset/android-view/integration.md +300 -0
  83. package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +64 -0
  84. package/resource/knowledge/chat/preset/flutter/features/contact-list.md +40 -0
  85. package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +129 -0
  86. package/resource/knowledge/chat/preset/flutter/features/language.md +104 -0
  87. package/resource/knowledge/chat/preset/flutter/features/message-input.md +54 -0
  88. package/resource/knowledge/chat/preset/flutter/features/message-list.md +158 -0
  89. package/resource/knowledge/chat/preset/flutter/features/search.md +59 -0
  90. package/resource/knowledge/chat/preset/flutter/features/theme.md +261 -0
  91. package/resource/knowledge/chat/preset/ios/features/chat-setting.md +94 -0
  92. package/resource/knowledge/chat/preset/ios/features/contact-list.md +119 -0
  93. package/resource/knowledge/chat/preset/ios/features/conversation-list.md +134 -0
  94. package/resource/knowledge/chat/preset/ios/features/language.md +125 -0
  95. package/resource/knowledge/chat/preset/ios/features/message-input.md +69 -0
  96. package/resource/knowledge/chat/preset/ios/features/message-list.md +162 -0
  97. package/resource/knowledge/chat/preset/ios/features/search.md +93 -0
  98. package/resource/knowledge/chat/preset/ios/features/theme.md +270 -0
  99. package/resource/{doc/chatkit/ios → knowledge/chat/preset/ios-uikit}/integration.md +160 -158
  100. package/resource/knowledge/chat/preset/react/features/chat-setting.md +101 -0
  101. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/contact-list.md +43 -41
  102. package/resource/knowledge/chat/preset/react/features/conversation-actions.md +215 -0
  103. package/resource/knowledge/chat/preset/react/features/conversation-list.md +339 -0
  104. package/resource/knowledge/chat/preset/react/features/conversation-preview.md +101 -0
  105. package/resource/knowledge/chat/preset/react/features/conversation-search.md +61 -0
  106. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/message-input.md +117 -156
  107. package/resource/knowledge/chat/preset/react/features/message-list.md +297 -0
  108. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/search.md +65 -59
  109. package/resource/knowledge/chat/preset/react/features/theme.md +93 -0
  110. package/resource/knowledge/chat/preset/vue/features/chat-header.md +331 -0
  111. package/resource/knowledge/chat/preset/vue/features/chat-setting.md +79 -0
  112. package/resource/knowledge/chat/preset/vue/features/contact-list.md +277 -0
  113. package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +234 -0
  114. package/resource/knowledge/chat/preset/vue/features/conversation-list.md +331 -0
  115. package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +216 -0
  116. package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/conversation-search.md +13 -13
  117. package/resource/knowledge/chat/preset/vue/features/message-input.md +551 -0
  118. package/resource/knowledge/chat/preset/vue/features/message-list.md +350 -0
  119. package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/search.md +79 -73
  120. package/resource/knowledge/chat/preset/vue/features/theme.md +136 -0
  121. package/resource/knowledge/chat/urls/error-code.md +17 -0
  122. package/resource/knowledge/chat/urls/product.md +43 -0
  123. package/resource/knowledge/chat/urls/restapi.md +204 -0
  124. package/resource/knowledge/chat/urls/sdk/android.md +80 -0
  125. package/resource/knowledge/chat/urls/sdk/flutter.md +71 -0
  126. package/resource/knowledge/chat/urls/sdk/ios.md +80 -0
  127. package/resource/knowledge/chat/urls/sdk/web.md +80 -0
  128. package/resource/knowledge/chat/urls/webhook.md +68 -0
  129. package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +286 -0
  130. package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +174 -0
  131. package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +329 -0
  132. package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +55 -0
  133. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +434 -0
  134. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +362 -0
  135. package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +466 -0
  136. package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +173 -0
  137. package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +51 -0
  138. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +291 -0
  139. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +78 -0
  140. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +488 -0
  141. package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +219 -0
  142. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +282 -0
  143. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +212 -0
  144. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +153 -0
  145. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +312 -0
  146. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +404 -0
  147. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +334 -0
  148. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +426 -0
  149. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +166 -0
  150. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +52 -0
  151. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +281 -0
  152. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +150 -0
  153. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +438 -0
  154. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +190 -0
  155. package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +291 -0
  156. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +192 -0
  157. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +146 -0
  158. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +309 -0
  159. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +370 -0
  160. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +339 -0
  161. package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +503 -0
  162. package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +188 -0
  163. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +51 -0
  164. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +289 -0
  165. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +78 -0
  166. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +487 -0
  167. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +183 -0
  168. package/resource/knowledge/livekit/core-sdk/api-reference/web/index.md +736 -0
  169. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audience-list.md +53 -47
  170. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audio-effect.md +28 -24
  171. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-barrage.md +22 -18
  172. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-base-beauty.md +17 -15
  173. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-co-guest-interaction.md +19 -18
  174. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-gift.md +102 -89
  175. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-host-interaction.md +41 -37
  176. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-integration.md +45 -43
  177. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-live-list.md +23 -20
  178. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audience-list.md +41 -41
  179. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audio-effect.md +70 -69
  180. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-barrage.md +68 -71
  181. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-base-beauty.md +43 -47
  182. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-co-guest-interaction.md +59 -56
  183. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-gift.md +103 -105
  184. package/resource/knowledge/livekit/core-sdk/live/flutter/live-host-interaction.md +869 -0
  185. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-integration.md +84 -87
  186. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-live-list.md +43 -40
  187. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audience-list.md +11 -10
  188. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audio-effect.md +28 -24
  189. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-barrage.md +22 -18
  190. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-base-beauty.md +15 -14
  191. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-co-guest-interaction.md +19 -18
  192. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-gift.md +54 -50
  193. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-host-interaction.md +41 -37
  194. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-integration.md +40 -40
  195. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-live-list.md +19 -18
  196. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audience-list.md +53 -47
  197. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audio-effect.md +28 -24
  198. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-barrage.md +22 -18
  199. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +41 -33
  200. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-gift.md +94 -81
  201. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-host-interaction.md +35 -30
  202. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-integration.md +45 -42
  203. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-room-list.md +23 -20
  204. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +260 -0
  205. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +598 -0
  206. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-barrage.md +490 -0
  207. package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +65 -59
  208. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +424 -0
  209. package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-integration.md +69 -76
  210. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-room-list.md +726 -0
  211. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audience-list.md +11 -10
  212. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audio-effect.md +28 -24
  213. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-barrage.md +22 -18
  214. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +41 -33
  215. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-gift.md +54 -50
  216. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-host-interaction.md +35 -30
  217. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-integration.md +49 -46
  218. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-room-list.md +19 -18
  219. package/resource/knowledge/livekit/faq/error-code.md +193 -0
  220. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/barrage.md +56 -53
  221. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-audience-list.md +22 -21
  222. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-view.md +34 -32
  223. package/resource/knowledge/push/config/android.md +92 -0
  224. package/resource/knowledge/push/config/harmonyos.md +83 -0
  225. package/resource/knowledge/push/config/ios.md +254 -0
  226. package/resource/knowledge/push/config/react-native.md +254 -0
  227. package/resource/knowledge/push/config/unity.md +209 -0
  228. package/resource/knowledge/push/config/unreal-engine.md +194 -0
  229. package/resource/knowledge/push/integration/android.md +404 -0
  230. package/resource/knowledge/push/integration/flutter.md +465 -0
  231. package/resource/knowledge/push/integration/harmonyos.md +63 -0
  232. package/resource/knowledge/push/integration/ios.md +246 -0
  233. package/resource/knowledge/push/integration/react-native.md +366 -0
  234. package/resource/knowledge/push/integration/uni-app.md +208 -0
  235. package/resource/knowledge/push/integration/unity.md +389 -0
  236. package/resource/knowledge/push/integration/unreal-engine.md +390 -0
  237. package/resource/knowledge/push/overview/prepare.md +60 -0
  238. package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +241 -0
  239. package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +588 -0
  240. package/resource/knowledge/roomkit/core-sdk/android/room-state.md +364 -0
  241. package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +340 -0
  242. package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +230 -0
  243. package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +797 -0
  244. package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +325 -0
  245. package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +325 -0
  246. package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +233 -0
  247. package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +569 -0
  248. package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +325 -0
  249. package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +322 -0
  250. package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +221 -0
  251. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/device-detection.md +49 -48
  252. package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +461 -0
  253. package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +216 -0
  254. package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +370 -0
  255. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-participant-state.md +61 -60
  256. package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +280 -0
  257. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-view.md +57 -56
  258. package/resource/knowledge/roomkit/core-sdk/vue/schedule-room.md +319 -0
  259. package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +267 -0
  260. package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +261 -0
  261. package/resource/knowledge/roomkit/preset/android/integration.md +396 -0
  262. package/resource/knowledge/roomkit/preset/flutter/integration.md +404 -0
  263. package/resource/knowledge/roomkit/preset/ios/integration.md +369 -0
  264. package/resource/knowledge/roomkit/preset/react/integration.md +576 -0
  265. package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +44 -0
  266. package/resource/{doc → knowledge}/rtcengine/web/plugin/21-advanced-auto-play-policy.md +8 -2
  267. package/resource/{doc → knowledge}/rtcengine/web/plugin/22-advanced-audio-mixer.md +19 -1
  268. package/resource/{doc → knowledge}/rtcengine/web/plugin/23-advanced-support-detection.md +1 -1
  269. package/resource/{doc → knowledge}/rtcengine/web/plugin/24-advanced-network-quality.md +8 -8
  270. package/resource/{doc → knowledge}/rtcengine/web/plugin/25-advanced-device-change.md +1 -1
  271. package/resource/{doc → knowledge}/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +6 -6
  272. package/resource/{doc → knowledge}/rtcengine/web/plugin/27-advanced-small-stream.md +3 -3
  273. package/resource/{doc → knowledge}/rtcengine/web/plugin/29-advanced-water-mark.md +18 -0
  274. package/resource/{doc → knowledge}/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
  275. package/resource/{doc → knowledge}/rtcengine/web/plugin/34-advanced-proxy.md +2 -2
  276. package/resource/{doc → knowledge}/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
  277. package/resource/knowledge/trtc/android/TRTCCloud.md +1915 -0
  278. package/resource/knowledge/trtc/android/TRTCCloudDef.md +1029 -0
  279. package/resource/knowledge/trtc/android/TRTCCloudListener.md +1095 -0
  280. package/resource/knowledge/trtc/android/TRTCStatistics.md +68 -0
  281. package/resource/knowledge/trtc/android/TXAudioEffectManager.md +502 -0
  282. package/resource/knowledge/trtc/android/TXBeautyManager.md +415 -0
  283. package/resource/knowledge/trtc/android/TXDeviceManager.md +169 -0
  284. package/resource/knowledge/trtc/android/TXLiteAVCode.md +125 -0
  285. package/resource/knowledge/trtc/c++/ITRTCCloud.md +2069 -0
  286. package/resource/knowledge/trtc/c++/ITRTCStatistics.md +73 -0
  287. package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +502 -0
  288. package/resource/knowledge/trtc/c++/ITXDeviceManager.md +391 -0
  289. package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1191 -0
  290. package/resource/knowledge/trtc/c++/TRTCTypeDef.md +931 -0
  291. package/resource/knowledge/trtc/c++/TXLiteAVCode.md +127 -0
  292. package/resource/knowledge/trtc/ios/TRTCCloud.md +2118 -0
  293. package/resource/knowledge/trtc/ios/TRTCCloudDef.md +975 -0
  294. package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1131 -0
  295. package/resource/knowledge/trtc/ios/TRTCStatistics.md +68 -0
  296. package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +423 -0
  297. package/resource/knowledge/trtc/ios/TXBeautyManager.md +416 -0
  298. package/resource/knowledge/trtc/ios/TXDeviceManager.md +387 -0
  299. package/resource/knowledge/trtc/ios/TXLiteAVCode.md +127 -0
  300. package/server.js +35 -10
  301. package/server.js.map +1 -1
  302. package/tools/call/get_native_call_uikit_integration.js +2 -3
  303. package/tools/call/get_native_call_uikit_integration.js.map +1 -1
  304. package/tools/call/get_native_callkit_core_integration.js +2 -5
  305. package/tools/call/get_native_callkit_core_integration.js.map +1 -1
  306. package/tools/call/get_web_call_uikit_integration.js +2 -3
  307. package/tools/call/get_web_call_uikit_integration.js.map +1 -1
  308. package/tools/chat/get_native_chat_uikit_integration.js +2 -3
  309. package/tools/chat/get_native_chat_uikit_integration.js.map +1 -1
  310. package/tools/chat/get_web_chat_uikit_integration.js +2 -3
  311. package/tools/chat/get_web_chat_uikit_integration.js.map +1 -1
  312. package/tools/common/present_framework_choice.js +19 -13
  313. package/tools/common/present_framework_choice.js.map +1 -1
  314. package/tools/common/record_answer.js +19 -25
  315. package/tools/common/record_answer.js.map +1 -1
  316. package/tools/common/record_feedback.js +17 -30
  317. package/tools/common/record_feedback.js.map +1 -1
  318. package/tools/common/search_trtc_knowledge.js +45 -0
  319. package/tools/common/search_trtc_knowledge.js.map +1 -0
  320. package/tools/definitions/get_native_call_uikit_integration_def.js +3 -1
  321. package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
  322. package/tools/definitions/get_native_callkit_core_integration_def.js +5 -3
  323. package/tools/definitions/get_native_callkit_core_integration_def.js.map +1 -1
  324. package/tools/definitions/get_native_chat_uikit_integration_def.js +5 -2
  325. package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
  326. package/tools/definitions/get_native_livekit_core_integration_def.js +6 -5
  327. package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -1
  328. package/tools/definitions/get_web_call_uikit_integration_def.js +4 -2
  329. package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
  330. package/tools/definitions/get_web_chat_uikit_integration_def.js +2 -0
  331. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
  332. package/tools/definitions/get_web_live_uikit_integration_def.js +5 -5
  333. package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
  334. package/tools/definitions/get_web_room_core_integration_def.js +50 -0
  335. package/tools/definitions/get_web_room_core_integration_def.js.map +1 -0
  336. package/tools/definitions/get_web_room_uikit_integration_def.js +5 -4
  337. package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
  338. package/tools/definitions/integration-boundary.js +6 -0
  339. package/tools/definitions/integration-boundary.js.map +1 -0
  340. package/tools/definitions/present_framework_choice_def.js +12 -10
  341. package/tools/definitions/present_framework_choice_def.js.map +1 -1
  342. package/tools/definitions/record_answer_def.js +19 -17
  343. package/tools/definitions/record_answer_def.js.map +1 -1
  344. package/tools/definitions/record_feedback_def.js +14 -13
  345. package/tools/definitions/record_feedback_def.js.map +1 -1
  346. package/tools/definitions/search_trtc_knowledge_def.js +40 -0
  347. package/tools/definitions/search_trtc_knowledge_def.js.map +1 -0
  348. package/tools/index.js +5 -36
  349. package/tools/index.js.map +1 -1
  350. package/tools/live/get_native_livekit_core_integration.js +1 -3
  351. package/tools/live/get_native_livekit_core_integration.js.map +1 -1
  352. package/tools/live/get_web_live_uikit_integration.js +2 -4
  353. package/tools/live/get_web_live_uikit_integration.js.map +1 -1
  354. package/tools/room/get_web_room_core_integration.js +48 -0
  355. package/tools/room/get_web_room_core_integration.js.map +1 -0
  356. package/tools/room/get_web_room_uikit_integration.js +2 -3
  357. package/tools/room/get_web_room_uikit_integration.js.map +1 -1
  358. package/utils/generate-structured-result.js +24 -30
  359. package/utils/generate-structured-result.js.map +1 -1
  360. package/utils/get-doc-content.js +14 -8
  361. package/utils/get-doc-content.js.map +1 -1
  362. package/utils/report-cls-client.js +18 -20
  363. package/utils/report-cls-client.js.map +1 -1
  364. package/utils/report-es-client.js +1 -1
  365. package/resource/doc/callkit/core-sdk/.gitkeep +0 -0
  366. package/resource/doc/callkit/core-sdk/android/answer-call.md +0 -852
  367. package/resource/doc/callkit/core-sdk/android/make-call.md +0 -954
  368. package/resource/doc/callkit/core-sdk/android/offline-push.md +0 -361
  369. package/resource/doc/callkit/core-sdk/flutter/answer-call.md +0 -1160
  370. package/resource/doc/callkit/core-sdk/flutter/make-call.md +0 -1205
  371. package/resource/doc/callkit/core-sdk/ios/answer-call.md +0 -1090
  372. package/resource/doc/callkit/core-sdk/ios/make-call.md +0 -1248
  373. package/resource/doc/callkit/core-sdk/ios/offline-push.md +0 -485
  374. package/resource/doc/callkit/core-sdk/uni-app/answer-call.md +0 -950
  375. package/resource/doc/callkit/core-sdk/uni-app/make-call.md +0 -1052
  376. package/resource/doc/callkit/faq/common/error-code.md +0 -47
  377. package/resource/doc/callkit/faq/flutter-faq.md +0 -115
  378. package/resource/doc/callkit/faq/ios-faq.md +0 -115
  379. package/resource/doc/callkit/faq/web-faq.md +0 -36
  380. package/resource/doc/callkit/preset/android/api.md +0 -296
  381. package/resource/doc/callkit/preset/flutter/api.md +0 -410
  382. package/resource/doc/callkit/preset/flutter/integration.md +0 -164
  383. package/resource/doc/callkit/preset/ios/api.md +0 -80
  384. package/resource/doc/callkit/preset/ios/integration.md +0 -187
  385. package/resource/doc/callkit/preset/react/api.md +0 -501
  386. package/resource/doc/callkit/preset/react/integration.md +0 -86
  387. package/resource/doc/callkit/preset/vue/api.md +0 -501
  388. package/resource/doc/callkit/preset/vue/integration.md +0 -83
  389. package/resource/doc/chatkit/android/faq.md +0 -111
  390. package/resource/doc/chatkit/android/features/theme.md +0 -219
  391. package/resource/doc/chatkit/android/integration.md +0 -490
  392. package/resource/doc/chatkit/faq/android_sdk/client-api.md +0 -281
  393. package/resource/doc/chatkit/faq/common/product.md +0 -7
  394. package/resource/doc/chatkit/faq/common/server.md +0 -44
  395. package/resource/doc/chatkit/faq/common/server_error_code.md +0 -74
  396. package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +0 -199
  397. package/resource/doc/chatkit/faq/flutter_sdk/faq.md +0 -53
  398. package/resource/doc/chatkit/faq/ios_sdk/client-api.md +0 -235
  399. package/resource/doc/chatkit/faq/web_sdk/error_code.md +0 -47
  400. package/resource/doc/chatkit/faq/web_sdk/faq.md +0 -287
  401. package/resource/doc/chatkit/flutter/faq.md +0 -23
  402. package/resource/doc/chatkit/flutter/features/theme.md +0 -235
  403. package/resource/doc/chatkit/flutter/integration.md +0 -344
  404. package/resource/doc/chatkit/ios/faq.md +0 -111
  405. package/resource/doc/chatkit/ios/features/theme.md +0 -267
  406. package/resource/doc/chatkit/react/components/avatar.md +0 -104
  407. package/resource/doc/chatkit/react/components/chat-header.md +0 -148
  408. package/resource/doc/chatkit/react/components/chat-setting.md +0 -57
  409. package/resource/doc/chatkit/react/components/chat.md +0 -38
  410. package/resource/doc/chatkit/react/components/component-list.md +0 -37
  411. package/resource/doc/chatkit/react/components/conversation-actions.md +0 -174
  412. package/resource/doc/chatkit/react/components/conversation-list.md +0 -333
  413. package/resource/doc/chatkit/react/components/conversation-preview.md +0 -118
  414. package/resource/doc/chatkit/react/components/conversation-search.md +0 -60
  415. package/resource/doc/chatkit/react/components/message-list.md +0 -293
  416. package/resource/doc/chatkit/react/components/tuikit.md +0 -34
  417. package/resource/doc/chatkit/react/faq.md +0 -26
  418. package/resource/doc/chatkit/react/integration.md +0 -416
  419. package/resource/doc/chatkit/vue/components/avatar.md +0 -104
  420. package/resource/doc/chatkit/vue/components/chat-header.md +0 -148
  421. package/resource/doc/chatkit/vue/components/chat-setting.md +0 -62
  422. package/resource/doc/chatkit/vue/components/chat.md +0 -45
  423. package/resource/doc/chatkit/vue/components/component-list.md +0 -87
  424. package/resource/doc/chatkit/vue/components/contact-list.md +0 -271
  425. package/resource/doc/chatkit/vue/components/conversation-actions.md +0 -228
  426. package/resource/doc/chatkit/vue/components/conversation-list.md +0 -320
  427. package/resource/doc/chatkit/vue/components/conversation-preview.md +0 -213
  428. package/resource/doc/chatkit/vue/components/message-input.md +0 -1054
  429. package/resource/doc/chatkit/vue/components/message-list.md +0 -433
  430. package/resource/doc/chatkit/vue/components/tuikit.md +0 -31
  431. package/resource/doc/chatkit/vue/components/userpicker.md +0 -256
  432. package/resource/doc/chatkit/vue/faq.md +0 -36
  433. package/resource/doc/chatkit/vue/integration.md +0 -428
  434. package/resource/doc/livekit/core-sdk/live/flutter/live-host-interaction.md +0 -866
  435. package/resource/doc/livekit/faq/common/error-code.md +0 -88
  436. package/resource/doc/livekit/preset/live/vue/api-reference/index.md +0 -780
  437. package/resource/doc/livekit/preset/live/vue/components/co-guest-panel.md +0 -91
  438. package/resource/doc/livekit/preset/live/vue/components/live-scene-panel.md +0 -112
  439. package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +0 -215
  440. package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +0 -300
  441. package/resource/doc/roomkit/faq/common/error-code.md +0 -67
  442. package/resource/doc/roomkit/vue/features/call-user-to-room.md +0 -220
  443. package/resource/doc/roomkit/vue/features/device-state.md +0 -460
  444. package/resource/doc/roomkit/vue/features/free-beauty-panel.md +0 -215
  445. package/resource/doc/roomkit/vue/features/room-chat.md +0 -369
  446. package/resource/doc/roomkit/vue/features/room-state.md +0 -282
  447. package/resource/doc/roomkit/vue/features/schedule-room.md +0 -318
  448. package/resource/doc/roomkit/vue/features/screen-share.md +0 -265
  449. package/resource/doc/roomkit/vue/features/virtual-background.md +0 -271
  450. package/resource/doc/roomkit/vue/integration.md +0 -315
  451. package/resource/doc/rtcengine/faq/common/error_code.md +0 -1
  452. package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
  453. package/resource/doc/rtcengine/web/.gitkeep +0 -0
  454. package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +0 -59
  455. package/resource/doc/trtc/C++/ITRTCCloud.md +0 -1970
  456. package/resource/doc/trtc/C++/ITRTCStatistics.md +0 -70
  457. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +0 -469
  458. package/resource/doc/trtc/C++/ITXDeviceManager.md +0 -387
  459. package/resource/doc/trtc/C++/TRTCCloudCallback.md +0 -1082
  460. package/resource/doc/trtc/C++/TRTCTypeDef.md +0 -925
  461. package/resource/doc/trtc/C++/TXLiteAVCode.md +0 -129
  462. package/resource/doc/trtc/android/TRTCCloud.md +0 -1815
  463. package/resource/doc/trtc/android/TRTCCloudDef.md +0 -992
  464. package/resource/doc/trtc/android/TRTCCloudListener.md +0 -1004
  465. package/resource/doc/trtc/android/TRTCStatistics.md +0 -65
  466. package/resource/doc/trtc/android/TXAudioEffectManager.md +0 -469
  467. package/resource/doc/trtc/android/TXBeautyManager.md +0 -402
  468. package/resource/doc/trtc/android/TXDeviceManager.md +0 -173
  469. package/resource/doc/trtc/android/TXLiteAVCode.md +0 -127
  470. package/resource/doc/trtc/iOS/TRTCCloud.md +0 -2028
  471. package/resource/doc/trtc/iOS/TRTCCloudDef.md +0 -958
  472. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +0 -1046
  473. package/resource/doc/trtc/iOS/TRTCStatistics.md +0 -65
  474. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +0 -397
  475. package/resource/doc/trtc/iOS/TXBeautyManager.md +0 -403
  476. package/resource/doc/trtc/iOS/TXDeviceManager.md +0 -381
  477. package/resource/doc/trtc/iOS/TXLiteAVCode.md +0 -130
  478. package/tools/call/get_callkit_api.js +0 -33
  479. package/tools/call/get_callkit_api.js.map +0 -1
  480. package/tools/chat/get_native_chat_uikit_feature_detail.js +0 -35
  481. package/tools/chat/get_native_chat_uikit_feature_detail.js.map +0 -1
  482. package/tools/chat/get_web_chat_uikit_component_detail.js +0 -35
  483. package/tools/chat/get_web_chat_uikit_component_detail.js.map +0 -1
  484. package/tools/common/get_faq.js +0 -266
  485. package/tools/common/get_faq.js.map +0 -1
  486. package/tools/common/record_skill_session.js +0 -69
  487. package/tools/common/record_skill_session.js.map +0 -1
  488. package/tools/definitions/get_callkit_api_def.js +0 -29
  489. package/tools/definitions/get_callkit_api_def.js.map +0 -1
  490. package/tools/definitions/get_faq_def.js +0 -49
  491. package/tools/definitions/get_faq_def.js.map +0 -1
  492. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +0 -31
  493. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +0 -1
  494. package/tools/definitions/get_native_livekit_core_features_def.js +0 -34
  495. package/tools/definitions/get_native_livekit_core_features_def.js.map +0 -1
  496. package/tools/definitions/get_native_trtc_sdk_docs_def.js +0 -32
  497. package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +0 -1
  498. package/tools/definitions/get_web_chat_uikit_component_detail_def.js +0 -31
  499. package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +0 -1
  500. package/tools/definitions/get_web_livekit_api_def.js +0 -30
  501. package/tools/definitions/get_web_livekit_api_def.js.map +0 -1
  502. package/tools/definitions/get_web_livekit_component_detail_def.js +0 -32
  503. package/tools/definitions/get_web_livekit_component_detail_def.js.map +0 -1
  504. package/tools/definitions/get_web_roomkit_feature_detail_def.js +0 -31
  505. package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +0 -1
  506. package/tools/definitions/get_web_trtc_sdk_api_def.js +0 -27
  507. package/tools/definitions/get_web_trtc_sdk_api_def.js.map +0 -1
  508. package/tools/definitions/get_web_trtc_sdk_integration_def.js +0 -27
  509. package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +0 -1
  510. package/tools/definitions/get_web_trtc_sdk_plugin_def.js +0 -27
  511. package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +0 -1
  512. package/tools/definitions/record_skill_session_def.js +0 -31
  513. package/tools/definitions/record_skill_session_def.js.map +0 -1
  514. package/tools/live/get_native_livekit_core_features.js +0 -68
  515. package/tools/live/get_native_livekit_core_features.js.map +0 -1
  516. package/tools/live/get_web_livekit_api.js +0 -33
  517. package/tools/live/get_web_livekit_api.js.map +0 -1
  518. package/tools/live/get_web_livekit_component_detail.js +0 -35
  519. package/tools/live/get_web_livekit_component_detail.js.map +0 -1
  520. package/tools/room/get_web_roomkit_feature_detail.js +0 -69
  521. package/tools/room/get_web_roomkit_feature_detail.js.map +0 -1
  522. package/tools/rtcengine/get_web_trtc_sdk_api.js +0 -32
  523. package/tools/rtcengine/get_web_trtc_sdk_api.js.map +0 -1
  524. package/tools/rtcengine/get_web_trtc_sdk_integration.js +0 -32
  525. package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +0 -1
  526. package/tools/rtcengine/get_web_trtc_sdk_plugin.js +0 -32
  527. package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +0 -1
  528. package/tools/trtc/get_native_trtc_sdk_docs.js +0 -74
  529. package/tools/trtc/get_native_trtc_sdk_docs.js.map +0 -1
  530. package/utils/build-session-directives.js +0 -120
  531. package/utils/build-session-directives.js.map +0 -1
  532. package/utils/handle-framework.js +0 -9
  533. package/utils/handle-framework.js.map +0 -1
  534. package/utils/handle-state-name.js +0 -29
  535. package/utils/handle-state-name.js.map +0 -1
  536. package/utils/report-runtime-error-cls-client.js +0 -91
  537. package/utils/report-runtime-error-cls-client.js.map +0 -1
  538. /package/resource/{doc/livekit/preset/live/vue/faq.md → knowledge/push/config/donut.md} +0 -0
  539. /package/resource/{doc/roomkit/vue/faq.md → knowledge/push/integration/donut.md} +0 -0
  540. /package/resource/{doc → knowledge}/rtcengine/web/api.md +0 -0
  541. /package/resource/{doc/rtcengine/faq/web/web.md → knowledge/rtcengine/web/faq.md} +0 -0
  542. /package/resource/{doc → knowledge}/rtcengine/web/how_to_integrated_web_sdk.md +0 -0
  543. /package/resource/{doc → knowledge}/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +0 -0
  544. /package/resource/{doc → knowledge}/rtcengine/web/plugin/28-advanced-beauty.md +0 -0
  545. /package/resource/{doc → knowledge}/rtcengine/web/plugin/30-advanced-cross-room-link.md +0 -0
  546. /package/resource/{doc → knowledge}/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -0
  547. /package/resource/{doc → knowledge}/rtcengine/web/plugin/37-advanced-voice-changer.md +0 -0
  548. /package/resource/{doc → knowledge}/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -0
  549. /package/resource/{doc → knowledge}/rtcengine/web/plugin/40-advanced-video-mixer.md +0 -0
  550. /package/resource/{doc → knowledge}/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +0 -0
  551. /package/resource/{doc → knowledge}/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +0 -0
  552. /package/resource/{doc → knowledge}/rtcengine/web/plugin/43-advanced-face-detection.md +0 -0
@@ -1,174 +0,0 @@
1
- `ConversationActions` component is responsible for row operations on a single session, supported by default with delete conversation, pin conversation to top/unpin, and mute/unmute features.
2
-
3
- ## Basic Usage
4
-
5
- When using `ConversationActions` in `ConversationList`, you can customize it directly through the top-level `actionsConfig` parameter of `ConversationList`. `actionsConfig` supports default conversation operation feature toggles, event response, adding new custom action items, and basic UI customization.
6
-
7
- For advanced customization, you can create new components through `ConversationActions`.
8
-
9
- ### Using ActionsConfig Basic Customization
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
- ### Custom ConversationActions Component
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` component API type `ConversationActionsProps` is based on `ConversationActionsConfig` API and expanded.
57
- | ##### **ConversationActionsProps** | | | |
58
- | --- | --- | --- | --- |
59
- | **Parameter Name** | **Type** | **Default Value** | **Note** |
60
- | **conversation*****(Required)*** | ConversationModel | - | This parameter is required and represents the session for the current rendered conversation operation. |
61
- | className | String | - | Custom root element class name. |
62
- | style | React.CSSProperties | - | Custom root element style. |
63
- | ##### ConversationActionsConfig | | | |
64
- | **Parameter Name** | **Type** | **Default Value** | **Note** |
65
- | enablePin | Boolean | true | Whether to display the pin to top feature button. |
66
- | enableMute | Boolean | true | Whether to display the do not disturb feature button. |
67
- | enableDelete | Boolean | true | Whether to display the deletion feature button. |
68
- | onConversationPin | (conversation: ConversationModel, e?: React.MouseEvent) => void | - | Customize the behavior of pinning/unpinning conversations. |
69
- | onConversationMute | (conversation: ConversationModel, e?: React.MouseEvent)<br>=> void | - | Customize the behavior of do not disturb/cancel Do Not Disturb session. |
70
- | onConversationDelete | (conversation: ConversationModel, e?: React.MouseEvent) => void | - | Customize the behavior of deleting conversations. |
71
- | customConversationActions | Record<string, ConversationActionItem> | - | Custom session operation items. |
72
- | PopupIcon | ReactElement | - | Custom action pop-up icon. |
73
- | PopupElements | ReactElement[] | - | Content of the custom action popup. |
74
- | onClick | (e: React.MouseEvent, key?: string, conversation?: ConversationModel) => void | - | Callback function for click action. |
75
-
76
- ## Customize Component
77
-
78
- ### Basic Feature Switch
79
-
80
- By setting the `enablePin`, `enableDelete`, and `enableMute` parameters, you can flexibly control the display of conversation pinning, mute message notification, and conversation deletion in `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
- ### Event Response
95
-
96
- `ConversationActions` component supports delete conversation, pin conversation to top/unpin, and mute/unmute features by default. If the event response of existing functionality does not meet your needs, you can customize the event response handling function and override it. In addition to customizing feature event responses, you can also obtain basic click event response through 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` is used to add new custom action items to the ConversationActions list.
122
- | ##### ConversationActionItem | | | |
123
- | --- | --- | --- | --- |
124
- | **Parameter Name** | **Type** | **Default Value** | **Note** |
125
- | enable | Boolean | true | Whether to enable custom action items. |
126
- | label | String | - | Display content of custom action items. |
127
- | onClick | (conversation: ConversationModel, e?: React.MouseEvent) => void | - | Callback function for clicking a custom action item. |
128
-
129
- Here is an example of adding new custom action items using `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
- | **Before modification** | **After modification** |
151
- | --- | --- |
152
- | | |
153
-
154
- ### UI Interface Customization
155
-
156
- You can customize the wakeup popup button style through the `PopupIcon` parameter and the popup content through `PopupElements`.
157
-
158
- The following is example code for secondary development on the basis of the default `ConversationActions` component to customize a new awakening button style:
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>Custom Icon</div>
165
- return (
166
- <ConversationActions {...props} PopupIcon={customIcon} />
167
- );
168
- };
169
-
170
- <ConversationList ConversationActions={CustomConversationActions} />
171
- ```
172
- | **Before modification** | **After modification** |
173
- | --- | --- |
174
- | | |
@@ -1,333 +0,0 @@
1
- # Component Overview
2
-
3
- The `ConversationList` component is primarily responsible for the List function. It contains the Header part and List part, and has features such as conversation search, session creation, session pinning, and conversation deletion.
4
-
5
- This document introduces in detail the foundation usage, component customization, freely combine and the props parameter list of the component.
6
- | **Conversation List** | **Session Operation** | **Conversation Search** | **Create Session** |
7
- | --- | --- | --- | --- |
8
- | | | | |
9
-
10
- ## Component composition
11
-
12
- The `ConversationList` component contains the following content:
13
- -`ConversationSearch` - Conversation Search
14
-
15
- - `ConversationList UI` - Conversation List Container
16
-
17
- - `ConversationPreview` - Show Session Information
18
-
19
- - `ConversationActions` - Conversation Action
20
-
21
- ## Basic usage
22
-
23
- The `ConversationList` component has no required properties. You can use `ConversationList` with the following code.
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
- ## Custom components
37
-
38
- `ConversationList` provides various dimensional Props APIs for user customization, allowing users to customize features, UI, modules and more.
39
-
40
- The `ConversationList` component provides multiple replaceable subcomponents, allowing users to customize `Header`, `List`, `ConversationPreview`, `ConversationCreate`, `ConversationSearch`, `ConversationActions`, `Avatar`, `Placeholder`, and more. Meanwhile, users can also use default subcomponents for secondary development customization.
41
-
42
- ### Basic feature switch
43
-
44
- By setting the `enableSearch`, `enableCreate`, and `enableActions` parameters, you can flexibly control the display of conversation search, session creation, and conversation action features in `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
- ### Data filtering and sorting
59
-
60
- The `ConversationList` component provides the `filterConversation` and `sortConversation` properties, allowing you to filter and sort the conversation list data.
61
-
62
- #### Filter conversations
63
-
64
- To filter conversation list data, you can pass a filter function to the `filterConversation` property. This function receives an array of `ConversationModel` as parameter and should return a new array that only contains conversations meeting your filter criteria.
65
-
66
- Here is an example of using the `filterConversation` property to only display conversations with "unread messages":
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
- #### Sort conversations
78
-
79
- To sort conversation list data, you can pass a sorting function to the `sortConversation` property. This function receives an array of `ConversationModel` as parameter and should return a new array with sessions sorted by your sorting criteria.
80
-
81
- Here is an example of using the `sortConversation` property to sort the session list by "latest news time" in descending order:
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
- By using the `filter` and `sort` properties, you can effectively filter and sort the conversation list data according to your needs.
95
-
96
- ### Custom actionsConfig
97
-
98
- Leverages actionsConfig to control the basic feature of ConversationActions.
99
-
100
- For more customization, see the ConversationActions chapter.
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
- ### Custom Placeholder
123
-
124
- You can customize the list display in different statuses by importing `PlaceholderEmptyList`, `PlaceholderLoading`, and `PlaceholderLoadError`.
125
-
126
- Here is a custom `PlaceholderLoading` example:
127
- ``` typescript
128
- import { ConversationList } from '@tencentcloud/chat-uikit-react';
129
-
130
- <ConversationList
131
- PlaceholderEmptyList={<div>Empty List!!!</div>}
132
- />
133
- ```
134
-
135
- ### Custom Header
136
-
137
- `ConversationListHeader` is responsible for rendering the header part of `ConversationList`, serving as a wrapping layer to render the default `ConversationSearch` and `ConversationCreate`. You can customize it by importing left, right and other attributes, and you can also customize the entire component.
138
-
139
- #### Props
140
- | **Parameter Name** | **Type** | **Default Value** | **Description** |
141
- | --- | --- | --- | --- |
142
- | children | `ReactNode` | - | Custom session list header center component.<br>When used in `<ConversationList>`, it imports `<ConversationSearch>` and `<ConversationCreate>` by default. |
143
- | left | `ReactElement` | - | Custom session list header left-side component. |
144
- | right | `ReactElement` | - | Custom session list header right-side component. |
145
- | className | `String` | - | Specify the custom name for the root element's CSS class. |
146
- | style | `React.CSSProperties` | - | Specify the custom style for the root element. |
147
-
148
- ### Basic customization
149
-
150
- Here is an example of adding a new function button on the right side of the Header Component.
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>Custom Icon</div>;
160
- return (
161
- <ConversationListHeader {...props} right={CustomIcon} />
162
- );
163
- };
164
-
165
- <ConversationList Header={CustomConversationListHeader} />
166
- ```
167
-
168
- #### Advanced customization
169
-
170
- Here is how to implement a simplified conversation grouping feature, distinguishing by All conversations, unread conversations, one-on-one chat sessions, and group chats across four key dimensions. Click different group buttons to execute different filtering rules.
171
- | **Before modification** | **Modified** |
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
- Custom List
242
-
243
- `ConversationListContent` is responsible for the rendering work of the main list part in `ConversationList`.
244
-
245
- Render the precomputed current session list `filteredAndSortedConversationList` from Context as the default wrapping layer.
246
-
247
- #### Props
248
- | **Parameter Name** | **Type** | **Default Value** | **Description** |
249
- | --- | --- | --- | --- |
250
- | children | `ReactNode` | - | Custom session list content area component.<br>When used in `<ConversationList>`, it imports the `` list traversed by `filteredAndSortedConversationList` by default. |
251
- | empty | `Boolean` | `false` | Conversation list identifier bit. When used in `<ConversationList>`, it judges `filteredAndSortedConversationList.length === 0` and imports it. |
252
- | loading | `Boolean` | `false` | Conversation list loading flag bit. When used in `<ConversationList>`, it uses `useConversationList()` to get `isLoading` and imports it. |
253
- | error | `Boolean` | `false` | Conversation list load error flag bit. When used in `<ConversationList>`, it uses `useConversationList()` to get `isLoadError` and imports it. |
254
- | PlaceholderEmptyList | `ReactNode` | `` | Placeholder element when the custom session list is empty. |
255
- | PlaceholderLoading | `ReactNode` | `` | Placeholder element for custom session list loading. |
256
- | PlaceholderLoadError | `ReactNode` | `` | Placeholder element for custom session list load error. |
257
- | className | `String` | - | Specify the custom name for the root element's CSS class. |
258
- | style | `React.CSSProperties` | - | Specify the custom style for the root element. |
259
-
260
- Basic customization
261
-
262
- The UI effects of the `List` component in different statuses are as follows. The trigger timing for each state is handled inside the `ConversationList`.
263
-
264
- Meanwhile, you can control the component status through custom input of `empty`, `loading`, and `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
- Custom ConversationPreview
280
-
281
- For details, see the ConversationPreview chapter.
282
- ``` typescript
283
- <ConversationList ConversationPreview={CustomConversationPreview} />
284
- ```
285
-
286
- Custom ConversationActions
287
-
288
- For details, see the ConversationActions chapter.
289
- ``` typescript
290
- <ConversationList ConversationActions={CustomConversationActions} />
291
- ```
292
-
293
- Custom ConversationSearch
294
-
295
- For details, see the ConversationSearch chapter.
296
- ``` typescript
297
- <ConversationList ConversationSearch={CustomConversationSearch} />
298
- ```
299
-
300
- Create and Bind Policy Query Instance Reset Instance Access Password
301
- ``` typescript
302
- <ConversationList ConversationCreate={CustomConversationCreate} />
303
- ```
304
-
305
- Custom Avatar
306
- ``` typescript
307
- <ConversationList Avatar={CustomAvatar} />
308
- ```
309
-
310
- ## APIs/Props
311
- | **Parameter Name** | **Type** | **Default Value** | **Description** |
312
- | --- | --- | --- | --- |
313
- | enableSearch | `Boolean` | `true` | Whether to display the control session search feature. |
314
- | enableCreate | `Boolean` | `true` | Whether to display the control session creation feature. |
315
- | enableActions | `Boolean` | `true` | Whether to display the conversation action feature. |
316
- | actionsConfig | `ConversationActionsConfig` | - | For custom session operation configuration. |
317
- | Header | `ReactElement` | `Header` | Custom Header component. |
318
- | List | `ReactElement` | `List` | Custom session list component. |
319
- | Preview | `ReactElement` | ConversationPreview | Session preview component. |
320
- | ConversationCreate | `ReactElement` | `ConversationCreate` | Custom conversation component. |
321
- | ConversationSearch | `ReactElement` | ConversationSearch | Custom session search component. |
322
- | ConversationActions | `ReactElement` | ConversationActions | Custom Conversation Operation Component. |
323
- | Avatar | `ReactElement` | `Avatar` | Custom avatar component. |
324
- | PlaceholderEmptyList | `ReactNode` | `` | Placeholder element when the custom session list is empty. |
325
- | PlaceholderLoading | `ReactNode` | `` | Placeholder element for custom session list loading. |
326
- | PlaceholderLoadError | `ReactNode` | `` | Placeholder element for custom session list load error. |
327
- | filter | `(conversationList: ConversationModel[]) => ConversationModel[]` | - | Functions for filtering session list. |
328
- | sort | `(conversationList: ConversationModel[]) => ConversationModel[]` | - | Functions for sorting session list. |
329
- | onConversationSelect | `(conversation: ConversationModel) => void;` | - | Callback function when clicking a session, with the clicked conversation object as parameter. |
330
- | onBeforeCreateConversation | `(params: CreateParams) => CreateParams;` | - | Custom action executed before session creation, with required parameters for creating a session. |
331
- | onConversationCreate | `(conversation: ConversationModel) => void;` | - | Callback function after session creation, with the created session object as parameter. |
332
- | className | `String` | - | Specify the custom name for the root element's CSS class. |
333
- | style | `React.CSSProperties` | - | Specify the custom style for the root element. |
@@ -1,118 +0,0 @@
1
- `ConversationPreview` is used for previewing session content in the list. The component displays session information, unread count, and provides conversation action feature.
2
-
3
- With the aid of atomic information display components, you can freely design and combine your desired `ConversationPreview` layout.
4
-
5
- Meanwhile, you can also use the `onConversationSelect` function to define selected session behavior.
6
-
7
- ### Basic Usage
8
-
9
- You can use the `Preview` property of `ConversationList` to customize the preview item for each individual conversation in the list. If the `Preview` property is not specified, the system will automatically adopt the `ConversationPreviewUI` component as the default value.
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
- | **Parameter Name** | **Type** | **Default Value** | **Description** |
29
- | --- | --- | --- | --- |
30
- | **conversation*****(Required)*** | ConversationModel | - | Required parameter to indicate the currently rendered conversation list item. |
31
- | isSelected | Boolean | false | Control if the conversation list item UI is in selected status. |
32
- | enableActions | Boolean | true | Control whether to display the conversation operation feature. |
33
- | actionsConfig | ConversationActionsConfig | - | For custom session operation configuration. |
34
- | highlightMatchString | String | - | Conversation list item Title highlights matching keywords, commonly used for Conversation Search results. |
35
- | Title | `String | JSX.Element` | ConversationPreviewTitle | Render the title area of the conversation list item. |
36
- | LastMessageAbstract | `String | JSX.Element` | ConversationPreviewAbstract | Render the latest message abstract area of the conversation list item. |
37
- | LastMessageTimestamp | `String | JSX.Element` | ConversationPreviewTimestamp | Render the latest message timestamp area of the conversation list item. |
38
- | Unread | `String | JSX.Element` | ConversationPreviewUnread | Render the unread indicator area of the conversation list item. |
39
- | ConversationActions | `ReactElement` | ConversationActions | Render the conversation operations area of the conversation list item. |
40
- | Avatar | ReactElement | Avatar | Render the avatar area of the conversation list item. |
41
- | onConversationSelect | (conversation: ConversationModel) => void; | - | Specify the attributes of receiving callback when selecting a dialogue in the conversation list. |
42
- | className | String | - | Set a custom name for the root element class in CSS. |
43
- | style | React.CSSProperties | - | Set custom styles for the root element. |
44
-
45
- ## Custom Case
46
-
47
- ### Discord-Like Style
48
-
49
- Discord is a popular chat application, similar to Skype or Telegram. The message content in Discord is as shown below:
50
-
51
- By customizing the `ConversationPreview` layout, features, and style, we can quickly achieve a Discord-like effect.
52
-
53
- 【React】
54
- 1. Customize the `ConversationListPreview`
55
-
56
- 2. Switch theme to dark mode
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` effect as follows after customization:
114
- | **Before Modification** | **Modified** |
115
- | --- | --- |
116
- | | |
117
-
118
- ###
@@ -1,60 +0,0 @@
1
- `ConversationSearch` uses the Search component, supporting search functionality for users, groups, and messages. It integrates features such as the search bar, advanced search, and search result display.
2
-
3
- ## Basic Usage
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
- SearchType,
15
- } from '@tencentcloud/chat-uikit-react';
16
-
17
- const CustomConversationSearch = (props: ConversationSearchProps) => {
18
- const onSelectResult = (data: SearchResultItem, type: SearchType) => {
19
- console.warn(`Select Search Result: ${JSON.stringify(data)}, type: ${type}`);
20
- };
21
- return (
22
- <ConversationSearch {...props} onResultItemClick={onSelectResult} />
23
- );
24
- };
25
-
26
- const App = () => {
27
- return (
28
- <UIKitProvider>
29
- <ConversationList
30
- style={{ maxWidth: '300px', height: '600px' }}
31
- ConversationSearch={CustomConversationSearch}
32
- />
33
- </UIKitProvider>
34
- );
35
- };
36
- ```
37
-
38
- ## Props
39
- | **Parameter Name** | **Type** | **Default Value** | **Description** |
40
- | --- | --- | --- | --- |
41
- | visible | boolean | true | Whether it is visible. |
42
- | Search | ComponentType<SearchProps> | - | custom search component |
43
- | variant | VariantType | VariantType.MINI | Search mode: mini, standard, embedded |
44
- | SearchBar | React.ComponentType<SearchBarProps> | DefaultSearchBar | custom search bar component |
45
- | SearchResults | React.ComponentType<SearchResultsProps> | DefaultSearchResults | custom search result component |
46
- | SearchAdvanced | React.ComponentType<SearchAdvancedProps> | DefaultSearchAdvanced | custom advanced search component |
47
- | SearchResultsPresearch | React.ComponentType | - | search placeholder component |
48
- | SearchResultsLoading | React.ComponentType | - | loading placeholder component |
49
- | SearchResultsEmpty | React.ComponentType | - | empty result placeholder component |
50
- | SearchResultItem | React.ComponentType<ResultItemProps> | - | custom search result item component |
51
- | debounceTime | number | 300 | search debounce time (ms) |
52
- | autoFocus | boolean | false | Whether to auto-focus the search box |
53
- | className | string | - | custom style class name |
54
- | style | React.CSSProperties | - | custom style |
55
- | onKeywordChange | (keyword: string) => void | - | searchsearch keywords change callback'] |
56
- | onSearchComplete | (results: Map<SearchType, SearchResult>) => void | - | search completed callback |
57
- | onResultItemClick | (data: SearchResultItem, type: SearchType) => void | - | search result click callback |
58
- | onError | (error: Error) => void | - | error callback |
59
-
60
- ###