@tencentcloud/sdk-mcp 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- 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/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/create-group.md +22 -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/create-group.md +26 -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/MessageList.md +385 -0
- package/resource/doc/chatuikit/vue3/integration.md +7 -4
- package/tools/call/get-native-call-integration-guide.js +2 -2
- package/tools/call/get-native-call-integration-guide.js.map +1 -1
- 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 +4 -4
- package/tools/call/get-web-call-integration-guide.js.map +1 -1
- package/tools/call/get-web-call-integration.js +34 -0
- package/tools/call/get-web-call-integration.js.map +1 -0
- package/tools/chat/auto-create-group.js +44 -0
- package/tools/chat/auto-create-group.js.map +1 -0
- package/tools/chat/create-group.js +29 -0
- package/tools/chat/create-group.js.map +1 -0
- package/tools/chat/get-native-chat-integration-guide.js +2 -2
- package/tools/chat/get-native-chat-integration-guide.js.map +1 -1
- 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 +8 -5
- package/tools/chat/get-web-chat-component-detail.js.map +1 -1
- package/tools/chat/get-web-chat-integration-guide.js +16 -8
- package/tools/chat/get-web-chat-integration-guide.js.map +1 -1
- 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/present-framework-choice.js +9 -18
- package/tools/common/present-framework-choice.js.map +1 -1
- package/tools/common/record-prompt.js +3 -3
- package/tools/common/record-prompt.js.map +1 -1
- package/tools/common/record-result.js +6 -6
- package/tools/common/record-result.js.map +1 -1
- package/tools/index.js +12 -8
- package/tools/index.js.map +1 -1
- 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/@tencent/aegis-node-sdk/CHANGELOG.md +0 -8
- package/@tencent/aegis-node-sdk/LICENSE +0 -21
- package/@tencent/aegis-node-sdk/README.md +0 -562
- package/@tencent/aegis-node-sdk/lib/aegis.min.js +0 -1
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +0 -14
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +0 -1
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +0 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +0 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +0 -85
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +0 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +0 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +0 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +0 -9
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +0 -62
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +0 -11
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +0 -4
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +0 -130
- package/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +0 -34
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +0 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +0 -18
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +0 -8
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +0 -8
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +0 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +0 -4
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +0 -10
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +0 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +0 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +0 -34
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +0 -12
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +0 -14
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +0 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +0 -12
- package/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +0 -3
- package/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +0 -33
- package/@tencent/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts +0 -0
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +0 -2
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +0 -18
- package/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +0 -60
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +0 -15
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +0 -5
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +0 -6
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +0 -18
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +0 -12
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +0 -10
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +0 -20
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +0 -27
- package/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +0 -2
- package/@tencent/aegis-node-sdk/package.json +0 -19
- package/@tencent/polaris/README.md +0 -407
- package/@tencent/polaris/dist/consumer/health.d.ts +0 -126
- package/@tencent/polaris/dist/consumer/health.js +0 -283
- package/@tencent/polaris/dist/consumer/health.js.map +0 -1
- package/@tencent/polaris/dist/consumer/index.d.ts +0 -120
- package/@tencent/polaris/dist/consumer/index.js +0 -348
- package/@tencent/polaris/dist/consumer/index.js.map +0 -1
- package/@tencent/polaris/dist/consumer/monitor.d.ts +0 -145
- package/@tencent/polaris/dist/consumer/monitor.js +0 -343
- package/@tencent/polaris/dist/consumer/monitor.js.map +0 -1
- package/@tencent/polaris/dist/consumer/selector.d.ts +0 -73
- package/@tencent/polaris/dist/consumer/selector.js +0 -316
- package/@tencent/polaris/dist/consumer/selector.js.map +0 -1
- package/@tencent/polaris/dist/errors.d.ts +0 -373
- package/@tencent/polaris/dist/errors.js +0 -154
- package/@tencent/polaris/dist/errors.js.map +0 -1
- package/@tencent/polaris/dist/global.d.ts +0 -16
- package/@tencent/polaris/dist/global.js +0 -18
- package/@tencent/polaris/dist/global.js.map +0 -1
- package/@tencent/polaris/dist/index.d.ts +0 -62
- package/@tencent/polaris/dist/index.js +0 -145
- package/@tencent/polaris/dist/index.js.map +0 -1
- package/@tencent/polaris/dist/instance.d.ts +0 -109
- package/@tencent/polaris/dist/instance.js +0 -38
- package/@tencent/polaris/dist/instance.js.map +0 -1
- package/@tencent/polaris/dist/limiter/bucket.d.ts +0 -51
- package/@tencent/polaris/dist/limiter/bucket.js +0 -152
- package/@tencent/polaris/dist/limiter/bucket.js.map +0 -1
- package/@tencent/polaris/dist/limiter/index.d.ts +0 -73
- package/@tencent/polaris/dist/limiter/index.js +0 -149
- package/@tencent/polaris/dist/limiter/index.js.map +0 -1
- package/@tencent/polaris/dist/limiter/ratelimit.d.ts +0 -27
- package/@tencent/polaris/dist/limiter/ratelimit.js +0 -134
- package/@tencent/polaris/dist/limiter/ratelimit.js.map +0 -1
- package/@tencent/polaris/dist/limiter/ratelimiter/base.d.ts +0 -17
- package/@tencent/polaris/dist/limiter/ratelimiter/base.js +0 -15
- package/@tencent/polaris/dist/limiter/ratelimiter/base.js.map +0 -1
- package/@tencent/polaris/dist/limiter/ratelimiter/global.d.ts +0 -59
- package/@tencent/polaris/dist/limiter/ratelimiter/global.js +0 -397
- package/@tencent/polaris/dist/limiter/ratelimiter/global.js.map +0 -1
- package/@tencent/polaris/dist/limiter/ratelimiter/index.d.ts +0 -3
- package/@tencent/polaris/dist/limiter/ratelimiter/index.js +0 -19
- package/@tencent/polaris/dist/limiter/ratelimiter/index.js.map +0 -1
- package/@tencent/polaris/dist/limiter/ratelimiter/local.d.ts +0 -17
- package/@tencent/polaris/dist/limiter/ratelimiter/local.js +0 -52
- package/@tencent/polaris/dist/limiter/ratelimiter/local.js.map +0 -1
- package/@tencent/polaris/dist/location.d.ts +0 -48
- package/@tencent/polaris/dist/location.js +0 -67
- package/@tencent/polaris/dist/location.js.map +0 -1
- package/@tencent/polaris/dist/logging.d.ts +0 -106
- package/@tencent/polaris/dist/logging.js +0 -130
- package/@tencent/polaris/dist/logging.js.map +0 -1
- package/@tencent/polaris/dist/metadata.d.ts +0 -78
- package/@tencent/polaris/dist/metadata.js +0 -119
- package/@tencent/polaris/dist/metadata.js.map +0 -1
- package/@tencent/polaris/dist/plugins/breaker/polaris.d.ts +0 -47
- package/@tencent/polaris/dist/plugins/breaker/polaris.js +0 -162
- package/@tencent/polaris/dist/plugins/breaker/polaris.js.map +0 -1
- package/@tencent/polaris/dist/plugins/lb/base.d.ts +0 -24
- package/@tencent/polaris/dist/plugins/lb/base.js +0 -32
- package/@tencent/polaris/dist/plugins/lb/base.js.map +0 -1
- package/@tencent/polaris/dist/plugins/lb/edf.d.ts +0 -24
- package/@tencent/polaris/dist/plugins/lb/edf.js +0 -77
- package/@tencent/polaris/dist/plugins/lb/edf.js.map +0 -1
- package/@tencent/polaris/dist/plugins/lb/hashring.d.ts +0 -24
- package/@tencent/polaris/dist/plugins/lb/hashring.js +0 -53
- package/@tencent/polaris/dist/plugins/lb/hashring.js.map +0 -1
- package/@tencent/polaris/dist/plugins/lb/sticky.d.ts +0 -31
- package/@tencent/polaris/dist/plugins/lb/sticky.js +0 -88
- package/@tencent/polaris/dist/plugins/lb/sticky.js.map +0 -1
- package/@tencent/polaris/dist/plugins/lb/swrr.d.ts +0 -25
- package/@tencent/polaris/dist/plugins/lb/swrr.js +0 -72
- package/@tencent/polaris/dist/plugins/lb/swrr.js.map +0 -1
- package/@tencent/polaris/dist/plugins/lb/wr.d.ts +0 -17
- package/@tencent/polaris/dist/plugins/lb/wr.js +0 -50
- package/@tencent/polaris/dist/plugins/lb/wr.js.map +0 -1
- package/@tencent/polaris/dist/plugins/lb/wrr.d.ts +0 -19
- package/@tencent/polaris/dist/plugins/lb/wrr.js +0 -81
- package/@tencent/polaris/dist/plugins/lb/wrr.js.map +0 -1
- package/@tencent/polaris/dist/plugins/logging/console.d.ts +0 -10
- package/@tencent/polaris/dist/plugins/logging/console.js +0 -38
- package/@tencent/polaris/dist/plugins/logging/console.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/local-server/index.d.ts +0 -32
- package/@tencent/polaris/dist/plugins/naming/local-server/index.js +0 -88
- package/@tencent/polaris/dist/plugins/naming/local-server/index.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +0 -124
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js +0 -398
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +0 -27
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +0 -287
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +0 -15
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js +0 -43
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +0 -28
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +0 -249
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +0 -19
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +0 -222
- package/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +0 -26
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +0 -99
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +0 -60
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +0 -259
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +0 -24
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +0 -18
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +0 -12
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +0 -39
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +0 -115
- package/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +0 -24
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +0 -22
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +0 -28
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +0 -80
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +0 -18
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +0 -65
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +0 -66
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +0 -95
- package/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +0 -1568
- package/@tencent/polaris/dist/plugins/naming/polaris-server/index.d.ts +0 -36
- package/@tencent/polaris/dist/plugins/naming/polaris-server/index.js +0 -51
- package/@tencent/polaris/dist/plugins/naming/polaris-server/index.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +0 -18
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +0 -67
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +0 -82
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +0 -11
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +0 -46
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +0 -16
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +0 -10
- package/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +0 -1102
- package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.d.ts +0 -29
- package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js +0 -77
- package/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +0 -12
- package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +0 -28
- package/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +0 -395
- package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.d.ts +0 -13
- package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js +0 -116
- package/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/types.d.ts +0 -67
- package/@tencent/polaris/dist/plugins/naming/polaris-server/types.js +0 -67
- package/@tencent/polaris/dist/plugins/naming/polaris-server/types.js.map +0 -1
- package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.d.ts +0 -99
- package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js +0 -217
- package/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js.map +0 -1
- package/@tencent/polaris/dist/plugins/registry/memory.d.ts +0 -10
- package/@tencent/polaris/dist/plugins/registry/memory.js +0 -50
- package/@tencent/polaris/dist/plugins/registry/memory.js.map +0 -1
- package/@tencent/polaris/dist/plugins/router/polaris/nearby.d.ts +0 -51
- package/@tencent/polaris/dist/plugins/router/polaris/nearby.js +0 -145
- package/@tencent/polaris/dist/plugins/router/polaris/nearby.js.map +0 -1
- package/@tencent/polaris/dist/plugins/router/polaris/rule.d.ts +0 -11
- package/@tencent/polaris/dist/plugins/router/polaris/rule.js +0 -174
- package/@tencent/polaris/dist/plugins/router/polaris/rule.js.map +0 -1
- package/@tencent/polaris/dist/plugins/router/trpc/canary.d.ts +0 -25
- package/@tencent/polaris/dist/plugins/router/trpc/canary.js +0 -36
- package/@tencent/polaris/dist/plugins/router/trpc/canary.js.map +0 -1
- package/@tencent/polaris/dist/plugins/router/trpc/env.d.ts +0 -10
- package/@tencent/polaris/dist/plugins/router/trpc/env.js +0 -34
- package/@tencent/polaris/dist/plugins/router/trpc/env.js.map +0 -1
- package/@tencent/polaris/dist/plugins/router/trpc/set.d.ts +0 -56
- package/@tencent/polaris/dist/plugins/router/trpc/set.js +0 -106
- package/@tencent/polaris/dist/plugins/router/trpc/set.js.map +0 -1
- package/@tencent/polaris/dist/plugins/shaping/unirate.d.ts +0 -31
- package/@tencent/polaris/dist/plugins/shaping/unirate.js +0 -124
- package/@tencent/polaris/dist/plugins/shaping/unirate.js.map +0 -1
- package/@tencent/polaris/dist/plugins/shaping/warmup.d.ts +0 -61
- package/@tencent/polaris/dist/plugins/shaping/warmup.js +0 -171
- package/@tencent/polaris/dist/plugins/shaping/warmup.js.map +0 -1
- package/@tencent/polaris/dist/plugins/weight/polaris.d.ts +0 -23
- package/@tencent/polaris/dist/plugins/weight/polaris.js +0 -159
- package/@tencent/polaris/dist/plugins/weight/polaris.js.map +0 -1
- package/@tencent/polaris/dist/plugins.d.ts +0 -619
- package/@tencent/polaris/dist/plugins.js +0 -91
- package/@tencent/polaris/dist/plugins.js.map +0 -1
- package/@tencent/polaris/dist/polaris.d.ts +0 -33
- package/@tencent/polaris/dist/polaris.js +0 -59
- package/@tencent/polaris/dist/polaris.js.map +0 -1
- package/@tencent/polaris/dist/provider/index.d.ts +0 -102
- package/@tencent/polaris/dist/provider/index.js +0 -168
- package/@tencent/polaris/dist/provider/index.js.map +0 -1
- package/@tencent/polaris/dist/registry.d.ts +0 -174
- package/@tencent/polaris/dist/registry.js +0 -660
- package/@tencent/polaris/dist/registry.js.map +0 -1
- package/@tencent/polaris/dist/rules.d.ts +0 -163
- package/@tencent/polaris/dist/rules.js +0 -24
- package/@tencent/polaris/dist/rules.js.map +0 -1
- package/@tencent/polaris/dist/scripts/postinstall.d.ts +0 -1
- package/@tencent/polaris/dist/scripts/postinstall.js +0 -71
- package/@tencent/polaris/dist/scripts/postinstall.js.map +0 -1
- package/@tencent/polaris/dist/service.d.ts +0 -18
- package/@tencent/polaris/dist/service.js +0 -3
- package/@tencent/polaris/dist/service.js.map +0 -1
- package/@tencent/polaris/dist/skeleton.d.ts +0 -87
- package/@tencent/polaris/dist/skeleton.js +0 -282
- package/@tencent/polaris/dist/skeleton.js.map +0 -1
- package/@tencent/polaris/dist/utils.d.ts +0 -36
- package/@tencent/polaris/dist/utils.js +0 -74
- package/@tencent/polaris/dist/utils.js.map +0 -1
- package/@tencent/polaris/dist/weak.d.ts +0 -11
- package/@tencent/polaris/dist/weak.js +0 -44
- package/@tencent/polaris/dist/weak.js.map +0 -1
- package/@tencent/polaris/package.json +0 -114
- 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 +0 -74
- package/streamableHttp.js.map +0 -1
- /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,765 @@
|
|
|
1
|
+
## 组件概述
|
|
2
|
+
|
|
3
|
+
`ConversationList` 组件主要负责会话列表功能,它包含了 Header 部分和 List 部分,具有搜索会话、创建会话、会话置顶、会话删除等功能。
|
|
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" ></td>
|
|
19
|
+
|
|
20
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
21
|
+
|
|
22
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
23
|
+
|
|
24
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
25
|
+
</tr>
|
|
26
|
+
</table>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## 组件构成
|
|
30
|
+
|
|
31
|
+
`ConversationList` 组件包含以下内容:
|
|
32
|
+
- `ConversationSearch` - 会话搜索
|
|
33
|
+
|
|
34
|
+
- `ConversationList UI` - 会话列表容器
|
|
35
|
+
|
|
36
|
+
- `ConversationPreview` - 单条会话信息展示
|
|
37
|
+
|
|
38
|
+
- `ConversationActions` - 单条会话操作
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## 基础使用
|
|
44
|
+
|
|
45
|
+
`ConversationList` 组件没有任何必须属性,您可以通过以下代码使用 `ConversationList`。
|
|
46
|
+
``` typescript
|
|
47
|
+
import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-react';
|
|
48
|
+
|
|
49
|
+
const App = () => {
|
|
50
|
+
return (
|
|
51
|
+
<UIKitProvider>
|
|
52
|
+
<ConversationList />
|
|
53
|
+
</UIKitProvider>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 自定义组件
|
|
59
|
+
|
|
60
|
+
`ConversationList` 为用户自定义提供了丰富且多维度的 Props 接口,允许用户自定义功能、UI、模块等。
|
|
61
|
+
|
|
62
|
+
`ConversationList` 组件提供了多个可替换的子组件,允许用户自定义 `Header`, `List`, `ConversationPreview`, `ConversationCreate`, `ConversationSearch`, `ConversationActions`, `Avatar`, `Placeholder` 等。同时,用户还可以利用默认子组件进行二次开发定制。
|
|
63
|
+
|
|
64
|
+
### 基础功能开关
|
|
65
|
+
|
|
66
|
+
通过设置 `enableSearch`, `enableCreate` 和 `enableActions` 参数,您可以灵活地控制 `ConversationList` 中的搜索会话、创建会话和会话操作功能的显示。
|
|
67
|
+
``` typescript
|
|
68
|
+
<ConversationList enableSearch={false} />
|
|
69
|
+
```
|
|
70
|
+
``` typescript
|
|
71
|
+
<ConversationList enableCreate={false} />
|
|
72
|
+
```
|
|
73
|
+
``` typescript
|
|
74
|
+
<ConversationList enableActions={false} />
|
|
75
|
+
```
|
|
76
|
+
<table>
|
|
77
|
+
<tr>
|
|
78
|
+
<td rowspan="1" colSpan="1" >`enableSearch={false}`</td>
|
|
79
|
+
|
|
80
|
+
<td rowspan="1" colSpan="1" >`enableCreate={false}`</td>
|
|
81
|
+
|
|
82
|
+
<td rowspan="1" colSpan="1" >`enableActions={false}`</td>
|
|
83
|
+
</tr>
|
|
84
|
+
|
|
85
|
+
<tr>
|
|
86
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
87
|
+
|
|
88
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
89
|
+
|
|
90
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
91
|
+
</tr>
|
|
92
|
+
</table>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### 数据筛选和排序
|
|
96
|
+
|
|
97
|
+
ConversationList 组件提供了 `filterConversation` 和 `sortConversation` 属性,可以让您对会话列表数据进行筛选和排序。
|
|
98
|
+
|
|
99
|
+
#### 筛选会话
|
|
100
|
+
|
|
101
|
+
要筛选会话列表数据,您可以给 `filterConversation` 属性传递一个筛选函数。这个函数接收一个 ConversationModel 数组作为参数,然后应该返回一个新数组,只包含符合您筛选条件的会话。
|
|
102
|
+
|
|
103
|
+
下面是一个使用 `filterConversation` 属性来只显示“包含未读消息”的会话的例子:
|
|
104
|
+
``` typescript
|
|
105
|
+
import { ConversationList } from '@tencentcloud/chat-uikit-react';
|
|
106
|
+
import type { ConversationModel } from '@tencentcloud/chat-uikit-react';
|
|
107
|
+
|
|
108
|
+
<ConversationList
|
|
109
|
+
filter={(conversationList: ConversationModel[]) =>
|
|
110
|
+
conversationList.filter(conversation => conversation.unreadCount > 0)}
|
|
111
|
+
/>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### 排序会话
|
|
115
|
+
|
|
116
|
+
要排序会话列表数据,您可以给 `sortConversation` 属性传递一个排序函数。这个函数接收一个 ConversationModel 数组作为参数,然后应该返回一个新数组,按照您的排序标准对会话进行排序。
|
|
117
|
+
|
|
118
|
+
下面是一个使用 `sortConversation` 属性来按照“最新消息时间倒序”排序会话列表的例子:
|
|
119
|
+
``` typescript
|
|
120
|
+
import { ConversationList } from '@tencentcloud/chat-uikit-react';
|
|
121
|
+
import type { ConversationModel } from '@tencentcloud/chat-uikit-react';
|
|
122
|
+
|
|
123
|
+
<ConversationList
|
|
124
|
+
sort={(conversationList: ConversationModel[]) =>
|
|
125
|
+
conversationList.sort(
|
|
126
|
+
(a, b) => (+(b?.lastMessage?.lastTime || 0)) - (+(a?.lastMessage?.lastTime || 0)),
|
|
127
|
+
)}
|
|
128
|
+
/>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
通过使用 `filter` 和 `sort` 属性,您可以根据您的需求有效地筛选和排序会话列表数据。
|
|
132
|
+
|
|
133
|
+
### 自定义 actionsConfig
|
|
134
|
+
|
|
135
|
+
利用 [actionsConfig](https://write.woa.com/document/157860973841612800) 对 ConversationActions 的基础功能进行控制。
|
|
136
|
+
|
|
137
|
+
更多定制请详情参见 [ConversationActions](https://write.woa.com/document/157860973841612800) 章节。
|
|
138
|
+
``` typescript
|
|
139
|
+
import { ConversationList } from '@tencentcloud/chat-uikit-react';
|
|
140
|
+
import type { ConversationModel } from '@tencentcloud/chat-uikit-react';
|
|
141
|
+
|
|
142
|
+
<ConversationList
|
|
143
|
+
actionsConfig={{
|
|
144
|
+
enablePin: false,
|
|
145
|
+
onConversationDelete: (conversation: ConversationModel) => { console.log('Delete conversation success'); },
|
|
146
|
+
customConversationActions: {
|
|
147
|
+
'custom-actions-1': {
|
|
148
|
+
label: 'custom-actions',
|
|
149
|
+
onClick: (conversation: ConversationModel) => { console.log(conversation); },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
}}
|
|
153
|
+
/>
|
|
154
|
+
```
|
|
155
|
+
<table>
|
|
156
|
+
<tr>
|
|
157
|
+
<td rowspan="1" colSpan="1" >`enablePin: false`</td>
|
|
158
|
+
|
|
159
|
+
<td rowspan="1" colSpan="1" >`enableDelete: false`</td>
|
|
160
|
+
|
|
161
|
+
<td rowspan="1" colSpan="1" >`enableMute: false`</td>
|
|
162
|
+
|
|
163
|
+
<td rowspan="1" colSpan="1" >`customConversationActions`</td>
|
|
164
|
+
</tr>
|
|
165
|
+
|
|
166
|
+
<tr>
|
|
167
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
168
|
+
|
|
169
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
170
|
+
|
|
171
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
172
|
+
|
|
173
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
174
|
+
</tr>
|
|
175
|
+
</table>
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
### 自定义 Placeholder
|
|
179
|
+
|
|
180
|
+
您可以通过传入 `PlaceholderEmptyList`、`PlaceholderLoading` 以及 `PlaceholderLoadError` 来定制不同状态下的列表展示。
|
|
181
|
+
|
|
182
|
+
以下是定制一个新的 `PlaceholderLoading` 示例:
|
|
183
|
+
``` typescript
|
|
184
|
+
import { ConversationList } from '@tencentcloud/chat-uikit-react';
|
|
185
|
+
|
|
186
|
+
<ConversationList
|
|
187
|
+
PlaceholderEmptyList={<div>Empty List!!!</div>}
|
|
188
|
+
/>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### 自定义 Header
|
|
192
|
+
|
|
193
|
+
`ConversationListHeader` 负责 ConversationList Header 部分的渲染工作,作为包裹层渲染默认 `ConversationSearch` 与 `ConversationCreate` 。您可以通过传入 left、right 等属性进行自定义,同时,您也可以自定义整个组件。
|
|
194
|
+
|
|
195
|
+
#### Props
|
|
196
|
+
<table>
|
|
197
|
+
<tr>
|
|
198
|
+
<td rowspan="1" colSpan="1" >**参数名**</td>
|
|
199
|
+
|
|
200
|
+
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
201
|
+
|
|
202
|
+
<td rowspan="1" colSpan="1" >**默认值**</td>
|
|
203
|
+
|
|
204
|
+
<td rowspan="1" colSpan="1" >**说明**</td>
|
|
205
|
+
</tr>
|
|
206
|
+
|
|
207
|
+
<tr>
|
|
208
|
+
<td rowspan="1" colSpan="1" >children</td>
|
|
209
|
+
|
|
210
|
+
<td rowspan="1" colSpan="1" >`ReactNode`</td>
|
|
211
|
+
|
|
212
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
213
|
+
|
|
214
|
+
<td rowspan="1" colSpan="1" >自定义会话列表头部中心组件。<br>在 `<ConversationList>` 中使用时,会默认传入 `<ConversationSearch>` 和 `<ConversationCreate>` 。</td>
|
|
215
|
+
</tr>
|
|
216
|
+
|
|
217
|
+
<tr>
|
|
218
|
+
<td rowspan="1" colSpan="1" >left</td>
|
|
219
|
+
|
|
220
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
221
|
+
|
|
222
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
223
|
+
|
|
224
|
+
<td rowspan="1" colSpan="1" >自定义会话列表头部左侧组件。</td>
|
|
225
|
+
</tr>
|
|
226
|
+
|
|
227
|
+
<tr>
|
|
228
|
+
<td rowspan="1" colSpan="1" >right</td>
|
|
229
|
+
|
|
230
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
231
|
+
|
|
232
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
233
|
+
|
|
234
|
+
<td rowspan="1" colSpan="1" >自定义会话列表头部右侧组件。</td>
|
|
235
|
+
</tr>
|
|
236
|
+
|
|
237
|
+
<tr>
|
|
238
|
+
<td rowspan="1" colSpan="1" >className</td>
|
|
239
|
+
|
|
240
|
+
<td rowspan="1" colSpan="1" >`String`</td>
|
|
241
|
+
|
|
242
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
243
|
+
|
|
244
|
+
<td rowspan="1" colSpan="1" >指定根元素类的 CSS 自定义名称。</td>
|
|
245
|
+
</tr>
|
|
246
|
+
|
|
247
|
+
<tr>
|
|
248
|
+
<td rowspan="1" colSpan="1" >style</td>
|
|
249
|
+
|
|
250
|
+
<td rowspan="1" colSpan="1" >`React.CSSProperties`</td>
|
|
251
|
+
|
|
252
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
253
|
+
|
|
254
|
+
<td rowspan="1" colSpan="1" >指定根元素样式的自定义样式。</td>
|
|
255
|
+
</tr>
|
|
256
|
+
</table>
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
#### 基础定制
|
|
260
|
+
|
|
261
|
+
以下是在 Header 组件右侧添加一个新的功能按钮示例。
|
|
262
|
+
``` typescript
|
|
263
|
+
import {
|
|
264
|
+
ConversationList,
|
|
265
|
+
ConversationListHeader,
|
|
266
|
+
} from '@tencentcloud/chat-uikit-react';
|
|
267
|
+
import type { ConversationListHeaderProps } from '@tencentcloud/chat-uikit-react';
|
|
268
|
+
|
|
269
|
+
const CustomConversationListHeader = (props: ConversationListHeaderProps) => {
|
|
270
|
+
const CustomIcon = <div>自定义 Icon </div>;
|
|
271
|
+
return (
|
|
272
|
+
<ConversationListHeader {...props} right={CustomIcon} />
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
<ConversationList Header={CustomConversationListHeader} />
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
#### 高阶定制
|
|
280
|
+
|
|
281
|
+
以下是实现一个简易的会话分组功能,按照全部会话、未读会话、单聊会话、群会话四个维度进行区分,通过点击不同分组按钮执行不同的筛选规则。
|
|
282
|
+
<table>
|
|
283
|
+
<tr>
|
|
284
|
+
<td rowspan="1" colSpan="1" >**修改前**</td>
|
|
285
|
+
|
|
286
|
+
<td rowspan="1" colSpan="1" >**修改后**</td>
|
|
287
|
+
</tr>
|
|
288
|
+
|
|
289
|
+
<tr>
|
|
290
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
291
|
+
|
|
292
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
293
|
+
</tr>
|
|
294
|
+
</table>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
【React】
|
|
300
|
+
``` typescript
|
|
301
|
+
import { useState } from 'react';
|
|
302
|
+
import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
|
|
303
|
+
import { ConversationList, UIKitProvider } from '@tencentcloud/chat-uikit-react';
|
|
304
|
+
import type { ConversationListHeaderProps, ConversationModel } from '@tencentcloud/chat-uikit-react';
|
|
305
|
+
|
|
306
|
+
const App = () => {
|
|
307
|
+
const [currentFilter, setCurrentFilter] = useState<string>('all');
|
|
308
|
+
const conversationGroupFilter: Record<string, (conversationList: ConversationModel[]) => ConversationModel[]> = {
|
|
309
|
+
all: (conversationList: ConversationModel[]) => conversationList,
|
|
310
|
+
unread: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.unreadCount > 0),
|
|
311
|
+
c2c: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.type === TUIChatEngine.TYPES.CONV_C2C),
|
|
312
|
+
group: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.type === TUIChatEngine.TYPES.CONV_GROUP),
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
const CustomConversationListHeader = (props: IConversationListHeaderProps) => {
|
|
316
|
+
return (
|
|
317
|
+
<div className="conversation-group-wrapper">
|
|
318
|
+
<button className={currentFilter === 'all' ? 'btn-active' : 'btn-default'} onClick={() => setCurrentFilter('all')}>All</button>
|
|
319
|
+
<button className={currentFilter === 'unread' ? 'btn-active' : 'btn-default'} onClick={() => setCurrentFilter('unread')}>Unread</button>
|
|
320
|
+
<button className={currentFilter === 'c2c' ? 'btn-active' : 'btn-default'} onClick={() => setCurrentFilter('c2c')}>C2C</button>
|
|
321
|
+
<button className={currentFilter === 'group' ? 'btn-active' : 'btn-default'} onClick={() => setCurrentFilter('group')}>Group</button>
|
|
322
|
+
</div>
|
|
323
|
+
);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
return (
|
|
327
|
+
<UIKitProvider>
|
|
328
|
+
<ConversationList
|
|
329
|
+
style={{ maxWidth: '300px', height: '600px' }}
|
|
330
|
+
Header={CustomConversationListHeader}
|
|
331
|
+
filter={conversationGroupFilter[currentFilter]}
|
|
332
|
+
/>
|
|
333
|
+
</UIKitProvider>
|
|
334
|
+
);
|
|
335
|
+
};
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
【CSS】
|
|
339
|
+
``` scss
|
|
340
|
+
.conversation-group-wrapper {
|
|
341
|
+
display: flex;
|
|
342
|
+
justify-content: space-around;
|
|
343
|
+
align-items: center;
|
|
344
|
+
margin: 10px;
|
|
345
|
+
font-size: 14px;
|
|
346
|
+
.btn-default{
|
|
347
|
+
display: flex;
|
|
348
|
+
padding: 5px 10px;
|
|
349
|
+
border: 1px solid #b3b3b4;
|
|
350
|
+
color: #3b3d43;
|
|
351
|
+
background-color: transparent;
|
|
352
|
+
border-radius: 2px;
|
|
353
|
+
}
|
|
354
|
+
.btn-active{
|
|
355
|
+
display: flex;
|
|
356
|
+
padding: 5px 10px;
|
|
357
|
+
border: 1px solid #1c66e5;
|
|
358
|
+
color: #1c66e5;
|
|
359
|
+
background-color: transparent;
|
|
360
|
+
border-radius: 2px;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### 自定义 List
|
|
366
|
+
|
|
367
|
+
`ConversationListContent` 负责 ConversationList 主列表部分的渲染工作。
|
|
368
|
+
|
|
369
|
+
作为包裹层默认渲染 Context 中计算好的当前会话列表显示数据 `filteredAndSortedConversationList`。
|
|
370
|
+
|
|
371
|
+
#### Props
|
|
372
|
+
<table>
|
|
373
|
+
<tr>
|
|
374
|
+
<td rowspan="1" colSpan="1" >**参数名**</td>
|
|
375
|
+
|
|
376
|
+
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
377
|
+
|
|
378
|
+
<td rowspan="1" colSpan="1" >**默认值**</td>
|
|
379
|
+
|
|
380
|
+
<td rowspan="1" colSpan="1" >**说明**</td>
|
|
381
|
+
</tr>
|
|
382
|
+
|
|
383
|
+
<tr>
|
|
384
|
+
<td rowspan="1" colSpan="1" >children</td>
|
|
385
|
+
|
|
386
|
+
<td rowspan="1" colSpan="1" >`ReactNode`</td>
|
|
387
|
+
|
|
388
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
389
|
+
|
|
390
|
+
<td rowspan="1" colSpan="1" >自定义会话列表内容区域组件。<br>在 `<ConversationList> `中使用时,会默认传入 `filteredAndSortedConversationList` 遍历的 `<Preview>` 列表。</td>
|
|
391
|
+
</tr>
|
|
392
|
+
|
|
393
|
+
<tr>
|
|
394
|
+
<td rowspan="1" colSpan="1" >empty</td>
|
|
395
|
+
|
|
396
|
+
<td rowspan="1" colSpan="1" >`Boolean`</td>
|
|
397
|
+
|
|
398
|
+
<td rowspan="1" colSpan="1" >`false`</td>
|
|
399
|
+
|
|
400
|
+
<td rowspan="1" colSpan="1" >空会话列表标识位, 在 `<ConversationList>` 中使用时,会判断`filteredAndSortedConversationList.length === 0` 并传入。</td>
|
|
401
|
+
</tr>
|
|
402
|
+
|
|
403
|
+
<tr>
|
|
404
|
+
<td rowspan="1" colSpan="1" >loading</td>
|
|
405
|
+
|
|
406
|
+
<td rowspan="1" colSpan="1" >`Boolean`</td>
|
|
407
|
+
|
|
408
|
+
<td rowspan="1" colSpan="1" >`false`</td>
|
|
409
|
+
|
|
410
|
+
<td rowspan="1" colSpan="1" >会话列表加载中标识位,在 `<ConversationList>` 中使用时,使用 `useConversationList() `获取 `isLoading` 并传入。</td>
|
|
411
|
+
</tr>
|
|
412
|
+
|
|
413
|
+
<tr>
|
|
414
|
+
<td rowspan="1" colSpan="1" >error</td>
|
|
415
|
+
|
|
416
|
+
<td rowspan="1" colSpan="1" >`Boolean`</td>
|
|
417
|
+
|
|
418
|
+
<td rowspan="1" colSpan="1" >`false`</td>
|
|
419
|
+
|
|
420
|
+
<td rowspan="1" colSpan="1" >会话列表加载错误标识位,在 `<ConversationList>` 中使用时,使用 `useConversationList() `获取 `isLoadError` 并传入。</td>
|
|
421
|
+
</tr>
|
|
422
|
+
|
|
423
|
+
<tr>
|
|
424
|
+
<td rowspan="1" colSpan="1" >PlaceholderEmptyList</td>
|
|
425
|
+
|
|
426
|
+
<td rowspan="1" colSpan="1" >`ReactNode`</td>
|
|
427
|
+
|
|
428
|
+
<td rowspan="1" colSpan="1" >`<PlaceHolder type={PlaceHolderTypes.NO_CONVERSATIONS} />`</td>
|
|
429
|
+
|
|
430
|
+
<td rowspan="1" colSpan="1" >自定义会话列表为空时的占位元素。</td>
|
|
431
|
+
</tr>
|
|
432
|
+
|
|
433
|
+
<tr>
|
|
434
|
+
<td rowspan="1" colSpan="1" >PlaceholderLoading</td>
|
|
435
|
+
|
|
436
|
+
<td rowspan="1" colSpan="1" >`ReactNode`</td>
|
|
437
|
+
|
|
438
|
+
<td rowspan="1" colSpan="1" >`<PlaceHolder type={PlaceHolderTypes.LOADING} />`</td>
|
|
439
|
+
|
|
440
|
+
<td rowspan="1" colSpan="1" >自定义会话列表加载中的占位元素。</td>
|
|
441
|
+
</tr>
|
|
442
|
+
|
|
443
|
+
<tr>
|
|
444
|
+
<td rowspan="1" colSpan="1" >PlaceholderLoadError</td>
|
|
445
|
+
|
|
446
|
+
<td rowspan="1" colSpan="1" >`ReactNode`</td>
|
|
447
|
+
|
|
448
|
+
<td rowspan="1" colSpan="1" >`<PlaceHolder type={PlaceHolderTypes.WRONG} />`</td>
|
|
449
|
+
|
|
450
|
+
<td rowspan="1" colSpan="1" >自定义会话列表加载错误时的占位元素。</td>
|
|
451
|
+
</tr>
|
|
452
|
+
|
|
453
|
+
<tr>
|
|
454
|
+
<td rowspan="1" colSpan="1" >className</td>
|
|
455
|
+
|
|
456
|
+
<td rowspan="1" colSpan="1" >`String`</td>
|
|
457
|
+
|
|
458
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
459
|
+
|
|
460
|
+
<td rowspan="1" colSpan="1" >指定根元素类的 CSS 自定义名称。</td>
|
|
461
|
+
</tr>
|
|
462
|
+
|
|
463
|
+
<tr>
|
|
464
|
+
<td rowspan="1" colSpan="1" >style</td>
|
|
465
|
+
|
|
466
|
+
<td rowspan="1" colSpan="1" >`React.CSSProperties`</td>
|
|
467
|
+
|
|
468
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
469
|
+
|
|
470
|
+
<td rowspan="1" colSpan="1" >指定根元素样式的自定义样式。</td>
|
|
471
|
+
</tr>
|
|
472
|
+
</table>
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
#### 基础定制
|
|
476
|
+
|
|
477
|
+
`List` 组件不同状态 UI 效果如下,在 `ConversationList` 内部已处理好每种状态的触发时机。
|
|
478
|
+
|
|
479
|
+
同时,您可以通过自定义传入 `empty`、`loading`、`error` 来控制组件状态。
|
|
480
|
+
``` typescript
|
|
481
|
+
import { ConversationList, ConversationListContent } from '@tencentcloud/chat-uikit-react';
|
|
482
|
+
import type { ConversationListContentProps } from '@tencentcloud/chat-uikit-react';
|
|
483
|
+
|
|
484
|
+
const CustomConversationListContent = (props: ConversationListContentProps) => {
|
|
485
|
+
return <ConversationListContent {...props} loading={true} />;
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
<ConversationList List={CustomConversationListContent} />
|
|
489
|
+
```
|
|
490
|
+
<table>
|
|
491
|
+
<tr>
|
|
492
|
+
<td rowspan="1" colSpan="1" >`default`</td>
|
|
493
|
+
|
|
494
|
+
<td rowspan="1" colSpan="1" >`empty={true}`</td>
|
|
495
|
+
|
|
496
|
+
<td rowspan="1" colSpan="1" >`loading={true}`</td>
|
|
497
|
+
|
|
498
|
+
<td rowspan="1" colSpan="1" >`error={true}`</td>
|
|
499
|
+
</tr>
|
|
500
|
+
|
|
501
|
+
<tr>
|
|
502
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
503
|
+
|
|
504
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
505
|
+
|
|
506
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
507
|
+
|
|
508
|
+
<td rowspan="1" colSpan="1" ></td>
|
|
509
|
+
</tr>
|
|
510
|
+
</table>
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
### 自定义 ConversationPreview
|
|
514
|
+
|
|
515
|
+
详情请参见 [ConversationPreview](https://write.woa.com/document/157860950620008448) 章节。
|
|
516
|
+
``` typescript
|
|
517
|
+
<ConversationList ConversationPreview={CustomConversationPreview} />
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### 自定义 ConversationActions
|
|
521
|
+
|
|
522
|
+
详情请参见 [ConversationActions](https://write.woa.com/document/157860973841612800) 章节。
|
|
523
|
+
``` typescript
|
|
524
|
+
<ConversationList ConversationActions={CustomConversationActions} />
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
### 自定义 ConversationSearch
|
|
528
|
+
|
|
529
|
+
详情请参见 [ConversationSearch](https://write.woa.com/document/157860965047783424) 章节。
|
|
530
|
+
``` typescript
|
|
531
|
+
<ConversationList ConversationSearch={CustomConversationSearch} />
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
### 自定义 ConversationCreate
|
|
535
|
+
``` typescript
|
|
536
|
+
<ConversationList ConversationCreate={CustomConversationCreate} />
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### 自定义 Avatar
|
|
540
|
+
``` typescript
|
|
541
|
+
<ConversationList Avatar={CustomAvatar} />
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
## APIs/Props
|
|
545
|
+
<table>
|
|
546
|
+
<tr>
|
|
547
|
+
<td rowspan="1" colSpan="1" >**参数名**</td>
|
|
548
|
+
|
|
549
|
+
<td rowspan="1" colSpan="1" >**类型**</td>
|
|
550
|
+
|
|
551
|
+
<td rowspan="1" colSpan="1" >**默认值**</td>
|
|
552
|
+
|
|
553
|
+
<td rowspan="1" colSpan="1" >**说明**</td>
|
|
554
|
+
</tr>
|
|
555
|
+
|
|
556
|
+
<tr>
|
|
557
|
+
<td rowspan="1" colSpan="1" >enableSearch</td>
|
|
558
|
+
|
|
559
|
+
<td rowspan="1" colSpan="1" >`Boolean`</td>
|
|
560
|
+
|
|
561
|
+
<td rowspan="1" colSpan="1" >`true`</td>
|
|
562
|
+
|
|
563
|
+
<td rowspan="1" colSpan="1" >控制会话搜索功能是否显示。</td>
|
|
564
|
+
</tr>
|
|
565
|
+
|
|
566
|
+
<tr>
|
|
567
|
+
<td rowspan="1" colSpan="1" >enableCreate</td>
|
|
568
|
+
|
|
569
|
+
<td rowspan="1" colSpan="1" >`Boolean`</td>
|
|
570
|
+
|
|
571
|
+
<td rowspan="1" colSpan="1" >`true`</td>
|
|
572
|
+
|
|
573
|
+
<td rowspan="1" colSpan="1" >控制创建会话功能是否显示。</td>
|
|
574
|
+
</tr>
|
|
575
|
+
|
|
576
|
+
<tr>
|
|
577
|
+
<td rowspan="1" colSpan="1" >enableActions</td>
|
|
578
|
+
|
|
579
|
+
<td rowspan="1" colSpan="1" >`Boolean`</td>
|
|
580
|
+
|
|
581
|
+
<td rowspan="1" colSpan="1" >`true`</td>
|
|
582
|
+
|
|
583
|
+
<td rowspan="1" colSpan="1" >控制会话操作功能是否显示。</td>
|
|
584
|
+
</tr>
|
|
585
|
+
|
|
586
|
+
<tr>
|
|
587
|
+
<td rowspan="1" colSpan="1" >actionsConfig</td>
|
|
588
|
+
|
|
589
|
+
<td rowspan="1" colSpan="1" >`ConversationActionsConfig`</td>
|
|
590
|
+
|
|
591
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
592
|
+
|
|
593
|
+
<td rowspan="1" colSpan="1" >用于自定义会话操作配置。</td>
|
|
594
|
+
</tr>
|
|
595
|
+
|
|
596
|
+
<tr>
|
|
597
|
+
<td rowspan="1" colSpan="1" >Header</td>
|
|
598
|
+
|
|
599
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
600
|
+
|
|
601
|
+
<td rowspan="1" colSpan="1" >`Header`</td>
|
|
602
|
+
|
|
603
|
+
<td rowspan="1" colSpan="1" >自定义 Header 组件。</td>
|
|
604
|
+
</tr>
|
|
605
|
+
|
|
606
|
+
<tr>
|
|
607
|
+
<td rowspan="1" colSpan="1" >List</td>
|
|
608
|
+
|
|
609
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
610
|
+
|
|
611
|
+
<td rowspan="1" colSpan="1" >`List`</td>
|
|
612
|
+
|
|
613
|
+
<td rowspan="1" colSpan="1" >自定义会话列表组件。</td>
|
|
614
|
+
</tr>
|
|
615
|
+
|
|
616
|
+
<tr>
|
|
617
|
+
<td rowspan="1" colSpan="1" >Preview</td>
|
|
618
|
+
|
|
619
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
620
|
+
|
|
621
|
+
<td rowspan="1" colSpan="1" >[ConversationPreview](https://write.woa.com/document/157860950620008448)</td>
|
|
622
|
+
|
|
623
|
+
<td rowspan="1" colSpan="1" >自定义会话预览组件。</td>
|
|
624
|
+
</tr>
|
|
625
|
+
|
|
626
|
+
<tr>
|
|
627
|
+
<td rowspan="1" colSpan="1" >ConversationCreate</td>
|
|
628
|
+
|
|
629
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
630
|
+
|
|
631
|
+
<td rowspan="1" colSpan="1" >`ConversationCreate`</td>
|
|
632
|
+
|
|
633
|
+
<td rowspan="1" colSpan="1" >自定义创建会话组件。</td>
|
|
634
|
+
</tr>
|
|
635
|
+
|
|
636
|
+
<tr>
|
|
637
|
+
<td rowspan="1" colSpan="1" >ConversationSearch</td>
|
|
638
|
+
|
|
639
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
640
|
+
|
|
641
|
+
<td rowspan="1" colSpan="1" >[ConversationSearch](https://write.woa.com/document/157860965047783424)</td>
|
|
642
|
+
|
|
643
|
+
<td rowspan="1" colSpan="1" >自定义会话搜索组件。</td>
|
|
644
|
+
</tr>
|
|
645
|
+
|
|
646
|
+
<tr>
|
|
647
|
+
<td rowspan="1" colSpan="1" >ConversationActions</td>
|
|
648
|
+
|
|
649
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
650
|
+
|
|
651
|
+
<td rowspan="1" colSpan="1" >[ConversationActions](https://write.woa.com/document/157860973841612800)</td>
|
|
652
|
+
|
|
653
|
+
<td rowspan="1" colSpan="1" >自定义会话操作组件。</td>
|
|
654
|
+
</tr>
|
|
655
|
+
|
|
656
|
+
<tr>
|
|
657
|
+
<td rowspan="1" colSpan="1" >Avatar</td>
|
|
658
|
+
|
|
659
|
+
<td rowspan="1" colSpan="1" >`ReactElement`</td>
|
|
660
|
+
|
|
661
|
+
<td rowspan="1" colSpan="1" >`Avatar`</td>
|
|
662
|
+
|
|
663
|
+
<td rowspan="1" colSpan="1" >自定义头像组件。</td>
|
|
664
|
+
</tr>
|
|
665
|
+
|
|
666
|
+
<tr>
|
|
667
|
+
<td rowspan="1" colSpan="1" >PlaceholderEmptyList</td>
|
|
668
|
+
|
|
669
|
+
<td rowspan="1" colSpan="1" >`ReactNode`</td>
|
|
670
|
+
|
|
671
|
+
<td rowspan="1" colSpan="1" >`<PlaceHolder type={PlaceHolderTypes.NO_CONVERSATIONS} />`</td>
|
|
672
|
+
|
|
673
|
+
<td rowspan="1" colSpan="1" >自定义会话列表为空时的占位元素。</td>
|
|
674
|
+
</tr>
|
|
675
|
+
|
|
676
|
+
<tr>
|
|
677
|
+
<td rowspan="1" colSpan="1" >PlaceholderLoading</td>
|
|
678
|
+
|
|
679
|
+
<td rowspan="1" colSpan="1" >`ReactNode`</td>
|
|
680
|
+
|
|
681
|
+
<td rowspan="1" colSpan="1" >`<PlaceHolder type={PlaceHolderTypes.LOADING} />`</td>
|
|
682
|
+
|
|
683
|
+
<td rowspan="1" colSpan="1" >自定义会话列表加载中的占位元素。</td>
|
|
684
|
+
</tr>
|
|
685
|
+
|
|
686
|
+
<tr>
|
|
687
|
+
<td rowspan="1" colSpan="1" >PlaceholderLoadError</td>
|
|
688
|
+
|
|
689
|
+
<td rowspan="1" colSpan="1" >`ReactNode`</td>
|
|
690
|
+
|
|
691
|
+
<td rowspan="1" colSpan="1" >`<PlaceHolder type={PlaceHolderTypes.WRONG} />`</td>
|
|
692
|
+
|
|
693
|
+
<td rowspan="1" colSpan="1" >自定义会话列表加载错误时的占位元素。</td>
|
|
694
|
+
</tr>
|
|
695
|
+
|
|
696
|
+
<tr>
|
|
697
|
+
<td rowspan="1" colSpan="1" >filter</td>
|
|
698
|
+
|
|
699
|
+
<td rowspan="1" colSpan="1" >`(conversationList: ConversationModel[]) => ConversationModel[]`</td>
|
|
700
|
+
|
|
701
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
702
|
+
|
|
703
|
+
<td rowspan="1" colSpan="1" >用于筛选会话列表的函数。</td>
|
|
704
|
+
</tr>
|
|
705
|
+
|
|
706
|
+
<tr>
|
|
707
|
+
<td rowspan="1" colSpan="1" >sort</td>
|
|
708
|
+
|
|
709
|
+
<td rowspan="1" colSpan="1" >`(conversationList: ConversationModel[]) => ConversationModel[]`</td>
|
|
710
|
+
|
|
711
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
712
|
+
|
|
713
|
+
<td rowspan="1" colSpan="1" >用于排序会话列表的函数。</td>
|
|
714
|
+
</tr>
|
|
715
|
+
|
|
716
|
+
<tr>
|
|
717
|
+
<td rowspan="1" colSpan="1" >onConversationSelect</td>
|
|
718
|
+
|
|
719
|
+
<td rowspan="1" colSpan="1" >`(conversation: ConversationModel) => void;`</td>
|
|
720
|
+
|
|
721
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
722
|
+
|
|
723
|
+
<td rowspan="1" colSpan="1" >点击会话后的回调函数,参数为所点击的会话对象。</td>
|
|
724
|
+
</tr>
|
|
725
|
+
|
|
726
|
+
<tr>
|
|
727
|
+
<td rowspan="1" colSpan="1" >onBeforeCreateConversation</td>
|
|
728
|
+
|
|
729
|
+
<td rowspan="1" colSpan="1" >`(params: CreateParams) => CreateParams;`</td>
|
|
730
|
+
|
|
731
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
732
|
+
|
|
733
|
+
<td rowspan="1" colSpan="1" >创建会话前执行的自定义操作,参数为创建会话所需的参数。</td>
|
|
734
|
+
</tr>
|
|
735
|
+
|
|
736
|
+
<tr>
|
|
737
|
+
<td rowspan="1" colSpan="1" >onConversationCreate</td>
|
|
738
|
+
|
|
739
|
+
<td rowspan="1" colSpan="1" >`(conversation: ConversationModel) => void;`</td>
|
|
740
|
+
|
|
741
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
742
|
+
|
|
743
|
+
<td rowspan="1" colSpan="1" >会话创建后的回调函数,参数为创建的会话对象。</td>
|
|
744
|
+
</tr>
|
|
745
|
+
|
|
746
|
+
<tr>
|
|
747
|
+
<td rowspan="1" colSpan="1" >className</td>
|
|
748
|
+
|
|
749
|
+
<td rowspan="1" colSpan="1" >`String`</td>
|
|
750
|
+
|
|
751
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
752
|
+
|
|
753
|
+
<td rowspan="1" colSpan="1" >指定根元素类的 CSS 自定义名称。</td>
|
|
754
|
+
</tr>
|
|
755
|
+
|
|
756
|
+
<tr>
|
|
757
|
+
<td rowspan="1" colSpan="1" >style</td>
|
|
758
|
+
|
|
759
|
+
<td rowspan="1" colSpan="1" >`React.CSSProperties`</td>
|
|
760
|
+
|
|
761
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
762
|
+
|
|
763
|
+
<td rowspan="1" colSpan="1" >指定根元素样式的自定义样式。</td>
|
|
764
|
+
</tr>
|
|
765
|
+
</table>
|