@bcc-code/vue-bcc-chat-ui 6.4.1 → 7.0.1
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/dist/assets/index-B_y7vs2y.js +12519 -0
- package/dist/assets/index-uEhSMl7W.css +1 -0
- package/dist/assets/primeicons-C6QP2o4f.woff2 +0 -0
- package/dist/assets/primeicons-DMOk5skT.eot +0 -0
- package/dist/assets/primeicons-Dr5RGzOO.svg +345 -0
- package/dist/assets/primeicons-MpK4pl85.ttf +0 -0
- package/dist/assets/primeicons-WjwUDZjB.woff +0 -0
- package/dist/assets/web-Cp3vw--c.js +1 -0
- package/dist/assets/web-DSc1BjG7.js +1 -0
- package/dist/index.html +13 -0
- package/package.json +42 -51
- package/README.md +0 -89
- package/dist/App.vue.d.ts +0 -2
- package/dist/chat/accessToken.d.ts +0 -2
- package/dist/chat/bccuiExtension.d.ts +0 -7
- package/dist/chat/captionedAttachment.d.ts +0 -7
- package/dist/chat/captionedAttachmentExtension.d.ts +0 -7
- package/dist/chat/cometChatPatches.d.ts +0 -3
- package/dist/chat/connection.d.ts +0 -14
- package/dist/chat/data.d.ts +0 -21
- package/dist/chat/environment.d.ts +0 -3
- package/dist/chat/index.d.ts +0 -450
- package/dist/chat/logger.d.ts +0 -12
- package/dist/chat/login.d.ts +0 -14
- package/dist/chat/message.d.ts +0 -15
- package/dist/chat/replyExtension.d.ts +0 -26
- package/dist/chat/replyStyle.d.ts +0 -30
- package/dist/chat/rescheduleExtension.d.ts +0 -22
- package/dist/chat/scheduledMessage.d.ts +0 -4
- package/dist/chat/styleFix.d.ts +0 -14
- package/dist/chat/theme.d.ts +0 -408
- package/dist/chat/translations.d.ts +0 -3
- package/dist/chat/types.d.ts +0 -123
- package/dist/chat/uiKit.d.ts +0 -10
- package/dist/component-overrides/BccBubbleWrapper.vue.d.ts +0 -156
- package/dist/component-overrides/CometChatMessageListOverride.vue.d.ts +0 -2
- package/dist/components/BccAttachmentBox.vue.d.ts +0 -29
- package/dist/components/BccAttachmentPreview.vue.d.ts +0 -23
- package/dist/components/BccChatMessageBubble.vue.d.ts +0 -99
- package/dist/components/BccChatMessageList.vue.d.ts +0 -82
- package/dist/components/BccChatMessages.vue.d.ts +0 -33
- package/dist/components/BccChatSendButton.vue.d.ts +0 -4
- package/dist/components/BccCometChatFullScreenViewer.vue.d.ts +0 -24
- package/dist/components/BccFileBubble.vue.d.ts +0 -70
- package/dist/components/BccImageBubble.vue.d.ts +0 -27
- package/dist/components/BccReplyBox.vue.d.ts +0 -36
- package/dist/components/BccReplyPreview.vue.d.ts +0 -30
- package/dist/components/BccScheduledMessageIcon.vue.d.ts +0 -2
- package/dist/components/BccScheduledMessageModal.vue.d.ts +0 -31
- package/dist/components/BccScheduledMessages.vue.d.ts +0 -25
- package/dist/components/BccScheduledSendButton.vue.d.ts +0 -14
- package/dist/index.d.ts +0 -4
- package/dist/main.d.ts +0 -1
- package/dist/offline/cometChatAPIInterceptor.d.ts +0 -2
- package/dist/offline/cometChatWSInterceptor.d.ts +0 -2
- package/dist/offline/connectivity.d.ts +0 -5
- package/dist/offline/failedSendingRetry.d.ts +0 -4
- package/dist/offline/index.d.ts +0 -9
- package/dist/offline/offlineStoreLocalStorage.d.ts +0 -29
- package/dist/offline/types.d.ts +0 -67
- package/dist/vite.svg +0 -1
- package/dist/vue-bcc-chat-ui.css +0 -1
- package/dist/vue-bcc-chat-ui.js +0 -86335
- package/dist/vue-bcc-chat-ui.js.map +0 -1
- package/src/components/BccAttachmentBox.vue +0 -133
- package/src/components/BccAttachmentPreview.vue +0 -57
- package/src/components/BccChatMessageBubble.vue +0 -219
- package/src/components/BccChatMessageList.vue +0 -488
- package/src/components/BccChatMessages.vue +0 -212
- package/src/components/BccChatSendButton.vue +0 -91
- package/src/components/BccCometChatFullScreenViewer.vue +0 -118
- package/src/components/BccFileBubble.vue +0 -137
- package/src/components/BccImageBubble.vue +0 -75
- package/src/components/BccReplyBox.vue +0 -141
- package/src/components/BccReplyPreview.vue +0 -113
- package/src/components/BccScheduledMessageIcon.vue +0 -65
- package/src/components/BccScheduledMessageModal.vue +0 -70
- package/src/components/BccScheduledMessages.vue +0 -125
- package/src/components/BccScheduledSendButton.vue +0 -118
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as o}from"./index-B_y7vs2y.js";class e extends o{constructor(){super(),this._lastWindow=null}async open(s){this._lastWindow=window.open(s.url,s.windowName||"_blank")}async close(){return new Promise((s,n)=>{this._lastWindow!=null?(this._lastWindow.close(),this._lastWindow=null,s()):n("No active window to close!")})}}const i=new e;export{i as Browser,e as BrowserWeb};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as t}from"./index-B_y7vs2y.js";class s extends t{constructor(){super(),this.handleVisibilityChange=()=>{const e={isActive:document.hidden!==!0};this.notifyListeners("appStateChange",e),document.hidden?this.notifyListeners("pause",null):this.notifyListeners("resume",null)},document.addEventListener("visibilitychange",this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented("Not implemented on web.")}async getInfo(){throw this.unimplemented("Not implemented on web.")}async getLaunchUrl(){return{url:""}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented("Not implemented on web.")}}export{s as AppWeb};
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>BCC Chat Custom UI</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-B_y7vs2y.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-uEhSMl7W.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,72 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcc-code/vue-bcc-chat-ui",
|
|
3
|
-
"author": "bcc-code",
|
|
4
|
-
"license": "Apache-2.0",
|
|
5
|
-
"version": "6.4.1",
|
|
6
|
-
"type": "module",
|
|
7
3
|
"private": false,
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"src/components"
|
|
11
|
-
],
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "git+https://github.com/bcc-code/bcc-chat.git"
|
|
15
|
-
},
|
|
4
|
+
"version": "7.0.1",
|
|
5
|
+
"type": "module",
|
|
16
6
|
"module": "./dist/vue-bcc-chat-ui.js",
|
|
17
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
18
11
|
"exports": {
|
|
19
12
|
".": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/vue-bcc-chat-ui.js"
|
|
22
15
|
},
|
|
23
|
-
"./style.css":
|
|
24
|
-
"import": "./dist/vue-bcc-chat-ui.css",
|
|
25
|
-
"require": "./dist/vue-bcc-chat-ui.css"
|
|
26
|
-
}
|
|
16
|
+
"./style.css": "./dist/style.css"
|
|
27
17
|
},
|
|
28
18
|
"publishConfig": {
|
|
29
19
|
"access": "public"
|
|
30
20
|
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@auth0/auth0-spa-js": "^2.17.0",
|
|
23
|
+
"@auth0/auth0-vue": "^2.5.0",
|
|
24
|
+
"@bcc-code/component-library-vue": "^0.8.8",
|
|
25
|
+
"@bcc-code/design-tokens": "^5.1.49",
|
|
26
|
+
"@capacitor/app": "^5.0.8",
|
|
27
|
+
"@capacitor/browser": "^5.2.1",
|
|
28
|
+
"@capacitor/core": "^5.7.8",
|
|
29
|
+
"@cometchat/chat-sdk-javascript": "4.1.8",
|
|
30
|
+
"@primeuix/themes": "^2.0.3",
|
|
31
|
+
"dompurify": "^3.3.3",
|
|
32
|
+
"markdown-it": "^14.1.1",
|
|
33
|
+
"primeicons": "^7.0.0",
|
|
34
|
+
"primevue": "^4.5.4",
|
|
35
|
+
"vue": "^3.5.29"
|
|
36
|
+
},
|
|
31
37
|
"peerDependencies": {
|
|
32
|
-
"
|
|
33
|
-
"vue": "^3.0.0"
|
|
38
|
+
"vue": "^3.5.29"
|
|
34
39
|
},
|
|
35
40
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@tailwindcss/
|
|
38
|
-
"@tailwindcss/forms": "^0.5.10",
|
|
39
|
-
"@tailwindcss/typography": "^0.5.16",
|
|
40
|
-
"@types/dompurify": "^3.2.0",
|
|
41
|
+
"@playwright/test": "^1.53.2",
|
|
42
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
41
43
|
"@types/markdown-it": "^14.1.2",
|
|
42
|
-
"@types/node": "^20.17.23",
|
|
43
44
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"vite-plugin-dts": "^4.5.3",
|
|
52
|
-
"vue": "^3.5.13"
|
|
53
|
-
},
|
|
54
|
-
"dependencies": {
|
|
55
|
-
"@cometchat/chat-sdk-javascript": "4.1.8",
|
|
56
|
-
"@cometchat/chat-uikit-vue": "4.3.32",
|
|
57
|
-
"@cometchat/uikit-elements": "4.3.23",
|
|
58
|
-
"@cometchat/uikit-resources": "4.3.24",
|
|
59
|
-
"@cometchat/uikit-shared": "4.3.30",
|
|
60
|
-
"dompurify": "^3.2.4",
|
|
61
|
-
"fuse.js": "^7.1.0",
|
|
62
|
-
"markdown-it": "^14.1.0",
|
|
63
|
-
"panzoom": "^9.4.3"
|
|
45
|
+
"jsdom": "^29.0.1",
|
|
46
|
+
"tailwindcss": "^4.2.2",
|
|
47
|
+
"typescript": "^5.9.3",
|
|
48
|
+
"vite": "^5.4.21",
|
|
49
|
+
"vite-plugin-dts": "^4.5.4",
|
|
50
|
+
"vitest": "^1.6.1",
|
|
51
|
+
"vue-tsc": "^1.8.27"
|
|
64
52
|
},
|
|
65
|
-
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a",
|
|
66
53
|
"scripts": {
|
|
67
|
-
"dev": "vite",
|
|
68
|
-
"build": "
|
|
69
|
-
"
|
|
70
|
-
"
|
|
54
|
+
"dev": "vite --port 5174",
|
|
55
|
+
"build": "vite build --mode library && vite build --mode demo",
|
|
56
|
+
"build:lib": "vite build --mode library",
|
|
57
|
+
"build:demo": "vite build --mode demo",
|
|
58
|
+
"preview": "vite preview --port 5174",
|
|
59
|
+
"test:unit": "vitest run",
|
|
60
|
+
"test:ui": "playwright test",
|
|
61
|
+
"test:ui:update": "playwright test --update-snapshots"
|
|
71
62
|
}
|
|
72
63
|
}
|
package/README.md
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# BCC Chat UI
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Installation
|
|
5
|
-
|
|
6
|
-
### Vue Components
|
|
7
|
-
|
|
8
|
-
1. Add package to project
|
|
9
|
-
```bash
|
|
10
|
-
# npm
|
|
11
|
-
npm install @bcc-code/vue-bcc-chat-ui
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
2. Register component in the Vue App
|
|
15
|
-
```ts
|
|
16
|
-
import chat from "@bcc-code/vue-bcc-chat-ui";
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(chat, { environment: "prod", themeMode: "light" });
|
|
20
|
-
|
|
21
|
-
await chat.login("access-token")
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
3. Use component in Vue
|
|
25
|
-
```ts
|
|
26
|
-
<script lang="ts" setup>
|
|
27
|
-
import { BccChatMessageList } from '@bcc-code/vue-bcc-chat-ui';
|
|
28
|
-
|
|
29
|
-
const authToken = ref('....');
|
|
30
|
-
const chatUid = ref('my-chat-id');
|
|
31
|
-
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<template>
|
|
35
|
-
<div>
|
|
36
|
-
<BccChatMessageList :chatUid="chatUid" />
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## Styling
|
|
44
|
-
|
|
45
|
-
The component can by styled with the folowing styles
|
|
46
|
-
|
|
47
|
-
```css
|
|
48
|
-
.bcc-chat-message-list {
|
|
49
|
-
/* 1. Wrapper for Messages component */
|
|
50
|
-
.cc-messages-wrapper {
|
|
51
|
-
|
|
52
|
-
/* 1.1 Messages component */
|
|
53
|
-
.cc-messages-wrapper__messages {
|
|
54
|
-
|
|
55
|
-
/* 1.1.1 Wrapper for Messages List */
|
|
56
|
-
.cc-messages-wrapper__messages-list {
|
|
57
|
-
|
|
58
|
-
/* 1.1.1.1 Messages List header view */
|
|
59
|
-
.cc__messagelist__headerview {
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* 1.1.1.2 Messages List messages */
|
|
63
|
-
.cc-messagelist {
|
|
64
|
-
.cc-list__wrapper {
|
|
65
|
-
.cc-list__header {
|
|
66
|
-
}
|
|
67
|
-
.cc-list__list {
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* 1.1.1.3 Message List footer */
|
|
73
|
-
.cc__messagelist__footerview {
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* 1.1.2 Wrapper for Composer */
|
|
78
|
-
.cc-messages-wrapper__composer {
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* 1.1.3 Wrapper for Live Reaction */
|
|
82
|
-
.cc__messages__livereaction {
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
```
|
package/dist/App.vue.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MessageComposerConfiguration } from '@cometchat/uikit-shared';
|
|
2
|
-
export declare function sendMediaMessage(msgComposerConfig: MessageComposerConfiguration & {
|
|
3
|
-
parentMessageId: number;
|
|
4
|
-
}, fileObject: File, receiverId: string, receiverType: string, messageType: string, dimensions?: {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
}, caption?: string): boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const connected: import('vue').ComputedRef<boolean>;
|
|
2
|
-
export declare const connecting: import('vue').ComputedRef<boolean>;
|
|
3
|
-
export declare function connect(id?: string): Promise<void>;
|
|
4
|
-
export declare function disconnectAll(): Promise<void>;
|
|
5
|
-
export declare function disconnect(id?: string): Promise<void>;
|
|
6
|
-
export declare const setAccessToken: (token: string) => Promise<void>;
|
|
7
|
-
declare const _default: {
|
|
8
|
-
setAccessToken: (token: string) => Promise<void>;
|
|
9
|
-
connect: typeof connect;
|
|
10
|
-
disconnect: typeof disconnect;
|
|
11
|
-
connected: import('vue').ComputedRef<boolean>;
|
|
12
|
-
connecting: import('vue').ComputedRef<boolean>;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
package/dist/chat/data.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { BaseMessage, Group, User } from '@cometchat/chat-sdk-javascript';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
import { ParticipantInfo, PersonSettings, SearchedItems, UserChatInfo } from './types';
|
|
4
|
-
export declare function getGroup(groupUid: string): Promise<Group | null | undefined>;
|
|
5
|
-
export declare function clearGroupChatCount(groupUid: string): Promise<void>;
|
|
6
|
-
export declare function getGroupOnlineCount(groupUid: string): Promise<number>;
|
|
7
|
-
export declare function getGroupMembersInfo(groupUid: string): Promise<ParticipantInfo[]>;
|
|
8
|
-
export declare const userChats: Ref<UserChatInfo[]>;
|
|
9
|
-
export declare function getUserChats(): Promise<UserChatInfo[]>;
|
|
10
|
-
export declare function searchChat(searchQuery: string, limit?: number): SearchedItems | undefined;
|
|
11
|
-
export declare function scrollToMessage(messageId: string): void;
|
|
12
|
-
export declare function getSenderDisplayName(message: BaseMessage | undefined, group?: Ref<Group | undefined>): any;
|
|
13
|
-
export declare function getMessageTextPreview(message?: BaseMessage, showEmoji?: boolean, showAttachmentName?: boolean): string;
|
|
14
|
-
export declare function proxyImage(imageUrl: string): string;
|
|
15
|
-
export declare function getMutedUntil(chatUid: string): Promise<string | null>;
|
|
16
|
-
export declare function muteChat(chatUid: string, mutedUntil: string | null): Promise<string | null>;
|
|
17
|
-
export declare function getMyChatSettings(): Promise<PersonSettings>;
|
|
18
|
-
export declare function updateMyChatSettings(settings: Partial<PersonSettings>): Promise<PersonSettings>;
|
|
19
|
-
export declare function setMuteAll(mute: boolean): Promise<boolean>;
|
|
20
|
-
export declare function toggleMuteAll(): Promise<boolean>;
|
|
21
|
-
export declare function toMarkdownHtml(str: string, mentionedUsers?: User[]): string;
|