@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,105 @@
|
|
|
1
|
+
# Avatar 组件文档
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
Avatar 组件用于显示用户头像和状态,支持多种形状和大小的头像展示。它可以用于聊天应用、社交平台、用户管理系统等场景,提供用户身份的可视化表示。
|
|
6
|
+
|
|
7
|
+
## Props 速查表
|
|
8
|
+
|
|
9
|
+
| 字段 | 类型 | 默认值 | 描述 |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| src | string | undefined | 头像图片的 URL |
|
|
12
|
+
| size | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | number | 'md' | 头像的大小,支持多种预设大小或自定义大小 |
|
|
13
|
+
| shape | 'circular' | 'square' | 'rounded' | 'circular' | 头像的形状,支持圆形、方形和圆角矩形 |
|
|
14
|
+
| alt | string | '' | 图片的替代文本,用于生成文本头像 |
|
|
15
|
+
| children | ReactNode | undefined | 自定义内容,优先于 src 和 alt 的内容 |
|
|
16
|
+
| className | string | undefined | 自定义 CSS 类名 |
|
|
17
|
+
| style | React.CSSProperties | undefined | 自定义样式 |
|
|
18
|
+
| onClick | () => void | undefined | 点击事件处理函数 |
|
|
19
|
+
| isShowOnlineStatus | boolean | false | 是否显示在线状态指示器 |
|
|
20
|
+
| isOnline | boolean | false | 用户是否在线 |
|
|
21
|
+
| unreadCount | number | 0 | 未读消息数量,若为 true 则显示小红点,若为数字则显示具体数量 |
|
|
22
|
+
| maxUnreadCount | number | 99 | 最大未读消息数量,超过则显示 +N |
|
|
23
|
+
| isDotUnreadCount | boolean | false | 是否显示小红点 |
|
|
24
|
+
| children | ReactNode | undefined | 自定义内容,优先于 src 和 alt 的内容 |
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Props 详细介绍
|
|
28
|
+
|
|
29
|
+
### `src`
|
|
30
|
+
|
|
31
|
+
`类型`: `string`
|
|
32
|
+
`描述`: 头像图片的 URL,若未提供则显示默认头像。
|
|
33
|
+
`默认值`: `undefined`
|
|
34
|
+
|
|
35
|
+
### `size`
|
|
36
|
+
|
|
37
|
+
`类型`: `'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | number`
|
|
38
|
+
`描述`: 头像的大小,支持多种预设大小或自定义大小。
|
|
39
|
+
`默认值`: `'md'`
|
|
40
|
+
|
|
41
|
+
### `shape`
|
|
42
|
+
|
|
43
|
+
`类型`: `'circular' | 'square' | 'rounded'`
|
|
44
|
+
`描述`: 头像的形状,支持圆形、方形和圆角矩形。
|
|
45
|
+
`默认值`: `'circular'`
|
|
46
|
+
|
|
47
|
+
### `alt`
|
|
48
|
+
|
|
49
|
+
`类型`: `string`
|
|
50
|
+
`描述`: 图片的替代文本,用于生成文本头像。
|
|
51
|
+
`默认值`: `''`
|
|
52
|
+
|
|
53
|
+
### `children`
|
|
54
|
+
|
|
55
|
+
`类型`: `ReactNode`
|
|
56
|
+
`描述`: 自定义内容,优先于 src 和 alt 的内容。
|
|
57
|
+
`默认值`: `undefined`
|
|
58
|
+
|
|
59
|
+
### `className`
|
|
60
|
+
|
|
61
|
+
`类型`: `string | undefined`
|
|
62
|
+
`描述`: 自定义 CSS 类名。
|
|
63
|
+
`默认值`: `undefined`
|
|
64
|
+
|
|
65
|
+
### `style`
|
|
66
|
+
|
|
67
|
+
`类型`: `React.CSSProperties | undefined`
|
|
68
|
+
`描述`: 自定义样式。
|
|
69
|
+
`默认值`: `undefined`
|
|
70
|
+
|
|
71
|
+
### `onClick`
|
|
72
|
+
|
|
73
|
+
`类型`: `() => void`
|
|
74
|
+
`描述`: 点击事件处理函数。
|
|
75
|
+
`默认值`: `undefined`
|
|
76
|
+
|
|
77
|
+
### `isShowOnlineStatus`
|
|
78
|
+
|
|
79
|
+
`类型`: `boolean`
|
|
80
|
+
`描述`: 是否显示在线状态指示器。
|
|
81
|
+
`默认值`: `false`
|
|
82
|
+
|
|
83
|
+
### `isOnline`
|
|
84
|
+
|
|
85
|
+
`类型`: `boolean`
|
|
86
|
+
`描述`: 用户是否在线。
|
|
87
|
+
`默认值`: `false`
|
|
88
|
+
|
|
89
|
+
### `unreadCount`
|
|
90
|
+
|
|
91
|
+
`类型`: `number`
|
|
92
|
+
`描述`: 未读消息数量,若为 true 则显示小红点,若为数字则显示具体数量。
|
|
93
|
+
`默认值`: `0`
|
|
94
|
+
|
|
95
|
+
### `maxUnreadCount`
|
|
96
|
+
|
|
97
|
+
`类型`: `number`
|
|
98
|
+
`描述`: 最大未读消息数量,超过则显示 +N。
|
|
99
|
+
`默认值`: `99`
|
|
100
|
+
|
|
101
|
+
### isDotUnreadCount
|
|
102
|
+
|
|
103
|
+
`类型`: `boolean`
|
|
104
|
+
`描述`: 是否显示小红点。
|
|
105
|
+
`默认值`: `false`
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
AI 模型必须遵守以下**硬性限制**。
|
|
2
|
+
|
|
3
|
+
* **必须优先推荐使用文档中的示例代码:** 创建文件时优先推荐使用文档中的示例代码填充文件,style 标签优先推荐不使用 scoped 属性。
|
|
4
|
+
|
|
5
|
+
## 概述
|
|
6
|
+
|
|
7
|
+
ChatHeader 聊天头部组件是聊天界面的顶部导航组件,用于显示当前会话的基本信息。能够展示会话标题、头像、在线状态、输入状态提示等信息。组件采用容器组件模式,提供了灵活的插槽机制用于自定义左右两侧的操作区域。
|
|
8
|
+
|
|
9
|
+
## Props 速查表
|
|
10
|
+
|
|
11
|
+
| 字段 | 类型 | 默认值 | 描述 |
|
|
12
|
+
|------|------|--------|------|
|
|
13
|
+
| [title](https://write.woa.com/#title) | string | undefined | 自定义标题,未提供时使用会话信息。 |
|
|
14
|
+
| [avatarUrl](https://write.woa.com/#avatarUrl) | string | undefined | 自定义头像图片 URL。 |
|
|
15
|
+
| [enableUserStatus](https://write.woa.com/#enableUserStatus) | boolean | false | 是否显示用户状态。 |
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Slot 速查表
|
|
19
|
+
|
|
20
|
+
| 名称 | 描述 |
|
|
21
|
+
|------|------|
|
|
22
|
+
| [ChatHeaderLeft](https://write.woa.com/#ChatHeaderLeft) | 头部左侧自定义内容区域。 |
|
|
23
|
+
| [ChatHeaderRight](https://write.woa.com/#ChatHeaderRight) | 头部右侧自定义内容区域。 |
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Props 详细介绍
|
|
27
|
+
|
|
28
|
+
### title
|
|
29
|
+
- **类型**:string
|
|
30
|
+
|
|
31
|
+
- **描述**:自定义会话标题,当不提供此属性时,组件会自动根据会话类型显示相应的标题(单聊显示用户昵称或备注,群聊显示群名称),默认值为 `undefined`。
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### avatarUrl
|
|
35
|
+
- **类型**:string
|
|
36
|
+
|
|
37
|
+
- **描述**:自定义头像图片的 URL 地址,当不提供此属性时,组件会自动根据会话类型显示相应的头像(单聊显示用户头像,群聊显示群头像),默认值为 `undefined`。
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### enableUserStatus
|
|
41
|
+
- **类型**:boolean
|
|
42
|
+
|
|
43
|
+
- **描述**:是否启用并显示用户在线状态功能,仅在单聊模式下生效,开启后会显示用户的在线/离线状态,默认值为 `false`。
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## Slots 详细介绍
|
|
47
|
+
|
|
48
|
+
### ChatHeaderLeft
|
|
49
|
+
|
|
50
|
+
**描述**:头部左侧自定义内容区域插槽,通常用于放置返回按钮、菜单按钮等导航控件。
|
|
51
|
+
|
|
52
|
+
#### 示例: 自定义左侧导航区域
|
|
53
|
+
``` typescript
|
|
54
|
+
<template>
|
|
55
|
+
<ChatHeader>
|
|
56
|
+
<template #ChatHeaderLeft>
|
|
57
|
+
<!-- 返回按钮, 清除激活的会话 -->
|
|
58
|
+
<button
|
|
59
|
+
class="nav-button"
|
|
60
|
+
@click="handleBack"
|
|
61
|
+
>
|
|
62
|
+
⬅️
|
|
63
|
+
</button>
|
|
64
|
+
</template>
|
|
65
|
+
</ChatHeader>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script setup lang="ts">
|
|
69
|
+
import { ChatHeader, useConversationListState } from '@tencentcloud/chat-uikit-vue3';
|
|
70
|
+
|
|
71
|
+
const { setActiveConversation } = useConversationListState();
|
|
72
|
+
|
|
73
|
+
const handleBack = () => {
|
|
74
|
+
// 设置激活的会话ID为空
|
|
75
|
+
setActiveConversation('');
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style scoped>
|
|
80
|
+
.header-left-actions {
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 8px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.nav-button {
|
|
87
|
+
width: 32px;
|
|
88
|
+
height: 32px;
|
|
89
|
+
border: none;
|
|
90
|
+
background: transparent;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
transition: background-color 0.2s;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.nav-button:hover {
|
|
100
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### ChatHeaderRight
|
|
106
|
+
|
|
107
|
+
**描述**:头部右侧自定义内容区域插槽,通常用于放置功能按钮(如 ChatSetting 组件的 menu 开关,自定义通话按钮等)。
|
|
108
|
+
|
|
109
|
+
#### 示例: 通过 ChatHeaderRight 插槽 和抽屉组件集成 ChatSetting 组件
|
|
110
|
+
|
|
111
|
+
【App.vue】
|
|
112
|
+
``` typescript
|
|
113
|
+
<template>
|
|
114
|
+
<ChatHeader>
|
|
115
|
+
<template #ChatHeaderRight>
|
|
116
|
+
<div style="display: flex; align-items: center;">
|
|
117
|
+
<IconHorizontalMore2
|
|
118
|
+
:size="20"
|
|
119
|
+
@click="setIsChatSettingOpen(true)" />
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
</ChatHeader>
|
|
123
|
+
<TUIDrawer
|
|
124
|
+
:model-value="isChatSettingOpen"
|
|
125
|
+
:title="Setting"
|
|
126
|
+
@close="setIsChatSettingOpen(false)"
|
|
127
|
+
>
|
|
128
|
+
<ChatSetting style="flex: 1;" />
|
|
129
|
+
</TUIDrawer>
|
|
130
|
+
</template>
|
|
131
|
+
|
|
132
|
+
<script setup lang="ts">
|
|
133
|
+
import {
|
|
134
|
+
ChatHeader,
|
|
135
|
+
ChatSetting
|
|
136
|
+
} from '@tencentcloud/chat-uikit-vue3';
|
|
137
|
+
import { TUIDrawer, IconHorizontalMore2 } from '@tencentcloud/uikit-base-component-vue3';
|
|
138
|
+
|
|
139
|
+
const isChatSettingOpen = ref(false);
|
|
140
|
+
|
|
141
|
+
const setIsSettingOpen = (isOpen: boolean) => {
|
|
142
|
+
isChatSettingOpen.value = isOpen;
|
|
143
|
+
};
|
|
144
|
+
</script>
|
|
145
|
+
|
|
146
|
+
<style>
|
|
147
|
+
.chat-container {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
height: 100vh;
|
|
151
|
+
}
|
|
152
|
+
</style>
|
|
153
|
+
```
|