Socket
Socket
Sign inDemoInstall

@tencentcloud/chat-uikit-vue

Package Overview
Dependencies
Maintainers
19
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tencentcloud/chat-uikit-vue - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

components/TUIChat/message-input-toolbar/style/uni.scss

14

CHANGELOG.md

@@ -1,5 +0,11 @@

## [2.0.5] (2023-02-04)
## [2.0.6] (2024-03-01)
### Features
- 升级 universal api 引入方式
## [2.0.5] (2024-02-04)
### Features
- 新增表情回复功能

@@ -12,3 +18,3 @@ - 添加音频播放动画

## [2.0.4] (2023-01-19)
## [2.0.4] (2024-01-19)

@@ -19,3 +25,3 @@ ### Features

## [2.0.3] (2023-01-12)
## [2.0.3] (2024-01-12)

@@ -31,3 +37,3 @@ ### Features

## [2.0.2] (2023-01-05)
## [2.0.2] (2024-01-05)

@@ -34,0 +40,0 @@ ### Fix

import { createVNode, render, VNode, vueVersion } from "../../../adapter-vue";
import { TUIGlobal } from "../../../utils/universal-api/index";
import { TUIGlobal } from "@tencentcloud/universal-api";
import TOAST_TYPE from "./type";

@@ -4,0 +4,0 @@ import MessageConstructor from "./index.vue";

@@ -6,4 +6,4 @@ import { SuggestionProps, SuggestionKeyDownProps } from "@tiptap/suggestion";

} from "@tencentcloud/chat-uikit-engine";
import { TUIGlobal } from "@tencentcloud/universal-api";
import { isH5 } from "../../../../utils/env";
import { TUIGlobal } from "../../../../utils/universal-api/index";

@@ -10,0 +10,0 @@ let currentConversationID = "";

import TUICore, { TUIConstants } from "@tencentcloud/tui-core";
import { TUIStore, StoreName } from "@tencentcloud/chat-uikit-engine";
import { TUIGlobal } from "@tencentcloud/universal-api";
import { isUniFrameWork } from "../../utils/env";
import { TUIGlobal } from "../../utils/universal-api/index";

@@ -6,0 +6,0 @@ export default class TUIContactServer {

@@ -9,4 +9,4 @@ import TUIChatEngine, {

} from "@tencentcloud/chat-uikit-engine";
import { TUIGlobal } from "@tencentcloud/universal-api";
import { Toast, TOAST_TYPE } from "../../common/Toast/index";
import { TUIGlobal } from "../../../utils/universal-api/index";

@@ -13,0 +13,0 @@ // 解析 用户头像/群头像

@@ -8,5 +8,5 @@ import TUICore, { TUIConstants } from "@tencentcloud/tui-core";

} from "@tencentcloud/chat-uikit-engine";
import { TUIGlobal } from "@tencentcloud/universal-api";
import { CONV_CREATE_TYPE } from "../../constant";
import { isUniFrameWork } from "../../utils/env";
import { TUIGlobal } from "../../utils/universal-api/index";
import createGroupIcon from "../../assets/icon/start-group.svg";

@@ -13,0 +13,0 @@ import createC2CIcon from "../../assets/icon/icon-c2c.svg";

@@ -7,5 +7,5 @@ import TUICore, { TUIConstants, ExtensionInfo } from "@tencentcloud/tui-core";

} from "@tencentcloud/chat-uikit-engine";
import { TUIGlobal } from "@tencentcloud/universal-api";
import settingSVG from "../../assets/icon/setting.svg";
import { isUniFrameWork } from "../../utils/env";
import { TUIGlobal } from "../../utils/universal-api/index";

@@ -12,0 +12,0 @@ export default class TUIGroupServer {

@@ -10,2 +10,3 @@ import TUICore, { TUIConstants } from "@tencentcloud/tui-core";

import { isUniFrameWork } from "../../utils/env";
import { TUIGlobal } from "@tencentcloud/universal-api";

@@ -33,6 +34,2 @@ export default class TUISearchServer {

if (extensionID === TUIConstants.TUIChat.EXTENSION.INPUT_MORE.EXT_ID) {
if (isUniFrameWork) {
// uniapp 暂不支持搜索功能
return [];
}
const searchExtension = {

@@ -47,3 +44,6 @@ weight: 3000,

onClicked: (options: any) => {
TUIStore.update(StoreName.CUSTOM, "isShowInConversationSearch", true);
TUIStore.update(StoreName.SEARCH, "isShowInConversationSearch", true);
isUniFrameWork && TUIGlobal?.navigateTo({
url: "/TUIKit/components/TUISearch/index",
});
},

@@ -50,0 +50,0 @@ },

@@ -16,2 +16,4 @@ import TUIChatEngine, {

import { messageTypeAbstractMap } from "./type";
import { isUniFrameWork } from "../../utils/env";
import { TUIGlobal } from "@tencentcloud/universal-api";

@@ -99,10 +101,13 @@ /**************************************

.then(() => {
TUIStore.update(StoreName.CUSTOM, "currentSearchingStatus", {
TUIStore.update(StoreName.SEARCH, "currentSearchingStatus", {
isSearching: false,
searchType: "global",
});
TUIStore.update(StoreName.CUSTOM, "currentSearchInputValue", {
TUIStore.update(StoreName.SEARCH, "currentSearchInputValue", {
value: "",
searchType: "global",
});
isUniFrameWork && TUIGlobal?.navigateTo({
url: "/TUIKit/components/TUIChat/index",
});
})

@@ -133,5 +138,9 @@ .catch((error: any) => {

}
if (result?.conversation) {
if (result?.conversation?.conversationID) {
// todo: 此处后续需要验证 uniapp 中 conversationModel 是否会失去原型导致解析失败
return result?.conversation?.getShowName();
if(result.conversation?.getShowName){
return result.conversation.getShowName() || result.conversation.conversationID;
}else{
return TUIStore.getConversationModel(result.conversation.conversationID)?.getShowName?.() || result.conversation.conversationID;
}
}

@@ -152,5 +161,9 @@ return "";

}
if (result?.conversation) {
if (result?.conversation?.conversationID) {
// todo: 此处后续需要验证 uniapp 中 conversationModel 是否会失去原型导致解析失败
return result.conversation?.getAvatar();
if(result.conversation.getAvatar){
return result.conversation?.getAvatar();
}else{
return TUIStore.getConversationModel(result.conversation.conversationID).getAvatar();
}
}

@@ -157,0 +170,0 @@ return "";

@@ -25,2 +25,3 @@ const TUISearch = {

结果: "results",
取消: "Cancel",
"[文本]": "[Text Message]",

@@ -27,0 +28,0 @@ "[图片]": "[Image Message]",

@@ -25,2 +25,3 @@ const TUISearch = {

结果: "结果",
取消: "取消",
"[文本]": "[文本]",

@@ -27,0 +28,0 @@ "[图片]": "[图片]",

{
"name": "@tencentcloud/chat-uikit-vue",
"version": "2.0.5",
"version": "2.0.6",
"repository": "https://github.com/TencentCloud/chat-uikit-vue",

@@ -22,2 +22,3 @@ "description": "TUIKit 是基于 IM SDK 实现的一套 UI 组件,其包含会话、聊天、群组、个人资料等功能,基于 TUIKit 组件您可以像搭积木一样快速搭建起自己的业务逻辑。",

"@tencentcloud/tui-core": "latest",
"@tencentcloud/universal-api": "latest",
"@tencentcloud/call-uikit-vue": "latest",

@@ -24,0 +25,0 @@ "@tencentcloud/call-uikit-vue2": "latest",

@@ -23,2 +23,43 @@ ## 关于 chat-uikit-vue

## 含 UI 集成 TUILogin 使用说明
``` javascript
// 引入 TUILogin 模块
import { TUILogin } from '@tencentcloud/tui-core';
```
初始化登录参数 options 配置说明:
| 参数 | 类型 | 含义 |
| --- | --- | --- |
| SDKAppID | number | 云通信应用的 SDKAppID,必填 |
| userID | string | 用户 ID,必填 |
| userSig |string | 用户登录密钥,必填 |
| TIMPush | any | 推送插件实例,uniapp 打包 app 时集成推送插件可用 |
| pushConfig | object | 推送插件配置信息,uniapp 打包 app 时集成推送插件可用 |
| useUploadPlugin | boolean | 是否使用上传插件, 默认 false |
| useProfanityFilterPlugin | boolean | 是否使用本地审核插件,默认 false |
| proxyServer | string | WebSocket 服务器代理地址 |
| fileUploadProxy | string | 图片、视频、文件上传代理地址 |
| fileDownloadProxy | string | 图片、视频、文件下载代理地址 |
| framework | string \| undefined | 使用的 UI 框架,可选值: vue2、vue3、undefined,必填 |
``` javascript
// 初始化登录
TUILogin.login(options);
```
``` javascript
// 登出
TUILogin.logout();
```
``` javascript
// 设置 Chat SDK 日志输出级别
TUILogin.setLogLevel(0); // 0:普通日志级别 1:release 级别日志 2:告警级别 3:错误级别 4:无日志级别
```
``` javascript
// 获取 Chat SDK 实例
const { chat } = TUILogin.getContext();
```
## 相关链接

@@ -25,0 +66,0 @@

import TUICore, { TUILogin, TUIConstants } from "@tencentcloud/tui-core";
import TUIChatEngine, { TUITranslateService } from "@tencentcloud/chat-uikit-engine";
import { TUIGlobal } from "@tencentcloud/universal-api";
import { ITUIComponents, ITUIPlugins } from "./interface";

@@ -7,3 +8,2 @@ import TUILocales from "./locales";

import { isApp } from "./utils/env";
import { TUIGlobal } from "./utils/universal-api/index";
import CallkitPluginServer from "./plugins/extension-server/callkit";

@@ -10,0 +10,0 @@ export default class TUIChatKit {

{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
// Type Checking
"strict": true,
"jsx": "preserve",
"exactOptionalPropertyTypes": true,
"noImplicitAny": false,
// Language and Environment
"target": "ESNext",
// Modules
"moduleResolution": "node",
"experimentalDecorators": true,
// Completeness
"skipLibCheck": true,
// Interop Constraints
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
// Emit
"sourceMap": true,
"strictFunctionTypes": false,
"preserveValueImports": false,
"importsNotUsedAsValues": "preserve",
// "strictFunctionTypes": false,
"isolatedModules": false,
"baseUrl": ".",
"types": ["node", "webpack-env", "vue/types", "vue-router/types"],
"paths": {
"@/*": ["src/*"]
"@/*": ["src/*"],
"@tencentcloud/chat-uikit-engine": ["../chat-uikit-engine/src"],
"@tencentcloud/tui-core": ["../tui-core/src"],
"@tencentcloud/universal-api": ["../../universal-api/src"],
"@tencentcloud/universal-component": ["../../universal-component/src"]
},
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
"lib": ["esnext", "dom"]
},
"files": ["*.d.ts", "**/*.ts", "**/*.tsx", "**/*.vue", "**/*.ts", "**/*.tsx"],
"include": [
"*.d.ts",
"**/*.js",
"**/*.d.ts",
"**/*.ts",
"**/*.tsx",
"**/*.vue",
"**/*.ts",
"**/*.tsx"
"**/*.vue"
],
"exclude": ["node_modules"]
}

@@ -1,2 +0,2 @@

import { getPlatform } from "./universal-api/index";
import { getPlatform } from "@tencentcloud/universal-api";
declare const uni: any;

@@ -3,0 +3,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc