@bcc-code/vue-bcc-chat-ui 1.0.8 → 1.1.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/README.md +63 -8
- package/dist/chat/connection.d.ts +11 -4
- package/dist/chat/index.d.ts +14 -2
- package/dist/chat/uiKit.d.ts +0 -1
- package/dist/components/BccChatMessageList.vue.d.ts +9 -9
- package/dist/index.d.ts +3 -3
- package/dist/vue-bcc-chat-ui.js +8932 -8872
- package/package.json +4 -14
- package/src/components/BccChatMessageList.vue +34 -80
- package/dist/App.vue.d.ts +0 -2
- package/dist/vue-bcc-chat-ui.umd.cjs +0 -3615
package/README.md
CHANGED
|
@@ -11,23 +11,78 @@
|
|
|
11
11
|
npm -i @bcc-code/vue-bcc-chat-ui
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
|
|
15
|
-
2. Use component in Vue
|
|
14
|
+
2. Register component in the Vue App
|
|
16
15
|
```ts
|
|
16
|
+
import { chat } from "@bcc-code/vue-bcc-chat-ui";
|
|
17
|
+
import "@bcc-code/vue-bcc-chat-ui/dist/styles.css";
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
19
|
+
const app = createApp(App);
|
|
20
|
+
app.use(chat, { environment: "prod", themeMode: "light" });
|
|
21
|
+
```
|
|
23
22
|
|
|
23
|
+
3. Use component in Vue
|
|
24
|
+
```ts
|
|
24
25
|
<script lang="ts" setup>
|
|
25
26
|
import { BccChatMessageList } from '@bcc-code/vue-bcc-chat-ui';
|
|
26
27
|
|
|
27
28
|
const authToken = ref('....');
|
|
28
|
-
const
|
|
29
|
+
const chatUid = ref('my-chat-id');
|
|
29
30
|
|
|
30
31
|
</script>
|
|
31
32
|
|
|
33
|
+
<template>
|
|
34
|
+
<div>
|
|
35
|
+
<BccChatMessageList :authToken="token" :chatUid="chatUid" />
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
32
39
|
```
|
|
33
40
|
|
|
41
|
+
|
|
42
|
+
## Styling
|
|
43
|
+
|
|
44
|
+
The component can by styled with the folowing styles
|
|
45
|
+
|
|
46
|
+
```css
|
|
47
|
+
.bcc-chat-message-list {
|
|
48
|
+
/* 1. Wrapper for Messages component */
|
|
49
|
+
.cc-messages-wrapper {
|
|
50
|
+
|
|
51
|
+
/* 1.1 Messages component */
|
|
52
|
+
.cc-messages-wrapper__messages {
|
|
53
|
+
|
|
54
|
+
/* 1.1.1 Wrapper for Messages List */
|
|
55
|
+
.cc-messages-wrapper__messages-list {
|
|
56
|
+
|
|
57
|
+
/* 1.1.1.1 Messages List header view */
|
|
58
|
+
.cc__messagelist__headerview {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* 1.1.1.2 Messages List messages */
|
|
62
|
+
.cc-messagelist {
|
|
63
|
+
.cc-list__wrapper {
|
|
64
|
+
.cc-list__header {
|
|
65
|
+
}
|
|
66
|
+
.cc-list__list {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* 1.1.1.3 Message List footer */
|
|
72
|
+
.cc__messagelist__footerview {
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* 1.1.2 Wrapper for Composer */
|
|
77
|
+
.cc-messages-wrapper__composer {
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* 1.1.3 Wrapper for Live Reaction */
|
|
81
|
+
.cc__messages__livereaction {
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
export declare const setAccessToken: (token: string | null | undefined) => void;
|
|
3
|
+
export declare const connect: (connectionName: string | null | undefined) => Promise<import("@cometchat/chat-sdk-javascript").User | null | undefined>;
|
|
4
|
+
export declare const disconnect: (connectionName: string | null | undefined) => Promise<void>;
|
|
5
|
+
export declare const reconnect: () => Promise<boolean>;
|
|
3
6
|
declare const _default: {
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
accessToken: Ref<string | null | undefined>;
|
|
8
|
+
setAccessToken: (token: string | null | undefined) => void;
|
|
9
|
+
connect: (connectionName: string | null | undefined) => Promise<import("@cometchat/chat-sdk-javascript").User | null | undefined>;
|
|
10
|
+
disconnect: (connectionName: string | null | undefined) => Promise<void>;
|
|
11
|
+
reconnect: () => Promise<boolean>;
|
|
12
|
+
connected: import("vue").ComputedRef<boolean>;
|
|
6
13
|
};
|
|
7
14
|
export default _default;
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
1
2
|
export interface ChatInstallOptions {
|
|
2
3
|
environment: string;
|
|
3
4
|
themeMode: string;
|
|
5
|
+
accessToken?: Ref<string | null | undefined> | null | undefined | string;
|
|
4
6
|
}
|
|
7
|
+
export * as theme from "./theme";
|
|
8
|
+
export * as uiKit from "./uiKit";
|
|
9
|
+
export * as mobileView from "./mobileView";
|
|
10
|
+
export * as connection from "./connection";
|
|
11
|
+
export * as data from "./data";
|
|
12
|
+
export * as environment from "./environment";
|
|
5
13
|
declare const _default: {
|
|
6
14
|
install: (app: any, options: ChatInstallOptions) => Promise<void>;
|
|
7
15
|
environment: {
|
|
@@ -21,8 +29,12 @@ declare const _default: {
|
|
|
21
29
|
isMobileView: any;
|
|
22
30
|
};
|
|
23
31
|
connection: {
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
accessToken: Ref<string | null | undefined>;
|
|
33
|
+
setAccessToken: (token: string | null | undefined) => void;
|
|
34
|
+
connect: (connectionName: string | null | undefined) => Promise<import("@cometchat/chat-sdk-javascript").User | null | undefined>;
|
|
35
|
+
disconnect: (connectionName: string | null | undefined) => Promise<void>;
|
|
36
|
+
reconnect: () => Promise<boolean>;
|
|
37
|
+
connected: import("vue").ComputedRef<boolean>;
|
|
26
38
|
};
|
|
27
39
|
data: {
|
|
28
40
|
getGroup: typeof import("@cometchat/chat-sdk-javascript").CometChat.getGroup;
|
package/dist/chat/uiKit.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
chatUid: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
5
6
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
}, {}>;
|
|
7
|
+
chatUid: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>>, {}, {}>;
|
|
12
12
|
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export { BccChatMessageList };
|
|
1
|
+
import BccChatMessageList from "./components/BccChatMessageList.vue";
|
|
2
|
+
import chat from "./chat";
|
|
3
|
+
export { BccChatMessageList, chat };
|