@tencentcloud/sdk-mcp 1.0.6 → 1.0.8
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 +7 -8
- package/index.js.map +1 -1
- package/libs/lib-generate-test-usersig-es.min.d.ts +6 -0
- package/libs/lib-generate-test-usersig-es.min.js +2 -0
- package/package.json +2 -1
- package/resource/doc/chatuikit/react/components/avatar.md +105 -0
- package/resource/doc/chatuikit/react/components/chat.md +38 -0
- package/resource/doc/chatuikit/react/components/chatheader.md +153 -0
- package/resource/doc/chatuikit/react/components/component-list.md +36 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +765 -0
- package/resource/doc/chatuikit/react/components/message-input.md +799 -0
- package/resource/doc/chatuikit/react/components/message-list.md +385 -0
- package/resource/doc/chatuikit/react/components/tuikit.md +64 -0
- package/resource/doc/chatuikit/react/integration.md +68 -0
- package/resource/doc/chatuikit/react/login.md +25 -0
- package/resource/doc/chatuikit/vue/components/MessageInput.md +546 -0
- package/resource/doc/chatuikit/vue/components/avatar.md +105 -0
- package/resource/doc/chatuikit/vue/components/chat.md +38 -0
- package/resource/doc/chatuikit/vue/components/chatheader.md +153 -0
- package/resource/doc/chatuikit/vue/components/component-list.md +90 -0
- package/resource/doc/chatuikit/vue/components/conversation-list.md +590 -0
- package/resource/doc/chatuikit/vue/components/login.md +29 -0
- package/resource/doc/chatuikit/vue/components/message-input.md +546 -0
- package/resource/doc/chatuikit/vue/components/message-list.md +548 -0
- package/resource/doc/chatuikit/vue/components/tuikit.md +110 -0
- package/resource/doc/chatuikit/vue/components/userpicker.md +256 -0
- package/resource/doc/chatuikit/vue/integration.md +218 -0
- package/resource/doc/chatuikit/vue/login.md +29 -0
- package/resource/doc/chatuikit/vue3/components/MessageInput.md +546 -0
- package/resource/doc/chatuikit/vue3/components/MessageList.md +385 -0
- package/resource/doc/chatuikit/vue3/components/avatar.md +105 -0
- package/resource/doc/chatuikit/vue3/components/chatheader.md +153 -0
- package/resource/doc/chatuikit/vue3/components/component-list.md +88 -0
- package/resource/doc/chatuikit/vue3/components/userpicker.md +256 -0
- package/resource/doc/chatuikit/vue3/integration.md +218 -0
- package/server.js +10 -181
- package/server.js.map +1 -1
- package/{streamableHttp.js → streamable-http.js} +8 -13
- package/streamable-http.js.map +1 -0
- package/tools/call/get-call-faq.js +31 -0
- package/tools/call/get-call-faq.js.map +1 -0
- package/tools/call/get-native-call-integration-guide.js +35 -0
- package/tools/call/get-native-call-integration-guide.js.map +1 -0
- package/tools/call/get-native-call-integration.js +35 -0
- package/tools/call/get-native-call-integration.js.map +1 -0
- package/tools/call/get-web-call-integration-guide.js +34 -0
- package/tools/call/get-web-call-integration-guide.js.map +1 -0
- package/tools/call/get-web-call-integration.js +34 -0
- package/tools/call/get-web-call-integration.js.map +1 -0
- package/tools/chat/get-chat-faq.js +31 -0
- package/tools/chat/get-chat-faq.js.map +1 -0
- package/tools/chat/get-native-chat-integration-guide.js +33 -0
- package/tools/chat/get-native-chat-integration-guide.js.map +1 -0
- package/tools/chat/get-native-chat-integration.js +33 -0
- package/tools/chat/get-native-chat-integration.js.map +1 -0
- package/tools/chat/get-web-chat-component-detail.js +36 -0
- package/tools/chat/get-web-chat-component-detail.js.map +1 -0
- package/tools/chat/get-web-chat-integration-guide.js +42 -0
- package/tools/chat/get-web-chat-integration-guide.js.map +1 -0
- package/tools/chat/get-web-chat-integration.js +36 -0
- package/tools/chat/get-web-chat-integration.js.map +1 -0
- package/tools/chat/get-web-chat-uikit-login.js +30 -0
- package/tools/chat/get-web-chat-uikit-login.js.map +1 -0
- package/tools/common/get-usersig.js +35 -0
- package/tools/common/get-usersig.js.map +1 -0
- package/tools/common/present-framework-choice.js +32 -0
- package/tools/common/present-framework-choice.js.map +1 -0
- package/tools/common/record-prompt.js +31 -0
- package/tools/common/record-prompt.js.map +1 -0
- package/tools/common/record-result.js +35 -0
- package/tools/common/record-result.js.map +1 -0
- package/tools/index.js +39 -0
- package/tools/index.js.map +1 -0
- package/tools/rtcengine/get-rtcengine-integration-guide.js +32 -0
- package/tools/rtcengine/get-rtcengine-integration-guide.js.map +1 -0
- package/tools/rtcengine/get-rtcenigne-faq.js +31 -0
- package/tools/rtcengine/get-rtcenigne-faq.js.map +1 -0
- package/utils/aegis-client.js +8 -0
- package/utils/aegis-client.js.map +1 -0
- package/utils/generate-usersig.js +14 -0
- package/utils/generate-usersig.js.map +1 -0
- package/utils/get-doc-content.js +46 -0
- package/utils/get-doc-content.js.map +1 -0
- package/utils/handle-component-name.js +12 -0
- package/utils/handle-component-name.js.map +1 -0
- package/utils/handle-framework.js +9 -0
- package/utils/handle-framework.js.map +1 -0
- package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +0 -185
- package/resource/doc/chatuikit/react/integrate_tuichat_react.md +0 -212
- package/resource/doc/chatuikit/vue/integrate_tuichat_only_vue.md +0 -149
- package/resource/doc/chatuikit/vue/integrate_tuichat_vue.md +0 -248
- package/streamableHttp.js.map +0 -1
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/CHANGELOG.md +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/LICENSE +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/README.md +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/aegis.min.js +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/core.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/aegis-node-sdk/package.json +0 -0
- /package/{@tencent → libs/@tencent}/polaris/README.md +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/health.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/monitor.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/consumer/selector.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/errors.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/errors.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/errors.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/global.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/global.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/global.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/instance.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/instance.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/instance.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/bucket.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimit.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/base.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/global.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/limiter/ratelimiter/local.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/location.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/location.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/location.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/logging.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/logging.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/logging.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/metadata.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/metadata.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/metadata.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/breaker/polaris.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/base.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/edf.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/hashring.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/sticky.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/swrr.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wr.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/lb/wrr.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/logging/console.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/local-server/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/pool.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/rules.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/types.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/naming/polaris-server/utils.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/registry/memory.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/nearby.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/polaris/rule.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/canary.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/env.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/router/trpc/set.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/unirate.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/shaping/warmup.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins/weight/polaris.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/plugins.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/polaris.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/polaris.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/polaris.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/provider/index.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/registry.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/registry.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/registry.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/rules.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/rules.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/rules.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/scripts/postinstall.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/service.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/service.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/service.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/skeleton.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/utils.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/utils.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/utils.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/weak.d.ts +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/weak.js +0 -0
- /package/{@tencent → libs/@tencent}/polaris/dist/weak.js.map +0 -0
- /package/{@tencent → libs/@tencent}/polaris/package.json +0 -0
- /package/resource/doc/chatuikit/{iOS → ios}/client_api_iOS.md +0 -0
- /package/resource/doc/chatuikit/{iOS → ios}/integrate_tuichat_only_iOS.md +0 -0
- /package/resource/doc/chatuikit/{iOS → ios}/integrate_tuikit_iOS.md +0 -0
- /package/resource/doc/chatuikit/{iOS → ios}/ui_api_iOS.md +0 -0
- /package/resource/doc/tuicallkit/{iOS → ios}/api_TUICallKit.md +0 -0
- /package/resource/doc/tuicallkit/{iOS → ios}/api_TUICallObserver.md +0 -0
- /package/resource/doc/tuicallkit/{iOS → ios}/how_to_integrated_iOS_callkit.md +0 -0
- /package/resource/doc/tuicallkit/{iOS → ios}/how_to_run_iOS_callkit_demo.md +0 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
## 组件概述
|
|
2
|
+
|
|
3
|
+
MessageList 是一个功能强大的聊天消息列表组件,提供了完整的消息展示、交互和自定义功能。该组件支持消息分组、已读回执、消息操作、滚动控制等核心聊天功能,同时提供了丰富的自定义选项来满足不同的业务需求。
|
|
4
|
+
|
|
5
|
+
## Props 配置
|
|
6
|
+
<table>
|
|
7
|
+
<tr>
|
|
8
|
+
<td rowspan="1" colSpan="1" >字段</td>
|
|
9
|
+
|
|
10
|
+
<td rowspan="1" colSpan="1" >类型</td>
|
|
11
|
+
|
|
12
|
+
<td rowspan="1" colSpan="1" >默认值</td>
|
|
13
|
+
|
|
14
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
15
|
+
</tr>
|
|
16
|
+
|
|
17
|
+
<tr>
|
|
18
|
+
<td rowspan="1" colSpan="1" >[alignment](https://write.woa.com/document/181344255270170624)</td>
|
|
19
|
+
|
|
20
|
+
<td rowspan="1" colSpan="1" >'left' \| 'right' \| 'two-sided'</td>
|
|
21
|
+
|
|
22
|
+
<td rowspan="1" colSpan="1" >'two-sided'</td>
|
|
23
|
+
|
|
24
|
+
<td rowspan="1" colSpan="1" >消息对齐方式。<br>- left: 所有消息左对齐。<br>- right: 所有消息右对齐。<br>- two-sided: 发送消息右对齐,接收消息左对齐。</td>
|
|
25
|
+
</tr>
|
|
26
|
+
|
|
27
|
+
<tr>
|
|
28
|
+
<td rowspan="1" colSpan="1" >[enableReadReceipt](https://write.woa.com/document/181344255270170624)</td>
|
|
29
|
+
|
|
30
|
+
<td rowspan="1" colSpan="1" >boolean</td>
|
|
31
|
+
|
|
32
|
+
<td rowspan="1" colSpan="1" >false</td>
|
|
33
|
+
|
|
34
|
+
<td rowspan="1" colSpan="1" >是否启用已读回执功能。</td>
|
|
35
|
+
</tr>
|
|
36
|
+
|
|
37
|
+
<tr>
|
|
38
|
+
<td rowspan="1" colSpan="1" >[messageActionList](https://write.woa.com/document/181344255270170624)</td>
|
|
39
|
+
|
|
40
|
+
<td rowspan="1" colSpan="1" >IMessageAction[]</td>
|
|
41
|
+
|
|
42
|
+
<td rowspan="1" colSpan="1" >undefined</td>
|
|
43
|
+
|
|
44
|
+
<td rowspan="1" colSpan="1" >自定义消息操作列表,例如复制、撤回、删除等。</td>
|
|
45
|
+
</tr>
|
|
46
|
+
|
|
47
|
+
<tr>
|
|
48
|
+
<td rowspan="1" colSpan="1" >[messageAggregationTime](https://write.woa.com/document/181344255270170624)</td>
|
|
49
|
+
|
|
50
|
+
<td rowspan="1" colSpan="1" >number</td>
|
|
51
|
+
|
|
52
|
+
<td rowspan="1" colSpan="1" >300 (5分钟)</td>
|
|
53
|
+
|
|
54
|
+
<td rowspan="1" colSpan="1" >消息聚合时间间隔(秒),相同发送者在此时间内的连续消息会被聚合显示。</td>
|
|
55
|
+
</tr>
|
|
56
|
+
|
|
57
|
+
<tr>
|
|
58
|
+
<td rowspan="1" colSpan="1" >[filter](https://write.woa.com/document/181344255270170624)</td>
|
|
59
|
+
|
|
60
|
+
<td rowspan="1" colSpan="1" >(message: IMessageModel) => boolean</td>
|
|
61
|
+
|
|
62
|
+
<td rowspan="1" colSpan="1" >undefined</td>
|
|
63
|
+
|
|
64
|
+
<td rowspan="1" colSpan="1" >消息过滤函数,用于控制哪些消息需要显示。</td>
|
|
65
|
+
</tr>
|
|
66
|
+
|
|
67
|
+
<tr>
|
|
68
|
+
<td rowspan="1" colSpan="1" >[className](https://write.woa.com/document/181344255270170624)</td>
|
|
69
|
+
|
|
70
|
+
<td rowspan="1" colSpan="1" >string</td>
|
|
71
|
+
|
|
72
|
+
<td rowspan="1" colSpan="1" >undefined</td>
|
|
73
|
+
|
|
74
|
+
<td rowspan="1" colSpan="1" >自定义 CSS 类名。</td>
|
|
75
|
+
</tr>
|
|
76
|
+
|
|
77
|
+
<tr>
|
|
78
|
+
<td rowspan="1" colSpan="1" >[style](https://write.woa.com/document/181344255270170624)</td>
|
|
79
|
+
|
|
80
|
+
<td rowspan="1" colSpan="1" >React.CSSProperties</td>
|
|
81
|
+
|
|
82
|
+
<td rowspan="1" colSpan="1" >undefined</td>
|
|
83
|
+
|
|
84
|
+
<td rowspan="1" colSpan="1" >自定义内联样式。</td>
|
|
85
|
+
</tr>
|
|
86
|
+
|
|
87
|
+
<tr>
|
|
88
|
+
<td rowspan="1" colSpan="1" >[Message](https://write.woa.com/document/181344255270170624)</td>
|
|
89
|
+
|
|
90
|
+
<td rowspan="1" colSpan="1" >React.ComponentType</td>
|
|
91
|
+
|
|
92
|
+
<td rowspan="1" colSpan="1" >Message</td>
|
|
93
|
+
|
|
94
|
+
<td rowspan="1" colSpan="1" >自定义消息组件。</td>
|
|
95
|
+
</tr>
|
|
96
|
+
|
|
97
|
+
<tr>
|
|
98
|
+
<td rowspan="1" colSpan="1" >[MessageTimeDivider](https://write.woa.com/document/181344255270170624)</td>
|
|
99
|
+
|
|
100
|
+
<td rowspan="1" colSpan="1" >React.ComponentType</td>
|
|
101
|
+
|
|
102
|
+
<td rowspan="1" colSpan="1" >MessageTimeDivider</td>
|
|
103
|
+
|
|
104
|
+
<td rowspan="1" colSpan="1" >自定义时间分隔线组件。</td>
|
|
105
|
+
</tr>
|
|
106
|
+
</table>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## Prop 字段详解
|
|
110
|
+
|
|
111
|
+
### alignment
|
|
112
|
+
|
|
113
|
+
参数类型: `'left' | 'right' | 'two-sided'`
|
|
114
|
+
|
|
115
|
+
alignment 用于设置消息对齐方式,支持 `left`、`right`、`two-sided` 三种模式。默认值为 `'two-sided'`。
|
|
116
|
+
- `two-sided`: 非本人的消息位于左侧,本人的消息位于右侧
|
|
117
|
+
|
|
118
|
+
- `left`: 所有消息位于左侧
|
|
119
|
+
|
|
120
|
+
- `right`: 所有消息位于右侧
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### enableReadReceipt
|
|
124
|
+
|
|
125
|
+
参数类型: `boolean`
|
|
126
|
+
|
|
127
|
+
enableReadReceipt 用于设置是否开启单条消息已读回执功能,默认值为 `false`。
|
|
128
|
+
|
|
129
|
+
### messageActionList
|
|
130
|
+
|
|
131
|
+
参数类型: `IMessageAction[]`
|
|
132
|
+
|
|
133
|
+
messageActionList 用于设置消息操作列表,例如复制、撤回、删除等操作,默认值为完整的消息操作列表 `['copy', 'recall', 'quote', 'forward', 'delete']`。
|
|
134
|
+
``` tsx
|
|
135
|
+
interface IMessageAction {
|
|
136
|
+
key: 'copy' | 'recall' | 'quote' | 'forward' | 'delete' | string;
|
|
137
|
+
label?: string;
|
|
138
|
+
icon?: React.ReactNode;
|
|
139
|
+
onClick?: (message: IMessageModel) => void;
|
|
140
|
+
visible?: ((message: IMessageModel) => boolean) | boolean;
|
|
141
|
+
component?: React.ComponentType<{ message: IMessageModel }>;
|
|
142
|
+
style?: React.CSSProperties;
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
可以使用 `useMessageAction` 获取完整的消息操作列表,然后根据需要进行自定义。
|
|
147
|
+
|
|
148
|
+
#### 示例1: 变更消息操作列表的顺序
|
|
149
|
+
|
|
150
|
+
假设按照 `forward`、`copy`、`recall`、`quote`、`delete` 的顺序显示消息操作列表。
|
|
151
|
+
``` tsx
|
|
152
|
+
import { Chat, MessageList, useMessageActions } from '@tencentcloud/chat-uikit-react';
|
|
153
|
+
|
|
154
|
+
const App = () => {
|
|
155
|
+
const actions = useMessageActions(['forward', 'copy', 'recall', 'quote', 'delete']);
|
|
156
|
+
return (
|
|
157
|
+
<Chat>
|
|
158
|
+
<MessageList messageActionList={actions} />
|
|
159
|
+
</Chat>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
#### 示例2: 仅展示部分消息操作
|
|
165
|
+
|
|
166
|
+
假设仅展示 `forward`、`copy`、`recall` 三个操作。
|
|
167
|
+
``` tsx
|
|
168
|
+
import { Chat, MessageList, useMessageActions } from '@tencentcloud/chat-uikit-react';
|
|
169
|
+
|
|
170
|
+
const App = () => {
|
|
171
|
+
const actions = useMessageActions(['forward', 'copy', 'recall']);
|
|
172
|
+
return (
|
|
173
|
+
<Chat>
|
|
174
|
+
<MessageList messageActionList={actions} />
|
|
175
|
+
</Chat>
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### 示例3: 自定义消息操作的样式
|
|
182
|
+
|
|
183
|
+
下面是一个自定义撤回操作的示例:
|
|
184
|
+
1. 将标签修改为'撤回 ⚠️'
|
|
185
|
+
|
|
186
|
+
2. 将颜色修改为橙色
|
|
187
|
+
|
|
188
|
+
3. 只有文本消息可以撤回
|
|
189
|
+
|
|
190
|
+
``` tsx
|
|
191
|
+
import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
|
|
192
|
+
import { Chat, MessageList, useMessageActions } from '@tencentcloud/chat-uikit-react';
|
|
193
|
+
|
|
194
|
+
const ChatApp = () => {
|
|
195
|
+
const actions = useMessageActions(['copy', {
|
|
196
|
+
key: 'recall',
|
|
197
|
+
label: 'Recall ⚠️',
|
|
198
|
+
style: {
|
|
199
|
+
color: 'orange'
|
|
200
|
+
},
|
|
201
|
+
visible: (message) => message.type === TUIChatEngine.TYPES.MSG_TEXT,
|
|
202
|
+
}, 'quote', 'forward', 'delete']);
|
|
203
|
+
|
|
204
|
+
return (
|
|
205
|
+
<Chat>
|
|
206
|
+
<MessageList messageActionList={actions} />
|
|
207
|
+
</Chat>
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### 示例4: 新增自定义消息操作
|
|
213
|
+
|
|
214
|
+
假设需要自定义消息操作,如仅其他人发送的消息可以标记'喜欢',且插入在'撤回'操作之后。
|
|
215
|
+
``` tsx
|
|
216
|
+
import { useMessageAction } from '@tencentcloud/chat-uikit-react';
|
|
217
|
+
import { yourApi } from '@/api/yourApi';
|
|
218
|
+
|
|
219
|
+
const customActions = {
|
|
220
|
+
key: 'like',
|
|
221
|
+
label: 'Like',
|
|
222
|
+
icon: <span>👍</span>,
|
|
223
|
+
style: {
|
|
224
|
+
color: '#E53888',
|
|
225
|
+
},
|
|
226
|
+
visible: (message) => message.flow === 'in',
|
|
227
|
+
onClick: (message) => {
|
|
228
|
+
yourApi.likeMessage(message.ID);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function ChatApp() {
|
|
233
|
+
const actions = useMessageAction(['forward', 'copy', 'recall', customActions, 'quote', 'delete']);
|
|
234
|
+
return <MessageList messageActionList={actions} />;
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### messageAggregationTime
|
|
239
|
+
|
|
240
|
+
参数类型: `number`
|
|
241
|
+
|
|
242
|
+
messageAggregationTime 用于设置消息聚合时间间隔,将相同发送者的连续消息聚合显示,默认值为 `300`(秒)。
|
|
243
|
+
|
|
244
|
+
### filter
|
|
245
|
+
|
|
246
|
+
参数类型: `(message: IMessageModel) => boolean`
|
|
247
|
+
|
|
248
|
+
filter 用于设置消息过滤函数,控制哪些消息需要显示,默认值为 `undefined`。
|
|
249
|
+
|
|
250
|
+
#### 示例: 过滤掉机器人发送的错误消息
|
|
251
|
+
``` tsx
|
|
252
|
+
import { MessageList } from '@/components/MessageList';
|
|
253
|
+
import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
|
|
254
|
+
|
|
255
|
+
const messageFilter = (message) => {
|
|
256
|
+
// 过滤掉发送者昵称包含 '_robot' 且内容包含 'operation-failed' 的文本消息
|
|
257
|
+
if (
|
|
258
|
+
message.nick?.includes('_robot')
|
|
259
|
+
&& message.type === TUIChatEngine.TYPES.MSG_TEXT
|
|
260
|
+
&& message.payload?.text?.includes('operation-failed')
|
|
261
|
+
) {
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
return true;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
function ChatApp() {
|
|
268
|
+
return <MessageList filter={messageFilter} />;
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### className
|
|
273
|
+
|
|
274
|
+
参数类型: `string`
|
|
275
|
+
|
|
276
|
+
className 用于设置根容器自定义 CSS 类名,默认值为 `undefined`。
|
|
277
|
+
|
|
278
|
+
### style
|
|
279
|
+
|
|
280
|
+
参数类型: `React.CSSProperties`
|
|
281
|
+
|
|
282
|
+
style 用于设置根容器自定义内联样式,默认值为 `undefined`。
|
|
283
|
+
|
|
284
|
+
### Message
|
|
285
|
+
|
|
286
|
+
参数类型: `React.ComponentType`
|
|
287
|
+
|
|
288
|
+
Message 用于设置自定义消息组件,替换默认的消息渲染组件,默认值为内置的 `Message` 组件。
|
|
289
|
+
|
|
290
|
+
#### 示例: 自定义 CUSTOM 消息点击跳转的消息组件
|
|
291
|
+
``` tsx
|
|
292
|
+
import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
|
|
293
|
+
import { Chat, MessageList, Message } from '@tencentcloud/chat-uikit-react';
|
|
294
|
+
|
|
295
|
+
function CustomMessage(props) {
|
|
296
|
+
const { message } = props;
|
|
297
|
+
|
|
298
|
+
if (message.type === TUIChatEngine.TYPES.MSG_CUSTOM) {
|
|
299
|
+
const { businessID, ...restData } = JSON.parse(message.payload.data);
|
|
300
|
+
if (businessID === 'text_link') {
|
|
301
|
+
return (
|
|
302
|
+
<div>
|
|
303
|
+
<div>{restData.text}</div>
|
|
304
|
+
<a href={restData.link}>
|
|
305
|
+
跳转到外部网址 {restData.link}
|
|
306
|
+
</a>
|
|
307
|
+
</div>
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
// 其他消息类型使用默认消息组件
|
|
312
|
+
return <Message {...props} />;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
function ChatApp() {
|
|
317
|
+
return (
|
|
318
|
+
<Chat>
|
|
319
|
+
<MessageList Message={CustomMessage} />
|
|
320
|
+
</Chat>
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### MessageTimeDivider
|
|
326
|
+
|
|
327
|
+
参数类型: `React.ComponentType`
|
|
328
|
+
|
|
329
|
+
MessageTimeDivider 用于设置自定义时间分隔线组件,默认值为内置的 `MessageTimeDivider` 组件。
|
|
330
|
+
|
|
331
|
+
#### 示例: 区分工作时间的时间分隔线
|
|
332
|
+
``` tsx
|
|
333
|
+
import { Chat, MessageList, MessageTimeDivider } from '@tencentcloud/chat-uikit-react';
|
|
334
|
+
|
|
335
|
+
const BusinessTimeDivider: typeof MessageTimeDivider = ({ prevMessage, currentMessage }) => {
|
|
336
|
+
if (!prevMessage || !currentMessage) return null;
|
|
337
|
+
|
|
338
|
+
// 对于即将渲染的每一条消息获取当前消息和上一消息的时间,并转换为日期对象,判断是否跨天或间隔超过4小时
|
|
339
|
+
const currentTime = new Date(currentMessage.time * 1000);
|
|
340
|
+
const prevTime = new Date(prevMessage.time * 1000);
|
|
341
|
+
|
|
342
|
+
// 跨天或间隔超过4小时才显示
|
|
343
|
+
const shouldShow = currentTime.toDateString() !== prevTime.toDateString() ||
|
|
344
|
+
(currentTime.getTime() - prevTime.getTime()) > 4 * 60 * 60 * 1000;
|
|
345
|
+
|
|
346
|
+
if (!shouldShow) return null;
|
|
347
|
+
|
|
348
|
+
// 判断工作时间 (9:00-18:00, 周一到周五)
|
|
349
|
+
const isWorkingTime = () => {
|
|
350
|
+
const hour = currentTime.getHours();
|
|
351
|
+
const day = currentTime.getDay();
|
|
352
|
+
return day >= 1 && day <= 5 && hour >= 9 && hour <= 18;
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
const timeLabel = isWorkingTime() ? '工作时间' : '非工作时间';
|
|
356
|
+
const timeColor = isWorkingTime() ? '#52c41a' : '#faad14';
|
|
357
|
+
|
|
358
|
+
return (
|
|
359
|
+
<div style={{ textAlign: 'center', margin: '16px 0' }}>
|
|
360
|
+
<span style={{
|
|
361
|
+
backgroundColor: timeColor,
|
|
362
|
+
color: 'white',
|
|
363
|
+
padding: '2px 8px',
|
|
364
|
+
borderRadius: '12px',
|
|
365
|
+
marginRight: '8px'
|
|
366
|
+
}}>
|
|
367
|
+
{timeLabel}
|
|
368
|
+
</span>
|
|
369
|
+
{currentTime.toLocaleString()}
|
|
370
|
+
</div>
|
|
371
|
+
);
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
function ChatApp() {
|
|
375
|
+
return (
|
|
376
|
+
<Chat>
|
|
377
|
+
<MessageList MessageTimeDivider={BusinessTimeDivider} />
|
|
378
|
+
</Chat>
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
## 总结
|
|
384
|
+
|
|
385
|
+
MessageList 组件提供了完整的消息列表功能和丰富的自定义选项。通过合理配置 Props 和自定义组件,您可以创建出符合业务需求的聊天界面。建议在实际使用中根据具体场景选择合适的配置。
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
## TUIKit 介绍
|
|
2
|
+
|
|
3
|
+
TUIKit 是基于腾讯云 IM SDK 的一款 UI 组件库,它提供了一些通用的 UI 组件,包含会话、聊天、关系链、群组、音视频通话等功能。
|
|
4
|
+
基于 UI 组件您可以像搭积木一样快速搭建起自己的业务逻辑。
|
|
5
|
+
TUIKit 中的组件在实现 UI 功能的同时,会调用 IM SDK 相应的接口实现 IM 相关逻辑和数据的处理,因而开发者在使用 TUIKit 时只需关注自身业务或个性化扩展即可。
|
|
6
|
+
基于 React 开发的 TUIKit 界面风格更契合境外客户的使用习惯,而且支持国际化,如果您的业务有出海的需求,欢迎接入。
|
|
7
|
+
|
|
8
|
+
## TUIKit 组成
|
|
9
|
+
|
|
10
|
+
TUIKit 主要分为 ConversationList、Chat、ChatSetting、Profile 等模块,每个模块负责不同的内容,具体可参见 [开源代码](https://github.com/TencentCloud/chat-uikit-react)。
|
|
11
|
+
|
|
12
|
+
Web 端界面效果如下图所示:
|
|
13
|
+
|
|
14
|
+

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

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

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

|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## ChatSetting 功能介绍
|
|
47
|
+
|
|
48
|
+
ChatSetting 主要负责 Chat 设置。
|
|
49
|
+
|
|
50
|
+

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

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

|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
AI 模型必须遵守以下**硬性限制**。
|
|
2
|
+
|
|
3
|
+
* **必须严格按照文档步骤和说明集成:** 在集成组件时必须按照文档步骤和说明进行。
|
|
4
|
+
* **必须严格使用文档中的示例代码:** 创建文件时必须严格使用文档中的示例代码填充文件,Chat 组件的 PlaceholderEmpty 属性不需要填写。
|
|
5
|
+
* **禁止创建用户信息配置文件:** 不得自动创建填写 SDKAppID、userID、userSig 的 config 目录或文件。
|
|
6
|
+
* **禁止创建获取 userSig 逻辑:** 不得自动创建获取 userSig 相关代码,必须明确引导用户输入 SDKAppID、 userID、 userSig 信息并帮忙回填到相应的文件。
|
|
7
|
+
|
|
8
|
+
# chat-uikit-react Integration
|
|
9
|
+
|
|
10
|
+
## step1:create react project
|
|
11
|
+
|
|
12
|
+
requirement: react: ^18.2.0, react-dom: ^18.2.0.
|
|
13
|
+
|
|
14
|
+
you can use vite or rsbuild to create a react project.
|
|
15
|
+
|
|
16
|
+
## step2: install chat-uikit-react
|
|
17
|
+
|
|
18
|
+
use npm or pnpm to install @tencentcloud/chat-uikit-react
|
|
19
|
+
|
|
20
|
+
## step3: add chat-uikit-react to your project
|
|
21
|
+
|
|
22
|
+
example code
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import {
|
|
26
|
+
UIKitProvider,
|
|
27
|
+
useLoginState,
|
|
28
|
+
LoginStatus,
|
|
29
|
+
ConversationList,
|
|
30
|
+
Chat,
|
|
31
|
+
ChatHeader,
|
|
32
|
+
MessageList,
|
|
33
|
+
MessageInput,
|
|
34
|
+
} from "@tencentcloud/chat-uikit-react";
|
|
35
|
+
|
|
36
|
+
function App() {
|
|
37
|
+
const userID = ''; // TODO: Replace with your userID
|
|
38
|
+
const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
|
|
39
|
+
const userSig = ''; // TODO: Replace with your userSig
|
|
40
|
+
|
|
41
|
+
const { status } = useLoginState({
|
|
42
|
+
SDKAppID,
|
|
43
|
+
userID,
|
|
44
|
+
userSig,
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
if (status !== LoginStatus.SUCCESS) {
|
|
48
|
+
return <div>Loading...</div>
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Language support zh-CN(default) / en-US / ja-JP / ko-KR / zh-TW
|
|
52
|
+
// Theme support light(default) / dark
|
|
53
|
+
return (
|
|
54
|
+
<UIKitProvider language='zh-CN' theme='light'>
|
|
55
|
+
<div style={{ height: '100vh', width: '100vw', display: 'flex', flexDirection: 'row' }}>
|
|
56
|
+
<ConversationList style={{ minWidth: '300px', maxWidth: '350px' }}/>
|
|
57
|
+
<Chat PlaceholderEmpty=''>
|
|
58
|
+
<ChatHeader />
|
|
59
|
+
<MessageList />
|
|
60
|
+
<MessageInput />
|
|
61
|
+
</Chat>
|
|
62
|
+
</div>
|
|
63
|
+
</UIKitProvider>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export default App;
|
|
68
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# chat-uikit-vue3 Login
|
|
2
|
+
|
|
3
|
+
本文提供 chat-uikit-react 登录的示例代码, 通过 useLoginState 驱动组件登录。
|
|
4
|
+
|
|
5
|
+
## 1. 登录
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ref } from 'vue';
|
|
9
|
+
import { useLoginState } from '@tencentcloud/chat-uikit-react';
|
|
10
|
+
|
|
11
|
+
const userID = ''; // TODO: Replace with your userID
|
|
12
|
+
const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
|
|
13
|
+
const userSig = ''; // TODO: Replace with your userSig
|
|
14
|
+
|
|
15
|
+
const { status } = useLoginState({
|
|
16
|
+
SDKAppID,
|
|
17
|
+
userID,
|
|
18
|
+
userSig,
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
if (status !== LoginStatus.SUCCESS) {
|
|
22
|
+
return <div>Loading...</div>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
```
|