@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.
Files changed (79) hide show
  1. package/dist/assets/index-B_y7vs2y.js +12519 -0
  2. package/dist/assets/index-uEhSMl7W.css +1 -0
  3. package/dist/assets/primeicons-C6QP2o4f.woff2 +0 -0
  4. package/dist/assets/primeicons-DMOk5skT.eot +0 -0
  5. package/dist/assets/primeicons-Dr5RGzOO.svg +345 -0
  6. package/dist/assets/primeicons-MpK4pl85.ttf +0 -0
  7. package/dist/assets/primeicons-WjwUDZjB.woff +0 -0
  8. package/dist/assets/web-Cp3vw--c.js +1 -0
  9. package/dist/assets/web-DSc1BjG7.js +1 -0
  10. package/dist/index.html +13 -0
  11. package/package.json +42 -51
  12. package/README.md +0 -89
  13. package/dist/App.vue.d.ts +0 -2
  14. package/dist/chat/accessToken.d.ts +0 -2
  15. package/dist/chat/bccuiExtension.d.ts +0 -7
  16. package/dist/chat/captionedAttachment.d.ts +0 -7
  17. package/dist/chat/captionedAttachmentExtension.d.ts +0 -7
  18. package/dist/chat/cometChatPatches.d.ts +0 -3
  19. package/dist/chat/connection.d.ts +0 -14
  20. package/dist/chat/data.d.ts +0 -21
  21. package/dist/chat/environment.d.ts +0 -3
  22. package/dist/chat/index.d.ts +0 -450
  23. package/dist/chat/logger.d.ts +0 -12
  24. package/dist/chat/login.d.ts +0 -14
  25. package/dist/chat/message.d.ts +0 -15
  26. package/dist/chat/replyExtension.d.ts +0 -26
  27. package/dist/chat/replyStyle.d.ts +0 -30
  28. package/dist/chat/rescheduleExtension.d.ts +0 -22
  29. package/dist/chat/scheduledMessage.d.ts +0 -4
  30. package/dist/chat/styleFix.d.ts +0 -14
  31. package/dist/chat/theme.d.ts +0 -408
  32. package/dist/chat/translations.d.ts +0 -3
  33. package/dist/chat/types.d.ts +0 -123
  34. package/dist/chat/uiKit.d.ts +0 -10
  35. package/dist/component-overrides/BccBubbleWrapper.vue.d.ts +0 -156
  36. package/dist/component-overrides/CometChatMessageListOverride.vue.d.ts +0 -2
  37. package/dist/components/BccAttachmentBox.vue.d.ts +0 -29
  38. package/dist/components/BccAttachmentPreview.vue.d.ts +0 -23
  39. package/dist/components/BccChatMessageBubble.vue.d.ts +0 -99
  40. package/dist/components/BccChatMessageList.vue.d.ts +0 -82
  41. package/dist/components/BccChatMessages.vue.d.ts +0 -33
  42. package/dist/components/BccChatSendButton.vue.d.ts +0 -4
  43. package/dist/components/BccCometChatFullScreenViewer.vue.d.ts +0 -24
  44. package/dist/components/BccFileBubble.vue.d.ts +0 -70
  45. package/dist/components/BccImageBubble.vue.d.ts +0 -27
  46. package/dist/components/BccReplyBox.vue.d.ts +0 -36
  47. package/dist/components/BccReplyPreview.vue.d.ts +0 -30
  48. package/dist/components/BccScheduledMessageIcon.vue.d.ts +0 -2
  49. package/dist/components/BccScheduledMessageModal.vue.d.ts +0 -31
  50. package/dist/components/BccScheduledMessages.vue.d.ts +0 -25
  51. package/dist/components/BccScheduledSendButton.vue.d.ts +0 -14
  52. package/dist/index.d.ts +0 -4
  53. package/dist/main.d.ts +0 -1
  54. package/dist/offline/cometChatAPIInterceptor.d.ts +0 -2
  55. package/dist/offline/cometChatWSInterceptor.d.ts +0 -2
  56. package/dist/offline/connectivity.d.ts +0 -5
  57. package/dist/offline/failedSendingRetry.d.ts +0 -4
  58. package/dist/offline/index.d.ts +0 -9
  59. package/dist/offline/offlineStoreLocalStorage.d.ts +0 -29
  60. package/dist/offline/types.d.ts +0 -67
  61. package/dist/vite.svg +0 -1
  62. package/dist/vue-bcc-chat-ui.css +0 -1
  63. package/dist/vue-bcc-chat-ui.js +0 -86335
  64. package/dist/vue-bcc-chat-ui.js.map +0 -1
  65. package/src/components/BccAttachmentBox.vue +0 -133
  66. package/src/components/BccAttachmentPreview.vue +0 -57
  67. package/src/components/BccChatMessageBubble.vue +0 -219
  68. package/src/components/BccChatMessageList.vue +0 -488
  69. package/src/components/BccChatMessages.vue +0 -212
  70. package/src/components/BccChatSendButton.vue +0 -91
  71. package/src/components/BccCometChatFullScreenViewer.vue +0 -118
  72. package/src/components/BccFileBubble.vue +0 -137
  73. package/src/components/BccImageBubble.vue +0 -75
  74. package/src/components/BccReplyBox.vue +0 -141
  75. package/src/components/BccReplyPreview.vue +0 -113
  76. package/src/components/BccScheduledMessageIcon.vue +0 -65
  77. package/src/components/BccScheduledMessageModal.vue +0 -70
  78. package/src/components/BccScheduledMessages.vue +0 -125
  79. package/src/components/BccScheduledSendButton.vue +0 -118
@@ -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};
@@ -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
- "files": [
9
- "dist",
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
- "import": "./dist/vue-bcc-chat-ui.js",
21
- "require": "./dist/vue-bcc-chat-ui.js"
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
- "@bcc-code/component-library-vue": "*",
33
- "vue": "^3.0.0"
38
+ "vue": "^3.5.29"
34
39
  },
35
40
  "devDependencies": {
36
- "@bcc-code/component-library-vue": "latest",
37
- "@tailwindcss/aspect-ratio": "^0.4.2",
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
- "autoprefixer": "^10.4.20",
45
- "path": "^0.12.7",
46
- "postcss": "^8.5.3",
47
- "sass": "^1.85.1",
48
- "tailwindcss": "^3.4.17",
49
- "typescript": "^5.8.2",
50
- "vite": "^6.2.0",
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": "npm run hotfix && vite build",
69
- "preview": "vite preview",
70
- "hotfix": "node applyHotfix.mjs"
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,2 +0,0 @@
1
- export declare function getAccessToken(): string | null;
2
- export declare function storeAccessToken(token: string | null | undefined): void;
@@ -1,7 +0,0 @@
1
- import { ExtensionsDataSource } from '@cometchat/chat-uikit-vue';
2
- export declare class BccUiExtension extends ExtensionsDataSource {
3
- constructor();
4
- enable(): void;
5
- addExtension(): void;
6
- getExtensionId(): string;
7
- }
@@ -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,7 +0,0 @@
1
- import { ExtensionsDataSource } from '@cometchat/chat-uikit-vue';
2
- export declare class CaptionedAttachmentExtension extends ExtensionsDataSource {
3
- constructor();
4
- enable(): void;
5
- addExtension(): void;
6
- getExtensionId(): string;
7
- }
@@ -1,3 +0,0 @@
1
- import { CometChatMessages } from '@cometchat/chat-uikit-vue';
2
- declare const patchedCometChatMessages: typeof CometChatMessages;
3
- export { patchedCometChatMessages as CometChatMessages };
@@ -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;
@@ -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;
@@ -1,3 +0,0 @@
1
- import { ChatEnvironmentConfig, Environment } from './types';
2
- export declare function getCurrentEnvironment(): ChatEnvironmentConfig;
3
- export declare function setCurrentEnvironment(env: Environment): void;