@connectycube/chat-widget 0.12.0 → 0.13.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 +31 -17
- package/dist/AppContainer.d.ts +3 -0
- package/dist/components/home/main/quick-actions.d.ts +5 -0
- package/dist/components/login.d.ts +1 -0
- package/dist/components/shared/avatar.d.ts +1 -1
- package/dist/connectycube.d.ts +4 -4
- package/dist/index.es.js +2582 -2545
- package/dist/index.umd.js +29 -29
- package/dist/redux/slices/quickActions.d.ts +7 -0
- package/dist/redux/store.d.ts +4 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -126,23 +126,33 @@ See chat widget code samples <https://github.com/ConnectyCube/connectycube-chat-
|
|
|
126
126
|
|
|
127
127
|
## Props
|
|
128
128
|
|
|
129
|
-
| Prop Name | Type | Description
|
|
130
|
-
| -------------------- | --------------------- |
|
|
131
|
-
| `appId` | `number \| string` | The ConnectyCube Application ID
|
|
132
|
-
| `authKey` | `string` | The ConnectyCube Authentication Key
|
|
133
|
-
| `config` | `object` | _(Optional)_ Configuration options for ConnectyCube SDK
|
|
134
|
-
| `userId` | `string` | A User Id from your system
|
|
135
|
-
| `userName` | `string` | User name. This is how other users will see your user name
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
| `
|
|
140
|
-
| `
|
|
141
|
-
| `
|
|
142
|
-
| `
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
145
|
-
| `
|
|
129
|
+
| Prop Name | Type | Description | Default Value |
|
|
130
|
+
| -------------------- | --------------------- | -------------------------------------------------------------------------------------- | ------------- |
|
|
131
|
+
| `appId` | `number \| string` | The ConnectyCube Application ID | |
|
|
132
|
+
| `authKey` | `string` | The ConnectyCube Authentication Key | |
|
|
133
|
+
| `config` | `object` | _(Optional)_ Configuration options for ConnectyCube SDK | |
|
|
134
|
+
| `userId` | `string` | A User Id from your system | |
|
|
135
|
+
| `userName` | `string` | User name. This is how other users will see your user name | |
|
|
136
|
+
| `userAvatar` | `string` | _(Optional)_ User Avatar URL | |
|
|
137
|
+
| `muted` | `boolean` | _(Optional)_ Do not play sound on incoming message | false |
|
|
138
|
+
| `splitView` | `boolean` | _(Optional)_ Displays the chats in split view or single view | false |
|
|
139
|
+
| `showOnlineUsersTab` | `boolean` | _(Optional)_ Displays users tab with the list of online users | false |
|
|
140
|
+
| `buttonTitle` | `string` | _(Optional)_ The text displayed on the chat button | "Chat" |
|
|
141
|
+
| `buttonStyle` | `React.CSSProperties` | _(Optional)_ Inline styles for the button | |
|
|
142
|
+
| `portalStyle` | `React.CSSProperties` | _(Optional)_ Inline styles for the portal | |
|
|
143
|
+
| `badgeStyle` | `React.CSSProperties` | _(Optional)_ Inline styles for the badge | |
|
|
144
|
+
| `buttonClassName` | `string` | _(Optional)_ CSS class or Tailwind CSS classes for the button | |
|
|
145
|
+
| `portalClassName` | `string` | _(Optional)_ CSS class or Tailwind CSS classes for the chat | |
|
|
146
|
+
| `badgeClassName` | `string` | _(Optional)_ CSS class or Tailwind CSS classes for the badge | |
|
|
147
|
+
| `quickActions` | `object` | _(Optional)_ Configuration for quick actions dialog. See [QuickActions](#quickactions) | |
|
|
148
|
+
|
|
149
|
+
## QuickActions
|
|
150
|
+
|
|
151
|
+
| Prop Name | Type | Description | Default Value |
|
|
152
|
+
| ------------- | ---------- | ------------------------------------------------ | ------------- |
|
|
153
|
+
| `title` | `string` | _(Optional)_ Title for the quick actions section | |
|
|
154
|
+
| `description` | `string` | _(Optional)_ Description for the quick actions | |
|
|
155
|
+
| `actions` | `string[]` | List of action strings | |
|
|
146
156
|
|
|
147
157
|
## Recipes
|
|
148
158
|
|
|
@@ -228,6 +238,10 @@ const props = {
|
|
|
228
238
|
};
|
|
229
239
|
```
|
|
230
240
|
|
|
241
|
+
## Changelog
|
|
242
|
+
|
|
243
|
+
<https://github.com/ConnectyCube/connectycube-chat-widget-samples/blob/main/CHANGELOG.md>
|
|
244
|
+
|
|
231
245
|
## Community and support
|
|
232
246
|
|
|
233
247
|
- [Blog](https://connectycube.com/blog)
|
package/dist/AppContainer.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Config } from '../../../node_modules/connectycube/dist/types/types';
|
|
2
|
+
import { QuickActions } from './redux/slices/quickActions';
|
|
2
3
|
export type AppProps = {
|
|
3
4
|
appId: Config.Credentials['appId'];
|
|
4
5
|
authKey: Config.Credentials['authKey'];
|
|
5
6
|
userId?: string;
|
|
6
7
|
userName?: string;
|
|
8
|
+
userAvatar?: string;
|
|
7
9
|
config?: Config.Options;
|
|
8
10
|
muted?: boolean;
|
|
9
11
|
splitView?: boolean;
|
|
10
12
|
showOnlineUsersTab?: boolean;
|
|
13
|
+
quickActions?: QuickActions;
|
|
11
14
|
buttonTitle?: string;
|
|
12
15
|
buttonStyle?: React.CSSProperties;
|
|
13
16
|
portalStyle?: React.CSSProperties;
|
package/dist/connectycube.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Chat, Users, Auth } from '../../../node_modules/connectycube/dist/types/types';
|
|
2
2
|
export declare const SESSION_KEY = "@connectycube/chat-widget:session";
|
|
3
|
-
export declare const tryReuseSession: (userName?: string, userId?: string) => Promise<boolean>;
|
|
3
|
+
export declare const tryReuseSession: (userName?: string, userId?: string, userAvatar?: string) => Promise<boolean>;
|
|
4
4
|
export declare const tryRestoreSession: () => Promise<Auth.Session | null>;
|
|
5
5
|
export declare const createUserSession: (login: string, password: string) => Promise<Auth.Session>;
|
|
6
|
-
export declare const createSession: (userId?: string, userName?: string) => Promise<Auth.Session | null>;
|
|
6
|
+
export declare const createSession: (userId?: string, userName?: string, userAvatar?: string) => Promise<Auth.Session | null>;
|
|
7
7
|
export declare const destroyUserSession: () => Promise<void>;
|
|
8
|
-
export declare const userSignup: (login: string, password: string, name?: string, externalId?: string) => Promise<Auth.Session>;
|
|
8
|
+
export declare const userSignup: (login: string, password: string, name?: string, externalId?: string, userAvatar?: string) => Promise<Auth.Session>;
|
|
9
9
|
export declare const chatCredentials: () => Chat.ConnectionParams | null;
|
|
10
|
-
export declare const updateUserProfileIfNeeded: (session: Auth.Session, name?: string, externalId?: string) => Promise<
|
|
10
|
+
export declare const updateUserProfileIfNeeded: (session: Auth.Session, name?: string, externalId?: string, avatar?: string) => Promise<Auth.Session>;
|
|
11
11
|
export declare const setSessionToLocalStorage: (session: Auth.Session) => void;
|
|
12
12
|
export declare const getSessionFromLocalStorage: () => Auth.Session | null;
|
|
13
13
|
export declare const clearSessionInLocalStorage: () => void;
|