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.
- package/README.md +74 -0
- package/babel.config.js +6 -0
- package/dist/index.js +684 -0
- package/package.json +59 -0
- package/public/Logo-192x192.png +0 -0
- package/public/Logo-512x512.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/BenjaminVictoria.ttf +0 -0
- package/public/icons/arrow_logo.svg +9 -0
- package/public/icons/assets/ic_placeholder_banner.svg +1 -0
- package/public/icons/attach-file.svg +9 -0
- package/public/icons/audio_pause.svg +1 -0
- package/public/icons/audio_play.svg +6 -0
- package/public/icons/back.svg +3 -0
- package/public/icons/bell.svg +1 -0
- package/public/icons/block.svg +1 -0
- package/public/icons/bottom-arrow.svg +1 -0
- package/public/icons/camera-switch.svg +12 -0
- package/public/icons/camera.svg +4 -0
- package/public/icons/cancel.svg +1 -0
- package/public/icons/chat empty placeholder.svg +58 -0
- package/public/icons/chat_audio_pause.png +0 -0
- package/public/icons/chat_audio_play.png +0 -0
- package/public/icons/close.svg +5 -0
- package/public/icons/crossCarousel.svg +3 -0
- package/public/icons/delete.svg +3 -0
- package/public/icons/disappear.svg +24 -0
- package/public/icons/document.png +0 -0
- package/public/icons/document.svg +1 -0
- package/public/icons/downloadCarousel.svg +6 -0
- package/public/icons/edit-pencil.svg +6 -0
- package/public/icons/emoji.svg +8 -0
- package/public/icons/emojiCarousel.svg +3 -0
- package/public/icons/filter.svg +1 -0
- package/public/icons/forwardCarousel.svg +3 -0
- package/public/icons/gallery.svg +1 -0
- package/public/icons/goToMessageCarousel.svg +3 -0
- package/public/icons/ic_uil_arrow-left.svg +1 -0
- package/public/icons/ic_uil_eye-slash.svg +1 -0
- package/public/icons/ic_uil_eye.svg +1 -0
- package/public/icons/leftArrowCarousel.svg +6 -0
- package/public/icons/light-mode.svg +14 -0
- package/public/icons/lock.svg +1 -0
- package/public/icons/login_background.png +0 -0
- package/public/icons/menu .svg +5 -0
- package/public/icons/menuCarousel.svg +5 -0
- package/public/icons/message.svg +3 -0
- package/public/icons/placeholder.svg +958 -0
- package/public/icons/poll.svg +1 -0
- package/public/icons/retake.png +0 -0
- package/public/icons/right-arrow.svg +3 -0
- package/public/icons/right.svg +3 -0
- package/public/icons/round-star.svg +1 -0
- package/public/icons/search.svg +3 -0
- package/public/icons/send.svg +10 -0
- package/public/icons/starCarousel.svg +3 -0
- package/public/icons/status.svg +1 -0
- package/public/icons/sticker.svg +1 -0
- package/public/icons/thumb-down.svg +1 -0
- package/public/icons/user.svg +1 -0
- package/public/icons/users.svg +1 -0
- package/public/icons/voice.png +0 -0
- package/public/index.html +38 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/offline.html +12 -0
- package/public/robots.txt +3 -0
- package/public/service-worker.js +81 -0
- package/src/App.js +15 -0
- package/src/App.test.js +8 -0
- package/src/Authpage.js +16 -0
- package/src/ChatContext.js +172 -0
- package/src/Data/index.js +110 -0
- package/src/assets/icons.js +49 -0
- package/src/assets/images/WhatsApp.html +258 -0
- package/src/assets/images/WhatsApp_files/301446776_522918349234681_1974693392291574064_n.jpg +0 -0
- package/src/assets/images/WhatsApp_files/app-bf223f825866ee433b07.css +242 -0
- package/src/assets/images/WhatsApp_files/app.77ee8aa7a4c593101105.js +77 -0
- package/src/assets/images/WhatsApp_files/lazy_loaded_high_priority_components.85a06e74a0a4ade1640b.css +16 -0
- package/src/assets/images/WhatsApp_files/lazy_loaded_low_priority_components.8621270bc215a9298a97.css +47 -0
- package/src/assets/images/WhatsApp_files/libsignal-protocol-ee5b8ba.min.js +21 -0
- package/src/assets/images/WhatsApp_files/main.48b845d68e066fb27a75.css +161 -0
- package/src/assets/images/WhatsApp_files/runtime.e6018f3c1e255e8f4dc7.js +2 -0
- package/src/assets/images/WhatsApp_files/stylex-d50abd61e6cf7eab2afd855adccf14e5.css +2841 -0
- package/src/assets/images/WhatsApp_files/vendor1_app.58a51d93a250f83ab555.js +79 -0
- package/src/assets/images/bg.jpeg +0 -0
- package/src/assets/images/drkbg.jpg +0 -0
- package/src/assets/images/notFound.jpeg +0 -0
- package/src/assets/images/watsapp.jpg +0 -0
- package/src/assets/images/watsappbg.png +0 -0
- package/src/assets/images/wb.jpg +0 -0
- package/src/assets/images/whatsapp.jpeg +0 -0
- package/src/components/ChatBox/AudioBubble.js +162 -0
- package/src/components/ChatBox/ChatBubble.js +232 -0
- package/src/components/ChatBox/DocumentBubble.js +87 -0
- package/src/components/ChatBox/MessagesBox.js +533 -0
- package/src/components/CustomModal.js +60 -0
- package/src/components/Icon.js +10 -0
- package/src/components/ImageComponent.js +24 -0
- package/src/components/MediaDocs.js +155 -0
- package/src/components/MediaDocumentContainer.js +55 -0
- package/src/components/MessageInfoDropdown.js +124 -0
- package/src/components/Modal/AllowMicPermissionModal.js +63 -0
- package/src/components/Modal/BlockUnblockChatModal.js +78 -0
- package/src/components/Modal/CameraPermissionBlockedModal.js +61 -0
- package/src/components/Modal/CameraPermissionRequestModal.js +60 -0
- package/src/components/Modal/ClearChatModal.js +78 -0
- package/src/components/Modal/DeleteChatModal.js +79 -0
- package/src/components/Modal/MicPermissionDisableModal.js +63 -0
- package/src/components/Modal/Modal.js +103 -0
- package/src/components/Modal/ModalDialog.js +103 -0
- package/src/components/Modal/ProfilePictureUploadPreview.js +160 -0
- package/src/components/OutsideAlerter/OutsideAlerter.js +38 -0
- package/src/components/ProfilePicture/ProfilePicture.js +127 -0
- package/src/components/Registration/Login.js +265 -0
- package/src/components/Registration/SignUp.js +322 -0
- package/src/components/SnackBar.js +42 -0
- package/src/components/common/Modal/useDetectOutsideClick.js +23 -0
- package/src/components/common/styled/PageWrapper.js +25 -0
- package/src/components/formcontrol/CustomButton.js +38 -0
- package/src/components/formcontrol/InputText.js +60 -0
- package/src/global-styles.js +42 -0
- package/src/hooks/useDeviceType.js +28 -0
- package/src/hooks/useThrottle.js +29 -0
- package/src/index.css +225 -0
- package/src/index.js +23 -0
- package/src/lib/constant.js +21 -0
- package/src/lib/functionality.js +13 -0
- package/src/lib/helpers.js +320 -0
- package/src/lib/mockData/index.js +76 -0
- package/src/lib/session/index.js +31 -0
- package/src/lib/validation.js +4 -0
- package/src/logo.svg +1 -0
- package/src/pages/WhatsappMainBox/index.js +574 -0
- package/src/reportWebVitals.js +13 -0
- package/src/services/deliveryStatus.js +27 -0
- package/src/setupTests.js +5 -0
- package/src/utils/chatSdk.js +14 -0
- package/src/utils/global.js +57 -0
- package/src/utils/media.js +79 -0
- package/src/view/component/BlockedContactSlide.js +134 -0
- package/src/view/component/Carousle/UpperMenuBar.js +106 -0
- package/src/view/component/Carousle/index.js +204 -0
- package/src/view/component/Chatbox.js/AudioRecorder.js +311 -0
- package/src/view/component/Chatbox.js/ChatBubbleReply.js +27 -0
- package/src/view/component/Chatbox.js/TakePhoto.js +363 -0
- package/src/view/component/Chatbox.js/index.js +856 -0
- package/src/view/component/Chatbox.js/styles.css +231 -0
- package/src/view/component/Contact/index.js +56 -0
- package/src/view/component/Contact/styles.css +208 -0
- package/src/view/component/ContactInfo/index.js +543 -0
- package/src/view/component/ContactInfo/styles.css +289 -0
- package/src/view/component/Context/index.js +3 -0
- package/src/view/component/DialogBox.js +15 -0
- package/src/view/component/ImageCropper/ImageCropper.js +128 -0
- package/src/view/component/Loader/Loader.js +52 -0
- package/src/view/component/Loader/UserPagingLoader.js +62 -0
- package/src/view/component/MainChatBox/index.js +819 -0
- package/src/view/component/MainChatBox/styles.css +124 -0
- package/src/view/component/Menu/index.js +261 -0
- package/src/view/component/Menu/styles.css +68 -0
- package/src/view/component/Profile/ProfileInfoContainer.js +112 -0
- package/src/view/component/Profile/ProfileUpdate.js +178 -0
- package/src/view/component/Profile/TakeProfilePhoto.js +391 -0
- package/src/view/component/Profile/index.js +550 -0
- package/src/view/component/Profile/styles.css +370 -0
- package/src/view/component/ReplyChatMessage/ReplyChatMessage.js +48 -0
- package/src/view/component/SeachBar/index.js +106 -0
- package/src/view/component/SeachBar/styles.css +53 -0
- package/src/view/component/Siderbar/index.js +512 -0
- package/src/view/component/Siderbar/styles.css +138 -0
- package/src/view/component/Toaster/Toaster.js +117 -0
- package/src/view/component/UserDetailsCard/UserDetailCard.js +337 -0
- package/src/view/component/deleteMessageMoal.js +80 -0
- package/src/view/component/emoji/index.js +22 -0
- package/src/view/component/emoji/sstyles.css +0 -0
- package/src/view/component/forwardData/index.js +327 -0
- package/src/view/component/forwardData/styles.css +112 -0
- package/src/view/component/forwardPopup/index.js +55 -0
- package/src/view/component/forwardPopup/styles.css +144 -0
- package/src/view/component/mediaList/index.js +92 -0
- package/src/view/component/menuDialog/index.js +71 -0
- package/src/view/component/menuDialog/styles.css +24 -0
- package/src/view/component/pagination/pagination.js +52 -0
- package/src/view/component/pagination/paginationForMsg.js +43 -0
- package/src/view/component/sidebarChat/index.js +321 -0
- package/src/view/component/sidebarChat/styles.css +109 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import ImageComponent from "../../../components/ImageComponent";
|
|
4
|
+
import { CLOSE_ICON } from "../../../utils/global";
|
|
5
|
+
import styled, { css } from "styled-components";
|
|
6
|
+
import { mobile } from "../../../utils/media";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const ToasterWrapper = styled.div`
|
|
10
|
+
position: relative;
|
|
11
|
+
background: ${props => props.variant === 'success' ? 'var(--toaster-success-bgcolor)' : 'var(--toaster-error-bgcolor)'};
|
|
12
|
+
position: fixed;
|
|
13
|
+
bottom: 40px;
|
|
14
|
+
left: 40px;
|
|
15
|
+
padding: 10px 20px;
|
|
16
|
+
border-radius: 5px;
|
|
17
|
+
color:#8696a0;
|
|
18
|
+
z-index: 999;
|
|
19
|
+
visibility: ${props => props.open ? 'visible' : 'hidden'};
|
|
20
|
+
animation: animate-left-in 500ms, animate-left-out 500ms;
|
|
21
|
+
|
|
22
|
+
${mobile(css`
|
|
23
|
+
left: 15px;
|
|
24
|
+
bottom: 15px;
|
|
25
|
+
`)}
|
|
26
|
+
|
|
27
|
+
.cross_icon{
|
|
28
|
+
width: 20px !important;
|
|
29
|
+
height: 20px !important;
|
|
30
|
+
${mobile(css`
|
|
31
|
+
width: 15px !important;
|
|
32
|
+
height: 15px !important;
|
|
33
|
+
`)}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const ShowToastMessage = styled.span`
|
|
38
|
+
margin-right: 1rem;
|
|
39
|
+
color: var(--primary-white);
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
const Toaster = ({ message, variant, time, open, onClose }) => {
|
|
43
|
+
|
|
44
|
+
const toastRef = useRef(null);
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
const timerId = setTimeout(() => {
|
|
48
|
+
if (toastRef.current) toastRef.current.classList.remove("show");
|
|
49
|
+
onClose();
|
|
50
|
+
}, time + 500);
|
|
51
|
+
|
|
52
|
+
return () => {
|
|
53
|
+
console.log("clear timeout");
|
|
54
|
+
clearTimeout(timerId);
|
|
55
|
+
};
|
|
56
|
+
}, [open]);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<>
|
|
60
|
+
{
|
|
61
|
+
open && (
|
|
62
|
+
<ToasterWrapper ref={toastRef} variant={variant} open={open}>
|
|
63
|
+
<i className="fa-regular fa-circle-check"></i>
|
|
64
|
+
<ShowToastMessage className="message">{message}</ShowToastMessage>
|
|
65
|
+
<ImageComponent onClick={onClose} className={'pointer cross_icon'} src={CLOSE_ICON} style={{color:"8696a0", filter:"invert(0.5)"}} alt="close_icon" />
|
|
66
|
+
</ToasterWrapper>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
<style jsx="true">{`
|
|
71
|
+
@keyframes animate-left-in {
|
|
72
|
+
from {
|
|
73
|
+
bottom: 0px;
|
|
74
|
+
opacity: 0;
|
|
75
|
+
}
|
|
76
|
+
to {
|
|
77
|
+
bottom: 40px;
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
@keyframes animate-left-out {
|
|
82
|
+
from {
|
|
83
|
+
bottom: 40px;
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
to {
|
|
87
|
+
bottom: 0px;
|
|
88
|
+
opacity: 0;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`}</style>
|
|
92
|
+
</>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
Toaster.propTypes = {
|
|
97
|
+
message: PropTypes.string.isRequired,
|
|
98
|
+
variant: PropTypes.oneOf(["success", "error", "warning"]),
|
|
99
|
+
open: PropTypes.oneOf([true, false]).isRequired,
|
|
100
|
+
onClose: PropTypes.func,
|
|
101
|
+
time: PropTypes.number,
|
|
102
|
+
anchorOrigin: PropTypes.exact({
|
|
103
|
+
vertical: PropTypes.oneOf(["top", "bottom"]),
|
|
104
|
+
horizontal: PropTypes.oneOf(["left", "center", "right"])
|
|
105
|
+
})
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
Toaster.defaultProps = {
|
|
109
|
+
time: 4000,
|
|
110
|
+
variant: "success",
|
|
111
|
+
anchorOrigin: {
|
|
112
|
+
vertical: "bottom",
|
|
113
|
+
horizontal: "left"
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export default Toaster;
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import MenuDialog from "../menuDialog";
|
|
3
|
+
import styled, { css } from "styled-components";
|
|
4
|
+
import ImageComponent from "../../../components/ImageComponent";
|
|
5
|
+
import Menu from "@mui/material/Menu";
|
|
6
|
+
import { mobile } from "../../../utils/media";
|
|
7
|
+
import { decodeChatBody, formatDate, getTimeWithMeridian, getTypingMessage } from "../../../lib/helpers";
|
|
8
|
+
import { USER_UNBLOCK_CONVERSATION } from "../../../lib/constant";
|
|
9
|
+
|
|
10
|
+
const UserChatBox = styled.div`
|
|
11
|
+
padding-right: 15px;
|
|
12
|
+
height: 72px;
|
|
13
|
+
border-bottom: 1px solid var(--border_color);
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-basis: auto;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
flex-grow: 1;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
const GridCell = styled.div`
|
|
23
|
+
text-align: left;
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
line-height: normal;
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
const CellFrameTitle = styled.div`
|
|
30
|
+
color: #fff;
|
|
31
|
+
text-align: left;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
line-height: normal;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-grow: 1;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
font-size: 17px;
|
|
38
|
+
overflow-wrap: break-word;
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
const CellFrameUserName = styled.div`
|
|
42
|
+
text-overflow: ellipsis;
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
display: inline-block;
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
color: var(--black);
|
|
47
|
+
overflow-x: hidden;
|
|
48
|
+
position: relative;
|
|
49
|
+
color: var(--black);
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
const CellFramePrimaryDetail = styled.div`
|
|
53
|
+
margin-top: 3px;
|
|
54
|
+
margin-left: 6px;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
color: var(--profile-color);
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
line-height: 14px;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
flex: none;
|
|
62
|
+
max-width: 100%;
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
const MessageLastTime = styled.div`
|
|
67
|
+
text-transform: capitalize;
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
const CellFrameSecondary = styled.div`
|
|
71
|
+
color: #8696a0;
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
margin-top: 2px
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
min-height: 20px;
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
line-height: 20px;
|
|
79
|
+
`;
|
|
80
|
+
|
|
81
|
+
const LastMessageShow = styled.div`
|
|
82
|
+
text-align: left;
|
|
83
|
+
background-color: initial;
|
|
84
|
+
font-weight: 500;
|
|
85
|
+
flex-grow: 1;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
font-size: 14px;
|
|
88
|
+
line-height: 20px;
|
|
89
|
+
text-overflow: ellipsis;
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
padding: 3px 0;
|
|
92
|
+
display: flex;
|
|
93
|
+
`;
|
|
94
|
+
|
|
95
|
+
const Message = styled.div`
|
|
96
|
+
display: inline-block;
|
|
97
|
+
align-items: flex-start;
|
|
98
|
+
position: relative;
|
|
99
|
+
overflow-x: hidden;
|
|
100
|
+
flex-grow: 1;
|
|
101
|
+
overflow-y: hidden;
|
|
102
|
+
text-overflow: ellipsis;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
const BadgeDots = styled.div`
|
|
107
|
+
box-sizing: border-box;
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
font-size: 0.75rem;
|
|
110
|
+
padding: 0 6px;
|
|
111
|
+
height: 20px;
|
|
112
|
+
border-radius: 10px;
|
|
113
|
+
transition: transform 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
114
|
+
background-color:var(--profile-color);
|
|
115
|
+
color: #fff;
|
|
116
|
+
width: fit-content;
|
|
117
|
+
|
|
118
|
+
&:hover {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
121
|
+
`;
|
|
122
|
+
|
|
123
|
+
const UserInfo = styled.div`
|
|
124
|
+
background: ${(props) =>
|
|
125
|
+
props.isActiveChat && "var(--chat_hover)"};
|
|
126
|
+
${mobile(css`
|
|
127
|
+
background: transparent;
|
|
128
|
+
`)}
|
|
129
|
+
.userProfileContainer {
|
|
130
|
+
padding: 0px 15px 0px 13px;
|
|
131
|
+
}
|
|
132
|
+
.user-image {
|
|
133
|
+
height: 49px;
|
|
134
|
+
width: 49px;
|
|
135
|
+
border-radius: 50%;
|
|
136
|
+
}
|
|
137
|
+
`;
|
|
138
|
+
|
|
139
|
+
let chatMenuData = [
|
|
140
|
+
"Archive chat",
|
|
141
|
+
"Mute notifications",
|
|
142
|
+
"Exit group",
|
|
143
|
+
"Pin chat",
|
|
144
|
+
"Mark as read",
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
const UserDetailCard = (props) => {
|
|
148
|
+
const {
|
|
149
|
+
data,
|
|
150
|
+
dataHandler,
|
|
151
|
+
index,
|
|
152
|
+
anchorEl,
|
|
153
|
+
open,
|
|
154
|
+
handleClosemodal,
|
|
155
|
+
dispatch,
|
|
156
|
+
state,
|
|
157
|
+
getCurrentUserDetailsHandler,
|
|
158
|
+
currentUserConversationDetails,
|
|
159
|
+
findUserId,
|
|
160
|
+
findUserIndex,
|
|
161
|
+
isActiveChat,
|
|
162
|
+
profileClose,
|
|
163
|
+
setMediaDocs
|
|
164
|
+
} = props;
|
|
165
|
+
|
|
166
|
+
const getTime =
|
|
167
|
+
getTimeWithMeridian(new Date(data?.lastMessageDetails.sentAt));
|
|
168
|
+
|
|
169
|
+
return (
|
|
170
|
+
<>
|
|
171
|
+
{
|
|
172
|
+
(data.lastMessageDetails?.hasOwnProperty('body') || data?.lastMessageDetails?.action === USER_UNBLOCK_CONVERSATION ) &&
|
|
173
|
+
<div key={data?.opponentDetails?.userId}>
|
|
174
|
+
<UserInfo
|
|
175
|
+
className="user_Info"
|
|
176
|
+
onClick={() => {
|
|
177
|
+
dataHandler(data);
|
|
178
|
+
getCurrentUserDetailsHandler(data);
|
|
179
|
+
profileClose();
|
|
180
|
+
setMediaDocs();
|
|
181
|
+
}}
|
|
182
|
+
isActiveChat={
|
|
183
|
+
isActiveChat
|
|
184
|
+
}
|
|
185
|
+
>
|
|
186
|
+
{data?.createdByUserImageUrl ? (
|
|
187
|
+
<div className="userProfileContainer">
|
|
188
|
+
<ImageComponent
|
|
189
|
+
src={data?.opponentDetails?.userProfileImageUrl}
|
|
190
|
+
className="user-image"
|
|
191
|
+
alt={data?.opponentDetails?.userName}
|
|
192
|
+
/>
|
|
193
|
+
</div>
|
|
194
|
+
) : (
|
|
195
|
+
<div className="userContact_image" style={{ textAlign: "center" }}>
|
|
196
|
+
{data?.name?.charAt(0)}
|
|
197
|
+
</div>
|
|
198
|
+
)}
|
|
199
|
+
|
|
200
|
+
<UserChatBox>
|
|
201
|
+
<GridCell>
|
|
202
|
+
<CellFrameTitle>
|
|
203
|
+
<CellFrameUserName>
|
|
204
|
+
{data?.opponentDetails?.userName}
|
|
205
|
+
</CellFrameUserName>
|
|
206
|
+
</CellFrameTitle>
|
|
207
|
+
<CellFramePrimaryDetail>
|
|
208
|
+
<MessageLastTime>{formatDate(data?.lastMessageDetails?.sentAt)}</MessageLastTime>
|
|
209
|
+
</CellFramePrimaryDetail>
|
|
210
|
+
</GridCell>
|
|
211
|
+
<CellFrameSecondary>
|
|
212
|
+
<LastMessageShow>
|
|
213
|
+
<Message>{decodeChatBody(data?.lastMessageDetails?.body)}</Message>
|
|
214
|
+
{data.unreadMessagesCount > 0 && (
|
|
215
|
+
<BadgeDots>{data.unreadMessagesCount}</BadgeDots>
|
|
216
|
+
)}
|
|
217
|
+
</LastMessageShow>
|
|
218
|
+
</CellFrameSecondary>
|
|
219
|
+
</UserChatBox>
|
|
220
|
+
</UserInfo>
|
|
221
|
+
{/* {pinChat ? (
|
|
222
|
+
<div>
|
|
223
|
+
{aar?.map((item, index) => {
|
|
224
|
+
return (
|
|
225
|
+
<div
|
|
226
|
+
className={`${
|
|
227
|
+
item == data?.id ? "d-block " : "d-none"
|
|
228
|
+
}`}
|
|
229
|
+
>
|
|
230
|
+
<h>
|
|
231
|
+
<svg
|
|
232
|
+
style={{
|
|
233
|
+
position: "absolute",
|
|
234
|
+
top: "34px",
|
|
235
|
+
right: "65px",
|
|
236
|
+
}}
|
|
237
|
+
height="15"
|
|
238
|
+
width="15"
|
|
239
|
+
preserveAspectRatio="xMidYMid meet"
|
|
240
|
+
class="text_Color"
|
|
241
|
+
>
|
|
242
|
+
<path
|
|
243
|
+
fill="currentColor"
|
|
244
|
+
d="M12.074 4.21 8.7 8.232l.116 4.233a.4.4 0 0 1-.657.318L.43 6.297a.4.4 0 0 1 .199-.702l4.196-.622L8.196.957a.63.63 0 0 1 .887-.078l2.914 2.445a.63.63 0 0 1 .077.887ZM1.294 14.229a.713.713 0 0 1-1.09-.915l2.674-3.64 1.536 1.288-3.12 3.267Z"
|
|
245
|
+
></path>
|
|
246
|
+
</svg>
|
|
247
|
+
</h>
|
|
248
|
+
</div>
|
|
249
|
+
);
|
|
250
|
+
})}
|
|
251
|
+
</div>
|
|
252
|
+
) : (
|
|
253
|
+
""
|
|
254
|
+
)} */}
|
|
255
|
+
|
|
256
|
+
{/* <div>
|
|
257
|
+
{markRead?.map((item, index) => {
|
|
258
|
+
return (
|
|
259
|
+
<div
|
|
260
|
+
className={`${
|
|
261
|
+
item == data?.id ? "d-block " : "d-none"
|
|
262
|
+
}`}
|
|
263
|
+
>
|
|
264
|
+
<div
|
|
265
|
+
style={{
|
|
266
|
+
height: "22px",
|
|
267
|
+
width: "22px",
|
|
268
|
+
borderRadius: "20px",
|
|
269
|
+
background: "#25d366",
|
|
270
|
+
position: "absolute",
|
|
271
|
+
top: "31px",
|
|
272
|
+
right: "40px",
|
|
273
|
+
}}
|
|
274
|
+
>
|
|
275
|
+
{" "}
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
);
|
|
279
|
+
})}
|
|
280
|
+
</div> */}
|
|
281
|
+
|
|
282
|
+
{/* { <p className={!isModalShow ? "d-none" : ""}> } */}
|
|
283
|
+
<div
|
|
284
|
+
// className={`${index == isShown ? "d-block " : "d-none"}`}
|
|
285
|
+
style={
|
|
286
|
+
{
|
|
287
|
+
// position: "fixed",
|
|
288
|
+
// zIndex: "10000",
|
|
289
|
+
// transformOrigin: "left top",
|
|
290
|
+
// transform: "scale(1)",
|
|
291
|
+
// opacity: "1",
|
|
292
|
+
// top: "30%",
|
|
293
|
+
// width: "15%",
|
|
294
|
+
// boxShadow:
|
|
295
|
+
// "0 2px 5px 0 rgba(var(--shadow-rgb),.26),0 2px 10px 0 rgba(var(--shadow-rgb),.16)",
|
|
296
|
+
// overflow: "hidden",
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
>
|
|
300
|
+
{/* <Menu
|
|
301
|
+
isShown={data?.id}
|
|
302
|
+
chatDelete={chatDelete}
|
|
303
|
+
chatPin={chatPin}
|
|
304
|
+
chatUnPin={chatUnPin}
|
|
305
|
+
handleClose={handleClose}
|
|
306
|
+
data={data}
|
|
307
|
+
pinedData={pinedData}
|
|
308
|
+
markChatPin={markChatPin}
|
|
309
|
+
markedData={markedData}
|
|
310
|
+
markUnchat={markUnchat}
|
|
311
|
+
/> */}
|
|
312
|
+
|
|
313
|
+
<Menu
|
|
314
|
+
id="basic-menu"
|
|
315
|
+
anchorEl={anchorEl}
|
|
316
|
+
open={open}
|
|
317
|
+
onClose={handleClosemodal}
|
|
318
|
+
MenuListProps={{
|
|
319
|
+
"aria-labelledby": "basic-button",
|
|
320
|
+
}}
|
|
321
|
+
>
|
|
322
|
+
<MenuDialog
|
|
323
|
+
menuData={chatMenuData}
|
|
324
|
+
dispatch={dispatch}
|
|
325
|
+
state={state}
|
|
326
|
+
/>
|
|
327
|
+
</Menu>
|
|
328
|
+
</div>
|
|
329
|
+
{/* {/ </p> /}
|
|
330
|
+
{/ </div> /} */}
|
|
331
|
+
</div>
|
|
332
|
+
}
|
|
333
|
+
</>
|
|
334
|
+
);
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
export default UserDetailCard;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { mobile } from '../../utils/media';
|
|
4
|
+
|
|
5
|
+
const ModalContainer = styled.div`
|
|
6
|
+
background-color: var(--modal_color);
|
|
7
|
+
color: var(--black);
|
|
8
|
+
position: absolute;
|
|
9
|
+
width: 32rem;
|
|
10
|
+
top: 50%;
|
|
11
|
+
left: 50%;
|
|
12
|
+
box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);
|
|
13
|
+
-webkit-transform: translate(-50%,-50%);
|
|
14
|
+
-ms-transform: translate(-50%,-50%);
|
|
15
|
+
transform: translate(-50%,-50%);
|
|
16
|
+
padding: 20px 24px 6px 22px;
|
|
17
|
+
${mobile(css`
|
|
18
|
+
max-width: 320px;
|
|
19
|
+
`)}
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
const ModalTitle = styled.h5`
|
|
23
|
+
margin-top: 20px;
|
|
24
|
+
text-transform:capitalize;
|
|
25
|
+
${mobile(css`
|
|
26
|
+
font-size: 18px;
|
|
27
|
+
`)}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const ModalDescription = styled.p`
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
${mobile(css`
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
`)}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
const ButtonAction = styled.div`
|
|
39
|
+
display:flex;
|
|
40
|
+
flex-direction:column;
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
margin:3rem 0 20px;
|
|
43
|
+
|
|
44
|
+
${mobile(css`
|
|
45
|
+
margin:1.5rem 0 20px;
|
|
46
|
+
`)}
|
|
47
|
+
.cancleBtn{
|
|
48
|
+
width: fit-content;
|
|
49
|
+
margin: 0.5rem 0;
|
|
50
|
+
margin-left: auto;
|
|
51
|
+
background:var(--white);
|
|
52
|
+
color:var(--button-primary-background);
|
|
53
|
+
border:1px solid var(--border_color)};
|
|
54
|
+
|
|
55
|
+
.logoutBtn{
|
|
56
|
+
background-color:var(--button-primary-background);
|
|
57
|
+
color:var(--white);
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
|
|
61
|
+
const Button = styled.button`
|
|
62
|
+
margin-left:15px;
|
|
63
|
+
border-radius:20px;
|
|
64
|
+
border:none;
|
|
65
|
+
padding:5px 20px 5px 20px;
|
|
66
|
+
`;
|
|
67
|
+
function DeleteMessageModal({deleteMesageHandler ,cancleDeleteMessage,deleteMessageEveryone}) {
|
|
68
|
+
return (
|
|
69
|
+
<ModalContainer>
|
|
70
|
+
<ModalTitle>Delete Message </ModalTitle>
|
|
71
|
+
<ButtonAction className="logoutActionbtn">
|
|
72
|
+
<Button className="cancleBtn" onClick={deleteMessageEveryone} >Delete for everyone</Button>
|
|
73
|
+
<Button className="cancleBtn" onClick={deleteMesageHandler} >Delete for Me</Button>
|
|
74
|
+
<Button className="cancleBtn" onClick={cancleDeleteMessage} >Cancel</Button>
|
|
75
|
+
</ButtonAction>
|
|
76
|
+
</ModalContainer>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default DeleteMessageModal
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React,{useState} from 'react';
|
|
2
|
+
import EmojiPicker from 'emoji-picker-react';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
// const onEmojiClick = (event , emojiObject)=>{
|
|
6
|
+
// setChosenEmoji(emojiObject)
|
|
7
|
+
|
|
8
|
+
// }
|
|
9
|
+
|
|
10
|
+
function Emoji() {
|
|
11
|
+
// const [chosenEmoji , setChosenEmoji] = useState(null);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div>
|
|
15
|
+
<EmojiPicker />
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default Emoji
|
|
22
|
+
|
|
File without changes
|