@tencent-rtc/mcp 1.3.9 → 1.4.0
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.
- package/package.json +2 -2
- package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/android-faq.md} +10 -22
- package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/flutter-faq.md} +10 -22
- package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/ios-faq.md} +10 -22
- package/resource/doc/callkit/preset/android/api.md +296 -0
- package/resource/doc/{tuicallkit → callkit/preset}/android/integration.md +53 -365
- package/resource/doc/callkit/preset/flutter/api.md +410 -0
- package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +35 -97
- package/resource/doc/callkit/preset/ios/api.md +80 -0
- package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +37 -118
- package/resource/doc/callkit/preset/react/api.md +501 -0
- package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +5 -20
- package/resource/doc/callkit/preset/vue/api.md +501 -0
- package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +4 -19
- package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -38
- package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/android/integration.md +28 -121
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +281 -0
- package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -1
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +199 -0
- package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +235 -0
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +3 -3
- package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +18 -87
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -38
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +47 -165
- package/resource/doc/{chatuikit → chatkit}/react/components/avatar.md +0 -33
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +8 -49
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +6 -35
- package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +0 -6
- package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -11
- package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +96 -502
- package/resource/doc/chatkit/react/components/conversation-actions.md +174 -0
- package/resource/doc/chatkit/react/components/conversation-list.md +333 -0
- package/resource/doc/chatkit/react/components/conversation-preview.md +118 -0
- package/resource/doc/chatkit/react/components/conversation-search.md +60 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -337
- package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +20 -212
- package/resource/doc/chatkit/react/components/search.md +243 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +1 -47
- package/resource/doc/{chatuikit → chatkit}/react/integration.md +21 -81
- package/resource/doc/{chatuikit → chatkit}/vue/components/avatar.md +0 -33
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -48
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +3 -5
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +0 -5
- package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -15
- package/resource/doc/chatkit/vue/components/contact-list.md +271 -0
- package/resource/doc/chatkit/vue/components/conversation-actions.md +228 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/conversation-list.md +42 -492
- package/resource/doc/chatkit/vue/components/conversation-preview.md +213 -0
- package/resource/doc/chatkit/vue/components/conversation-search.md +50 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-input.md +2 -223
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -252
- package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
- package/resource/doc/{chatuikit → chatkit}/vue/components/tuikit.md +7 -21
- package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +3 -62
- package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/vue/integration.md +22 -23
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +18 -89
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audio-effect.md +34 -192
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-barrage.md +28 -141
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +20 -112
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +59 -193
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-gift.md +75 -455
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-host-interaction.md +94 -344
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +107 -515
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +33 -173
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +14 -93
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -179
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +19 -107
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -166
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -163
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +69 -443
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-host-interaction.md +117 -364
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-integration.md +107 -492
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +23 -165
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +35 -111
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +35 -193
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +31 -144
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +24 -116
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +37 -171
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +79 -459
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +69 -320
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +85 -502
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +32 -169
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audience-list.md +18 -89
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audio-effect.md +34 -192
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-barrage.md +28 -141
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-co-guest-interaction.md +50 -259
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-gift.md +75 -455
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-host-interaction.md +51 -265
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-integration.md +61 -427
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-room-list.md +33 -173
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-co-guest-interaction.md +44 -203
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-integration.md +56 -416
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audience-list.md +35 -111
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audio-effect.md +35 -193
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-barrage.md +31 -144
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-co-guest-interaction.md +43 -252
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-gift.md +79 -459
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-host-interaction.md +46 -264
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-integration.md +61 -445
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-room-list.md +32 -169
- package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -2
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +780 -0
- package/resource/doc/livekit/preset/live/vue/components/barrage.md +291 -0
- package/resource/doc/livekit/{live → preset/live}/vue/components/co-guest-panel.md +10 -49
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +26 -144
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +12 -75
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +36 -227
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +215 -0
- package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
- package/resource/doc/livekit/preset/live/vue/live-list-integration.md +241 -0
- package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +299 -0
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +300 -0
- package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +743 -0
- package/resource/doc/roomkit/vue/faq.md +1 -0
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +17 -53
- package/resource/doc/roomkit/vue/features/device-detection.md +30 -48
- package/resource/doc/roomkit/vue/features/device-state.md +24 -44
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +13 -36
- package/resource/doc/roomkit/vue/features/room-chat.md +31 -89
- package/resource/doc/roomkit/vue/features/room-participant-state.md +28 -50
- package/resource/doc/roomkit/vue/features/room-state.md +25 -34
- package/resource/doc/roomkit/vue/features/room-view.md +30 -125
- package/resource/doc/roomkit/vue/features/schedule-room.md +9 -40
- package/resource/doc/roomkit/vue/features/screen-share.md +22 -90
- package/resource/doc/roomkit/vue/features/virtual-background.md +13 -29
- package/resource/doc/roomkit/vue/integration.md +21 -76
- package/resource/doc/rtcengine/faq/common/error_code.md +1 -0
- package/resource/doc/rtcengine/faq/web/web.md +14 -24
- package/resource/doc/rtcengine/web/api.md +1 -3
- package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +3 -10
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +1 -5
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +1 -2
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -4
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +3 -5
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +1 -7
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +0 -2
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +4 -8
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +11 -11
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +12 -88
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -5
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +30 -37
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +13 -90
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -2
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +1 -2
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +19 -19
- package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +1 -1
- package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +4 -5
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
- package/resource/doc/trtc/C++/ITRTCCloud.md +686 -2835
- package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +202 -1022
- package/resource/doc/trtc/C++/ITXDeviceManager.md +126 -767
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +579 -2147
- package/resource/doc/trtc/C++/TRTCTypeDef.md +703 -3378
- package/resource/doc/trtc/C++/TXLiteAVCode.md +116 -908
- package/resource/doc/trtc/android/TRTCCloud.md +606 -2573
- package/resource/doc/trtc/android/TRTCCloudDef.md +752 -3640
- package/resource/doc/trtc/android/TRTCCloudListener.md +581 -2008
- package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/android/TXAudioEffectManager.md +202 -1022
- package/resource/doc/trtc/android/TXBeautyManager.md +127 -704
- package/resource/doc/trtc/android/TXDeviceManager.md +51 -318
- package/resource/doc/trtc/android/TXLiteAVCode.md +114 -892
- package/resource/doc/trtc/iOS/TRTCCloud.md +694 -2904
- package/resource/doc/trtc/iOS/TRTCCloudDef.md +726 -3498
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +543 -2028
- package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +174 -877
- package/resource/doc/trtc/iOS/TXBeautyManager.md +128 -710
- package/resource/doc/trtc/iOS/TXDeviceManager.md +129 -772
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +117 -915
- package/server.js +1 -5
- package/server.js.map +1 -1
- package/tools/call/get_callkit_api.js +32 -0
- package/tools/call/get_callkit_api.js.map +1 -0
- package/tools/call/get_native_call_uikit_integration.js +34 -0
- package/tools/call/get_native_call_uikit_integration.js.map +1 -0
- package/tools/call/{get-web-call-integration.js → get_web_call_uikit_integration.js} +13 -8
- package/tools/call/get_web_call_uikit_integration.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js +34 -0
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +1 -0
- package/tools/chat/get_native_chat_uikit_integration.js +45 -0
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js +34 -0
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +1 -0
- package/tools/chat/get_web_chat_uikit_integration.js +45 -0
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -0
- package/tools/common/get_faq.js +265 -0
- package/tools/common/get_faq.js.map +1 -0
- package/tools/common/{get-usersig.js → get_usersig.js} +6 -3
- package/tools/common/get_usersig.js.map +1 -0
- package/tools/common/present_framework_choice.js +63 -0
- package/tools/common/present_framework_choice.js.map +1 -0
- package/tools/definitions/get_callkit_api_def.js +29 -0
- package/tools/definitions/get_callkit_api_def.js.map +1 -0
- package/tools/definitions/get_faq_def.js +17 -18
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js +15 -34
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +31 -0
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_native_chat_uikit_integration_def.js +16 -41
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +34 -0
- package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +34 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +32 -0
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +1 -0
- package/tools/definitions/get_usersig_def.js +17 -22
- package/tools/definitions/get_usersig_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +15 -7
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +17 -49
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +16 -19
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +15 -18
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_livekit_api_def.js +30 -0
- package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js +32 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +15 -46
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +31 -0
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js +27 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +27 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +27 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +24 -12
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/index.js +47 -61
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_features.js +65 -0
- package/tools/live/get_native_livekit_core_features.js.map +1 -0
- package/tools/live/get_native_livekit_core_integration.js +59 -0
- package/tools/live/get_native_livekit_core_integration.js.map +1 -0
- package/tools/live/get_web_live_uikit_integration.js +48 -0
- package/tools/live/get_web_live_uikit_integration.js.map +1 -0
- package/tools/live/get_web_livekit_api.js +32 -0
- package/tools/live/get_web_livekit_api.js.map +1 -0
- package/tools/live/get_web_livekit_component_detail.js +34 -0
- package/tools/live/get_web_livekit_component_detail.js.map +1 -0
- package/tools/room/{get-web-room-integration.js → get_web_room_uikit_integration.js} +13 -14
- package/tools/room/get_web_room_uikit_integration.js.map +1 -0
- package/tools/room/{get-web-room-feature-detail.js → get_web_roomkit_feature_detail.js} +30 -31
- package/tools/room/get_web_roomkit_feature_detail.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +1 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +31 -0
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +1 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js +73 -0
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +1 -0
- package/utils/generate-structured-result.js +61 -17
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/report-cls-client.js +12 -1
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +2 -2
- package/resource/doc/chatuikit/android/workflow.md +0 -713
- package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1371
- package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -932
- package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1119
- package/resource/doc/chatuikit/flutter/workflow.md +0 -941
- package/resource/doc/chatuikit/react/components/conversation-list.md +0 -1017
- package/resource/doc/chatuikit/react/components/search.md +0 -745
- package/resource/doc/chatuikit/react/create-group.md +0 -23
- package/resource/doc/chatuikit/react/init.md +0 -26
- package/resource/doc/chatuikit/react/workflow.md +0 -258
- package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
- package/resource/doc/chatuikit/vue/create-group.md +0 -25
- package/resource/doc/chatuikit/vue/init.md +0 -40
- package/resource/doc/chatuikit/vue/workflow.md +0 -395
- package/resource/doc/livekit/live/android/workflow.md +0 -320
- package/resource/doc/livekit/live/flutter/workflow.md +0 -353
- package/resource/doc/livekit/live/ios/workflow.md +0 -454
- package/resource/doc/livekit/live/vue/components/barrage.md +0 -616
- package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -446
- package/resource/doc/livekit/live/vue/faq.md +0 -0
- package/resource/doc/livekit/live/vue/live-list-integration.md +0 -200
- package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -269
- package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -269
- package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -595
- package/resource/doc/livekit/live/vue/states/live-state.md +0 -3591
- package/resource/doc/livekit/live/vue/workflow.md +0 -218
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -312
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -430
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -679
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -671
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -271
- package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +0 -849
- package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +0 -1046
- package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +0 -460
- package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +0 -558
- package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +0 -865
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -657
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -437
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -335
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -327
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -659
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -814
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1000
- package/resource/doc/roomkit/vue/features/workflow.md +0 -553
- package/resource/doc/roomkit/vue/workflow.md +0 -733
- package/resource/doc/tuicallkit/android/workflow.md +0 -441
- package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -784
- package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -610
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -938
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -897
- package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -469
- package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -781
- package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -398
- package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
- package/resource/doc/tuicallkit/react/api.md +0 -1404
- package/resource/doc/tuicallkit/vue/api.md +0 -1406
- package/resource/doc/tuicallkit/vue/faq.md +0 -36
- package/tools/call/get-native-call-integration.js +0 -43
- package/tools/call/get-native-call-integration.js.map +0 -1
- package/tools/call/get-web-call-api.js +0 -27
- package/tools/call/get-web-call-api.js.map +0 -1
- package/tools/call/get-web-call-integration.js.map +0 -1
- package/tools/chat/get-native-chat-feature-detail.js +0 -30
- package/tools/chat/get-native-chat-feature-detail.js.map +0 -1
- package/tools/chat/get-native-chat-integration.js +0 -45
- package/tools/chat/get-native-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-component-detail.js +0 -31
- package/tools/chat/get-web-chat-component-detail.js.map +0 -1
- package/tools/chat/get-web-chat-integration.js +0 -45
- package/tools/chat/get-web-chat-integration.js.map +0 -1
- package/tools/chat/get-web-chat-uikit-init.js +0 -28
- package/tools/chat/get-web-chat-uikit-init.js.map +0 -1
- package/tools/chat/get-web-create-group-doc.js +0 -28
- package/tools/chat/get-web-create-group-doc.js.map +0 -1
- package/tools/common/get-faq.js +0 -91
- package/tools/common/get-faq.js.map +0 -1
- package/tools/common/get-usersig.js.map +0 -1
- package/tools/common/present-framework-choice.js +0 -16
- package/tools/common/present-framework-choice.js.map +0 -1
- package/tools/common/present-scenario-choice.js +0 -16
- package/tools/common/present-scenario-choice.js.map +0 -1
- package/tools/common/record-prompt.js +0 -55
- package/tools/common/record-prompt.js.map +0 -1
- package/tools/common/record-result.js +0 -60
- package/tools/common/record-result.js.map +0 -1
- package/tools/definitions/get_native_chat_feature_detail_def.js +0 -32
- package/tools/definitions/get_native_chat_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_live_api_def.js +0 -23
- package/tools/definitions/get_native_live_api_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -87
- package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +0 -75
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +0 -63
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +0 -1
- package/tools/definitions/get_trtc_native_api_def.js +0 -16
- package/tools/definitions/get_trtc_native_api_def.js.map +0 -1
- package/tools/definitions/get_web_call_uikit_api_def.js +0 -23
- package/tools/definitions/get_web_call_uikit_api_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_init_def.js +0 -23
- package/tools/definitions/get_web_chat_uikit_init_def.js.map +0 -1
- package/tools/definitions/get_web_create_group_doc_def.js +0 -18
- package/tools/definitions/get_web_create_group_doc_def.js.map +0 -1
- package/tools/definitions/get_web_live_state_detail_def.js +0 -19
- package/tools/definitions/get_web_live_state_detail_def.js.map +0 -1
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +0 -27
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +0 -92
- package/tools/definitions/get_web_room_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_web_room_state_detail_def.js +0 -19
- package/tools/definitions/get_web_room_state_detail_def.js.map +0 -1
- package/tools/definitions/present_scenario_choice_def.js +0 -53
- package/tools/definitions/present_scenario_choice_def.js.map +0 -1
- package/tools/definitions/record_prompt_def.js +0 -58
- package/tools/definitions/record_prompt_def.js.map +0 -1
- package/tools/definitions/record_result_def.js +0 -46
- package/tools/definitions/record_result_def.js.map +0 -1
- package/tools/live/get-native-live-uikit-integration.js +0 -177
- package/tools/live/get-native-live-uikit-integration.js.map +0 -1
- package/tools/live/get-web-live-component-detail.js +0 -31
- package/tools/live/get-web-live-component-detail.js.map +0 -1
- package/tools/live/get-web-live-state-detail.js +0 -31
- package/tools/live/get-web-live-state-detail.js.map +0 -1
- package/tools/live/get-web-live-uikit-integration.js +0 -52
- package/tools/live/get-web-live-uikit-integration.js.map +0 -1
- package/tools/live/get_native_live_uikit_extra_features.js +0 -105
- package/tools/live/get_native_live_uikit_extra_features.js.map +0 -1
- package/tools/live/get_native_live_uikit_interaction.js +0 -194
- package/tools/live/get_native_live_uikit_interaction.js.map +0 -1
- package/tools/native_live/get-native-live-api.js +0 -31
- package/tools/native_live/get-native-live-api.js.map +0 -1
- package/tools/room/get-web-room-feature-detail.js.map +0 -1
- package/tools/room/get-web-room-integration.js.map +0 -1
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +0 -28
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-sdk-faq.js +0 -32
- package/tools/rtcengine/get-trtc-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-api.js +0 -28
- package/tools/rtcengine/get-trtc-web-sdk-api.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-faq.js +0 -30
- package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-integration.js +0 -29
- package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +0 -1
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js +0 -45
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +0 -1
- package/tools/trtc/get-trtc-native-api.js +0 -31
- package/tools/trtc/get-trtc-native-api.js.map +0 -1
- package/utils/handle-component-name.js +0 -33
- package/utils/handle-component-name.js.map +0 -1
- /package/resource/doc/{chatuikit/iOS/workflow.md → callkit/core-sdk/.gitkeep} +0 -0
- /package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +0 -0
- /package/resource/doc/{tuicallkit/react/faq.md → callkit/faq/web-faq.md} +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/common/server_error_code.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/flutter/faq.md +0 -0
- /package/resource/doc/{chatuikit → chatkit}/react/faq.md +0 -0
- /package/resource/doc/roomkit/faq/common/{error_code.md → error-code.md} +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
| | |
|
|
@@ -0,0 +1,333 @@
|
|
|
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. |
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
###
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
###
|