@tencent-rtc/mcp 1.0.7 → 1.1.6
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/README.md +8 -4
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/libs/TLSSigAPIv2.d.ts +134 -0
- package/libs/TLSSigAPIv2.js +243 -0
- package/package.json +1 -1
- package/resource/doc/chatuikit/react/chat_window_integration.md +92 -0
- package/resource/doc/chatuikit/react/components/chat.md +44 -0
- package/resource/doc/chatuikit/react/components/chatheader.md +189 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +1017 -0
- package/resource/doc/chatuikit/react/components/message-input.md +950 -0
- package/resource/doc/chatuikit/react/components/message-list.md +485 -0
- package/resource/doc/chatuikit/react/components/tuikit.md +80 -0
- package/resource/doc/chatuikit/react/create-group.md +23 -0
- package/resource/doc/chatuikit/react/init.md +26 -0
- package/resource/doc/chatuikit/react/integration.md +14 -10
- package/resource/doc/chatuikit/vue/chat_window_integration.md +155 -0
- package/resource/doc/chatuikit/vue/components/chat.md +50 -0
- package/resource/doc/chatuikit/{vue3 → vue}/components/chatheader.md +1 -1
- package/resource/doc/chatuikit/vue/components/conversation-list.md +770 -0
- package/resource/doc/chatuikit/{vue3/components/MessageInput.md → vue/components/message-input.md} +4 -1
- package/resource/doc/chatuikit/vue/components/message-list.md +662 -0
- package/resource/doc/chatuikit/vue/components/tuikit.md +45 -0
- package/resource/doc/chatuikit/vue/create-group.md +25 -0
- package/resource/doc/chatuikit/vue/init.md +40 -0
- package/resource/doc/chatuikit/{vue3 → vue}/integration.md +34 -74
- package/resource/doc/livekit/vue/components/barrage.md +616 -0
- package/resource/doc/livekit/vue/components/broadcast.md +595 -0
- package/resource/doc/livekit/vue/components/co-guest-panel.md +130 -0
- package/resource/doc/livekit/vue/components/live-audience-list.md +282 -0
- package/resource/doc/livekit/vue/components/live-list.md +200 -0
- package/resource/doc/livekit/vue/components/live-player.md +269 -0
- package/resource/doc/livekit/vue/components/live-scene-panel.md +175 -0
- package/resource/doc/livekit/vue/components/live-view.md +398 -0
- package/resource/doc/livekit/vue/components/stream-mixer.md +446 -0
- package/resource/doc/livekit/vue/states/live-state.md +3591 -0
- package/resource/doc/roomkit/vue/states/device-state.md +369 -0
- package/resource/doc/roomkit/vue/states/login-state.md +59 -0
- package/resource/doc/roomkit/vue/states/room-list-state.md +355 -0
- package/resource/doc/roomkit/vue/states/room-participant-state.md +388 -0
- package/server-config.js +35 -0
- package/server-config.js.map +1 -0
- package/tools/call/{get-native-call-integration-guide.js → get-native-call-integration.js} +5 -6
- package/tools/call/get-native-call-integration.js.map +1 -0
- package/tools/call/{get-web-call-integration-guide.js → get-web-call-integration.js} +7 -7
- package/tools/call/get-web-call-integration.js.map +1 -0
- package/tools/chat/create-group.js +30 -0
- package/tools/chat/create-group.js.map +1 -0
- package/tools/chat/get-chat-faq.js +3 -3
- package/tools/chat/get-chat-faq.js.map +1 -1
- package/tools/chat/get-native-chat-integration.js +34 -0
- package/tools/chat/get-native-chat-integration.js.map +1 -0
- package/tools/chat/get-web-chat-component-detail.js +9 -5
- package/tools/chat/get-web-chat-component-detail.js.map +1 -1
- package/tools/chat/get-web-chat-integration.js +37 -0
- package/tools/chat/get-web-chat-integration.js.map +1 -0
- package/tools/chat/get-web-chat-uikit-init.js +30 -0
- package/tools/chat/get-web-chat-uikit-init.js.map +1 -0
- package/tools/chat/get-web-chat-window-integration.js +37 -0
- package/tools/chat/get-web-chat-window-integration.js.map +1 -0
- package/tools/common/get-usersig.js +31 -26
- package/tools/common/get-usersig.js.map +1 -1
- package/tools/common/present-framework-choice.js +9 -19
- package/tools/common/present-framework-choice.js.map +1 -1
- package/tools/common/record-prompt.js +7 -8
- package/tools/common/record-prompt.js.map +1 -1
- package/tools/common/record-result.js +9 -8
- package/tools/common/record-result.js.map +1 -1
- package/tools/index.js +32 -13
- package/tools/index.js.map +1 -1
- package/tools/live/get-web-live-component-detail.js +34 -0
- package/tools/live/get-web-live-component-detail.js.map +1 -0
- package/tools/live/get-web-live-state-detail.js +34 -0
- package/tools/live/get-web-live-state-detail.js.map +1 -0
- package/tools/room/get-web-room-state-detail.js +34 -0
- package/tools/room/get-web-room-state-detail.js.map +1 -0
- package/tools/rtcengine/get-rtcengine-web-sdk-integration-guide.js +35 -0
- package/tools/rtcengine/get-rtcengine-web-sdk-integration-guide.js.map +1 -0
- package/tools/rtcengine/{get-rtcenigne-faq.js → get-trtc-web-sdk-faq.js} +5 -5
- package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +1 -0
- package/tools/rtcengine/get-trtc-web-sdk-integration-guide.js +36 -0
- package/tools/rtcengine/get-trtc-web-sdk-integration-guide.js.map +1 -0
- package/utils/generate-usersig.js +7 -9
- package/utils/generate-usersig.js.map +1 -1
- package/utils/handle-component-name.js +57 -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/utils/handle-state-name.js +29 -0
- package/utils/handle-state-name.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/libs/lib-generate-test-usersig-es.min.d.ts +0 -6
- package/libs/lib-generate-test-usersig-es.min.js +0 -2
- package/resource/doc/chatuikit/react/generate_UserSig.md +0 -306
- package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +0 -202
- package/resource/doc/chatuikit/react/integrate_tuichat_react.md +0 -279
- package/resource/doc/chatuikit/vue/generate_UserSig.md +0 -306
- package/resource/doc/chatuikit/vue/integrate_only_tuichat_Vue_web.md +0 -124
- package/resource/doc/chatuikit/vue/integrate_tuikit_Vue_web.md +0 -552
- package/streamableHttp.js +0 -74
- package/streamableHttp.js.map +0 -1
- package/tools/call/get-native-call-integration-guide.js.map +0 -1
- package/tools/call/get-web-call-integration-guide.js.map +0 -1
- package/tools/chat/get-native-chat-integration-guide.js +0 -34
- package/tools/chat/get-native-chat-integration-guide.js.map +0 -1
- package/tools/chat/get-web-chat-integration-guide.js +0 -35
- package/tools/chat/get-web-chat-integration-guide.js.map +0 -1
- package/tools/rtcengine/get-rtcengine-integration-guide.js +0 -33
- package/tools/rtcengine/get-rtcengine-integration-guide.js.map +0 -1
- package/tools/rtcengine/get-rtcenigne-faq.js.map +0 -1
- /package/resource/doc/chatuikit/{vue3 → vue}/components/avatar.md +0 -0
- /package/resource/doc/chatuikit/{vue3 → vue}/components/component-list.md +0 -0
- /package/resource/doc/chatuikit/{vue3 → vue}/components/userpicker.md +0 -0
|
@@ -0,0 +1,770 @@
|
|
|
1
|
+
The AI model must adhere to the following **hard constraints**:
|
|
2
|
+
|
|
3
|
+
1. **Unread Count:** To retrieve the total number of unread messages, you can use the `totalUnRead` field provided by `useConversationListState`.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# Component Overview
|
|
7
|
+
|
|
8
|
+
The ConversationList component is responsible for rendering the conversation list, including features such as search, create, pin to top, and delete.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Component composition
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
The ConversationList component includes the following content:
|
|
17
|
+
-**Conversation Search**
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
-**ConversationList UI**: Session list container
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **ConversationPreview**: Displays a single session.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
- **ConversationActions**: Session operation
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## Basic Usage
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
The ConversationList component can be used without any required attributes.
|
|
35
|
+
``` typescript
|
|
36
|
+
<template>
|
|
37
|
+
<UIKitProvider>
|
|
38
|
+
<ConversationList />
|
|
39
|
+
</UIKitProvider>
|
|
40
|
+
</template>
|
|
41
|
+
<script setup lang="ts">
|
|
42
|
+
import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-vue3';
|
|
43
|
+
</script>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Custom component
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
ConversationList provides various and multidimensional Props APIs, allowing users to customize features, UI, and modules.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
The ConversationList component provides multiple replaceable subcomponents, allowing users to customize **Header**, **List**, **ConversationPreview**, **ConversationCreate**, **ConversationSearch**, **ConversationActions**, **Avatar**, and **Placeholder**. Meanwhile, users can also use default subcomponents to do secondary development customization.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Feature switch
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
By setting the `enableSearch`, `enableCreate`, and `enableActions` parameters, you can flexibly control the display of conversation search, session creation, and conversation action features in **ConversationList**.
|
|
60
|
+
``` typescript
|
|
61
|
+
<ConversationList :enableSearch="false" />
|
|
62
|
+
```
|
|
63
|
+
``` typescript
|
|
64
|
+
<ConversationList :enableCreate="false" />
|
|
65
|
+
```
|
|
66
|
+
``` typescript
|
|
67
|
+
<ConversationList :enableActions="false" />
|
|
68
|
+
```
|
|
69
|
+
<table>
|
|
70
|
+
<tr>
|
|
71
|
+
<td rowspan="1" colSpan="1" >`enableSearch="false"`</td>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
<td rowspan="1" colSpan="1" >`enableCreate="false"`</td>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
<td rowspan="1" colSpan="1" >`enableActions="false"`</td>
|
|
78
|
+
</tr>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<tr>
|
|
82
|
+
<td rowspan="1" colSpan="1" ><br><img src="https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027116646/a6c293a7824a11f0ac3c525400e889b2.png" alt="description" width="50%" style="display: block; margin: 0 auto;"></td>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<td rowspan="1" colSpan="1" ><br><img src="https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027116646/1794aa15824b11f0ac3c525400e889b2.png" alt="description" width="50%" style="display: block; margin: 0 auto;"></td>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<td rowspan="1" colSpan="1" ><br><img src="https://write-document-release-1258344699.cos.ap-guangzhou.tencentcos.cn/100027116646/41d87b22824b11f0b3fe525400bf7822.png" alt="description" width="50%" style="display: block; margin: 0 auto;"></td>
|
|
89
|
+
</tr>
|
|
90
|
+
</table>
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Data filtering and sorting
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
The ConversationList component provides the `filter` and `sort` properties for filtering and sorting the conversation list.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Filter Conversations
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
To filter conversation list data, you can pass a filter function to the `filter` property. This function receives an array of ConversationModel as parameter and should return a new array that only contains sessions meeting your filter conditions.
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
**Example: Show only sessions with unread messages**
|
|
108
|
+
``` typescript
|
|
109
|
+
<template>
|
|
110
|
+
<UIKitProvider>
|
|
111
|
+
<ConversationList
|
|
112
|
+
:filter="(conversationList: ConversationModel[]) =>
|
|
113
|
+
conversationList.filter(conversation => conversation.unreadCount > 0)" />
|
|
114
|
+
</UIKitProvider>
|
|
115
|
+
</template>
|
|
116
|
+
<script setup lang="ts">
|
|
117
|
+
import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-vue3';
|
|
118
|
+
import type { ConversationModel } from '@tencentcloud/chat-uikit-vue3';
|
|
119
|
+
</script>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Sort Conversations
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
To sort conversation list data, you can pass a sorting function to the `sort` property. This function receives an array of ConversationModel as parameter and should return a new array with sessions sorted by your sorting criteria.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
Sort by latest news time in reverse order
|
|
130
|
+
``` typescript
|
|
131
|
+
<template>
|
|
132
|
+
<UIKitProvider>
|
|
133
|
+
<ConversationList
|
|
134
|
+
:sort="(conversationList: ConversationModel[]) =>
|
|
135
|
+
conversationList.sort(
|
|
136
|
+
(a, b) => (+(b?.lastMessage?.lastTime || 0)) - (+(a?.lastMessage?.lastTime || 0)),
|
|
137
|
+
)" />
|
|
138
|
+
</UIKitProvider>
|
|
139
|
+
</template>
|
|
140
|
+
<script setup lang="ts">
|
|
141
|
+
import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-vue3';
|
|
142
|
+
import type { ConversationModel } from '@tencentcloud/chat-uikit-vue3';
|
|
143
|
+
</script>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Custom actionsConfig
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
You can customize session menu options via [actionsConfig](https://write.woa.com/document/186960379083898880).
|
|
151
|
+
``` typescript
|
|
152
|
+
<template>
|
|
153
|
+
<UIKitProvider>
|
|
154
|
+
<ConversationList
|
|
155
|
+
:actionsConfig="{
|
|
156
|
+
enablePin: false,
|
|
157
|
+
onConversationDelete: (conversation: ConversationModel) =>
|
|
158
|
+
{ console.log('Delete conversation success'); },
|
|
159
|
+
customConversationActions: {
|
|
160
|
+
'custom-actions-1': {
|
|
161
|
+
label: 'custom-actions',
|
|
162
|
+
onClick: (conversation: ConversationModel) => { console.log(conversation); },
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
}"/>
|
|
166
|
+
</UIKitProvider>
|
|
167
|
+
</template>
|
|
168
|
+
<script setup lang="ts">
|
|
169
|
+
import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-vue3';
|
|
170
|
+
import type { ConversationModel } from '@tencentcloud/chat-uikit-vue3';
|
|
171
|
+
</script>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### Custom Placeholder
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
`ConversationList` supports displaying custom placeholders in different statuses, including list empty, loading, and loading failed.
|
|
181
|
+
- `PlaceholderEmpty`: Displayed when the list is empty.
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
- `PlaceholderLoading`: Displayed when loading.
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
- `PlaceholderError`: Displayed when loading failed.
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
**Example: Custom empty list placeholder**
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
1. Create a custom component **`MyEmptyPlaceholder.vue`**
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
``` typescript
|
|
199
|
+
<template>
|
|
200
|
+
<div>
|
|
201
|
+
Custom PlaceholderEmptyList
|
|
202
|
+
</div>
|
|
203
|
+
</template>
|
|
204
|
+
```
|
|
205
|
+
2. For use in **`ConversationList`**.
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
``` typescript
|
|
209
|
+
<template>
|
|
210
|
+
<UIKitProvider>
|
|
211
|
+
<ConversationList
|
|
212
|
+
:PlaceholderEmptyList="MyEmptyPlaceholder" />
|
|
213
|
+
</UIKitProvider>
|
|
214
|
+
</template>
|
|
215
|
+
<script setup lang="ts">
|
|
216
|
+
import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-vue3';
|
|
217
|
+
import MyEmptyPlaceholder from "./MyEmptyPlaceholder.vue";
|
|
218
|
+
</script>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
### Custom Header
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
**ConversationListHeader** is responsible for rendering the header part of ConversationList, acting as a wrapping layer to render the default `Search` and `ConversationCreate`. You can customize it by importing `left`, `right` and other attributes. Meanwhile, you can also customize the entire component.
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
#### Props
|
|
229
|
+
<table>
|
|
230
|
+
<tr>
|
|
231
|
+
<td rowspan="1" colSpan="1" >**Parameter Name**</td>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
<td rowspan="1" colSpan="1" >**Default Value**</td>
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
<td rowspan="1" colSpan="1" >**Description**</td>
|
|
241
|
+
</tr>
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<tr>
|
|
245
|
+
<td rowspan="1" colSpan="1" >children</td>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
<td rowspan="1" colSpan="1" >Header center component of the custom session list.<br>Default imports `<Search>` and `<ConversationCreate>`.</td>
|
|
255
|
+
</tr>
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
<tr>
|
|
259
|
+
<td rowspan="1" colSpan="1" >left</td>
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
<td rowspan="1" colSpan="1" >Left-side component of the custom session list header.</td>
|
|
269
|
+
</tr>
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
<tr>
|
|
273
|
+
<td rowspan="1" colSpan="1" >right</td>
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
<td rowspan="1" colSpan="1" >Right-side component of the custom session list header.</td>
|
|
283
|
+
</tr>
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
<tr>
|
|
287
|
+
<td rowspan="1" colSpan="1" >className</td>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<td rowspan="1" colSpan="1" >String</td>
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
<td rowspan="1" colSpan="1" >Specify the CSS custom name of the root element class.</td>
|
|
297
|
+
</tr>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
<tr>
|
|
301
|
+
<td rowspan="1" colSpan="1" >style</td>
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
<td rowspan="1" colSpan="1" >CSSProperties</td>
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
<td rowspan="1" colSpan="1" >Specify the custom style of the root element.</td>
|
|
311
|
+
</tr>
|
|
312
|
+
</table>
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
Implement a simplified conversation grouping feature
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
Filter conversations by All, unread conversation, one-on-one chat session, and group chat. Click different group buttons to execute different filtering rules.
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
[App.vue]
|
|
328
|
+
``` typescript
|
|
329
|
+
<template>
|
|
330
|
+
<UIKitProvider>
|
|
331
|
+
<ConversationList
|
|
332
|
+
:Header="CustomConversationListHeader"
|
|
333
|
+
:filter="conversationFilter"
|
|
334
|
+
</UIKitProvider>
|
|
335
|
+
</template>
|
|
336
|
+
<script setup lang="ts">
|
|
337
|
+
import { UIKitProvider, ConversationList } from '@tencentcloud/chat-uikit-vue3';
|
|
338
|
+
import type { ConversationModel } from '@tencentcloud/chat-uikit-vue3';
|
|
339
|
+
import CustomConversationListHeader from "./CustomConversationListHeader.vue";
|
|
340
|
+
const conversationFilter = ref<((conversations: ConversationModel[]) => ConversationModel[]) | undefined>(undefined);
|
|
341
|
+
const handleFilterChange = (filter: (conversations: ConversationModel[]) => ConversationModel[]) => {
|
|
342
|
+
conversationFilter.value = filter;
|
|
343
|
+
};
|
|
344
|
+
provide('setConversationFilter', handleFilterChange);
|
|
345
|
+
</script>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
[CustomConversationListHeader.vue]
|
|
350
|
+
``` typescript
|
|
351
|
+
<template>
|
|
352
|
+
<div class="customHeader">
|
|
353
|
+
<div class="filterTabs">
|
|
354
|
+
<button
|
|
355
|
+
v-for="(label, key) in filterLabels"
|
|
356
|
+
:key="key"
|
|
357
|
+
:class="[
|
|
358
|
+
'filterTab',
|
|
359
|
+
{ ['active']: activeFilter === key }
|
|
360
|
+
]"
|
|
361
|
+
@click="handleFilterClick(key as FilterType)"
|
|
362
|
+
>
|
|
363
|
+
{{ label }}
|
|
364
|
+
</button>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
</template>
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
<script lang="ts" setup>
|
|
371
|
+
import { ref, inject } from 'vue';
|
|
372
|
+
import type { ConversationModel } from '@tencentcloud/chat-uikit-vue3';
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
type FilterType = 'All' | 'Unread' | 'C2C' | 'Group';
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
interface Props {
|
|
379
|
+
children?: any;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
defineProps<Props>();
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
const activeFilter = ref<FilterType>('All');
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
const filterLabels: Record<FilterType, string> = {
|
|
390
|
+
Create and bind policy Query instance Reset instance access password
|
|
391
|
+
Unread
|
|
392
|
+
C2C: 'One-on-one chat'
|
|
393
|
+
Group chat
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
const conversationGroupFilter: Record<string, (conversationList: ConversationModel[]) => ConversationModel[]> = {
|
|
398
|
+
All: (conversationList: ConversationModel[]) => conversationList,
|
|
399
|
+
Unread: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.unreadCount > 0),
|
|
400
|
+
C2C: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.type === 'C2C'),
|
|
401
|
+
Group: (conversationList: ConversationModel[]) => conversationList?.filter((item: ConversationModel) => item.type === 'GROUP'),
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
const setFilter = inject<(filter: any) => void>('setConversationFilter');
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
const handleFilterClick = (filterType: FilterType) => {
|
|
409
|
+
activeFilter.value = filterType;
|
|
410
|
+
const filterFn = conversationGroupFilter[filterType];
|
|
411
|
+
setFilter?.(filterFn);
|
|
412
|
+
};
|
|
413
|
+
</script>
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
<style lang="scss">
|
|
417
|
+
.customHeader {
|
|
418
|
+
padding: 8px 16px;
|
|
419
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
420
|
+
display: flex;
|
|
421
|
+
flex-direction: column;
|
|
422
|
+
gap: 12px;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
.filterTabs {
|
|
427
|
+
display: flex;
|
|
428
|
+
gap: 4px;
|
|
429
|
+
align-items: center;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
.filterTab {
|
|
434
|
+
position: relative;
|
|
435
|
+
display: flex;
|
|
436
|
+
align-items: center;
|
|
437
|
+
gap: 4px;
|
|
438
|
+
padding: 6px 12px;
|
|
439
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
440
|
+
border-radius: 16px;
|
|
441
|
+
background: transparent;
|
|
442
|
+
cursor: pointer;
|
|
443
|
+
font-size: 12px;
|
|
444
|
+
font-weight: 400;
|
|
445
|
+
color: #3b3d43;
|
|
446
|
+
transition: all 0.2s ease;
|
|
447
|
+
outline: none;
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
&.active {
|
|
451
|
+
border: 1px solid #1c66e5;
|
|
452
|
+
color: #1c66e5;
|
|
453
|
+
font-weight: 500;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
</style>
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
## Props
|
|
463
|
+
<table>
|
|
464
|
+
<tr>
|
|
465
|
+
<td rowspan="1" colSpan="1" >**Parameter Name**</td>
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
<td rowspan="1" colSpan="1" >**Type**</td>
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
<td rowspan="1" colSpan="1" >**Default Value**</td>
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
<td rowspan="1" colSpan="1" >**Description**</td>
|
|
475
|
+
</tr>
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
<tr>
|
|
479
|
+
<td rowspan="1" colSpan="1" >enableSearch</td>
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
<td rowspan="1" colSpan="1" >Boolean</td>
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
<td rowspan="1" colSpan="1" >true</td>
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
<td rowspan="1" colSpan="1" >Control whether to display the Conversation Search feature.</td>
|
|
489
|
+
</tr>
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
<tr>
|
|
493
|
+
<td rowspan="1" colSpan="1" >enableCreate</td>
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
<td rowspan="1" colSpan="1" >Boolean</td>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
<td rowspan="1" colSpan="1" >true</td>
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
<td rowspan="1" colSpan="1" >Control whether to display the Create Session feature.</td>
|
|
503
|
+
</tr>
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
<tr>
|
|
507
|
+
<td rowspan="1" colSpan="1" >enableActions</td>
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
<td rowspan="1" colSpan="1" >Boolean</td>
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
<td rowspan="1" colSpan="1" >true</td>
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
<td rowspan="1" colSpan="1" >Control whether to display the conversation operation feature.</td>
|
|
517
|
+
</tr>
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
<tr>
|
|
521
|
+
<td rowspan="1" colSpan="1" >actionsConfig</td>
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
<td rowspan="1" colSpan="1" >ConversationActionsConfig</td>
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
<td rowspan="1" colSpan="1" >Used for custom session operation configuration.</td>
|
|
531
|
+
</tr>
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
<tr>
|
|
535
|
+
<td rowspan="1" colSpan="1" >Header</td>
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
<td rowspan="1" colSpan="1" >Header</td>
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
<td rowspan="1" colSpan="1" >Custom Header component.</td>
|
|
545
|
+
</tr>
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
<tr>
|
|
549
|
+
<td rowspan="1" colSpan="1" >List</td>
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
<td rowspan="1" colSpan="1" >List</td>
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
<td rowspan="1" colSpan="1" >Custom session list component.</td>
|
|
559
|
+
</tr>
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
<tr>
|
|
563
|
+
<td rowspan="1" colSpan="1" >Preview</td>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
<td rowspan="1" colSpan="1" >[ConversationPreview](https://write.woa.com/document/186960335138078720)</td>
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
<td rowspan="1" colSpan="1" >Session preview component.</td>
|
|
573
|
+
</tr>
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
<tr>
|
|
577
|
+
<td rowspan="1" colSpan="1" >ConversationCreate</td>
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
<td rowspan="1" colSpan="1" >ConversationCreate</td>
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
<td rowspan="1" colSpan="1" >Custom conversation component.</td>
|
|
587
|
+
</tr>
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
<tr>
|
|
591
|
+
<td rowspan="1" colSpan="1" >ConversationSearch</td>
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
<td rowspan="1" colSpan="1" >[Search](https://write.woa.com/document/186960410207154176)</td>
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
<td rowspan="1" colSpan="1" >Custom session search component.</td>
|
|
601
|
+
</tr>
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
<tr>
|
|
605
|
+
<td rowspan="1" colSpan="1" >ConversationActions</td>
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
<td rowspan="1" colSpan="1" >[ConversationActions](https://write.woa.com/document/186960379083898880)</td>
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
<td rowspan="1" colSpan="1" >Custom Conversation Operation Component.</td>
|
|
615
|
+
</tr>
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
<tr>
|
|
619
|
+
<td rowspan="1" colSpan="1" >Avatar</td>
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
<td rowspan="1" colSpan="1" >Avatar</td>
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
<td rowspan="1" colSpan="1" >Custom avatar component.</td>
|
|
629
|
+
</tr>
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
<tr>
|
|
633
|
+
<td rowspan="1" colSpan="1" >PlaceholderEmptyList</td>
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
<td rowspan="1" colSpan="1" ><PlaceHolder type={PlaceHolderTypes.NO_CONVERSATIONS} /></td>
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
<td rowspan="1" colSpan="1" >Placeholder element when custom session list is empty.</td>
|
|
643
|
+
</tr>
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
<tr>
|
|
647
|
+
<td rowspan="1" colSpan="1" >PlaceholderLoading</td>
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
<td rowspan="1" colSpan="1" ><PlaceHolder type={PlaceHolderTypes.LOADING} /></td>
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
<td rowspan="1" colSpan="1" >Placeholder element during custom session list loading.</td>
|
|
657
|
+
</tr>
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
<tr>
|
|
661
|
+
<td rowspan="1" colSpan="1" >PlaceholderLoadError</td>
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
<td rowspan="1" colSpan="1" >Component</td>
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
<td rowspan="1" colSpan="1" ><PlaceHolder type={PlaceHolderTypes.WRONG} /></td>
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
<td rowspan="1" colSpan="1" >Placeholder element for custom session list load error.</td>
|
|
671
|
+
</tr>
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
<tr>
|
|
675
|
+
<td rowspan="1" colSpan="1" >filter</td>
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
<td rowspan="1" colSpan="1" >(conversationList: ConversationModel[]) => ConversationModel[]</td>
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
<td rowspan="1" colSpan="1" >Functions for filtering session list.</td>
|
|
685
|
+
</tr>
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
<tr>
|
|
689
|
+
<td rowspan="1" colSpan="1" >sort</td>
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
<td rowspan="1" colSpan="1" >(conversationList: ConversationModel[]) => ConversationModel[]</td>
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
<td rowspan="1" colSpan="1" >Functions for sorting session list.</td>
|
|
699
|
+
</tr>
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
<tr>
|
|
703
|
+
<td rowspan="1" colSpan="1" >onConversationSelect</td>
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
<td rowspan="1" colSpan="1" >(conversation: ConversationModel) => void;</td>
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
<td rowspan="1" colSpan="1" >Callback function when clicking a session, with the clicked conversation object as parameter.</td>
|
|
713
|
+
</tr>
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
<tr>
|
|
717
|
+
<td rowspan="1" colSpan="1" >onBeforeCreateConversation</td>
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
<td rowspan="1" colSpan="1" >(params: CreateParams) => CreateParams;</td>
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
<td rowspan="1" colSpan="1" >Custom action executed before session creation, with parameters required for creating a session.</td>
|
|
727
|
+
</tr>
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
<tr>
|
|
731
|
+
<td rowspan="1" colSpan="1" >onConversationCreate</td>
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
<td rowspan="1" colSpan="1" >(conversation: ConversationModel) => void;</td>
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
<td rowspan="1" colSpan="1" >Callback function after session creation, with the created session object as parameter.</td>
|
|
741
|
+
</tr>
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
<tr>
|
|
745
|
+
<td rowspan="1" colSpan="1" >className</td>
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
<td rowspan="1" colSpan="1" >String</td>
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
<td rowspan="1" colSpan="1" >Specify the CSS custom name of the root element class.</td>
|
|
755
|
+
</tr>
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
<tr>
|
|
759
|
+
<td rowspan="1" colSpan="1" >style</td>
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
<td rowspan="1" colSpan="1" >CSSProperties</td>
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
<td rowspan="1" colSpan="1" >-</td>
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
<td rowspan="1" colSpan="1" >Specify the custom style of the root element.</td>
|
|
769
|
+
</tr>
|
|
770
|
+
</table>
|