@tencentcloud/sdk-mcp 1.3.9 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/resource/doc/{tuicallkit/android/faq.md → callkit/faq/android-faq.md} +75 -308
- package/resource/doc/{tuicallkit/faq/common/error_code.md → callkit/faq/common/error-code.md} +2 -2
- package/resource/doc/{tuicallkit/flutter/faq.md → callkit/faq/flutter-faq.md} +83 -315
- package/resource/doc/{tuicallkit/iOS/faq.md → callkit/faq/ios-faq.md} +76 -313
- package/resource/doc/{tuicallkit/vue/faq.md → callkit/faq/web-faq.md} +78 -311
- package/resource/doc/callkit/preset/android/api.md +330 -0
- package/resource/doc/{tuicallkit → callkit/preset}/android/integration.md +63 -420
- package/resource/doc/callkit/preset/flutter/api.md +401 -0
- package/resource/doc/{tuicallkit → callkit/preset}/flutter/integration.md +53 -273
- package/resource/doc/callkit/preset/ios/api.md +282 -0
- package/resource/doc/{tuicallkit/iOS → callkit/preset/ios}/integration.md +39 -120
- package/resource/doc/callkit/preset/react/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/react/integration.md +6 -6
- package/resource/doc/callkit/preset/vue/api.md +600 -0
- package/resource/doc/{tuicallkit → callkit/preset}/vue/integration.md +5 -5
- package/resource/doc/{chatuikit → chatkit}/android/faq.md +29 -37
- package/resource/doc/{chatuikit → chatkit}/android/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/android/integration.md +30 -126
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +280 -0
- package/resource/doc/{chatuikit → chatkit}/faq/common/product.md +4 -17
- package/resource/doc/{chatuikit → chatkit}/faq/common/server.md +1 -2
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +183 -0
- package/resource/doc/{chatuikit → chatkit}/faq/flutter_sdk/faq.md +3 -3
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +279 -0
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/error_code.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/faq/web_sdk/faq.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/flutter/features/theme.md +22 -166
- package/resource/doc/{chatuikit → chatkit}/flutter/integration.md +20 -95
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/faq.md +29 -37
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/features/theme.md +27 -176
- package/resource/doc/{chatuikit/iOS → chatkit/ios}/integration.md +78 -280
- package/resource/doc/{chatuikit/vue → chatkit/react}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-header.md +7 -12
- package/resource/doc/{chatuikit → chatkit}/react/components/chat-setting.md +10 -17
- package/resource/doc/{chatuikit → chatkit}/react/components/chat.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/component-list.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/react/components/contact-list.md +122 -703
- 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 +116 -0
- package/resource/doc/chatkit/react/components/conversation-search.md +57 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/message-input.md +36 -186
- package/resource/doc/{chatuikit → chatkit}/react/components/message-list.md +21 -113
- package/resource/doc/chatkit/react/components/search.md +282 -0
- package/resource/doc/{chatuikit → chatkit}/react/components/tuikit.md +5 -26
- package/resource/doc/{chatuikit → chatkit}/react/integration.md +37 -104
- package/resource/doc/{chatuikit/react → chatkit/vue}/components/avatar.md +0 -1
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-header.md +7 -13
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat-setting.md +13 -18
- package/resource/doc/{chatuikit → chatkit}/vue/components/chat.md +1 -2
- package/resource/doc/{chatuikit → chatkit}/vue/components/component-list.md +0 -1
- 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 -316
- 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 +1 -23
- package/resource/doc/{chatuikit → chatkit}/vue/components/message-list.md +23 -134
- package/resource/doc/{chatuikit → chatkit}/vue/components/search.md +73 -640
- package/resource/doc/chatkit/vue/components/tuikit.md +45 -0
- package/resource/doc/{chatuikit → chatkit}/vue/components/userpicker.md +4 -4
- package/resource/doc/{chatuikit → chatkit}/vue/faq.md +1 -1
- package/resource/doc/{chatuikit → chatkit}/vue/integration.md +53 -121
- package/resource/doc/livekit/core-sdk/live/android/api-reference/AudioEffectStore.md +283 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BarrageStore.md +148 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/BattleStore.md +316 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CameraView.md +57 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoGuestStore.md +419 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/CoHostStore.md +325 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/DeviceStore.md +436 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/GiftStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveAudienceStore.md +239 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LiveSeatStore.md +417 -0
- package/resource/doc/livekit/core-sdk/live/android/api-reference/LoginStore.md +207 -0
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-audience-list.md +17 -88
- 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 +26 -139
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-base-beauty.md +16 -99
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-co-guest-interaction.md +54 -161
- 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 +91 -338
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-integration.md +108 -492
- package/resource/doc/livekit/{live → core-sdk/live}/android/live-live-list.md +27 -165
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/AudioEffectStore.md +279 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BarrageStore.md +158 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BaseBeautyStore.md +155 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/BattleStore.md +304 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoGuestStore.md +394 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/CoHostStore.md +303 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/DeviceStore.md +410 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/GiftStore.md +160 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LikeStore.md +51 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveAudienceStore.md +231 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveCoreView.md +143 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LiveSeatStore.md +375 -0
- package/resource/doc/livekit/core-sdk/live/flutter/api-reference/LoginStore.md +170 -0
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audience-list.md +13 -91
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-audio-effect.md +34 -177
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-barrage.md +18 -102
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-base-beauty.md +24 -164
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-co-guest-interaction.md +56 -161
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-gift.md +66 -460
- 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 +160 -543
- package/resource/doc/livekit/{live → core-sdk/live}/flutter/live-live-list.md +22 -161
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/AudioEffectStore.md +287 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BarrageStore.md +165 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BaseBeautyStore.md +143 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/BattleStore.md +298 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoGuestStore.md +349 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/CoHostStore.md +297 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/DeviceStore.md +471 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/GiftStore.md +179 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LikeStore.md +49 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveAudienceStore.md +238 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveCoreView.md +74 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LiveSeatStore.md +412 -0
- package/resource/doc/livekit/core-sdk/live/ios/api-reference/LoginStore.md +173 -0
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audience-list.md +23 -96
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-audio-effect.md +33 -195
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-barrage.md +35 -150
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-base-beauty.md +20 -105
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-co-guest-interaction.md +35 -140
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-gift.md +77 -457
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-host-interaction.md +70 -317
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-integration.md +90 -473
- package/resource/doc/livekit/{live → core-sdk/live}/ios/live-live-list.md +28 -163
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-audience-list.md +17 -88
- 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 +26 -139
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-co-guest-interaction.md +53 -262
- 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 +60 -272
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-integration.md +63 -440
- package/resource/doc/livekit/{voice → core-sdk/voice}/android/voice-room-list.md +23 -151
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audience-list.md +13 -91
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-audio-effect.md +34 -177
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-barrage.md +18 -102
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-co-guest-interaction.md +44 -201
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-gift.md +66 -460
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-integration.md +57 -419
- package/resource/doc/livekit/{voice → core-sdk/voice}/flutter/voice-room-list.md +24 -157
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audience-list.md +23 -96
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-audio-effect.md +33 -195
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-barrage.md +35 -150
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-co-guest-interaction.md +45 -254
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-gift.md +77 -457
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-host-interaction.md +52 -261
- package/resource/doc/livekit/core-sdk/voice/ios/voice-integration.md +478 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/ios/voice-room-list.md +36 -167
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audience-list.md +15 -45
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-audio-effect.md +23 -137
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-barrage.md +25 -131
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-co-guest-interaction.md +70 -366
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-gift.md +70 -424
- package/resource/doc/livekit/core-sdk/voice/uni-app/voice-integration.md +323 -0
- package/resource/doc/livekit/{voice → core-sdk/voice}/uni-app/voice-room-list.md +24 -116
- package/resource/doc/livekit/faq/common/{error_code.md → error-code.md} +2 -3
- 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 +9 -48
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-audience-list.md +27 -145
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-scene-panel.md +13 -76
- package/resource/doc/livekit/{live → preset/live}/vue/components/live-view.md +33 -224
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +211 -0
- package/resource/doc/livekit/preset/live/vue/faq.md +1 -0
- package/resource/doc/livekit/preset/live/vue/live-list-integration.md +244 -0
- package/resource/doc/livekit/preset/live/vue/live-player-desk-integration.md +301 -0
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +307 -0
- package/resource/doc/livekit/preset/live/vue/live-pusher-integration.md +754 -0
- package/resource/doc/roomkit/android/features/call-user-to-room.md +234 -0
- package/resource/doc/roomkit/android/features/room-participant-state.md +850 -0
- package/resource/doc/roomkit/android/features/room-state.md +358 -0
- package/resource/doc/roomkit/android/features/schedule-room.md +336 -0
- package/resource/doc/roomkit/android/integration.md +433 -0
- package/resource/doc/roomkit/{common/error_code.md → faq/common/error-code.md} +1 -1
- package/resource/doc/roomkit/flutter/features/call-user-to-room.md +228 -0
- package/resource/doc/roomkit/flutter/features/room-participant-state.md +796 -0
- package/resource/doc/roomkit/flutter/features/room-state.md +324 -0
- package/resource/doc/roomkit/flutter/features/schedule-room.md +324 -0
- package/resource/doc/roomkit/flutter/integration.md +405 -0
- package/resource/doc/roomkit/ios/features/call-user-to-room.md +226 -0
- package/resource/doc/roomkit/ios/features/room-participant-state.md +821 -0
- package/resource/doc/roomkit/ios/features/room-state.md +320 -0
- package/resource/doc/roomkit/ios/features/schedule-room.md +318 -0
- package/resource/doc/roomkit/ios/integration.md +384 -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 -36
- package/resource/doc/roomkit/vue/features/room-view.md +30 -127
- 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 -34
- package/resource/doc/roomkit/vue/integration.md +21 -80
- package/resource/doc/rtcengine/faq/common/userSig.md +17 -141
- package/resource/doc/rtcengine/faq/web/web.md +15 -22
- package/resource/doc/rtcengine/web/api.md +17 -21
- package/resource/doc/rtcengine/web/how_to_integrated_web_sdk.md +4 -10
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +4 -8
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +3 -3
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +2 -3
- package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +6 -6
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +2 -2
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +2 -4
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +1 -2
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +2 -6
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +13 -14
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +10 -90
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +5 -8
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +31 -35
- package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +0 -2
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +7 -49
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +1 -1
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -3
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +20 -20
- 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 -4
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +3 -3
- package/resource/doc/trtc/C++/ITRTCCloud.md +718 -2847
- package/resource/doc/trtc/C++/ITRTCStatistics.md +53 -308
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +207 -1041
- package/resource/doc/trtc/C++/ITXDeviceManager.md +127 -768
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +634 -2259
- package/resource/doc/trtc/C++/TRTCTypeDef.md +726 -3465
- package/resource/doc/trtc/C++/TXLiteAVCode.md +117 -916
- package/resource/doc/trtc/android/TRTCCloud.md +638 -2612
- package/resource/doc/trtc/android/TRTCCloudDef.md +769 -3697
- package/resource/doc/trtc/android/TRTCCloudListener.md +609 -2070
- package/resource/doc/trtc/android/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/android/TXAudioEffectManager.md +207 -1049
- 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 +115 -900
- package/resource/doc/trtc/iOS/TRTCCloud.md +726 -2930
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +580 -2099
- package/resource/doc/trtc/iOS/TRTCStatistics.md +48 -278
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +179 -896
- 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/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +747 -3559
- 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/common/record_skill_session.js +58 -0
- package/tools/common/record_skill_session.js.map +1 -0
- package/tools/definitions/get_callkit_api_def.js +28 -0
- package/tools/definitions/get_callkit_api_def.js.map +1 -0
- package/tools/definitions/get_faq_def.js +18 -19
- 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 +33 -0
- package/tools/definitions/get_native_livekit_core_features_def.js.map +1 -0
- package/tools/definitions/get_native_livekit_core_integration_def.js +33 -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 -24
- 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 +13 -18
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_livekit_api_def.js +27 -0
- package/tools/definitions/get_web_livekit_api_def.js.map +1 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js +29 -0
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +13 -46
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +30 -0
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +1 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +25 -0
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +23 -12
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/definitions/record_skill_session_def.js +31 -0
- package/tools/definitions/record_skill_session_def.js.map +1 -0
- package/tools/index.js +49 -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 +21 -1
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/chatuikit/android/workflow.md +0 -713
- package/resource/doc/chatuikit/faq/android_sdk/client-api.md +0 -1376
- package/resource/doc/chatuikit/faq/flutter_sdk/client-api.md +0 -860
- package/resource/doc/chatuikit/faq/ios_sdk/client-api.md +0 -1371
- package/resource/doc/chatuikit/flutter/workflow.md +0 -816
- package/resource/doc/chatuikit/iOS/workflow.md +0 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +0 -765
- package/resource/doc/chatuikit/react/components/search.md +0 -885
- package/resource/doc/chatuikit/react/create-group.md +0 -22
- package/resource/doc/chatuikit/react/init.md +0 -25
- package/resource/doc/chatuikit/react/workflow.md +0 -254
- package/resource/doc/chatuikit/uniapp-app/faq.md +0 -0
- package/resource/doc/chatuikit/uniapp-app/integration.md +0 -619
- package/resource/doc/chatuikit/uniapp-app/workflow.md +0 -576
- package/resource/doc/chatuikit/vue/components/contact-list.md +0 -679
- package/resource/doc/chatuikit/vue/components/tuikit.md +0 -110
- package/resource/doc/chatuikit/vue/create-group.md +0 -26
- package/resource/doc/chatuikit/vue/init.md +0 -35
- package/resource/doc/chatuikit/vue/workflow.md +0 -395
- package/resource/doc/livekit/live/android/workflow.md +0 -322
- package/resource/doc/livekit/live/flutter/workflow.md +0 -353
- package/resource/doc/livekit/live/ios/workflow.md +0 -352
- package/resource/doc/livekit/live/vue/components/barrage.md +0 -615
- package/resource/doc/livekit/live/vue/components/stream-mixer.md +0 -442
- package/resource/doc/livekit/live/vue/faq.md +0 -0
- package/resource/doc/livekit/live/vue/live-list-integration.md +0 -195
- package/resource/doc/livekit/live/vue/live-player-desk-integration.md +0 -293
- package/resource/doc/livekit/live/vue/live-player-h5-integration.md +0 -381
- package/resource/doc/livekit/live/vue/live-pusher-integration.md +0 -598
- package/resource/doc/livekit/live/vue/states/live-state.md +0 -2656
- package/resource/doc/livekit/live/vue/workflow.md +0 -219
- package/resource/doc/livekit/voice/android/workflow.md +0 -333
- package/resource/doc/livekit/voice/flutter/workflow.md +0 -359
- package/resource/doc/livekit/voice/ios/voice-integration.md +0 -853
- package/resource/doc/livekit/voice/ios/workflow.md +0 -358
- package/resource/doc/livekit/voice/uni-app/voice-integration.md +0 -613
- package/resource/doc/livekit/voice/uni-app/workflow.md +0 -369
- package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +0 -334
- package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +0 -434
- package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +0 -685
- package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +0 -712
- package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +0 -284
- 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 -879
- package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +0 -668
- package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +0 -456
- package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +0 -332
- package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +0 -748
- package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +0 -328
- package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +0 -505
- package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +0 -507
- package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +0 -676
- package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +0 -284
- package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +0 -820
- package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +0 -1065
- 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 -432
- package/resource/doc/tuicallkit/faq/android_sdk/call-observer-api.md +0 -786
- package/resource/doc/tuicallkit/faq/android_sdk/callkit-api.md +0 -663
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-define-api.md +0 -932
- package/resource/doc/tuicallkit/faq/flutter_sdk/call-observer-api.md +0 -926
- package/resource/doc/tuicallkit/faq/flutter_sdk/callkit-api.md +0 -452
- package/resource/doc/tuicallkit/faq/ios_sdk/call-observer-api.md +0 -779
- package/resource/doc/tuicallkit/faq/ios_sdk/callkit-api.md +0 -635
- package/resource/doc/tuicallkit/flutter/workflow.md +0 -331
- package/resource/doc/tuicallkit/react/api.md +0 -1512
- package/resource/doc/tuicallkit/react/faq.md +0 -986
- package/resource/doc/tuicallkit/vue/api.md +0 -1512
- 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 -22
- package/tools/definitions/get_native_live_api_def.js.map +0 -1
- package/tools/definitions/get_native_live_uikit_extra_features_def.js +0 -109
- 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 -17
- 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/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/{rtcengine/web → callkit/core-sdk}/.gitkeep +0 -0
- /package/resource/doc/{chatuikit → chatkit}/faq/common/server_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
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
## 组件概述
|
|
2
|
+
|
|
3
|
+
Search 是一个功能完整的搜索解决方案,包含了搜索框、搜索结果展示、高级搜索等功能的完整组件集合。适用于即时通讯、在线会议、在线教育等场景的用户、群组、消息搜索。
|
|
4
|
+
|
|
5
|
+
> **说明:**
|
|
6
|
+
>
|
|
7
|
+
|
|
8
|
+
> 此功能属于增值服务,需要您购买云端搜索插件,请点击 [购买](https://console.cloud.tencent.com/im/plugin/TUICloudSearch)。
|
|
9
|
+
>
|
|
10
|
+
|
|
11
|
+
## 组件架构
|
|
12
|
+
``` bash
|
|
13
|
+
Search (主组件)
|
|
14
|
+
├── SearchBar # 搜索框组件
|
|
15
|
+
├── SearchResults # 搜索结果组件
|
|
16
|
+
├── SearchAdvanced # 高级搜索组件
|
|
17
|
+
└── SearchResultsItem # 搜索结果项组件
|
|
18
|
+
├── User # 用户结果项
|
|
19
|
+
├── Group # 群组结果项
|
|
20
|
+
├── Message # 消息结果项
|
|
21
|
+
└── Conversation # 会话结果项
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 搜索模式
|
|
25
|
+
| **迷你模式** | **标准模式** | **嵌入式模式** |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| - 适用于侧边栏或小容器<br>- 显示有限结果数量<br>- 支持展开查看更多 | - 适用于全屏搜索界面<br>- 完整功能展示<br>- 支持高级搜索 | - 适用于聊天界面<br>- 专注消息搜索<br>- 优化的布局 |
|
|
28
|
+
| | | |
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
32
|
+
| --- | --- | --- | --- |
|
|
33
|
+
| variant | `VariantType` | `VariantType.MINI` | 搜索模式:`mini`(迷你)、`standard`(标准)、`embedded`(嵌入式) |
|
|
34
|
+
| SearchBar | `React.ComponentType<SearchBarProps>` | `DefaultSearchBar` | 自定义搜索框组件 |
|
|
35
|
+
| SearchResults | `React.ComponentType<SearchResultsProps>` | `DefaultSearchResults` | 自定义搜索结果组件 |
|
|
36
|
+
| SearchAdvanced | `React.ComponentType<SearchAdvancedProps>` | `DefaultSearchAdvanced` | 自定义高级搜索组件 |
|
|
37
|
+
| SearchResultsPresearch | `React.ComponentType` | - | 搜索前占位符组件 |
|
|
38
|
+
| SearchResultsLoading | `React.ComponentType` | - | 加载中占位符组件 |
|
|
39
|
+
| SearchResultsEmpty | `React.ComponentType` | - | 空结果占位符组件 |
|
|
40
|
+
| SearchResultItem | `React.ComponentType<ResultItemProps>` | - | 自定义搜索结果项组件 |
|
|
41
|
+
| debounceTime | `number` | `300` | 搜索防抖时间(毫秒) |
|
|
42
|
+
| autoFocus | `boolean` | `false` | 是否自动聚焦搜索框 |
|
|
43
|
+
| className | `string` | - | 自定义样式类名 |
|
|
44
|
+
| style | `React.CSSProperties` | - | 自定义样式 |
|
|
45
|
+
| onKeywordChange | `(keyword: string) => void` | - | 搜索关键词变化回调 |
|
|
46
|
+
| onSearchComplete | `(results: Map<SearchType, SearchResult>) => void` | - | 搜索完成回调 |
|
|
47
|
+
| onResultItemClick | `(data: SearchResultItem, type: SearchType) => void` | - | 搜索结果点击回调 |
|
|
48
|
+
| onError | `(error: Error) => void` | - | 搜索错误回调 |
|
|
49
|
+
|
|
50
|
+
## 基础使用
|
|
51
|
+
``` typescript
|
|
52
|
+
import { Search, VariantType } from '@tencentcloud/chat-uikit-react';
|
|
53
|
+
|
|
54
|
+
function App() {
|
|
55
|
+
return (
|
|
56
|
+
<Search
|
|
57
|
+
variant={VariantType.STANDARD}
|
|
58
|
+
onResultItemClick={(data, type) => {
|
|
59
|
+
console.log('搜索结果点击:', data, type);
|
|
60
|
+
}}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 自定义能力
|
|
67
|
+
|
|
68
|
+
`Search` 为用户自定义提供了丰富且多维度的 Props 接口,允许用户自定义功能、UI、模块等。
|
|
69
|
+
|
|
70
|
+
`Search` 组件提供了多个可替换的子组件,允许用户自定义 `SearchBar`, `SearchResults`, `SearchAdvanced`, `SearchResultItem`, `SearchResultsPresearch`, `SearchResultsLoading`, `SearchResultsEmpty`, 等。同时,用户还可以利用默认子组件进行二次开发定制。
|
|
71
|
+
|
|
72
|
+
【自定义 SearchBar】
|
|
73
|
+
|
|
74
|
+
**Props**
|
|
75
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
76
|
+
| --- | --- | --- | --- |
|
|
77
|
+
| data | `SearchResultItem` | - | 搜索结果数据 |
|
|
78
|
+
| type | `SearchType` | - | 搜索结果类型 |
|
|
79
|
+
| keyword | `string` | - | 搜索关键词 |
|
|
80
|
+
| onClick | `(data: SearchResultItem, type: SearchType) => void` | - | 点击回调 |
|
|
81
|
+
| className | `string` | - | 自定义样式类名 |
|
|
82
|
+
|
|
83
|
+
**示例**
|
|
84
|
+
``` typescript
|
|
85
|
+
const CustomSearchBar = ({ value, onChange, onClear, placeholder }) => (
|
|
86
|
+
<div className="custom-search-bar">
|
|
87
|
+
<input
|
|
88
|
+
type="text"
|
|
89
|
+
value={value}
|
|
90
|
+
onChange={onChange}
|
|
91
|
+
placeholder={placeholder}
|
|
92
|
+
/>
|
|
93
|
+
{value && <button onClick={onClear}>清除</button>}
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
<Search SearchBar={CustomSearchBar} />
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
【自定义 SearchResults】
|
|
101
|
+
|
|
102
|
+
**Props**
|
|
103
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
104
|
+
| --- | --- | --- | --- |
|
|
105
|
+
| results | `Map<SearchType, SearchResult>` | - | 搜索结果数据 |
|
|
106
|
+
| isLoading | `boolean` | - | 是否正在加载 |
|
|
107
|
+
| error | `Error \\| null` | - | 错误信息 |
|
|
108
|
+
| keyword | `string` | - | 搜索关键词 |
|
|
109
|
+
| typeLabels | `Record<SearchType, string>` | - | 搜索类型标签 |
|
|
110
|
+
| onLoadMore | `(type: SearchType) => void` | - | 加载更多回调 |
|
|
111
|
+
| onResultItemClick | `(data: SearchResultItem, type: SearchType) => void` | - | 结果项点击回调 |
|
|
112
|
+
| SearchResultsLoading | `React.ComponentType` | `Loading` | 自定义加载组件 |
|
|
113
|
+
| SearchResultsPresearch | `React.ComponentType` | - | 搜索前占位符组件 |
|
|
114
|
+
| SearchResultsEmpty | `React.ComponentType` | `EmptyResult` | 空结果占位符组件 |
|
|
115
|
+
| SearchResultItem | `React.ComponentType<ResultItemProps>` | `DefaultSearchResultsItem` | 自定义结果项组件 |
|
|
116
|
+
| variant | `VariantType` | `VariantType.STANDARD` | 显示模式 |
|
|
117
|
+
| searchType | `SearchType \\| 'all'` | `'all'` | 当前搜索类型 |
|
|
118
|
+
|
|
119
|
+
**示例**
|
|
120
|
+
``` typescript
|
|
121
|
+
const CustomSearchResults = ({ results, keyword, onResultItemClick }) => (
|
|
122
|
+
<div className="custom-results">
|
|
123
|
+
{Array.from(results.entries()).map(([type, result]) => (
|
|
124
|
+
<div key={type}>
|
|
125
|
+
<h3>{type}</h3>
|
|
126
|
+
{result.resultList.map((item, index) => (
|
|
127
|
+
<div key={index} onClick={() => onResultItemClick(item, type)}>
|
|
128
|
+
{/* 自定义结果项 */}
|
|
129
|
+
</div>
|
|
130
|
+
))}
|
|
131
|
+
</div>
|
|
132
|
+
))}
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
<Search SearchResults={CustomSearchResults} />
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
【自定义 SearchAdvanced】
|
|
140
|
+
|
|
141
|
+
**Props**
|
|
142
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
143
|
+
| --- | --- | --- | --- |
|
|
144
|
+
| variant | `VariantType` | - | 显示模式 |
|
|
145
|
+
| searchType | `SearchTabType` | - | 当前搜索类型 |
|
|
146
|
+
| advancedParams | `Map<SearchType, SearchParamsMap[SearchType]>` | - | 高级搜索参数 |
|
|
147
|
+
| onAdvancedParamsChange | `(type: SearchType, params: SearchParamsMap[SearchType]) => void` | - | 参数变化回调 |
|
|
148
|
+
|
|
149
|
+
**示例**
|
|
150
|
+
``` typescript
|
|
151
|
+
const CustomSearchAdvanced = ({ variant, searchType, advancedParams, onAdvancedParamsChange }) => (
|
|
152
|
+
<div className="custom-advanced">
|
|
153
|
+
{/* 自定义高级搜索功能 */}
|
|
154
|
+
</div>
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
<Search SearchAdvanced={CustomSearchAdvanced} />
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
【自定义 SearchResultItem】
|
|
161
|
+
|
|
162
|
+
**Props**
|
|
163
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
164
|
+
| --- | --- | --- | --- |
|
|
165
|
+
| data | `SearchResultItem` | - | 搜索结果数据 |
|
|
166
|
+
| type | `SearchType` | - | 搜索结果类型 |
|
|
167
|
+
| keyword | `string` | - | 搜索关键词 |
|
|
168
|
+
| onClick | `(data: SearchResultItem, type: SearchType) => void` | - | 点击回调 |
|
|
169
|
+
| className | `string` | - | 自定义样式类名 |
|
|
170
|
+
|
|
171
|
+
**示例**
|
|
172
|
+
``` typescript
|
|
173
|
+
const CustomSearchItem = ({ data, type, keyword, onClick }) => (
|
|
174
|
+
<div className="custom-item">
|
|
175
|
+
{type === SearchType.MESSAGE && (
|
|
176
|
+
<Conversation
|
|
177
|
+
data={data}
|
|
178
|
+
keyword={keyword}
|
|
179
|
+
onClick={onClick}
|
|
180
|
+
/>
|
|
181
|
+
)}
|
|
182
|
+
{type === SearchType.USER && (
|
|
183
|
+
<User
|
|
184
|
+
data={data}
|
|
185
|
+
keyword={keyword}
|
|
186
|
+
onClick={onClick}
|
|
187
|
+
/>
|
|
188
|
+
)}
|
|
189
|
+
{type === SearchType.GROUP && (
|
|
190
|
+
<Group
|
|
191
|
+
data={data}
|
|
192
|
+
keyword={keyword}
|
|
193
|
+
onClick={onClick}
|
|
194
|
+
/>
|
|
195
|
+
)}
|
|
196
|
+
{type === SearchType.CHAT_MESSAGE && (
|
|
197
|
+
<Message
|
|
198
|
+
data={data}
|
|
199
|
+
keyword={keyword}
|
|
200
|
+
onClick={onClick}
|
|
201
|
+
/>
|
|
202
|
+
)}
|
|
203
|
+
</div>
|
|
204
|
+
);
|
|
205
|
+
|
|
206
|
+
<Search SearchResultItem={CustomSearchItem} />
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
【自定义占位组件】
|
|
210
|
+
|
|
211
|
+
**Props**
|
|
212
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
213
|
+
| --- | --- | --- | --- |
|
|
214
|
+
| SearchResultsPresearch | `React.ComponentType` | - | 搜索前占位符组件 |
|
|
215
|
+
| SearchResultsLoading | `React.ComponentType` | - | 加载中占位符组件 |
|
|
216
|
+
| SearchResultsEmpty | `React.ComponentType` | - | 空结果占位符组件 |
|
|
217
|
+
|
|
218
|
+
**示例**
|
|
219
|
+
``` typescript
|
|
220
|
+
<Search
|
|
221
|
+
SearchResultsPresearch={() => <div>输入关键词开始搜索</div>}
|
|
222
|
+
SearchResultsLoading={() => <div>搜索中...</div>}
|
|
223
|
+
SearchResultsEmpty={() => <div>未找到相关结果</div>}
|
|
224
|
+
/>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## SearchState
|
|
228
|
+
|
|
229
|
+
SearchState 是基于 Zustand 的搜索状态管理钩子,为 Search 组件提供完整的状态管理能力。它支持多种搜索模式(标准模式、嵌入式模式),管理搜索关键词、搜索结果、加载状态、错误处理等功能。如果自定义组件能力不能支持您的业务,可以使用 SearchState 实现您的需求。
|
|
230
|
+
|
|
231
|
+
#### 数据
|
|
232
|
+
| 属性名 | 类型 | 说明 |
|
|
233
|
+
| --- | --- | --- |
|
|
234
|
+
| keyword | `string` | 当前搜索关键词 |
|
|
235
|
+
| results | `Map<SearchType, SearchResult<SearchType>>` | 搜索结果集合 |
|
|
236
|
+
| isLoading | `boolean` | 是否正在搜索 |
|
|
237
|
+
| error | `Error \\| null` | 搜索错误信息 |
|
|
238
|
+
| searchAdvancedParams | `Map<ISearchType, SearchParamsMap[SearchType]>` | 高级搜索参数 |
|
|
239
|
+
| selectedSearchType | `SearchType \\| 'all'` | 当前选中的搜索类型 |
|
|
240
|
+
|
|
241
|
+
#### 操作方法
|
|
242
|
+
| 方法名 | 类型 | 说明 |
|
|
243
|
+
| --- | --- | --- |
|
|
244
|
+
| setKeyword | `(k: string) => void` | 设置搜索关键词 |
|
|
245
|
+
| loadMore | `(type?: SearchType) => Promise<void>` | 加载更多搜索结果 |
|
|
246
|
+
| setSelectedType | `(type: SearchType \\| 'all') => void` | 设置搜索类型 |
|
|
247
|
+
| setSearchMessageAdvancedParams | `(params: SearchCloudMessagesParams) => void` | 设置消息搜索高级参数 |
|
|
248
|
+
| setSearchUserAdvancedParams | `(params: SearchCloudUsersParams) => void` | 设置用户搜索高级参数 |
|
|
249
|
+
| setSearchGroupAdvancedParams | `(params: SearchCloudGroupsParams) => void` | 设置群组搜索高级参数 |
|
|
250
|
+
|
|
251
|
+
## 使用示例
|
|
252
|
+
``` typescript
|
|
253
|
+
import { useSearchState, VariantType } from '@tencentcloud/chat-uikit-react';
|
|
254
|
+
const {
|
|
255
|
+
keyword,
|
|
256
|
+
results,
|
|
257
|
+
isLoading,
|
|
258
|
+
error,
|
|
259
|
+
setKeyword,
|
|
260
|
+
setSelectedType,
|
|
261
|
+
loadMore
|
|
262
|
+
} = useSearchState(VariantType.STANDARD);
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## 常见问题
|
|
267
|
+
|
|
268
|
+
### Q: 如何自定义搜索结果的显示格式?
|
|
269
|
+
|
|
270
|
+
A: 使用 `SearchResultItem` 属性传入自定义组件。
|
|
271
|
+
|
|
272
|
+
### Q: 如何处理搜索性能问题?
|
|
273
|
+
|
|
274
|
+
A: 调整 `debounceTime`,使用 React.memo,考虑结果缓存。
|
|
275
|
+
|
|
276
|
+
### Q: 移动端如何优化?
|
|
277
|
+
|
|
278
|
+
A: 组件自动适配移动端,也可通过 CSS 进一步定制。
|
|
279
|
+
|
|
280
|
+
### Q: 如何支持多语言?
|
|
281
|
+
|
|
282
|
+
A: 组件内置国际化支持,通过 `useUIKit` 获取翻译。
|
|
@@ -11,54 +11,33 @@ TUIKit 主要分为 ConversationList、Chat、ChatSetting、Profile 等模块,
|
|
|
11
11
|
|
|
12
12
|
Web 端界面效果如下图所示:
|
|
13
13
|
|
|
14
|
-

|
|
15
|
-
|
|
16
|
-
|
|
17
14
|
H5 端界面效果如下图所示:
|
|
18
15
|
|
|
19
|
-

|
|
20
|
-
|
|
21
|
-
|
|
22
16
|
## Chat 重点功能介绍
|
|
23
17
|
|
|
24
18
|
Chat 主要负责消息界面的展示。您可以利用它直接发送不同类型的消息,支持文字/表情/图片/视频/文件/自定义等消息类型,同时支持消息转发/撤回/引用、查询、已读回执等功能。
|
|
25
19
|
|
|
26
|
-

|
|
27
|
-
|
|
28
|
-
|
|
29
20
|
> **说明:**
|
|
30
|
-
>
|
|
21
|
+
>
|
|
31
22
|
|
|
32
23
|
> 为了尊重版权,IM Demo/TUIKit 工程中默认不包含大表情元素切图。在正式上线商用前,请您替换为自己设计或拥有版权的其他表情包。请注意,下图所示的**默认小黄脸表情包版权属于腾讯云**,您可以通过升级至 [IM 企业版套餐](https://buy.cloud.tencent.com/avc) 免费使用该表情包。
|
|
33
|
-
>
|
|
34
|
-
|
|
35
|
-
> 
|
|
36
|
-
>
|
|
24
|
+
>
|
|
37
25
|
|
|
26
|
+
>
|
|
27
|
+
>
|
|
38
28
|
|
|
39
29
|
## ConversationList 功能介绍
|
|
40
30
|
|
|
41
31
|
ConversationList 主要负责会话列表的展示和编辑,包含会话置顶、会话删除等功能。
|
|
42
32
|
|
|
43
|
-

|
|
44
|
-
|
|
45
|
-
|
|
46
33
|
## ChatSetting 功能介绍
|
|
47
34
|
|
|
48
35
|
ChatSetting 主要负责 Chat 设置。
|
|
49
36
|
|
|
50
|
-

|
|
51
|
-
|
|
52
|
-
|
|
53
37
|
## Contact 重点功能介绍
|
|
54
38
|
|
|
55
39
|
Contact 主要负责关系链展示以及创建会话等操作。
|
|
56
40
|
|
|
57
|
-

|
|
58
|
-
|
|
59
|
-
|
|
60
41
|
## Profile 重点功能介绍
|
|
61
42
|
|
|
62
|
-
Profile 主要负责用户资料的管理。
|
|
63
|
-
|
|
64
|
-

|
|
43
|
+
Profile 主要负责用户资料的管理。
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
TUIKit 是基于腾讯云 Chat SDK 的一款 vue3 UI 组件库,它提供了一些通用的 UI 组件,包含会话、聊天、群组等功能。本文介绍如何快速集成 TUIKit 并实现核心功能。
|
|
2
2
|
|
|
3
3
|
> **推荐使用更高效的 AI 集成助手**
|
|
4
|
-
>
|
|
4
|
+
>
|
|
5
5
|
|
|
6
6
|
> 我们为您提供了全新的 AI 集成方式,只需要简单描述您的需求,即可**自动生成集成代码**,大幅提升开发效率。
|
|
7
|
-
>
|
|
7
|
+
>
|
|
8
8
|
|
|
9
9
|
> [点击这里,立即体验 AI 集成](https://cloud.tencent.com/document/product/269/124481)
|
|
10
|
-
>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-

|
|
14
|
-
|
|
10
|
+
>
|
|
15
11
|
|
|
16
12
|
## 关键概念
|
|
17
13
|
|
|
@@ -32,7 +28,6 @@ chat-uikit-react 主要分为 ConversationList、Chat、MessageList、ChatHeader
|
|
|
32
28
|
|
|
33
29
|
8. Contact 提供联系人组件。
|
|
34
30
|
|
|
35
|
-
|
|
36
31
|
## 前提条件
|
|
37
32
|
- Node.js v18 版本及以上,建议使用当前的 LTS v22 版本
|
|
38
33
|
|
|
@@ -40,15 +35,13 @@ chat-uikit-react 主要分为 ConversationList、Chat、MessageList、ChatHeader
|
|
|
40
35
|
|
|
41
36
|
- TypeScript@^5.0.0
|
|
42
37
|
|
|
43
|
-
|
|
44
38
|
## 创建项目
|
|
45
39
|
|
|
46
40
|
创建一个新的名为 **chat-example** 的 React 项目(创建项目时选择 **React 18**,并且使用 TypeScript 模板),并按照脚手架提示完成项目的初始化。
|
|
47
41
|
|
|
48
|
-
|
|
49
42
|
【shell】
|
|
50
43
|
``` bash
|
|
51
|
-
npm create rsbuild@latest
|
|
44
|
+
npm create rsbuild@latest
|
|
52
45
|
# 初始化脚手架项目
|
|
53
46
|
cd chat-example
|
|
54
47
|
npm i
|
|
@@ -61,7 +54,6 @@ npm run dev
|
|
|
61
54
|
|
|
62
55
|
通过 npm 方式下载 [chat-uikit-react](https://www.npmjs.com/package/@tencentcloud/chat-uikit-react) 并在项目中使用。
|
|
63
56
|
|
|
64
|
-
|
|
65
57
|
【shell】
|
|
66
58
|
``` bash
|
|
67
59
|
npm i @tencentcloud/chat-uikit-react
|
|
@@ -70,19 +62,12 @@ npm i @tencentcloud/chat-uikit-react
|
|
|
70
62
|
### 步骤 2. 引入组件
|
|
71
63
|
|
|
72
64
|
> **注意:**
|
|
73
|
-
>
|
|
74
|
-
> - 以下代码中未填入 `SDKAppID`、`userID` 和 `userSig`,需在
|
|
65
|
+
>
|
|
66
|
+
> - 以下代码中未填入 `SDKAppID`、`userID` 和 `userSig`,需在 步骤3 中获取相关信息后进行替换。
|
|
75
67
|
> - 为了尊重版权,IM Demo/TUIKit 工程中默认不包含大表情元素切图。正式上线商用前请您替换为自己设计或拥有版权的其他表情包。下图所示默认的**小黄脸表情包版权归腾讯云所有**,可以有偿授权使用,如需获得授权您可以通过升级至 [IM 企业版套餐](https://buy.cloud.tencent.com/avc) 免费使用该表情包。
|
|
76
68
|
|
|
77
|
-

|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
69
|
复制以下 `App.tsx` 代码并替换原有的 `src/App.tsx` 中的内容。
|
|
82
70
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
71
|
【src/App.tsx】
|
|
87
72
|
``` typescript
|
|
88
73
|
import { useEffect, useLayoutEffect, useState, useMemo } from "react";
|
|
@@ -121,12 +106,12 @@ function ChatApp() {
|
|
|
121
106
|
const [activeTab, setActiveTab] = useState<'conversations' | 'contacts'>('conversations');
|
|
122
107
|
const [isChatSettingShow, setIsChatSettingShow] = useState(false);
|
|
123
108
|
const [isSearchInChatShow, setIsSearchInChatShow] = useState(false);
|
|
124
|
-
|
|
109
|
+
|
|
125
110
|
const { language, theme } = useUIKit();
|
|
126
111
|
|
|
127
112
|
const isDark = theme === 'dark';
|
|
128
113
|
|
|
129
|
-
const texts = useMemo(() =>
|
|
114
|
+
const texts = useMemo(() =>
|
|
130
115
|
language === 'zh-CN'
|
|
131
116
|
? { emptyTitle: '暂无会话', emptySub: '选择一个会话开始聊天', error: '请检查 SDKAppID, userID, userSig, 通过开发人员工具(F12)查看具体的错误信息', loading: '登录中...' }
|
|
132
117
|
: { emptyTitle: 'No conversation', emptySub: 'Select a conversation to start chatting', error: 'Please check the SDKAppID, userID, and userSig. View the specific error information through the developer tools (F12).', loading: 'Logging in...'},
|
|
@@ -311,9 +296,6 @@ export default App;
|
|
|
311
296
|
|
|
312
297
|
复制以下 `App.css` 代码并替换同级目录的 `src/App.css` 样式文件。
|
|
313
298
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
299
|
【src/App.css】
|
|
318
300
|
``` java
|
|
319
301
|
|
|
@@ -330,89 +312,51 @@ const { status } = useLoginState({
|
|
|
330
312
|
userSig: '', // string 类型
|
|
331
313
|
});
|
|
332
314
|
```
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
<td rowspan="1" colSpan="1" >说明</td>
|
|
340
|
-
</tr>
|
|
341
|
-
|
|
342
|
-
<tr>
|
|
343
|
-
<td rowspan="1" colSpan="1" >SDKAppID</td>
|
|
344
|
-
|
|
345
|
-
<td rowspan="1" colSpan="1" >Number</td>
|
|
346
|
-
|
|
347
|
-
<td rowspan="1" colSpan="1" >SDKAppID 是腾讯云 IM 客户应用的唯一标识。您可以在 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 创建新应用,获取 SDKAppID 。<br>**说明:**<br>SDKAppID 是腾讯云 IM 客户应用的唯一标识。我们建议每一个独立的 App 都申请一个新的 SDKAppID。不同 SDKAppID 之间的消息是天然隔离的,不能互通。<br></td>
|
|
348
|
-
</tr>
|
|
349
|
-
|
|
350
|
-
<tr>
|
|
351
|
-
<td rowspan="1" colSpan="1" >userID</td>
|
|
352
|
-
|
|
353
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
354
|
-
|
|
355
|
-
<td rowspan="1" colSpan="1" >用户的唯一标识符,由您定义,只能包含大小写字母(a-z,A-Z)、数字(0-9)、下划线和连字符。</td>
|
|
356
|
-
</tr>
|
|
357
|
-
|
|
358
|
-
<tr>
|
|
359
|
-
<td rowspan="1" colSpan="1" >userSig</td>
|
|
360
|
-
|
|
361
|
-
<td rowspan="1" colSpan="1" >String</td>
|
|
362
|
-
|
|
363
|
-
<td rowspan="1" colSpan="1" >用户登录即时通信 IM 的密码,其本质是对 UserID 等信息加密后得到的密文。<br>**说明:**<br>- 开发环境:快速跑通 Demo,可以通过 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 获取 UserSig。<br>- 生产环境:将 UserSig 的计算代码集成到您的服务端,并提供面向项目的接口, 正确的 UserSig 签发方式请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/269/32688)。<br></td>
|
|
364
|
-
</tr>
|
|
365
|
-
</table>
|
|
366
|
-
|
|
315
|
+
| 参数 | 类型 | 说明 |
|
|
316
|
+
| --- | --- | --- |
|
|
317
|
+
| SDKAppID | Number | SDKAppID 是腾讯云 IM 客户应用的唯一标识。您可以在 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 创建新应用,获取 SDKAppID 。<br>**说明:**<br>SDKAppID 是腾讯云 IM 客户应用的唯一标识。我们建议每一个独立的 App 都申请一个新的 SDKAppID。不同 SDKAppID 之间的消息是天然隔离的,不能互通。 |
|
|
318
|
+
| userID | String | 用户的唯一标识符,由您定义,只能包含大小写字母(a-z,A-Z)、数字(0-9)、下划线和连字符。 |
|
|
319
|
+
| userSig | String | 用户登录即时通信 IM 的密码,其本质是对 UserID 等信息加密后得到的密文。<br>**说明:**<br>- 开发环境:快速跑通 Demo,可以通过 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 获取 UserSig。<br>- 生产环境:将 UserSig 的计算代码集成到您的服务端,并提供面向项目的接口, 正确的 UserSig 签发方式请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/269/32688)。 |
|
|
367
320
|
|
|
368
321
|
> **注意:**
|
|
369
|
-
>
|
|
322
|
+
>
|
|
370
323
|
|
|
371
324
|
> 本文示例代码采用从 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 获取 UserSig 的方案,**该方法仅适合本地跑通功能调试**。 正确的 UserSig 签发方式请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/269/32688)。
|
|
372
|
-
>
|
|
325
|
+
>
|
|
373
326
|
|
|
374
327
|
- SDKAppID:在 [即时通信 IM 控制台 > 应用管理](https://console.cloud.tencent.com/im) 单击**创建新应用**,获取 SDKAppID。
|
|
375
328
|
|
|
376
|
-

|
|
377
|
-
|
|
378
329
|
- userID:单击 [即时通信 IM 控制台 > 消息服务 Chat > 账号管理](https://console.cloud.tencent.com/im/account-management),切换至目标应用所在账号,您可以创建 2~3 个账号用于体验单聊、群聊的功能。
|
|
379
330
|
|
|
380
|
-

|
|
381
|
-
|
|
382
331
|
- userSig:单击 [即时通信 IM 控制台 > 开发工具 > UserSig生成校验](https://console.cloud.tencent.com/im/tool-usersig),切换至目标应用所在账号,填写创建的 userID,即可生成 userSig。
|
|
383
332
|
|
|
384
|
-

|
|
385
|
-
|
|
386
|
-
|
|
387
333
|
## 运行和测试
|
|
388
334
|
|
|
389
335
|
填入登录鉴权信息后即可运行项目开始体验。
|
|
390
336
|
|
|
391
|
-
|
|
392
337
|
【shell】
|
|
393
338
|
``` bash
|
|
394
339
|
npm run dev
|
|
395
340
|
```
|
|
396
341
|
|
|
397
342
|
> **注意:**
|
|
398
|
-
>
|
|
399
|
-
> - 请确保
|
|
400
|
-
> - userID 和 userSig 为一一对应关系,具体参见
|
|
343
|
+
>
|
|
344
|
+
> - 请确保 步骤3 代码中 SDKAppID、userID 和 userSig 均已成功替换,如未替换将会导致项目表现异常。
|
|
345
|
+
> - userID 和 userSig 为一一对应关系,具体参见 生成 UserSig(用户鉴权)。
|
|
401
346
|
> - 如遇到项目启动失败,请检查 开发环境要求 是否满足。
|
|
402
347
|
|
|
403
|
-
|
|
404
348
|
## 集成更多高级特性
|
|
405
349
|
|
|
406
350
|
### 音视频通话
|
|
407
351
|
|
|
408
352
|
> **说明:**
|
|
409
|
-
>
|
|
353
|
+
>
|
|
410
354
|
|
|
411
355
|
> TUICallKit 是腾讯云推出一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
412
|
-
>
|
|
356
|
+
>
|
|
413
357
|
|
|
414
|
-
>
|
|
415
|
-
>
|
|
358
|
+
> 更多详细信息可参考:音视频通话-开通服务。
|
|
359
|
+
>
|
|
416
360
|
|
|
417
361
|
1. 安装 `@trtc/calls-uikit-react` 依赖
|
|
418
362
|
|
|
@@ -421,13 +365,12 @@ npm run dev
|
|
|
421
365
|
```
|
|
422
366
|
2. 从 `@trtc/calls-uikit-react` 导出 `TUICallKit`,并挂载到 DOM 节点上。
|
|
423
367
|
|
|
424
|
-
|
|
425
368
|
在 `src/App.tsx` 文件中继续补充下面的代码:
|
|
426
369
|
|
|
427
370
|
``` typescript
|
|
428
371
|
// src/App.tsx
|
|
429
372
|
import { TUICallKit } from '@trtc/calls-uikit-react';
|
|
430
|
-
|
|
373
|
+
|
|
431
374
|
function App() {
|
|
432
375
|
return (
|
|
433
376
|
<UIKitProvider>
|
|
@@ -445,29 +388,25 @@ npm run dev
|
|
|
445
388
|
```
|
|
446
389
|
4. 拨打语音通话
|
|
447
390
|
|
|
448
|
-

|
|
449
|
-
|
|
450
|
-
|
|
451
391
|
### 云端搜索
|
|
452
392
|
|
|
453
393
|
> **说明:**
|
|
454
|
-
>
|
|
394
|
+
>
|
|
455
395
|
|
|
456
396
|
> 搜索,在客服、社交、在线教育、在线医疗、OA 等场景下是刚需功能,可帮助用户快速查找群组、用户、消息,提升产品使用体验和用户粘性。
|
|
457
|
-
>
|
|
397
|
+
>
|
|
458
398
|
|
|
459
399
|
> 由于 Web 平台本地存储特殊性等原因,Vue **无法实现本地搜索**,为了更好的满足对于搜索能力的需求,推出了**云端搜索能力**。**云端搜索功能支持全局搜索和会话内搜索,同时支持搜索群组、用户和消息。**
|
|
460
|
-
>
|
|
400
|
+
>
|
|
461
401
|
|
|
462
402
|
> 此功能属于增值服务,需要您购买云端搜索插件,请点击 [购买](https://console.cloud.tencent.com/im/plugin/TUICloudSearch)。
|
|
463
|
-
>
|
|
464
|
-
|
|
403
|
+
>
|
|
465
404
|
|
|
466
405
|
云端搜索在“步骤 2”中已经默认集成,如果需要关闭云端搜索功能,请参考以下代码:
|
|
467
406
|
1. 注释 `ChatHeader` 中 `ChatHeaderRight` 属性,和会话内搜索侧边栏相关的代码
|
|
468
407
|
|
|
469
408
|
``` typescript
|
|
470
|
-
|
|
409
|
+
|
|
471
410
|
<ChatHeader enableCall={true}
|
|
472
411
|
ChatHeaderRight={
|
|
473
412
|
<div className="header-actions">
|
|
@@ -495,11 +434,10 @@ npm run dev
|
|
|
495
434
|
UserSig 是用户登录即时通信 IM 的密码,其本质是对 UserID 等信息加密后得到的密文。UserSig 签发方式是需将 UserSig 的计算代码集成到您的服务端,并提供面向项目的接口,在需要 UserSig 时由您的项目向业务服务器发起请求获取动态 UserSig。更多详情请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/269/32688)。
|
|
496
435
|
|
|
497
436
|
> **注意:**
|
|
498
|
-
>
|
|
437
|
+
>
|
|
499
438
|
|
|
500
439
|
> 本文示例代码采用在 [即时通信 IM 控制台](https://console.cloud.tencent.com/im) 获取 UserSig 的方案,**该方法仅适合本地跑通功能调试**。 正确的 UserSig 签发方式请参见[服务端生成 UserSig](https://cloud.tencent.com/document/product/269/32688)。
|
|
501
|
-
>
|
|
502
|
-
|
|
440
|
+
>
|
|
503
441
|
|
|
504
442
|
### 是否支持 react 17/19 版本?
|
|
505
443
|
|
|
@@ -529,25 +467,20 @@ function onChatSettingClose() {
|
|
|
529
467
|
## 参考信息
|
|
530
468
|
|
|
531
469
|
### 相关文档
|
|
532
|
-
-
|
|
470
|
+
- 自定义组件 - UIKitProvider
|
|
533
471
|
|
|
534
|
-
-
|
|
472
|
+
- 自定义组件 - ConversationList
|
|
535
473
|
|
|
536
|
-
-
|
|
474
|
+
- 自定义组件 - MessageList
|
|
537
475
|
|
|
538
|
-
-
|
|
476
|
+
- 自定义组件 - MessageInput
|
|
539
477
|
|
|
540
|
-
-
|
|
478
|
+
- 自定义组件 - ContactList
|
|
541
479
|
|
|
542
|
-
-
|
|
480
|
+
- 自定义组件 - Search
|
|
543
481
|
|
|
544
|
-
-
|
|
482
|
+
- 自定义组件 - ChatSetting
|
|
545
483
|
|
|
546
484
|
- [chat-uikit-react npm](https://www.npmjs.com/package/@tencentcloud/chat-uikit-react)
|
|
547
485
|
|
|
548
486
|
- [GitHub Demo](https://github.com/TencentCloud/chat-uikit-react)
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
## 联系我们
|
|
552
|
-
|
|
553
|
-
如遇任何问题,可联系 [官网售后](https://cloud.tencent.com/act/event/connect-service#/) 反馈,享有专业工程师的支持,解决您的难题。
|