@bcc-code/vue-bcc-chat-ui 1.0.8 → 1.1.0

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 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
- <template>
19
- <div>
20
- <BccChatMessageList :authToken="token" :chat="chatId" />
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 chatId = ref('my-chat-id');
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,7 @@
1
- export declare const connect: (authToken: string | (() => string)) => Promise<import("@cometchat/chat-sdk-javascript").User | undefined>;
1
+ export declare const connect: (authToken: string) => Promise<import("@cometchat/chat-sdk-javascript").User | undefined>;
2
2
  export declare const disconnect: () => Promise<void>;
3
3
  declare const _default: {
4
- connect: (authToken: string | (() => string)) => Promise<import("@cometchat/chat-sdk-javascript").User | undefined>;
4
+ connect: (authToken: string) => Promise<import("@cometchat/chat-sdk-javascript").User | undefined>;
5
5
  disconnect: () => Promise<void>;
6
6
  };
7
7
  export default _default;
@@ -21,7 +21,7 @@ declare const _default: {
21
21
  isMobileView: any;
22
22
  };
23
23
  connection: {
24
- connect: (authToken: string | (() => string)) => Promise<import("@cometchat/chat-sdk-javascript").User | undefined>;
24
+ connect: (authToken: string) => Promise<import("@cometchat/chat-sdk-javascript").User | undefined>;
25
25
  disconnect: () => Promise<void>;
26
26
  };
27
27
  data: {
@@ -1,4 +1,3 @@
1
- import "@cometchat/chat-uikit-vue/dist/style.css";
2
1
  export declare const init: () => Promise<void>;
3
2
  declare const _default: {
4
3
  init: () => Promise<void>;
@@ -1,12 +1,20 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
- accessToken: StringConstructor;
3
- chatUid: StringConstructor;
4
- active: BooleanConstructor;
2
+ accessToken: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ chatUid: {
7
+ type: StringConstructor;
8
+ required: true;
9
+ };
5
10
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
6
- accessToken: StringConstructor;
7
- chatUid: StringConstructor;
8
- active: BooleanConstructor;
9
- }>>, {
10
- active: boolean;
11
- }, {}>;
11
+ accessToken: {
12
+ type: StringConstructor;
13
+ required: true;
14
+ };
15
+ chatUid: {
16
+ type: StringConstructor;
17
+ required: true;
18
+ };
19
+ }>>, {}, {}>;
12
20
  export default _default;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import './style.css';
2
- import BccChatMessageList from './components/BccChatMessageList.vue';
3
- export { BccChatMessageList };
1
+ import BccChatMessageList from "./components/BccChatMessageList.vue";
2
+ import chat from "./chat";
3
+ export { BccChatMessageList, chat };