isometrik-chat 0.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.
Files changed (188) hide show
  1. package/README.md +74 -0
  2. package/babel.config.js +6 -0
  3. package/dist/index.js +684 -0
  4. package/package.json +59 -0
  5. package/public/Logo-192x192.png +0 -0
  6. package/public/Logo-512x512.png +0 -0
  7. package/public/favicon.ico +0 -0
  8. package/public/fonts/BenjaminVictoria.ttf +0 -0
  9. package/public/icons/arrow_logo.svg +9 -0
  10. package/public/icons/assets/ic_placeholder_banner.svg +1 -0
  11. package/public/icons/attach-file.svg +9 -0
  12. package/public/icons/audio_pause.svg +1 -0
  13. package/public/icons/audio_play.svg +6 -0
  14. package/public/icons/back.svg +3 -0
  15. package/public/icons/bell.svg +1 -0
  16. package/public/icons/block.svg +1 -0
  17. package/public/icons/bottom-arrow.svg +1 -0
  18. package/public/icons/camera-switch.svg +12 -0
  19. package/public/icons/camera.svg +4 -0
  20. package/public/icons/cancel.svg +1 -0
  21. package/public/icons/chat empty placeholder.svg +58 -0
  22. package/public/icons/chat_audio_pause.png +0 -0
  23. package/public/icons/chat_audio_play.png +0 -0
  24. package/public/icons/close.svg +5 -0
  25. package/public/icons/crossCarousel.svg +3 -0
  26. package/public/icons/delete.svg +3 -0
  27. package/public/icons/disappear.svg +24 -0
  28. package/public/icons/document.png +0 -0
  29. package/public/icons/document.svg +1 -0
  30. package/public/icons/downloadCarousel.svg +6 -0
  31. package/public/icons/edit-pencil.svg +6 -0
  32. package/public/icons/emoji.svg +8 -0
  33. package/public/icons/emojiCarousel.svg +3 -0
  34. package/public/icons/filter.svg +1 -0
  35. package/public/icons/forwardCarousel.svg +3 -0
  36. package/public/icons/gallery.svg +1 -0
  37. package/public/icons/goToMessageCarousel.svg +3 -0
  38. package/public/icons/ic_uil_arrow-left.svg +1 -0
  39. package/public/icons/ic_uil_eye-slash.svg +1 -0
  40. package/public/icons/ic_uil_eye.svg +1 -0
  41. package/public/icons/leftArrowCarousel.svg +6 -0
  42. package/public/icons/light-mode.svg +14 -0
  43. package/public/icons/lock.svg +1 -0
  44. package/public/icons/login_background.png +0 -0
  45. package/public/icons/menu .svg +5 -0
  46. package/public/icons/menuCarousel.svg +5 -0
  47. package/public/icons/message.svg +3 -0
  48. package/public/icons/placeholder.svg +958 -0
  49. package/public/icons/poll.svg +1 -0
  50. package/public/icons/retake.png +0 -0
  51. package/public/icons/right-arrow.svg +3 -0
  52. package/public/icons/right.svg +3 -0
  53. package/public/icons/round-star.svg +1 -0
  54. package/public/icons/search.svg +3 -0
  55. package/public/icons/send.svg +10 -0
  56. package/public/icons/starCarousel.svg +3 -0
  57. package/public/icons/status.svg +1 -0
  58. package/public/icons/sticker.svg +1 -0
  59. package/public/icons/thumb-down.svg +1 -0
  60. package/public/icons/user.svg +1 -0
  61. package/public/icons/users.svg +1 -0
  62. package/public/icons/voice.png +0 -0
  63. package/public/index.html +38 -0
  64. package/public/logo192.png +0 -0
  65. package/public/logo512.png +0 -0
  66. package/public/manifest.json +25 -0
  67. package/public/offline.html +12 -0
  68. package/public/robots.txt +3 -0
  69. package/public/service-worker.js +81 -0
  70. package/src/App.js +15 -0
  71. package/src/App.test.js +8 -0
  72. package/src/Authpage.js +16 -0
  73. package/src/ChatContext.js +172 -0
  74. package/src/Data/index.js +110 -0
  75. package/src/assets/icons.js +49 -0
  76. package/src/assets/images/WhatsApp.html +258 -0
  77. package/src/assets/images/WhatsApp_files/301446776_522918349234681_1974693392291574064_n.jpg +0 -0
  78. package/src/assets/images/WhatsApp_files/app-bf223f825866ee433b07.css +242 -0
  79. package/src/assets/images/WhatsApp_files/app.77ee8aa7a4c593101105.js +77 -0
  80. package/src/assets/images/WhatsApp_files/lazy_loaded_high_priority_components.85a06e74a0a4ade1640b.css +16 -0
  81. package/src/assets/images/WhatsApp_files/lazy_loaded_low_priority_components.8621270bc215a9298a97.css +47 -0
  82. package/src/assets/images/WhatsApp_files/libsignal-protocol-ee5b8ba.min.js +21 -0
  83. package/src/assets/images/WhatsApp_files/main.48b845d68e066fb27a75.css +161 -0
  84. package/src/assets/images/WhatsApp_files/runtime.e6018f3c1e255e8f4dc7.js +2 -0
  85. package/src/assets/images/WhatsApp_files/stylex-d50abd61e6cf7eab2afd855adccf14e5.css +2841 -0
  86. package/src/assets/images/WhatsApp_files/vendor1_app.58a51d93a250f83ab555.js +79 -0
  87. package/src/assets/images/bg.jpeg +0 -0
  88. package/src/assets/images/drkbg.jpg +0 -0
  89. package/src/assets/images/notFound.jpeg +0 -0
  90. package/src/assets/images/watsapp.jpg +0 -0
  91. package/src/assets/images/watsappbg.png +0 -0
  92. package/src/assets/images/wb.jpg +0 -0
  93. package/src/assets/images/whatsapp.jpeg +0 -0
  94. package/src/components/ChatBox/AudioBubble.js +162 -0
  95. package/src/components/ChatBox/ChatBubble.js +232 -0
  96. package/src/components/ChatBox/DocumentBubble.js +87 -0
  97. package/src/components/ChatBox/MessagesBox.js +533 -0
  98. package/src/components/CustomModal.js +60 -0
  99. package/src/components/Icon.js +10 -0
  100. package/src/components/ImageComponent.js +24 -0
  101. package/src/components/MediaDocs.js +155 -0
  102. package/src/components/MediaDocumentContainer.js +55 -0
  103. package/src/components/MessageInfoDropdown.js +124 -0
  104. package/src/components/Modal/AllowMicPermissionModal.js +63 -0
  105. package/src/components/Modal/BlockUnblockChatModal.js +78 -0
  106. package/src/components/Modal/CameraPermissionBlockedModal.js +61 -0
  107. package/src/components/Modal/CameraPermissionRequestModal.js +60 -0
  108. package/src/components/Modal/ClearChatModal.js +78 -0
  109. package/src/components/Modal/DeleteChatModal.js +79 -0
  110. package/src/components/Modal/MicPermissionDisableModal.js +63 -0
  111. package/src/components/Modal/Modal.js +103 -0
  112. package/src/components/Modal/ModalDialog.js +103 -0
  113. package/src/components/Modal/ProfilePictureUploadPreview.js +160 -0
  114. package/src/components/OutsideAlerter/OutsideAlerter.js +38 -0
  115. package/src/components/ProfilePicture/ProfilePicture.js +127 -0
  116. package/src/components/Registration/Login.js +265 -0
  117. package/src/components/Registration/SignUp.js +322 -0
  118. package/src/components/SnackBar.js +42 -0
  119. package/src/components/common/Modal/useDetectOutsideClick.js +23 -0
  120. package/src/components/common/styled/PageWrapper.js +25 -0
  121. package/src/components/formcontrol/CustomButton.js +38 -0
  122. package/src/components/formcontrol/InputText.js +60 -0
  123. package/src/global-styles.js +42 -0
  124. package/src/hooks/useDeviceType.js +28 -0
  125. package/src/hooks/useThrottle.js +29 -0
  126. package/src/index.css +225 -0
  127. package/src/index.js +23 -0
  128. package/src/lib/constant.js +21 -0
  129. package/src/lib/functionality.js +13 -0
  130. package/src/lib/helpers.js +320 -0
  131. package/src/lib/mockData/index.js +76 -0
  132. package/src/lib/session/index.js +31 -0
  133. package/src/lib/validation.js +4 -0
  134. package/src/logo.svg +1 -0
  135. package/src/pages/WhatsappMainBox/index.js +574 -0
  136. package/src/reportWebVitals.js +13 -0
  137. package/src/services/deliveryStatus.js +27 -0
  138. package/src/setupTests.js +5 -0
  139. package/src/utils/chatSdk.js +14 -0
  140. package/src/utils/global.js +57 -0
  141. package/src/utils/media.js +79 -0
  142. package/src/view/component/BlockedContactSlide.js +134 -0
  143. package/src/view/component/Carousle/UpperMenuBar.js +106 -0
  144. package/src/view/component/Carousle/index.js +204 -0
  145. package/src/view/component/Chatbox.js/AudioRecorder.js +311 -0
  146. package/src/view/component/Chatbox.js/ChatBubbleReply.js +27 -0
  147. package/src/view/component/Chatbox.js/TakePhoto.js +363 -0
  148. package/src/view/component/Chatbox.js/index.js +856 -0
  149. package/src/view/component/Chatbox.js/styles.css +231 -0
  150. package/src/view/component/Contact/index.js +56 -0
  151. package/src/view/component/Contact/styles.css +208 -0
  152. package/src/view/component/ContactInfo/index.js +543 -0
  153. package/src/view/component/ContactInfo/styles.css +289 -0
  154. package/src/view/component/Context/index.js +3 -0
  155. package/src/view/component/DialogBox.js +15 -0
  156. package/src/view/component/ImageCropper/ImageCropper.js +128 -0
  157. package/src/view/component/Loader/Loader.js +52 -0
  158. package/src/view/component/Loader/UserPagingLoader.js +62 -0
  159. package/src/view/component/MainChatBox/index.js +819 -0
  160. package/src/view/component/MainChatBox/styles.css +124 -0
  161. package/src/view/component/Menu/index.js +261 -0
  162. package/src/view/component/Menu/styles.css +68 -0
  163. package/src/view/component/Profile/ProfileInfoContainer.js +112 -0
  164. package/src/view/component/Profile/ProfileUpdate.js +178 -0
  165. package/src/view/component/Profile/TakeProfilePhoto.js +391 -0
  166. package/src/view/component/Profile/index.js +550 -0
  167. package/src/view/component/Profile/styles.css +370 -0
  168. package/src/view/component/ReplyChatMessage/ReplyChatMessage.js +48 -0
  169. package/src/view/component/SeachBar/index.js +106 -0
  170. package/src/view/component/SeachBar/styles.css +53 -0
  171. package/src/view/component/Siderbar/index.js +512 -0
  172. package/src/view/component/Siderbar/styles.css +138 -0
  173. package/src/view/component/Toaster/Toaster.js +117 -0
  174. package/src/view/component/UserDetailsCard/UserDetailCard.js +337 -0
  175. package/src/view/component/deleteMessageMoal.js +80 -0
  176. package/src/view/component/emoji/index.js +22 -0
  177. package/src/view/component/emoji/sstyles.css +0 -0
  178. package/src/view/component/forwardData/index.js +327 -0
  179. package/src/view/component/forwardData/styles.css +112 -0
  180. package/src/view/component/forwardPopup/index.js +55 -0
  181. package/src/view/component/forwardPopup/styles.css +144 -0
  182. package/src/view/component/mediaList/index.js +92 -0
  183. package/src/view/component/menuDialog/index.js +71 -0
  184. package/src/view/component/menuDialog/styles.css +24 -0
  185. package/src/view/component/pagination/pagination.js +52 -0
  186. package/src/view/component/pagination/paginationForMsg.js +43 -0
  187. package/src/view/component/sidebarChat/index.js +321 -0
  188. package/src/view/component/sidebarChat/styles.css +109 -0
@@ -0,0 +1,543 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { Avatar } from "@mui/material";
3
+ import "./styles.css";
4
+ import SearchBar from "../SeachBar";
5
+ import Box from "@mui/material/Box";
6
+ import Drawer from "@mui/material/Drawer";
7
+ import List from "@mui/material/List";
8
+ import Divider from "@mui/material/Divider";
9
+ import ListItem from "@mui/material/ListItem";
10
+ import ListItemButton from "@mui/material/ListItemButton";
11
+ import ListItemIcon from "@mui/material/ListItemIcon";
12
+ import ListItemText from "@mui/material/ListItemText";
13
+ import InboxIcon from "@mui/icons-material/MoveToInbox";
14
+ import MailIcon from "@mui/icons-material/Mail";
15
+ import KeyboardBackspaceIcon from "@mui/icons-material/KeyboardBackspace";
16
+ import PropTypes from "prop-types";
17
+ import Tabs from "@mui/material/Tabs";
18
+ import Tab from "@mui/material/Tab";
19
+ import Typography from "@mui/material/Typography";
20
+ import MediaList from "../../component/mediaList/index";
21
+ import watsappbg from "../../../assets/images/watsappbg.png";
22
+ import darkbg from "../../../assets/images/drkbg.jpg";
23
+ import {
24
+ BELL_ICON,
25
+ BLOCKICON,
26
+ CLOSE_ICON,
27
+ DELETEICON,
28
+ DISAPEAR_ICON,
29
+ LOCKICON,
30
+ RIGHT_ARROW,
31
+ ROUND_STAR,
32
+ THUMB_DOWN,
33
+ } from "../../../utils/global";
34
+ import ImageComponent from "../../../components/ImageComponent";
35
+ import { Brightness1 } from "@mui/icons-material";
36
+ import { decodeChatBody, getMessageDateSorted, getTimeWithMeridian, getUserStatus } from "../../../lib/helpers";
37
+ import client from "../../../utils/chatSdk";
38
+ import styled ,{css} from "styled-components";
39
+ import MediaDocs from "../../../components/MediaDocs";
40
+ import Icon from "../../../components/Icon";
41
+ import { getCookie } from "../../../lib/session";
42
+ import { mobile} from "../../../utils/media";
43
+ import MediaDocumentContainer from "../../../components/MediaDocumentContainer";
44
+ // import Box from '@mui/material/Box';
45
+
46
+
47
+ const MessageInfo = styled.div`
48
+ margin: 20px;
49
+ max-width: auto%;
50
+ border-radius: 7.5px;
51
+ --wt-bg-opacity: 1;
52
+ padding: 0.2rem 0.4rem;
53
+ background-color: var(--sender_chatbg);
54
+ word-break: break-word;
55
+ text-align: end;
56
+ width: fit-content;
57
+ `;
58
+
59
+ const MessageInfoBody = styled.div`
60
+ max-height: 10rem;
61
+ overflow: scroll;
62
+ color: var(--black);
63
+ `;
64
+
65
+ const ReadStatus = styled.div`
66
+ padding: 20px 40px;
67
+ border-bottom: 1px solid var(--border_color);
68
+ display: flex;
69
+ flex-direction: column;
70
+ color: var(--black);
71
+ `;
72
+
73
+ const DeliveredStatus = styled.div`
74
+ border-bottom: 1px solid var(--border_color);
75
+ display: flex;
76
+ flex-direction: column;
77
+ padding: 20px 40px;
78
+ color: var(--black);
79
+ `;
80
+
81
+ const StatusMode = styled.div`
82
+ background-color: var(--primary-white);
83
+ `;
84
+
85
+ const ShowSearchChatMessage = styled.div`
86
+ position: relative;
87
+ padding: 0 1rem;
88
+ `;
89
+
90
+ const SearchChatMessageText = styled.p`
91
+ font-size: 16px;
92
+ font-weight: 500;
93
+ color: var(--profile-color);
94
+ margin-bottom: 0;
95
+ `;
96
+
97
+ const SearchChatMessageTime = styled.h5`
98
+ color: var(--chat-msg-text);
99
+ font-size: 14px;
100
+ margin-top: 1rem;
101
+ margin-bottom: 0;
102
+ text-align: ${props => props.textCenter ? 'center' : 'left'};
103
+ padding: ${props => props.customPadding ? '2rem 0' : ''};
104
+ `;
105
+
106
+ const SearchChatMessageTextContainer = styled.div`
107
+ display: flex;
108
+ align-items: center;
109
+ gap: 0.5rem;
110
+ `;
111
+
112
+ const MediaDrawer = styled.div`
113
+ width:70vw;
114
+ ${mobile(css`
115
+ width:100vw;
116
+ `)}
117
+ `
118
+
119
+ function TabPanel(props) {
120
+ const { children, value, index, ...other } = props;
121
+
122
+ return (
123
+ <div
124
+ role="tabpanel"
125
+ hidden={value !== index}
126
+ id={`simple-tabpanel-${index}`}
127
+ aria-labelledby={`simple-tab-${index}`}
128
+ {...other}
129
+ >
130
+ {value === index && (
131
+ <Box sx={{ p: 3 }}>
132
+ <Typography>{children}</Typography>
133
+ </Box>
134
+ )}
135
+ </div>
136
+ );
137
+ }
138
+
139
+ TabPanel.propTypes = {
140
+ children: PropTypes.node,
141
+ index: PropTypes.number.isRequired,
142
+ value: PropTypes.number.isRequired,
143
+ };
144
+
145
+ function a11yProps(index) {
146
+ return {
147
+ id: `simple-tab-${index}`,
148
+ "aria-controls": `simple-tabpanel-${index}`,
149
+ };
150
+ }
151
+
152
+
153
+ function ContactInfo(props) {
154
+ const { sidebarChatItem, setShowProfilePicture, setDeleteChatModal, setUserBlockModal, userConversationDetail, theme, Messages, messageInfo, conversationId, messageChat,mediaDocs, debounceSearchMessages, searchedMessageArray, searchMessageLoaderStatus,handleClosee,handler,
155
+ handleImgVidClick, enteredSearchQuery } = props;
156
+
157
+ const [state, setState] = React.useState({
158
+ top: false,
159
+ left: false,
160
+ bottom: false,
161
+ right: false,
162
+ });
163
+ const [value, setValue] = React.useState(0);
164
+ const [totalMediaFiles, setTotalMediaFiles] = useState();
165
+ const [readTime, setReadTime] = useState();
166
+ const [deliveryTime, setDeliveryTime] = useState();
167
+ const userId = getCookie("userId");
168
+
169
+ useEffect(() => {
170
+ if (!messageChat) return;
171
+ const payload = { conversationId: conversationId, messageId: messageChat?.messageId, limit: 20, skip: 0 };
172
+
173
+ client.message.getStatusDelivery(payload).then((res) => {
174
+ const DeliveredTime = getTimeWithMeridian(new Date(res?.users && res?.users[0]?.timestamp));
175
+ setDeliveryTime(DeliveredTime)
176
+ setDeliveryTime(res?.users && res?.users[0]?.timestamp);
177
+ }).catch((error) => {
178
+ console.log("error message ", error);
179
+ })
180
+ client.message.getStatusRead(payload).then((res) => {
181
+ const ReadedTime = getTimeWithMeridian(new Date(res?.users && res?.users[0]?.timestamp));
182
+ setReadTime(ReadedTime);
183
+ setDeliveryTime(res?.users && res?.users[0]?.timestamp);
184
+ }).catch((error) => {
185
+ console.log("error while fetching message status", error);
186
+ });
187
+ }, [messageChat]);
188
+
189
+ const handleChange = (event, newValue) => {
190
+ setValue(newValue);
191
+ };
192
+
193
+ const toggleDrawer = (anchor, open) => (event) => {
194
+ if (
195
+ event.type === "keydown" &&
196
+ (event.key === "Tab" || event.key === "Shift")
197
+ ) {
198
+ return;
199
+ }
200
+
201
+ setState({ ...state, [anchor]: open });
202
+ };
203
+
204
+ const list = (anchor) => (
205
+ <Box
206
+ sx={{ width: anchor === "top" || anchor === "bottom" ? "auto" : 250 }}
207
+ role="presentation"
208
+ onClick={toggleDrawer(anchor, false)}
209
+ onKeyDown={toggleDrawer(anchor, false)}
210
+ >
211
+ <List>
212
+ {["Inbox", "Starred", "Send email", "Drafts"].map((text, index) => (
213
+ <ListItem key={text} disablePadding>
214
+ <ListItemButton>
215
+ <ListItemIcon>
216
+ {index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
217
+ </ListItemIcon>
218
+ <ListItemText primary={text} />
219
+ </ListItemButton>
220
+ </ListItem>
221
+ ))}
222
+ </List>
223
+ <Divider />
224
+ <List>
225
+ {["All mail", "Trash", "Spam"].map((text, index) => (
226
+ <ListItem key={text} disablePadding>
227
+ <ListItemButton>
228
+ <ListItemIcon>
229
+ {index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
230
+ </ListItemIcon>
231
+ <ListItemText primary={text} />
232
+ </ListItemButton>
233
+ </ListItem>
234
+ ))}
235
+ </List>
236
+ </Box>
237
+ );
238
+ const closeHandler = () => {
239
+ handleClosee();
240
+ handler();
241
+ };
242
+
243
+ const avatarClickHandler = () => {
244
+ setShowProfilePicture({ showProfile: true, userName: sidebarChatItem?.opponentDetails?.userName, userImageSrc: sidebarChatItem?.opponentDetails?.userProfileImageUrl, theme: props?.theme })
245
+ }
246
+
247
+
248
+ return (
249
+ <>
250
+ {props?.slideShow || props?.searchShow || messageInfo ? (
251
+ <div className="contact_container">
252
+ <div
253
+ className={
254
+ props?.slideShow || props?.searchShow || messageInfo
255
+ ? "contact_header header"
256
+ : "contact_header"
257
+ }
258
+ >
259
+ <ImageComponent
260
+ onClick={closeHandler}
261
+ src={CLOSE_ICON}
262
+ // style={{height:"18px", width:"18px"}}
263
+ className={props?.theme ? "darkicons" : "lighticons"}
264
+ />
265
+ <p>{`${props?.slideShow ? "Contact info" : ""} ${props?.searchShow ? "Search Messages" : ""} ${messageInfo ? "Message Info" : ""}`}</p>
266
+ </div>
267
+ {props?.slideShow ? (
268
+ <div>
269
+ <div className={props?.slideShow ? "showMe" : ""}>
270
+ <div className="contact_profile">
271
+ <Avatar
272
+ className="profile_image"
273
+ src={sidebarChatItem?.opponentDetails?.userProfileImageUrl}
274
+ onClick={() => avatarClickHandler(sidebarChatItem)}
275
+ ></Avatar>
276
+ </div>
277
+ <div className="contact_name">
278
+ <div>
279
+ {props?.sidebarChatItem?.name}
280
+ <p className="text_Color d-flex justify-content-center">
281
+ {sidebarChatItem?.opponentDetails?.userName}
282
+ </p>
283
+ </div>
284
+ </div>
285
+ </div>
286
+ <div>
287
+ {["right"].map((anchor) => (
288
+ <React.Fragment key={anchor}>
289
+ <div
290
+ className={
291
+ props?.slideShow
292
+ ? "contactsocialInfo showMe msgFont text_Color pointer"
293
+ : "contactsocialInfo pointer"
294
+ }
295
+ onClick={toggleDrawer(anchor, true)}
296
+ >
297
+ <span>
298
+ Media And docs - </span>
299
+ <div>
300
+ {/* {["right"].map((anchor) => (
301
+ <React.Fragment key={anchor}> */}
302
+ {/* <Button onClick={toggleDrawer(anchor, true)}> */}
303
+ <span
304
+ data-testid="chevron-right-alt"
305
+ data-icon="chevron-right-alt"
306
+ class="aft2yglh pointer"
307
+ // onClick={mediaHandler}
308
+
309
+ > <span style={{ marginRight: "10px" }}>{mediaDocs?.length}</span>
310
+ <ImageComponent
311
+ style={{ filter: "brightness(0.5)" }}
312
+ src={RIGHT_ARROW}
313
+ className={
314
+ props?.theme
315
+ ? "dark_footer_icon"
316
+ : "light_footer_icon"
317
+ }
318
+ />
319
+ </span>
320
+
321
+
322
+ <Drawer
323
+ anchor={anchor}
324
+ open={state[anchor]}
325
+ onClose={toggleDrawer(anchor, false)}
326
+ // hideBackdrop
327
+ >
328
+ <MediaDrawer className="media_Container">
329
+ <div className="media_header">
330
+ <KeyboardBackspaceIcon
331
+ className="pointer icons keyboard"
332
+ onClick={(e) => {
333
+ toggleDrawer(anchor, false)(e);
334
+ e.stopPropagation();
335
+ }}
336
+ />
337
+
338
+ <div className="bg-white ss">
339
+ <Box sx={{ width: "100%", marginTop: "50px" }}>
340
+ <Box
341
+ sx={{
342
+ borderBottom: 1,
343
+ borderColor: "divider",
344
+ }}
345
+ >
346
+ <Tabs
347
+ value={value}
348
+ onChange={handleChange}
349
+ aria-label="basic tabs example"
350
+ sx={{ width: "100%" }}
351
+ >
352
+ <Tab label="Media" {...a11yProps(0)} />
353
+ <Tab label="Docs" {...a11yProps(1)} />
354
+ </Tabs>
355
+ </Box>
356
+ <TabPanel value={value} index={0}>
357
+ <MediaDocs handleImgVidClick={handleImgVidClick} mediaDocs={mediaDocs} />
358
+ </TabPanel>
359
+ <TabPanel value={value} index={1}>
360
+ <MediaDocumentContainer mediaDocs={mediaDocs} />
361
+ </TabPanel>
362
+ <TabPanel value={value} index={2}>
363
+ No Link Items
364
+ </TabPanel>
365
+ </Box>
366
+ </div>
367
+ </div>
368
+ </MediaDrawer>
369
+ </Drawer>
370
+
371
+ </div>
372
+ </div>
373
+ <div>
374
+ <MediaList message={Messages} conversationId={conversationId} setTotalMediaFiles={setTotalMediaFiles} totalMediaFiles={totalMediaFiles} />
375
+ </div>
376
+ </React.Fragment>
377
+ ))}
378
+
379
+ <div
380
+ className={
381
+ props?.slideShow ? "text textt showMe" : "text textt"
382
+ }
383
+ >
384
+ {/* <p>
385
+ <ImageComponent
386
+ src={ROUND_STAR}
387
+ className={
388
+ props?.theme
389
+ ? "darkicons"
390
+ : "lighticons"
391
+ }
392
+ />
393
+ <span>Starred Message</span>
394
+ <ImageComponent
395
+ src={RIGHT_ARROW}
396
+ className={
397
+ props?.theme
398
+ ? "darkicons"
399
+ : "lighticons"
400
+ }
401
+ />
402
+ </p> */}
403
+
404
+ {/* <p>
405
+ <ImageComponent
406
+ src={DISAPEAR_ICON}
407
+ className={
408
+ props?.theme
409
+ ? "darkicons"
410
+ : "lighticons"
411
+ }
412
+ />
413
+ <span>Disappearing Messages </span>
414
+ <ImageComponent
415
+ src={RIGHT_ARROW}
416
+ className={
417
+ props?.theme
418
+ ? "darkicons"
419
+ : "lighticons"
420
+ }
421
+ />
422
+ </p> */}
423
+ {/* <p className="d-block pd-0">
424
+ <ImageComponent
425
+ src={LOCKICON}
426
+ className={
427
+ props?.theme
428
+ ? "darkicons"
429
+ : "lighticons"
430
+ }
431
+ />
432
+ <span>Encryption </span>
433
+
434
+ <p className="text_Color txt">
435
+ messages are end to end encrypted Please cick to verify
436
+ </p>
437
+ </p> */}
438
+
439
+
440
+ <p className="pointer" onClick={() => setUserBlockModal(true)}>
441
+ <ImageComponent src={BLOCKICON} className={`icons svgg ${userConversationDetail?.messagingDisabled ? 'user_unblock' : ''}`} />
442
+ <span className={`${userConversationDetail?.messagingDisabled ? 'user_unblock' : ''} pointer btnn`}>
443
+ {userConversationDetail?.messagingDisabled ? 'Unblock' : 'Block'} {userConversationDetail?.opponentDetails?.userName}
444
+
445
+ </span>
446
+ </p>
447
+ {/* <p>
448
+ <ImageComponent src={THUMB_DOWN} className="icons svgg" />
449
+ <span className="pointer btnn">
450
+ Reporterd To {props?.sidebarChatItem?.name}{" "}
451
+ </span>
452
+ </p> */}
453
+ <p onClick={() => setDeleteChatModal(true)} className="pointer pb-4">
454
+ <ImageComponent src={DELETEICON} className="icons" />
455
+ <span className="pointer btnn">Delete Chat </span>
456
+ </p>
457
+ </div>
458
+ </div>
459
+ </div>
460
+ ) : (
461
+ ""
462
+ )}
463
+
464
+ {props?.searchShow ? (
465
+ <div className="contact_container">
466
+ <div>
467
+ <div className="contact_profile">
468
+ <SearchBar userSearchEnteredData={debounceSearchMessages} searchShow={props?.searchShow} theme={theme} />
469
+ </div>
470
+ <ShowSearchChatMessage>
471
+ {
472
+ searchMessageLoaderStatus ? <SearchChatMessageTime textCenter customPadding>{'Looking for messages.....'}</SearchChatMessageTime> :
473
+ searchedMessageArray?.length > 0 ?
474
+ searchedMessageArray.map(data => (
475
+ <>
476
+ <SearchChatMessageTime>{getMessageDateSorted(data?.sentAt)}</SearchChatMessageTime>
477
+ <SearchChatMessageTextContainer>
478
+ {(data.senderInfo?.userId || data?.senderId) === userId && (
479
+ <Icon style={{ marginLeft: "2px" }} id={'singleTick'}
480
+ />
481
+ )}
482
+ <SearchChatMessageText key={data.messageId}>{decodeChatBody(data.body)}</SearchChatMessageText>
483
+ </SearchChatMessageTextContainer>
484
+ </>
485
+ )) :
486
+ enteredSearchQuery?.length > 0 ?
487
+ <SearchChatMessageTime textCenter customPadding>{'No messages found'}</SearchChatMessageTime> :
488
+ <div className="bg-white">
489
+ <p className="text_Color text-align-center searchmsg text-center">
490
+ Search for message with {sidebarChatItem?.opponentDetails?.userName}{" "}
491
+ </p>
492
+ </div>
493
+ }
494
+ </ShowSearchChatMessage>
495
+ </div>
496
+ </div>
497
+ ) : (
498
+ ""
499
+ )}
500
+
501
+ {messageInfo ? (
502
+ <div className="contact_container" style={{ marginTop: "66px", backgroundColor: "var(--gray_color)" }}>
503
+ <MessageInfoBody style={{
504
+ background: `url(${props?.theme ? darkbg : watsappbg})`,
505
+ backgroundRepeat: "no-repeat",
506
+ backgroundSize: "cover",
507
+ }}>
508
+ <MessageInfo>
509
+ {messageChat?.attachments && messageChat?.attachments?.[0]?.mediaUrl.length > 0 ? <ImageComponent style={{ width: "21rem", height: "11rem" }}
510
+ src={messageChat?.attachments[0]?.mediaUrl}
511
+ /> : decodeChatBody(messageChat?.body)}
512
+ </MessageInfo>
513
+ </MessageInfoBody>
514
+ <StatusMode>
515
+ <ReadStatus>
516
+ <span>Read</span>
517
+ <span>{readTime ? readTime : "-"}</span>
518
+ </ReadStatus>
519
+ <DeliveredStatus>
520
+ <span>Delivered </span>
521
+ <span>{deliveryTime ? readTime : "-"}</span>
522
+ </DeliveredStatus> </StatusMode>
523
+ </div>
524
+
525
+ ) : (
526
+ ""
527
+ )}
528
+ </div>
529
+ ) : (
530
+ ""
531
+ )}
532
+ <style jsx>{`
533
+ @media (max-width: 48rem) {
534
+ .contact_container {
535
+ max-width: 100vw;
536
+ }
537
+ }
538
+ `}</style>
539
+ </>
540
+ );
541
+ }
542
+
543
+ export default ContactInfo;