cometchat-visual-builder-no-code 1.0.1-test
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 +249 -0
- package/dist/156.main.js +1 -0
- package/dist/194.main.js +1 -0
- package/dist/37.main.js +1 -0
- package/dist/380.main.js +1 -0
- package/dist/750.main.js +1 -0
- package/dist/App.d.ts +4 -0
- package/dist/CometChat/CometChatApp.d.ts +16 -0
- package/dist/CometChat/CometChatSettings.d.ts +88 -0
- package/dist/CometChat/components/CometChatAddMembers/CometChatAddMembers.d.ts +210 -0
- package/dist/CometChat/components/CometChatAddMembers/useCometChatAddMembers.d.ts +11 -0
- package/dist/CometChat/components/CometChatAlertPopup/CometChatAlertPopup.d.ts +6 -0
- package/dist/CometChat/components/CometChatBannedMembers/CometChatBannedMembers.d.ts +6 -0
- package/dist/CometChat/components/CometChatCallLog/CometChatCallLogDetails.d.ts +5 -0
- package/dist/CometChat/components/CometChatCallLog/CometChatCallLogHistory.d.ts +4 -0
- package/dist/CometChat/components/CometChatCallLog/CometChatCallLogInfo.d.ts +4 -0
- package/dist/CometChat/components/CometChatCallLog/CometChatCallLogParticipants.d.ts +4 -0
- package/dist/CometChat/components/CometChatCallLog/CometChatCallLogRecordings.d.ts +4 -0
- package/dist/CometChat/components/CometChatCreateGroup/CometChatCreateGroup.d.ts +9 -0
- package/dist/CometChat/components/CometChatDetails/CometChatThreadedMessages.d.ts +11 -0
- package/dist/CometChat/components/CometChatDetails/CometChatUserDetails.d.ts +17 -0
- package/dist/CometChat/components/CometChatHome/CometChatHome.d.ts +14 -0
- package/dist/CometChat/components/CometChatJoinGroup/CometChatJoinGroup.d.ts +9 -0
- package/dist/CometChat/components/CometChatLogin/CometChatAppCredentials.d.ts +3 -0
- package/dist/CometChat/components/CometChatLogin/CometChatLogin.d.ts +3 -0
- package/dist/CometChat/components/CometChatLogin/sampledata.d.ts +7 -0
- package/dist/CometChat/components/CometChatMessages/CometChatEmptyStateView.d.ts +4 -0
- package/dist/CometChat/components/CometChatMessages/CometChatMessages.d.ts +12 -0
- package/dist/CometChat/components/CometChatSelector/CometChatSelector.d.ts +20 -0
- package/dist/CometChat/components/CometChatSelector/CometChatTabs.d.ts +8 -0
- package/dist/CometChat/components/CometChatTransferOwnership/CometChatTransferOwnership.d.ts +142 -0
- package/dist/CometChat/components/CometChatTransferOwnership/useCometChatTransferOwnership.d.ts +7 -0
- package/dist/CometChat/context/AppContext.d.ts +8 -0
- package/dist/CometChat/context/CometChatContext.d.ts +107 -0
- package/dist/CometChat/context/appReducer.d.ts +213 -0
- package/dist/CometChat/customHooks.d.ts +7 -0
- package/dist/CometChat/styleConfig.d.ts +104 -0
- package/dist/CometChat/utils/utils.d.ts +28 -0
- package/dist/CometChatNoCode/CometChatApi.d.ts +33 -0
- package/dist/CometChatNoCode/components/docked/DockedChatView.d.ts +7 -0
- package/dist/CometChatNoCode/components/embedded/EmbeddedChatView.d.ts +5 -0
- package/dist/CometChatNoCode/useCometChatWidgetStyles.d.ts +8 -0
- package/dist/assets/Roboto-Black.4afbed674a5252ead176.ttf +0 -0
- package/dist/assets/Roboto-BlackItalic.b49c4ba79204961dccd3.ttf +0 -0
- package/dist/assets/Roboto-Bold.d50a80138ec4f2fb5e9f.ttf +0 -0
- package/dist/assets/Roboto-BoldItalic.3fcf599c8a6c05a2c712.ttf +0 -0
- package/dist/assets/Roboto-Italic.cd47f5421512ee65fe22.ttf +0 -0
- package/dist/assets/Roboto-Light.839cb7309f46fed11436.ttf +0 -0
- package/dist/assets/Roboto-LightItalic.3743e89917aa46e2f6e5.ttf +0 -0
- package/dist/assets/Roboto-Medium.e73e917f7bfa48666e00.ttf +0 -0
- package/dist/assets/Roboto-MediumItalic.3dc683bc0f0d56bae3f8.ttf +0 -0
- package/dist/assets/Roboto-Regular.27f62b53b93858475a7f.ttf +0 -0
- package/dist/assets/change_scope.b7ce2e760bde03b486b5.png +0 -0
- package/dist/assets/svg/Spinner-Gradient-1.f2f8d4c6a11b46ae64da.svg +12 -0
- package/dist/assets/svg/addMembers.ac9bd9903ea91980e5bc.svg +5 -0
- package/dist/assets/svg/arrow_back.dd796cd8deddca446613.svg +8 -0
- package/dist/assets/svg/audio_call_button.17b58b643e8bc12cc6b9.svg +5 -0
- package/dist/assets/svg/block.0699b8d96de4c20c76d0.svg +5 -0
- package/dist/assets/svg/call-log-audio.0e3aaf2981e227b061c4.svg +3 -0
- package/dist/assets/svg/call-log_video.a810985ecf2746c8842f.svg +3 -0
- package/dist/assets/svg/callRecordingEmpty.eed59067696789e6204c.svg +8 -0
- package/dist/assets/svg/callRejectedIcon.fc84614b78bd19ffa1b0.svg +3 -0
- package/dist/assets/svg/call_empty.8ce6468827c447772bb6.svg +10 -0
- package/dist/assets/svg/call_end_no_fill.4a9911b198245072f6ae.svg +3 -0
- package/dist/assets/svg/call_made.e084ced6071c98821ebc.svg +8 -0
- package/dist/assets/svg/call_received.8a1f2ab017bbcf7bb046.svg +8 -0
- package/dist/assets/svg/calls.28f11734184b2e2e4e71.svg +5 -0
- package/dist/assets/svg/chats.5adfcfafa4cc0d303184.svg +10 -0
- package/dist/assets/svg/checkbox_tick.c8c052b7695f577cad91.svg +5 -0
- package/dist/assets/svg/close.2adefe6aea2efbd3491d.svg +12 -0
- package/dist/assets/svg/close.9564eb57de95f15d7b4e.svg +8 -0
- package/dist/assets/svg/collaborative_document_fill.221c4b61169245253c63.svg +4 -0
- package/dist/assets/svg/collaborative_whiteboard_fill.25e29644e4591c341125.svg +4 -0
- package/dist/assets/svg/cometchat_logo.ecf7992c1cc3576ceb57.svg +11 -0
- package/dist/assets/svg/conversations_audio-message.55058fd73f6f30059605.svg +8 -0
- package/dist/assets/svg/conversations_collaborative-document-message.9f5c199a668e6da1c4c6.svg +4 -0
- package/dist/assets/svg/conversations_collaborative-whiteboard-message.247bd7060246085899a4.svg +5 -0
- package/dist/assets/svg/conversations_delete.ce537f017fc12fab523e.svg +8 -0
- package/dist/assets/svg/conversations_delivered.510802caddcee7cf38e1.svg +3 -0
- package/dist/assets/svg/conversations_empty_state.32344f305d4d728f07e7.svg +20 -0
- package/dist/assets/svg/conversations_file-message.64124f24b26099a70a27.svg +8 -0
- package/dist/assets/svg/conversations_image-message.eaaad8ef101995637081.svg +8 -0
- package/dist/assets/svg/conversations_link.cfde67f9dcdc9ad112cc.svg +8 -0
- package/dist/assets/svg/conversations_missed-video-call.77f4e98af6049b2deab0.svg +8 -0
- package/dist/assets/svg/conversations_missed-voice-call.b52f9611ff85a6f468ee.svg +3 -0
- package/dist/assets/svg/conversations_outgoing-video-call.53f25a89d3793fdf2a00.svg +8 -0
- package/dist/assets/svg/conversations_outgoing-voice-call.aa7e2a8136855c39e5cb.svg +4 -0
- package/dist/assets/svg/conversations_poll-message.a38228224d6a756b8aa0.svg +3 -0
- package/dist/assets/svg/conversations_read.510802caddcee7cf38e1.svg +3 -0
- package/dist/assets/svg/conversations_sent.fbb8355efb327852ba32.svg +3 -0
- package/dist/assets/svg/conversations_sticker-message.1e08cf8a4ce3d8af27c9.svg +4 -0
- package/dist/assets/svg/conversations_thread.ef0eb6defdbb3b8a27b6.svg +8 -0
- package/dist/assets/svg/conversations_video-message.a2b413578aacf04e2a73.svg +8 -0
- package/dist/assets/svg/create-group.1166ddd2089dc474d86b.svg +3 -0
- package/dist/assets/svg/delete.9436ff083c3f2bf87470.svg +7 -0
- package/dist/assets/svg/delete.ca82d8766e6022162c9a.svg +8 -0
- package/dist/assets/svg/delete_icon.5db005e80f01622481b4.svg +4 -0
- package/dist/assets/svg/download.2068ff3bb9a26d87d0e5.svg +8 -0
- package/dist/assets/svg/downloadRecording.68d1a64015bdff727563.svg +3 -0
- package/dist/assets/svg/dropdown-arrow.19438c7586194515d473.svg +3 -0
- package/dist/assets/svg/emptyStateIconChat.dd845e1db2718f852ae0.svg +13 -0
- package/dist/assets/svg/error_icon.093f6c62b1e9dc09b727.svg +3 -0
- package/dist/assets/svg/error_info.139c04e0afeb03ada008.svg +3 -0
- package/dist/assets/svg/groups.6cc0adefb30e36b72309.svg +5 -0
- package/dist/assets/svg/incomingCallIcon.f72a226b678f60cf8858.svg +3 -0
- package/dist/assets/svg/incomingCallSuccess.0bf30f35cef97a13ccbe.svg +3 -0
- package/dist/assets/svg/incoming_video.00f32e896263889e2509.svg +8 -0
- package/dist/assets/svg/incoming_video_no_fill.01824d5f73a4bb089c1c.svg +4 -0
- package/dist/assets/svg/infoIcon.a45d68fa3e8e16b713b0.svg +5 -0
- package/dist/assets/svg/leaveGroup.58a4d38b4954c066952c.svg +5 -0
- package/dist/assets/svg/list_error_state_icon.173ec5995098722fd26a.svg +20 -0
- package/dist/assets/svg/loading_icon.0b32af930a5efc56290d.svg +3 -0
- package/dist/assets/svg/lock.71f7e9ad8da2b826c5c8.svg +8 -0
- package/dist/assets/svg/logout.450e8c11bf96d0c74710.svg +3 -0
- package/dist/assets/svg/message_delete.ce537f017fc12fab523e.svg +8 -0
- package/dist/assets/svg/mic_off.feb56f6133333e8e36fa.svg +8 -0
- package/dist/assets/svg/missedCallIcon.1cd662c850168ec2dd17.svg +10 -0
- package/dist/assets/svg/missedCallIcon.6048dda48a6a5b22dedc.svg +3 -0
- package/dist/assets/svg/missed_video_call_no_fill.a0aacfbcbf172a144ddc.svg +3 -0
- package/dist/assets/svg/more_icon.81b8f41258a897ea6ac4.svg +5 -0
- package/dist/assets/svg/outgoingCallSuccess.bbbc38474aa26b2bc241.svg +3 -0
- package/dist/assets/svg/outgoing_video_no_fill.765e9ef5fcb3e4a5be0c.svg +4 -0
- package/dist/assets/svg/pause.05902e314b4e9feca993.svg +8 -0
- package/dist/assets/svg/phone_incoming_no_fill.74e0941289461c76a5b4.svg +3 -0
- package/dist/assets/svg/phone_missed_no_fill.79993937b02c29c3ea6c.svg +3 -0
- package/dist/assets/svg/phone_outgoing_no_fill.07e8c060e778f4974d37.svg +4 -0
- package/dist/assets/svg/play_arrow.04f459a65b962cbb5f65.svg +8 -0
- package/dist/assets/svg/recording_icon.34cb90ed731d42e870b8.svg +10 -0
- package/dist/assets/svg/recording_resume.3d513ca8193f9334828b.svg +10 -0
- package/dist/assets/svg/search.61b1c747aa872b5ab4aa.svg +4 -0
- package/dist/assets/svg/send_fill.7d309325ccdb5f41d511.svg +8 -0
- package/dist/assets/svg/shield.0e8a980876383e89187b.svg +3 -0
- package/dist/assets/svg/start_chat.8f162a45823986cf2187.svg +5 -0
- package/dist/assets/svg/status_delivered.eda17954854636ebc910.svg +5 -0
- package/dist/assets/svg/status_read.f096888f2bedb92218d0.svg +3 -0
- package/dist/assets/svg/status_sending.7d1d357d6406afa36f70.svg +5 -0
- package/dist/assets/svg/status_sent.929a6372b15bb47d0179.svg +5 -0
- package/dist/assets/svg/sticker.54cf4f566ab9065ac0ef.svg +3 -0
- package/dist/assets/svg/stop.436a8cb465a4609f82a5.svg +8 -0
- package/dist/assets/svg/tooltip.2aa237f32c9f99b8d920.svg +5 -0
- package/dist/assets/svg/user.8dfdcadd19738360c459.svg +3 -0
- package/dist/assets/svg/user_empty.cce82d51a2fd34fb1414.svg +8 -0
- package/dist/assets/svg/users.3a4bb20ce645e85da09e.svg +5 -0
- package/dist/assets/svg/video_call_button.ad8739d880b299a43512.svg +5 -0
- package/dist/index.d.ts +7 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +39 -0
- package/package.json +89 -0
package/README.md
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img alt="CometChat" src="https://assets.cometchat.io/website/images/logos/banner.png">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
<img alt="version" src="https://img.shields.io/badge/version-v1.0.5-blue" />
|
|
7
|
+
<img alt="status" src="https://img.shields.io/badge/status-stable-brightgreen" />
|
|
8
|
+
<img alt="react" src="https://img.shields.io/badge/react-supported-61DAFB?logo=react" />
|
|
9
|
+
<img alt="vite" src="https://img.shields.io/badge/vite-supported-646CFF?logo=vite" />
|
|
10
|
+
<img alt="typescript" src="https://img.shields.io/badge/typescript-supported-blue" />
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
# Integration steps for Visual Builder
|
|
14
|
+
|
|
15
|
+
Follow these steps to integrate it into your existing React project:
|
|
16
|
+
|
|
17
|
+
For Next.js integration, please refer to our <a href="https://www.cometchat.com/docs/ui-kit/react/builder-integration-nextjs" target="_blank">step-by-step guide</a>.
|
|
18
|
+
|
|
19
|
+
## 1. Install dependencies in your app
|
|
20
|
+
|
|
21
|
+
Run the following command to install the required dependencies:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @cometchat/chat-uikit-react@6.0.7 @cometchat/calls-sdk-javascript
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 2. Copy CometChat Folder
|
|
28
|
+
|
|
29
|
+
Copy the `cometchat-app-react/src/CometChat` folder into your project’s `src` directory.
|
|
30
|
+
|
|
31
|
+
## 3. Initialize CometChat UI Kit
|
|
32
|
+
|
|
33
|
+
The initialization process varies depending on your setup. Select your framework:
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary>CRA</summary>
|
|
37
|
+
|
|
38
|
+
Open the file `src/index.tsx` and update it to include the required imports and initialization logic.
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import React from "react";
|
|
42
|
+
import ReactDOM from "react-dom/client";
|
|
43
|
+
import App from "./App";
|
|
44
|
+
import {
|
|
45
|
+
UIKitSettingsBuilder,
|
|
46
|
+
CometChatUIKit,
|
|
47
|
+
} from "@cometchat/chat-uikit-react";
|
|
48
|
+
import { setupLocalization } from "./CometChat/utils/utils";
|
|
49
|
+
import { CometChatProvider } from "./CometChat/context/CometChatContext";
|
|
50
|
+
|
|
51
|
+
export const COMETCHAT_CONSTANTS = {
|
|
52
|
+
APP_ID: "", // Replace with your App ID
|
|
53
|
+
REGION: "", // Replace with your App Region
|
|
54
|
+
AUTH_KEY: "", // Replace with your Auth Key or leave blank if you are authenticating using Auth Token
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const uiKitSettings = new UIKitSettingsBuilder()
|
|
58
|
+
.setAppId(COMETCHAT_CONSTANTS.APP_ID)
|
|
59
|
+
.setRegion(COMETCHAT_CONSTANTS.REGION)
|
|
60
|
+
.setAuthKey(COMETCHAT_CONSTANTS.AUTH_KEY)
|
|
61
|
+
.subscribePresenceForAllUsers()
|
|
62
|
+
.build();
|
|
63
|
+
|
|
64
|
+
CometChatUIKit.init(uiKitSettings)?.then(() => {
|
|
65
|
+
setupLocalization();
|
|
66
|
+
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
|
67
|
+
<CometChatProvider>
|
|
68
|
+
<App />
|
|
69
|
+
</CometChatProvider>
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
</details>
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary>Vite</summary>
|
|
78
|
+
|
|
79
|
+
Open the file `src/main.tsx` and update it to include the required imports and initialization logic.
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import { createRoot } from "react-dom/client";
|
|
83
|
+
import "./index.css";
|
|
84
|
+
import App from "./App.tsx";
|
|
85
|
+
import {
|
|
86
|
+
UIKitSettingsBuilder,
|
|
87
|
+
CometChatUIKit,
|
|
88
|
+
} from "@cometchat/chat-uikit-react";
|
|
89
|
+
import { setupLocalization } from "./CometChat/utils/utils.ts";
|
|
90
|
+
import { CometChatProvider } from "./CometChat/context/CometChatContext.tsx";
|
|
91
|
+
|
|
92
|
+
export const COMETCHAT_CONSTANTS = {
|
|
93
|
+
APP_ID: "", // Replace with your App ID
|
|
94
|
+
REGION: "", // Replace with your App Region
|
|
95
|
+
AUTH_KEY: "", // Replace with your Auth Key or leave blank if you are authenticating using Auth Token
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const uiKitSettings = new UIKitSettingsBuilder()
|
|
99
|
+
.setAppId(COMETCHAT_CONSTANTS.APP_ID)
|
|
100
|
+
.setRegion(COMETCHAT_CONSTANTS.REGION)
|
|
101
|
+
.setAuthKey(COMETCHAT_CONSTANTS.AUTH_KEY)
|
|
102
|
+
.subscribePresenceForAllUsers()
|
|
103
|
+
.build();
|
|
104
|
+
|
|
105
|
+
CometChatUIKit.init(uiKitSettings)?.then(() => {
|
|
106
|
+
setupLocalization();
|
|
107
|
+
createRoot(document.getElementById("root")!).render(
|
|
108
|
+
<CometChatProvider>
|
|
109
|
+
<App />
|
|
110
|
+
</CometChatProvider>
|
|
111
|
+
);
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
## 4. User Login
|
|
118
|
+
|
|
119
|
+
Refer to the [User Login Guide](https://www.cometchat.com/docs/ui-kit/react/react-js-integration#step-4-user-login) to implement user authentication in your app.
|
|
120
|
+
|
|
121
|
+
## 5. Render CometChatApp Component
|
|
122
|
+
|
|
123
|
+
Add the `CometChatApp` component to your app:
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import CometChatApp from "./CometChat/CometChatApp";
|
|
127
|
+
|
|
128
|
+
const App = () => {
|
|
129
|
+
return (
|
|
130
|
+
/* The CometChatApp component requires a parent element with an explicit height and width
|
|
131
|
+
to render properly. Ensure the container has defined dimensions, and adjust them as needed
|
|
132
|
+
based on your layout requirements. */
|
|
133
|
+
<div style={{ width: "100vw", height: "100dvh" }}>
|
|
134
|
+
<CometChatApp />
|
|
135
|
+
</div>
|
|
136
|
+
);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export default App;
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Note:
|
|
143
|
+
|
|
144
|
+
Use the `CometChatApp` component to launch a chat interface with a selected user or group.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import { useEffect, useState } from "react";
|
|
148
|
+
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
149
|
+
import CometChatApp from "./CometChat/CometChatApp";
|
|
150
|
+
|
|
151
|
+
const App = () => {
|
|
152
|
+
const [selectedUser, setSelectedUser] = useState<CometChat.User | undefined>(
|
|
153
|
+
undefined
|
|
154
|
+
);
|
|
155
|
+
const [selectedGroup, setSelectedGroup] = useState<
|
|
156
|
+
CometChat.Group | undefined
|
|
157
|
+
>(undefined);
|
|
158
|
+
|
|
159
|
+
useEffect(() => {
|
|
160
|
+
const UID = "UID"; // Replace with your User ID
|
|
161
|
+
CometChat.getUser(UID).then(setSelectedUser).catch(console.error);
|
|
162
|
+
|
|
163
|
+
const GUID = "GUID"; // Replace with your Group ID
|
|
164
|
+
CometChat.getGroup(GUID).then(setSelectedGroup).catch(console.error);
|
|
165
|
+
}, []);
|
|
166
|
+
|
|
167
|
+
return (
|
|
168
|
+
/* CometChatApp requires a parent with explicit height & width to render correctly.
|
|
169
|
+
Adjust the height and width as needed.
|
|
170
|
+
*/
|
|
171
|
+
<div style={{ width: "100vw", height: "100vh" }}>
|
|
172
|
+
<CometChatApp user={selectedUser} group={selectedGroup} />
|
|
173
|
+
</div>
|
|
174
|
+
);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export default App;
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
This implementation applies when you choose the **Without Sidebar** option for Sidebar.
|
|
181
|
+
|
|
182
|
+
- If `chatType` is `user` (default), only User chats will be displayed (either the selected user or the default user).
|
|
183
|
+
- If `chatType` is `group`, only Group chats will be displayed (either the selected group or the default group).
|
|
184
|
+
|
|
185
|
+
## 6. Run the App
|
|
186
|
+
|
|
187
|
+
Finally, start your app using the appropriate command based on your setup:
|
|
188
|
+
|
|
189
|
+
- Vite
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
npm run dev
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
- Create React App (CRA):
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
npm start
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Note:
|
|
202
|
+
|
|
203
|
+
Enable the following features in the Dashboard in your App under Chat > Features to ensure full functionality.
|
|
204
|
+
|
|
205
|
+
> Mentions, Reactions, Message translation, Polls, Collaborative whiteboard, Collaborative document, Emojis, Stickers, Conversation starter, Conversation summary, Smart reply.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
If you face any issues while integrating the builder in your app project, please check if you have the following configurations added to your `tsConfig.json`:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"compilerOptions": {
|
|
214
|
+
"jsx": "react-jsx",
|
|
215
|
+
"resolveJsonModule": true
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
If your development server is running, restart it to ensure the new TypeScript configuration is picked up.
|
|
221
|
+
|
|
222
|
+
## Run the Visual Builder App Independently (optional)
|
|
223
|
+
|
|
224
|
+
>
|
|
225
|
+
>
|
|
226
|
+
> 1. Open the `cometchat-app-react` folder.
|
|
227
|
+
> 2. Add credentials for your app in `src/index.tsx` (`src/main.tsx` incase for Vite):
|
|
228
|
+
>
|
|
229
|
+
> ```typescript
|
|
230
|
+
> export const COMETCHAT_CONSTANTS = {
|
|
231
|
+
> APP_ID: "", // Replace with your App ID
|
|
232
|
+
> REGION: "", // Replace with your App Region
|
|
233
|
+
> AUTH_KEY: "", // Replace with your Auth Key or leave blank if you are authenticating using Auth Token
|
|
234
|
+
> };
|
|
235
|
+
> ```
|
|
236
|
+
>
|
|
237
|
+
> 3. Install dependencies:
|
|
238
|
+
>
|
|
239
|
+
> ```bash
|
|
240
|
+
> npm i
|
|
241
|
+
> ```
|
|
242
|
+
>
|
|
243
|
+
> 4. Run the app:
|
|
244
|
+
>
|
|
245
|
+
> ```bash
|
|
246
|
+
> npm start
|
|
247
|
+
> ```
|
|
248
|
+
|
|
249
|
+
For detailed steps, refer to our <a href="https://www.cometchat.com/docs/ui-kit/react/builder-integration" target="_blank">Visual Builder documentation</a>
|
package/dist/156.main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkVisualBuilder=this.webpackChunkVisualBuilder||[]).push([[156],{2156:(s,u,a)=>{s.exports=a.p+"assets/svg/outgoingCallSuccess.bbbc38474aa26b2bc241.svg"}}]);
|
package/dist/194.main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkVisualBuilder=this.webpackChunkVisualBuilder||[]).push([[194],{2194:(s,e,c)=>{s.exports=c.p+"assets/svg/incomingCallSuccess.0bf30f35cef97a13ccbe.svg"}}]);
|
package/dist/37.main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkVisualBuilder=this.webpackChunkVisualBuilder||[]).push([[37],{5037:(s,a,e)=>{s.exports=e.p+"assets/svg/missedCallIcon.6048dda48a6a5b22dedc.svg"}}]);
|
package/dist/380.main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkVisualBuilder=this.webpackChunkVisualBuilder||[]).push([[380],{4380:(s,e,u)=>{s.exports=u.p+"assets/svg/callRejectedIcon.fc84614b78bd19ffa1b0.svg"}}]);
|
package/dist/750.main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkVisualBuilder=this.webpackChunkVisualBuilder||[]).push([[750],{5750:(s,i,u)=>{s.exports=u.p+"assets/svg/incomingCallIcon.f72a226b678f60cf8858.svg"}}]);
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './styles/CometChatApp.css';
|
|
2
|
+
import '@cometchat/chat-uikit-react/css-variables.css';
|
|
3
|
+
interface CometChatAppProps {
|
|
4
|
+
/** Default user for the chat application (optional). */
|
|
5
|
+
user?: CometChat.User;
|
|
6
|
+
/** Default group for the chat application (optional). */
|
|
7
|
+
group?: CometChat.Group;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Main application component for the CometChat Builder.
|
|
11
|
+
*
|
|
12
|
+
* @param {CometChatAppProps} props - The component props.
|
|
13
|
+
* @returns {JSX.Element} The rendered CometChatApp component.
|
|
14
|
+
*/
|
|
15
|
+
declare function CometChatApp({ user, group }: CometChatAppProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default CometChatApp;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface CometChatSettingsInterface {
|
|
2
|
+
chatFeatures: {
|
|
3
|
+
coreMessagingExperience: {
|
|
4
|
+
typingIndicator: boolean;
|
|
5
|
+
threadConversationAndReplies: boolean;
|
|
6
|
+
photosSharing: boolean;
|
|
7
|
+
videoSharing: boolean;
|
|
8
|
+
audioSharing: boolean;
|
|
9
|
+
fileSharing: boolean;
|
|
10
|
+
editMessage: boolean;
|
|
11
|
+
deleteMessage: boolean;
|
|
12
|
+
messageDeliveryAndReadReceipts: boolean;
|
|
13
|
+
userAndFriendsPresence: boolean;
|
|
14
|
+
};
|
|
15
|
+
deeperUserEngagement: {
|
|
16
|
+
mentions: boolean;
|
|
17
|
+
reactions: boolean;
|
|
18
|
+
messageTranslation: boolean;
|
|
19
|
+
polls: boolean;
|
|
20
|
+
collaborativeWhiteboard: boolean;
|
|
21
|
+
collaborativeDocument: boolean;
|
|
22
|
+
voiceNotes: boolean;
|
|
23
|
+
emojis: boolean;
|
|
24
|
+
stickers: boolean;
|
|
25
|
+
userInfo: boolean;
|
|
26
|
+
groupInfo: boolean;
|
|
27
|
+
};
|
|
28
|
+
aiUserCopilot: {
|
|
29
|
+
conversationStarter: boolean;
|
|
30
|
+
conversationSummary: boolean;
|
|
31
|
+
smartReply: boolean;
|
|
32
|
+
};
|
|
33
|
+
groupManagement: {
|
|
34
|
+
createGroup: boolean;
|
|
35
|
+
addMembersToGroups: boolean;
|
|
36
|
+
joinLeaveGroup: boolean;
|
|
37
|
+
deleteGroup: boolean;
|
|
38
|
+
viewGroupMembers: boolean;
|
|
39
|
+
};
|
|
40
|
+
moderatorControls: {
|
|
41
|
+
kickUsers: boolean;
|
|
42
|
+
banUsers: boolean;
|
|
43
|
+
promoteDemoteMembers: boolean;
|
|
44
|
+
};
|
|
45
|
+
privateMessagingWithinGroups: {
|
|
46
|
+
sendPrivateMessageToGroupMembers: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
callFeatures: {
|
|
50
|
+
voiceAndVideoCalling: {
|
|
51
|
+
oneOnOneVoiceCalling: boolean;
|
|
52
|
+
oneOnOneVideoCalling: boolean;
|
|
53
|
+
groupVideoConference: boolean;
|
|
54
|
+
groupVoiceConference: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
layout: {
|
|
58
|
+
withSideBar: boolean;
|
|
59
|
+
tabs: string[];
|
|
60
|
+
chatType: string;
|
|
61
|
+
};
|
|
62
|
+
style: {
|
|
63
|
+
theme: string;
|
|
64
|
+
color: {
|
|
65
|
+
brandColor: string;
|
|
66
|
+
primaryTextLight: string;
|
|
67
|
+
primaryTextDark: string;
|
|
68
|
+
secondaryTextLight: string;
|
|
69
|
+
secondaryTextDark: string;
|
|
70
|
+
};
|
|
71
|
+
typography: {
|
|
72
|
+
font: string;
|
|
73
|
+
size: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
noCode?: {
|
|
77
|
+
docked: boolean;
|
|
78
|
+
styles: {
|
|
79
|
+
buttonBackGround: string;
|
|
80
|
+
buttonShape: string;
|
|
81
|
+
openIcon: string;
|
|
82
|
+
closeIcon: string;
|
|
83
|
+
customJs: string;
|
|
84
|
+
customCss: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export declare const CometChatSettings: CometChatSettingsInterface;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { CSSProperties, JSX } from 'react';
|
|
2
|
+
import '../../styles/CometChatAddMembers/CometChatAddMembers.css';
|
|
3
|
+
import { CometChatOption, SelectionMode } from '@cometchat/chat-uikit-react';
|
|
4
|
+
interface IAddMembersProps {
|
|
5
|
+
/**
|
|
6
|
+
* Image URL for the back button
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* This prop will also be used if `backButton` prop is not provided
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue `./assets/backbutton.svg`
|
|
12
|
+
*/
|
|
13
|
+
backButtonIconURL?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Show back button
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue `true`
|
|
18
|
+
*/
|
|
19
|
+
showBackButton?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Function to call when the back button is clicked
|
|
22
|
+
*/
|
|
23
|
+
onBack?: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Title of the component
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue `getLocalizedString("ADD_MEMBERS")`
|
|
28
|
+
*/
|
|
29
|
+
title?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Hide the search bar
|
|
32
|
+
*
|
|
33
|
+
* @defaulValue `false`
|
|
34
|
+
*/
|
|
35
|
+
hideSearch?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Image URL for the search icon to use in the search bar
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `./assets/search.svg`
|
|
40
|
+
*/
|
|
41
|
+
searchIconURL?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Text to be displayed when the search input has no value
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue `getLocalizedString("SEARCH")`
|
|
46
|
+
*/
|
|
47
|
+
searchPlaceholderText?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Show alphabetical header
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue `false`
|
|
52
|
+
*/
|
|
53
|
+
showSectionHeader?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Property on the user object
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* This property will be used to extract the section header character from the user object
|
|
59
|
+
*
|
|
60
|
+
* @defaultValue `getName`
|
|
61
|
+
*/
|
|
62
|
+
sectionHeaderField?: keyof CometChat.User;
|
|
63
|
+
/**
|
|
64
|
+
* Image URL for the default loading view
|
|
65
|
+
*
|
|
66
|
+
* @defaultValue `./assets/spinner.svg`
|
|
67
|
+
*/
|
|
68
|
+
loadingIconURL?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Custom view for the loading state of the component
|
|
71
|
+
*/
|
|
72
|
+
loadingStateView?: JSX.Element;
|
|
73
|
+
/**
|
|
74
|
+
* Text to display in the default empty view
|
|
75
|
+
*
|
|
76
|
+
* @defaultValue `getLocalizedString("NO_USERS_FOUND")`
|
|
77
|
+
*/
|
|
78
|
+
emptyStateText?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Custom view for the empty state of the component
|
|
81
|
+
*/
|
|
82
|
+
emptyStateView?: JSX.Element;
|
|
83
|
+
/**
|
|
84
|
+
* Text to display in the default error view
|
|
85
|
+
*
|
|
86
|
+
* @defaultValue `getLocalizedString("SOMETHING_WRONG")`
|
|
87
|
+
*/
|
|
88
|
+
errorStateText?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Custom view for the error state of the component
|
|
91
|
+
*/
|
|
92
|
+
errorStateView?: JSX.Element;
|
|
93
|
+
/**
|
|
94
|
+
* Hide error view
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
* If set to true, hides the default and the custom error view
|
|
98
|
+
*
|
|
99
|
+
* @defaultValue `false`
|
|
100
|
+
*/
|
|
101
|
+
hideError?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Hide user presence
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* If set to true, the status indicator of the default list item view is not displayed
|
|
107
|
+
*
|
|
108
|
+
* @defaultValue `false`
|
|
109
|
+
*/
|
|
110
|
+
disableUsersPresence?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Hide the separator at the bottom of the default list item view
|
|
113
|
+
*
|
|
114
|
+
* @defaultValue `false`
|
|
115
|
+
*/
|
|
116
|
+
hideSeparator?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Function to call whenever the component encounters an error
|
|
119
|
+
*/
|
|
120
|
+
onError?: ((error: CometChat.CometChatException) => void) | null;
|
|
121
|
+
/**
|
|
122
|
+
* Custom view to render on the top-right of the component
|
|
123
|
+
*/
|
|
124
|
+
menus?: JSX.Element;
|
|
125
|
+
/**
|
|
126
|
+
* List of actions available on mouse over on the default list item component
|
|
127
|
+
*/
|
|
128
|
+
options?: (user: CometChat.User) => CometChatOption[];
|
|
129
|
+
/**
|
|
130
|
+
* Selection mode to use for the default tail view
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* This prop is used if `listItemView` prop is not provided.
|
|
134
|
+
*
|
|
135
|
+
* @defaultValue `SelectionMode.multiple`
|
|
136
|
+
*/
|
|
137
|
+
selectionMode?: SelectionMode;
|
|
138
|
+
/**
|
|
139
|
+
* Function to call when a user from the fetched list is selected
|
|
140
|
+
*
|
|
141
|
+
* @remarks
|
|
142
|
+
* This prop is used if `selectionMode` prop is not `SelectionMode.none`
|
|
143
|
+
*/
|
|
144
|
+
onSelect?: (user: CometChat.User, selected: boolean) => void;
|
|
145
|
+
/**
|
|
146
|
+
* Request builder to fetch users
|
|
147
|
+
*
|
|
148
|
+
* @remarks
|
|
149
|
+
* If the search input is not empty and the `searchRequestBuilder` prop is not provided,
|
|
150
|
+
* the search keyword of this request builder is set to the text in the search input
|
|
151
|
+
*
|
|
152
|
+
* @defaultValue Default request builder having the limit set to 30
|
|
153
|
+
*/
|
|
154
|
+
usersRequestBuilder?: CometChat.UsersRequestBuilder;
|
|
155
|
+
/**
|
|
156
|
+
* Request builder with search parameters to fetch users
|
|
157
|
+
*
|
|
158
|
+
* @remarks
|
|
159
|
+
* If the search input is not empty,
|
|
160
|
+
* the search keyword of this request builder is set to the text in the search input
|
|
161
|
+
*/
|
|
162
|
+
searchRequestBuilder?: CometChat.UsersRequestBuilder;
|
|
163
|
+
/**
|
|
164
|
+
* Custom list item view to be rendered for each user in the fetched list
|
|
165
|
+
*/
|
|
166
|
+
listItemView?: (user: CometChat.User) => JSX.Element;
|
|
167
|
+
/**
|
|
168
|
+
* Custom subtitle view to be rendered for each user in the fetched list
|
|
169
|
+
*
|
|
170
|
+
* @remarks
|
|
171
|
+
* This prop is used if `listItemView` prop is not provided
|
|
172
|
+
*/
|
|
173
|
+
subtitleView?: (user: CometChat.User) => JSX.Element;
|
|
174
|
+
/**
|
|
175
|
+
* Group to add members to
|
|
176
|
+
*/
|
|
177
|
+
group: CometChat.Group;
|
|
178
|
+
/**
|
|
179
|
+
* Function to call when add button of the component is clicked
|
|
180
|
+
*
|
|
181
|
+
* @remarks
|
|
182
|
+
* This function won't be call if no users are selected
|
|
183
|
+
*/
|
|
184
|
+
onAddMembersButtonClick?: (guid: string, membersToAdd: CometChat.GroupMember[]) => void;
|
|
185
|
+
/**
|
|
186
|
+
* Text to display for the default add button
|
|
187
|
+
*
|
|
188
|
+
* @defaultValue `getLocalizedString("ADD_MEMBERS")`
|
|
189
|
+
*/
|
|
190
|
+
buttonText?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Image URL for the close button
|
|
193
|
+
*
|
|
194
|
+
* @defaultValue `./assets/close2x.svg`
|
|
195
|
+
*/
|
|
196
|
+
closeButtonIconURL?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Function to call when the close button is clicked
|
|
199
|
+
*/
|
|
200
|
+
onClose?: () => void;
|
|
201
|
+
/**
|
|
202
|
+
* Styles to apply to the status indicator component of the default list item view
|
|
203
|
+
*/
|
|
204
|
+
statusIndicatorStyle?: CSSProperties;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Renders a scrollable list of users to add to a group of a CometChat App
|
|
208
|
+
*/
|
|
209
|
+
export declare function CometChatAddMembers(props: IAddMembersProps): import("react/jsx-runtime").JSX.Element;
|
|
210
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SelectionMode } from '@cometchat/chat-uikit-react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type Args = {
|
|
4
|
+
loggedInUserRef: React.MutableRefObject<CometChat.User | null>;
|
|
5
|
+
errorHandler: (error: unknown) => void;
|
|
6
|
+
selectionMode: SelectionMode;
|
|
7
|
+
selectionModeRef: React.MutableRefObject<SelectionMode>;
|
|
8
|
+
membersToAddRef: React.MutableRefObject<CometChat.GroupMember[]>;
|
|
9
|
+
};
|
|
10
|
+
export declare function useCometChatAddMembers(args: Args): void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import '../../styles/CometChatAlertPopup/CometChatAlertPopup.css';
|
|
2
|
+
export declare const CometChatAlertPopup: (props: {
|
|
3
|
+
onConfirmClick?: (() => void) | undefined;
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
description?: string | undefined;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/CometChatCreateGroup/CometChatCreateGroup.css';
|
|
3
|
+
import { Group } from '@cometchat/chat-sdk-javascript';
|
|
4
|
+
interface CreateGroupProps {
|
|
5
|
+
setShowCreateGroup: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
onGroupCreated?: (group: Group) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const CometChatCreateGroup: ({ setShowCreateGroup, onGroupCreated }: CreateGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default CometChatCreateGroup;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '../../styles/CometChatDetails/CometChatThreadedMessages.css';
|
|
2
|
+
import { CallLog } from '@cometchat/calls-sdk-javascript';
|
|
3
|
+
interface ThreadProps {
|
|
4
|
+
message: CometChat.BaseMessage;
|
|
5
|
+
requestBuilderState?: CometChat.MessagesRequestBuilder;
|
|
6
|
+
selectedItem: CometChat.User | CometChat.Group | CometChat.Conversation | CometChat.Call | CallLog | undefined;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
showComposer?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const CometChatThreadedMessages: (props: ThreadProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import '../../styles/CometChatDetails/CometChatUserDetails.css';
|
|
2
|
+
interface UserDetailProps {
|
|
3
|
+
user: CometChat.User;
|
|
4
|
+
onHide?: () => void;
|
|
5
|
+
actionItems?: {
|
|
6
|
+
id?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
}[];
|
|
10
|
+
showStatus?: boolean;
|
|
11
|
+
onUserActionClick?: (item: {
|
|
12
|
+
name: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const CometChatUserDetails: (props: UserDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|