1 |
- {"version":3,"sources":["components/HomePage/LeftBar/SmallMenuBar/index.tsx","components/HomePage/LeftBar/SearchLists/ChatListRecent/RecentItem/index.tsx","components/HomePage/LeftBar/SearchLists/ChatListRecent/ChatItem/index.tsx","components/reusableComponents/AlertInfo/index.tsx","components/HomePage/LeftBar/SearchLists/ChatListRecent/index.tsx","components/HomePage/LeftBar/SearchLists/FilesList/index.tsx","components/HomePage/LeftBar/SearchLists/MediaList/MediaListItem/index.tsx","components/HomePage/LeftBar/SearchLists/MediaList/index.tsx","components/HomePage/LeftBar/SearchLists/TextList/index.tsx","components/HomePage/LeftBar/SearchLists/AudioList/index.tsx","components/HomePage/LeftBar/SearchLists/VideoList/index.tsx","redux/allMessages/operations/index.ts","redux/chats/selector/index.ts","redux/allMessages/selector/index.ts","redux/control/selector/index.ts","redux/chat/operations/index.ts","components/HomePage/LeftBar/SearchLists/index.tsx","components/HomePage/LeftBar/SearchBar/StaticDatePicker/index.tsx","components/HomePage/LeftBar/SearchBar/index.tsx","components/HomePage/LeftBar/ChatsList/ChatItem/DeleteModal/index.tsx","components/HomePage/LeftBar/ChatsList/ChatItem/index.tsx","components/HomePage/LeftBar/ChatsList/index.tsx","components/HomePage/LeftBar/MenuBar/index.tsx","components/HomePage/LeftBar/ContactsList/ContactItem/index.tsx","redux/contacts/selector/index.ts","components/HomePage/LeftBar/ContactsList/index.tsx","redux/contacts/operations/index.ts","components/HomePage/LeftBar/AddContact/ToolBar/index.tsx","components/HomePage/LeftBar/AddContact/index.tsx","components/HomePage/LeftBar/SettingsBar/ToolBar/MenuList/index.tsx","components/HomePage/LeftBar/SettingsBar/ToolBar/index.tsx","components/HomePage/LeftBar/SettingsBar/SettingsPicture/DeleteModal/index.tsx","components/HomePage/LeftBar/SettingsBar/SettingsPicture/index.tsx","components/HomePage/LeftBar/SettingsBar/SettingsMenu/index.tsx","components/HomePage/LeftBar/SettingsBar/index.tsx","components/HomePage/LeftBar/EditBar/ToolBar/index.tsx","components/HomePage/LeftBar/EditBar/EditList/index.tsx","components/HomePage/LeftBar/EditBar/SubmitBtn/index.tsx","components/HomePage/LeftBar/EditBar/index.tsx","components/HomePage/LeftBar/index.tsx","components/HomePage/RightBar/HeaderBar/Credentials/index.tsx","components/HomePage/RightBar/HeaderBar/Buttons/MenuList/index.tsx","components/HomePage/RightBar/HeaderBar/Buttons/DeleteModal/index.tsx","components/HomePage/RightBar/HeaderBar/Buttons/index.tsx","components/HomePage/RightBar/HeaderBar/index.tsx","components/HomePage/RightBar/ChatBar/ArrowBack/index.tsx","components/HomePage/RightBar/ChatBar/FilesMenu/UploadFile/index.tsx","components/HomePage/RightBar/ChatBar/FilesMenu/index.tsx","components/HomePage/RightBar/ChatBar/SendMessage/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageLeftText/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageLeftImage/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageLeftAudio/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageLeftVideo/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageLeftFile/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageRightText/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageRightImage/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageRightAudio/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageRightVideo/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageRightFile/index.tsx","components/HomePage/RightBar/ChatBar/Messages/MessageTime/index.tsx","redux/messages/selector/index.ts","redux/messages/operations/index.ts","components/HomePage/RightBar/ChatBar/index.tsx","components/HomePage/RightBar/RightListsAndBars/SearchList/Search/StaticDatePicker/index.tsx","components/HomePage/RightBar/RightListsAndBars/SearchList/Search/index.tsx","components/HomePage/RightBar/RightListsAndBars/SearchList/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ToolBar/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfilePicture/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfileMenu/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfileLists/AudioList/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfileLists/MediaList/MediaListItem/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfileLists/MediaList/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfileLists/FilesList/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfileLists/TextList/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfileLists/VideoList/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/ProfileLists/index.tsx","components/HomePage/RightBar/RightListsAndBars/CredentialsList/index.tsx","components/HomePage/RightBar/RightListsAndBars/EditBar/ToolBar/index.tsx","components/HomePage/RightBar/RightListsAndBars/EditBar/EditList/index.tsx","components/HomePage/RightBar/RightListsAndBars/EditBar/Delete/index.tsx","components/HomePage/RightBar/RightListsAndBars/EditBar/SubmitBtn/index.tsx","components/HomePage/RightBar/RightListsAndBars/EditBar/index.tsx","components/HomePage/RightBar/RightListsAndBars/index.tsx","components/HomePage/RightBar/index.tsx","redux/chats/operations/index.ts","components/HomePage/index.tsx"],"names":["StyledMenu","styled","props","Menu","elevation","anchorOrigin","vertical","horizontal","transformOrigin","theme","borderRadius","marginTop","spacing","minWidth","color","palette","mode","grey","boxShadow","padding","marginBottom","fontSize","text","secondary","marginRight","useStyles","makeStyles","container","position","maxWidth","top","right","zIndex","cursor","SmallMenuBar","handleSelectedMenu","setIsMenuSm","classes","useState","anchorEl","setAnchorEl","open","Boolean","handleClose","className","Avatar","onClick","e","currentTarget","sx","bgcolor","width","height","id","aria-labelledby","onClose","MenuItem","stackItem","display","flexDirection","justifyContent","alignContent","alignItems","background","titleName","paddingTop","RecentItem","handleListItemClick","chat","name","lastName","avatarUrl","companionId","alt","src","prodBaseURL","undefined","firstLetter","Typography","variant","slicedWord","listItemInnerText","flexWrap","listItem_iconAvatar","listItem_iconRight","listItem_icon_time","marginLeft","paddingBottom","ChatItem","lastMessage","lastMessageCreatedAt","createdAt","ListItemButton","ListItemIcon","ListItemText","primary","timeStampEU","AlertInfo","Stack","Alert","severity","AlertTitle","stack","maxHeight","overflowY","webkitBoxShadow","backgroundColor","ChatListRecent","value","date","filteredAndSorted","length","direction","slice","map","List","component","aria-label","folderIcon","listItem","FilesList","messagesMemo","sort","setDisabled","filtered","filter","type","filteredMessages","handleSort","useEffect","message","fullType","ListItem","ListItemAvatar","handleDownload","Divider","overlay","left","boxSizing","wrapper","downloadIcon","content","img","scale","time","MediaListItem","updatedAt","watch","setWatch","url","target","ImageListItem","srcSet","loading","MediaList","ImageList","cols","rowHeight","copyIcon","TextList","style","wordBreak","secondaryTypographyProps","onCopy","copied","AudioList","VideoList","asyncGetAllMessages","dispatch","a","getAllMessages","data","actionGetAllMessagesSuccess","actionGetAllMessagesReject","getStateMemo","createSelector","state","chats","getAllMessagesMemo","allMessages","messages","getIsOpen","control","isOpen","getScroll","scroll","asyncStartChatById","startChat","actionSelectChat","borderBottom","item","icon","lineHeight","fontWeight","underline","SearchLists","setValue","setDate","useDispatch","useSelector","total","isActive","setIsActive","handleIsActive","newValue","idInterval","setInterval","clearInterval","sortByRecent","el","credentials","toLowerCase","includes","timeStampFilter","actionIsOpen","StaticDatePicker","disabled","changeDate","handleOnOpen","DatePicker","inputVariant","orientation","openTo","autoOk","Date","onOpen","onChange","Search","margin","SearchIconWrapper","pointerEvents","StyledInputBase","InputBase","paddingLeft","transition","transitions","create","toolBar","activeSearch","outline","iconBtn","transform","iconArrow","label","inputProps","SearchBar","handleClick","handleOpenIsSearch","handleSearch","isSearch","Toolbar","IconButton","onFocus","placeholder","size","Switch","updateUser","checked","modalDelete","bottom","titleWrapper","DeleteModal","setModal","removeChatForBoth","Button","StyledBadge","Badge","paper","animation","border","opacity","listItemInnerText__icon","listItem_iconTimeChecked","listItem_iconRightBtn","textAlign","listItem_iconRightBtnMute","listItem_iconRightBtnHidden","listItem_typing","listItem_dots","fontFamily","clipPath","to","handleNewMsgs","selected","setSelected","modal","mute","seen","watched","typing","online","muteChat","onContextMenu","preventDefault","handleContextMenu","overlap","list","ChatsList","chatsRef","useRef","sortedChats","setSortedChats","getChatMemo","stopPropagation","actionScroll","find","actionRemoveChat","current","forEach","i","oldDifferent","playNotificationWithoutPermission","notification","number","visibility","listItemLast","listIcon","listIconText","MenuBar","nightMode","Paper","textDecoration","href","ContactItem","contact","_id","removeContact","getState","contacts","getContactsMemo","ContactsList","arr","asyncGetContacts","getContacts","actionGetContactsSuccess","actionGetContactsReject","asyncAddContact","addContact","ToolBar","title","buttonNext","textField","AddContact","setSelectedIndex","setNumber","handleAddContact","isValidNumber","onKeyDown","code","TextField","fullWidth","split","join","trim","required","MenuList","asyncLogout","index","setIndex","removeUserAvatar","nameTile","timeTile","iconDeleteWrapper","iconDelete","SettingsPicture","avatarsArr","selectedItem","SettingsMenu","getNumber","SettingsBar","imgWrapper","imgDropZoneOverlay","addPhoto","avatarArrow","alignSelf","EditList","user","setName","setLastName","openBtn","setOpenBtn","setFile","useDropzone","noDrag","accept","getRootProps","getInputProps","acceptedFiles","handleTextField","format","SubmitBtn","handleSubmit","EditBar","file","Name","LastName","updateCredentials","originalName","originalLastName","formData","FormData","append","updateUserAvatar","LeftBar","setIsSearch","isMenu","setIsMenu","isMenuSm","selectedIndex","modalRoot","handleCloseModal","document","getElementById","addEventListener","removeEventListener","Grid","lg","onMouseEnter","onMouseLeave","createPortal","Credentials","getChat","Buttons","HeaderBar","AppBar","avatarArrowWrapper","listSeenIcon","ArrowBack","isArrow","handleScrollTo","isNew","new","dropZone","UploadFile","children","listText","FilesMenu","setIsOpenMenu","setType","textarea","resize","attachIcon","borderTop","filesMenu","emoji","iconCancel","avatarCamera","avatarRight","ringContainerLeft","ringContainerRight","circle","ringRing","animationIterationCount","SendMessage","isOpenMenu","isOpenEmoji","setIsOpenEmoji","isRecording","setIsRecording","isFilming","setIsFilming","useReactMediaRecorder","audio","status","startRecording","stopRecording","mediaBlobUrl","clearBlobUrl","video","_status","_startRecording","_stopRecording","_mediaBlobUrl","_clearBlobUrl","clearMessage","sentMessage","sentMessageById","XMLHttpRequest","responseType","onload","blob","response","File","sentAudioMessageById","send","sentVideoMessageById","sentImgMessageById","sentFileMessageById","playNotification","handleFocusTextarea","typingChat","handleBlurTextarea","onEmojiClick","_e","emojiObject","prevValue","onBlur","rows","font","borderLeft","borderRight","messageActive","MessageLeftText","primaryTypographyProps","timeStampMessage","removeMessageById","wrapperActive","image","bntDownload","wrapperOverlayImg","overlayDownloadIcon","overlayTime","overlayDelete","MessagesLeftImage","player","MessageLeftAudio","controls","Player","require","playerActive","MessageLeftVideo","playsInline","FileViewer","MessageLeftFile","read","setRead","handleCloseRead","allowFullScreen","fileType","filePath","onError","rel","download","MessageRightText","MessageRightImage","MessageRightAudio","MessageRightVideo","MessageRightFile","MessageTime","getMessages","getMessagesMemo","asyncGetMessagesById","cb","getMessagesById","actionGetMessagesSuccess","actionGetMessagesReject","debounce","messagesScroll","messagesEmpty","messagesBody","ChatBar","userNumber","setIsArrow","setIsNew","divRef","scrollTo","scrollHeight","behavior","handleScroll","useCallback","scrollTop","clientHeight","different","Math","floor","seenChat","debouncedHandleScroll","getChatById","actionGetChatById","ref","onScroll","isTime","MessageLeftImage","searchBarActive","sortChat","SearchList","iconClose","contactsMemo","isContact","setIsContact","ProfilePicture","ProfileMenu","overflow","ProfileLists","filterBy","scrollContainer","CredentialsList","notifications","setMute","Checkbox","Delete","editBar","Mute","updateContact","RightListsAndBars","chatBar","RightBar","handleIsOpen","asyncGetChats","getChats","actionGetChatsSuccess","actionGetChatsReject","minHeight","HomePage","asyncCurrentUser"],"mappings":"0SAYMA,EAAaC,aAAO,SAACC,GAAD,OACxB,cAACC,EAAA,EAAD,aACEC,UAAW,EACXC,aAAc,CACZC,SAAU,MACVC,WAAY,SAEdC,gBAAiB,CACfF,SAAU,S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eAFK,QAElB5a,EAFkB,SAGlBH,EAASgb,aAAsB7a,IAHb,gDAKxBH,EAASib,gBALe,yDAAN,uDCGhBhkB,GAAYC,YAAW,CACzBC,UAAW,CACP+jB,UAAW,QACXnf,UAAW,WA6BJof,UAzBE,WACf,IAAMtjB,EAAUZ,KACV+I,EAAW8B,cAenB,OAbErE,qBAAU,WACRuC,EAAS8a,MACT9a,EAASoK,MACTpK,EAASob,gBACT,IAKM/Y,EAAaC,aALC,WAClBtC,EAAS8a,MACT9a,EAASoK,MACTpK,EAASob,kBAEiC,KAC5C,OAAO,kBAAM7Y,cAAcF,MAC1B,CAACrC,IAGF,eAACuP,EAAA,EAAD,CAAMnX,UAAWP,EAAQV,UAAWA,WAAS,EAACf,QAAS,EAAvD,UACE,cAAC,GAAD,IACA,cAAC,GAAD","file":"static/js/HomePage.e4112ee6.chunk.js","sourcesContent":["import { makeStyles } from '@material-ui/core'\r\nimport React, { useState } from 'react';\r\nimport { styled } from '@mui/material/styles';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport ChatIcon from '@mui/icons-material/Chat';\r\nimport PermContactCalendarIcon from '@mui/icons-material/PermContactCalendar';\r\nimport ModeEditOutlineOutlinedIcon from '@mui/icons-material/ModeEditOutlineOutlined';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport PersonAddAltIcon from '@mui/icons-material/PersonAddAlt';\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(-2),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '8px 8px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(4),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n maxWidth: '100%',\r\n top: '92vh',\r\n right: 20,\r\n zIndex: 10,\r\n cursor:'pointer'\r\n },\r\n})\r\n\r\ninterface ISmallMenuBar {\r\n handleSelectedMenu:(i:number) => void,\r\n setIsMenuSm:React.Dispatch<React.SetStateAction<boolean>>,\r\n}\r\nconst SmallMenuBar = ({handleSelectedMenu,setIsMenuSm}:ISmallMenuBar) => {\r\n const classes = useStyles()\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const open = Boolean(anchorEl);\r\n const handleClick = (e: React.MouseEvent<HTMLDivElement>):void => setAnchorEl(e.currentTarget)\r\n\r\n const handleClose = ():void => {\r\n setIsMenuSm(false)\r\n setAnchorEl(null)\r\n }\r\n\r\n return (\r\n <div className={classes.container}>\r\n <Avatar onClick={handleClick} sx={{\r\n bgcolor: 'rgb(41, 139, 231)',\r\n width: 56, height: 56 }}>\r\n {!anchorEl?<ModeEditOutlineOutlinedIcon />:<CloseIcon/>}\r\n </Avatar>\r\n <StyledMenu\r\n id=\"demo-positioned-menu\"\r\n aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl}\r\n open={open}\r\n onClose={handleClose}\r\n >\r\n <MenuItem onClick={() => {\r\n handleClose();\r\n handleSelectedMenu(3)\r\n }}>\r\n <PersonAddAltIcon/>\r\n New Contact\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleClose();\r\n handleSelectedMenu(1)\r\n }}>\r\n <PermContactCalendarIcon/>\r\n Contacts\r\n </MenuItem> \r\n </StyledMenu> \r\n </div>\r\n );\r\n}\r\nexport default SmallMenuBar","import { makeStyles, Typography } from '@material-ui/core'\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { slicedWord, firstLetter,prodBaseURL } from '../../../../../../helpers';\r\nimport { TChat } from '../../../../../../typescript/redux/chats/types';\r\n\r\nconst useStyles = makeStyles({\r\n stackItem: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n padding:5,\r\n borderRadius: 5,\r\n cursor:'pointer',\r\n '&:hover': {\r\n background: '#eeeded'\r\n }\r\n },\r\n titleName: {\r\n color: '#575757',\r\n fontSize: 16,\r\n paddingTop:5\r\n }\r\n})\r\n\r\ninterface IRecentItem {\r\n handleListItemClick: (companionId: string) => void,\r\n chat:TChat,\r\n}\r\n\r\nconst RecentItem = ({handleListItemClick,chat}:IRecentItem) => {\r\n const classes = useStyles()\r\n const { name, lastName,color,avatarUrl,companionId } = chat\r\n \r\n \r\n\r\nreturn (\r\n <div onClick={() => handleListItemClick(companionId)} className={classes.stackItem}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 54, height: 54}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n <Typography variant=\"h6\" className={classes.titleName} >{`${firstLetter(name)}${slicedWord(name, 8, 1)}`}</Typography>\r\n </div>\r\n )\r\n}\r\n\r\nexport default RecentItem","import { makeStyles,Typography } from '@material-ui/core'\r\nimport ListItemButton from '@mui/material/ListItemButton';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\n\r\nimport { TChat } from '../../../../../../typescript/redux/chats/types';\r\nimport { firstLetter,slicedWord,timeStampEU,prodBaseURL } from '../../../../../../helpers';\r\n\r\nconst useStyles = makeStyles({\r\n listItemInnerText: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n flexWrap: 'nowrap',\r\n },\r\n listItem_iconAvatar: {\r\n marginRight:10\r\n },\r\n listItem_iconRight: {\r\n marginRight: 10,\r\n },\r\n listItem_icon_time: {\r\n fontSize: 12,\r\n marginLeft: 5,\r\n paddingBottom:25,\r\n color: '#1b1b1b'\r\n },\r\n})\r\n\r\ninterface IChatItem {\r\n chat: TChat,\r\n handleListItemClick: (companionId: string) => void,\r\n}\r\n\r\nconst ChatItem = ({chat,handleListItemClick}:IChatItem) => {\r\n const classes = useStyles()\r\n const {name,lastName,avatarUrl,color,companionId,lastMessage,lastMessageCreatedAt,createdAt} = chat\r\n\r\n return (\r\n <ListItemButton onClick={() => handleListItemClick(companionId)}>\r\n <ListItemIcon className={classes.listItem_iconAvatar}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 54, height: 54 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemIcon> \r\n <ListItemText primary={`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n secondary={`${lastMessage ? slicedWord(lastMessage, 35) :\r\n `${firstLetter(name)}${slicedWord(name, 8, 1)} joined Telegram`}`}/>\r\n <ListItemIcon className={classes.listItem_iconRight}>\r\n <Typography className={classes.listItem_icon_time} variant=\"h6\" color=\"initial\">\r\n {timeStampEU(lastMessageCreatedAt?lastMessageCreatedAt:createdAt)}\r\n </Typography>\r\n </ListItemIcon> \r\n </ListItemButton> \r\n );\r\n}\r\nexport default ChatItem","import Alert from '@mui/material/Alert';\r\nimport AlertTitle from '@mui/material/AlertTitle';\r\nimport Stack from '@mui/material/Stack';\r\n\r\n\r\nconst AlertInfo = ({ name }: { name: string }) => {\r\nreturn (\r\n <Stack sx={{ width: '100%' }} spacing={2}>\r\n <Alert severity=\"info\">\r\n <AlertTitle>Warning</AlertTitle>\r\n <strong>{name}</strong>\r\n </Alert>\r\n </Stack>\r\n );\r\n}\r\n\r\nexport default AlertInfo","import { makeStyles } from '@material-ui/core'\r\nimport List from '@mui/material/List';\r\nimport Stack from '@mui/material/Stack';\r\n\r\nimport { TChats } from '../../../../../typescript/redux/chats/types';\r\nimport RecentItem from './RecentItem';\r\nimport ChatItem from './ChatItem';\r\nimport AlertInfo from '../../../../reusableComponents/AlertInfo';\r\n\r\nconst useStyles = makeStyles({\r\n stack: {\r\n display: 'flex',\r\n justifyContent: 'space-around',\r\n paddingTop:20,\r\n },\r\n container: {\r\n width: '100%',\r\n maxHeight: '86vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n }, \r\n})\r\n\r\ninterface IChatListRecent {\r\n value: string,\r\n date:any,\r\n filteredAndSorted: TChats,\r\n handleListItemClick: (companionId: string) => void,\r\n}\r\n\r\nconst ChatListRecent = ({value,date,filteredAndSorted,handleListItemClick}:IChatListRecent) => {\r\n const classes = useStyles()\r\n\r\nreturn (\r\n <>\r\n {!value && !date && filteredAndSorted.length > 0 &&\r\n <Stack direction=\"row\" className={classes.stack}>\r\n {filteredAndSorted.slice(0, 6).map((chat) =>\r\n <RecentItem key={chat.companionId} handleListItemClick={handleListItemClick} chat={chat} />)}\r\n </Stack>}\r\n {(value || date) && filteredAndSorted.length > 0 &&\r\n <List className={classes.container} component=\"nav\" aria-label=\"main mailbox folders\">\r\n {filteredAndSorted.map((chat) =>\r\n <ChatItem key={chat.companionId} handleListItemClick={handleListItemClick} chat={chat} />)}\r\n </List>}\r\n {(value || date) && filteredAndSorted.length === 0 && <AlertInfo name={`Can not find Chat by request: ${value}`} />}\r\n {!value && !date && filteredAndSorted.length === 0 &&<AlertInfo name='You do not have any Chats yet!'/>}\r\n </>) \r\n}\r\n\r\nexport default ChatListRecent","import List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport FolderIcon from '@mui/icons-material/Folder';\r\nimport Divider from '@mui/material/Divider';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useEffect } from 'react';\r\n\r\nimport AlertInfo from '../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,handleDownload,filteredMessages,handleSort,prodBaseURL } from '../../../../../helpers'\r\nimport { TAllMessages } from '../../../../../typescript/redux/allMessages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n maxHeight: '86vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n }, \r\n folderIcon: {\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n },\r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n }, \r\n})\r\n\r\ninterface IFilesList {\r\n messagesMemo: TAllMessages,\r\n value: string,\r\n date: any,\r\n setDisabled: React.Dispatch<boolean>,\r\n sort: boolean\r\n}\r\n\r\nconst FilesList = ({ messagesMemo,value,date,sort,setDisabled }: IFilesList) => {\r\n const classes = useStyles()\r\n const filtered = messagesMemo.filter(({type}) => type !== 'text')\r\n const filteredAndSorted = filteredMessages(handleSort('createdAt', filtered, sort),date,value)\r\n \r\n useEffect(() => {\r\n setDisabled(filtered.length > 0?false:true)\r\n }, [filtered, setDisabled])\r\n \r\n return (\r\n <>\r\n {filteredAndSorted.length > 0 &&\r\n <List className={classes.container}>\r\n {filteredAndSorted.map(({ message, createdAt, fullType }) =>\r\n <div key={createdAt}>\r\n <ListItem alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <FolderIcon onClick={() =>\r\n handleDownload(`${prodBaseURL}/${message}`, fullType)}\r\n className={classes.folderIcon} fontSize='large' />\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>}\r\n {(value || date)&& filteredAndSorted.length === 0 && <AlertInfo name={`Can not find Files by request: ${value}`} />}\r\n {!value && !date && filteredAndSorted.length === 0 && <AlertInfo name='You do not have Files yet!'/>}\r\n </>\r\n )\r\n}\r\n\r\nexport default FilesList","\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useState } from 'react';\r\nimport ImageListItem from '@mui/material/ImageListItem';\r\nimport DownloadForOfflineIcon from '@mui/icons-material/DownloadForOffline';\r\nimport { handleDownload,timeStampEU,prodBaseURL } from '../../../../../../helpers'\r\n\r\nconst useStyles = makeStyles({ \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n boxSizing: 'border-box',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center'\r\n },\r\n wrapper: {\r\n width: '30%',\r\n maxHeight: '80%',\r\n position: 'relative',\r\n display: 'flex',\r\n },\r\n downloadIcon: {\r\n position: 'absolute',\r\n content: '',\r\n right: 0,\r\n top: -40,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n borderRadius: '50%',\r\n '&:hover': {\r\n backgroundColor: '#ffffff',\r\n color: '#b8b7b7',\r\n }\r\n },\r\n img: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n scale:0.98\r\n }\r\n },\r\n time: {\r\n position: 'absolute',\r\n content: '', \r\n color: '#ffffff',\r\n top: -30,\r\n left: 0,\r\n borderRadius: 10,\r\n padding:'2px 6px 2px 6px',\r\n backgroundColor:'#707070'\r\n }\r\n});\r\nconst MediaListItem = ({ message,fullType,updatedAt }: { message: string,fullType:string,updatedAt:string }) => {\r\n const classes = useStyles();\r\n const [watch, setWatch] = useState<boolean>(false)\r\n const handleOpenWatch = () => !watch && setWatch(true)\r\n const handleCloseWatch = (e:any) => e.target.id === 'overlay'&&watch&&setWatch(false)\r\n \r\n const url = `${prodBaseURL}/${message}`\r\n \r\n return (watch ?\r\n <div onClick={handleCloseWatch} id='overlay' className={classes.overlay}>\r\n <div className={classes.wrapper}>\r\n <span className={classes.time}>{timeStampEU(updatedAt)}</span>\r\n <DownloadForOfflineIcon className={classes.downloadIcon} fontSize='large'\r\n onClick={() => handleDownload(url, fullType)}/>\r\n <img width='100%' height='auto' alt='imageItem' src={url} />\r\n </div>\r\n </div> :\r\n <ImageListItem>\r\n <img onClick={handleOpenWatch} className={classes.img}\r\n src={`${url}?w=164&h=164&fit=crop&auto=format`}\r\n srcSet={`${url}?w=164&h=164&fit=crop&auto=format&dpr=2 2x`}\r\n alt='imageItem' loading=\"lazy\" />\r\n </ImageListItem>\r\n \r\n )\r\n}\r\n\r\nexport default MediaListItem","import ImageList from '@mui/material/ImageList';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useEffect } from 'react';\r\n\r\nimport MediaListItem from './MediaListItem';\r\nimport AlertInfo from '../../../../reusableComponents/AlertInfo';\r\nimport { filteredMessages,handleSort } from '../../../../../helpers'\r\nimport { TAllMessages } from '../../../../../typescript/redux/allMessages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n maxHeight: '86vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n }, \r\n})\r\n\r\ninterface IMediaList {\r\n messagesMemo: TAllMessages,\r\n value: string,\r\n date: any,\r\n setDisabled: React.Dispatch<boolean>,\r\n sort: boolean\r\n}\r\n\r\nconst MediaList = ({ messagesMemo,value,date,sort,setDisabled }: IMediaList) => {\r\n const classes = useStyles()\r\n const filtered = messagesMemo.filter(({type}) => type === 'image')\r\n const filteredAndSorted = filteredMessages(handleSort('createdAt', filtered, sort), date, value)\r\n \r\n useEffect(() => {\r\n setDisabled(filtered.length > 0?false:true)\r\n }, [filtered, setDisabled])\r\n \r\n return (\r\n <>\r\n {filteredAndSorted.length > 0 &&\r\n <ImageList className={classes.container} cols={3} rowHeight={164}>\r\n {filteredAndSorted.map(({message,createdAt,fullType,updatedAt}) => \r\n <MediaListItem key={createdAt} message={message} fullType={fullType} updatedAt={updatedAt}/>)}\r\n </ImageList>}\r\n {(value || date) && filteredAndSorted.length === 0 && <AlertInfo name={`Can not find Media by request: ${value}`} />}\r\n {!value && !date && filteredAndSorted.length === 0 && <AlertInfo name='You do not have Media yet!'/>}\r\n </>\r\n )\r\n}\r\n\r\nexport default MediaList","import List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport Divider from '@mui/material/Divider';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useEffect } from 'react';\r\n\r\nimport AlertInfo from '../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,firstLetter,copied,filteredMessages,handleSort,prodBaseURL } from '../../../../../helpers'\r\nimport { TAllMessages } from '../../../../../typescript/redux/allMessages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n maxHeight: '86vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n }, \r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n copyIcon: {\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n }, \r\n})\r\n\r\ninterface ITextList {\r\n messagesMemo: TAllMessages,\r\n value: string,\r\n date: any,\r\n setDisabled: React.Dispatch<boolean>,\r\n sort: boolean\r\n}\r\n\r\nconst TextList = ({ messagesMemo,value,date,sort,setDisabled }: ITextList) => {\r\n const classes = useStyles()\r\n const filtered = messagesMemo.filter(({type}) => type === 'text')\r\n const filteredAndSorted = filteredMessages(handleSort('createdAt', filtered, sort),date,value)\r\n \r\n useEffect(() => {\r\n setDisabled(filtered.length > 0?false:true)\r\n }, [filtered, setDisabled])\r\n \r\n return (\r\n <>\r\n {filteredAndSorted.length > 0 &&\r\n <List className={classes.container}>\r\n {filteredAndSorted.map(({ message, createdAt, lastName, name, color, avatarUrl }) =>\r\n <div key={createdAt}>\r\n <ListItem alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 38, height: 38}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar>\r\n <ListItemText style={{ wordBreak: 'break-word',marginRight:2 }} primary={message}\r\n secondary={timeStampEU(createdAt)} secondaryTypographyProps={{color: '#020202',paddingTop:0.5}}\r\n />\r\n <CopyToClipboard onCopy={() => copied('Message')} text={message}>\r\n <ContentCopyIcon className={classes.copyIcon} fontSize='large' />\r\n </CopyToClipboard> \r\n </ListItem>\r\n <Divider variant=\"inset\" />\r\n </div>)}\r\n </List>}\r\n {(value || date) && filteredAndSorted.length === 0 && <AlertInfo name={`Can not find Text by request: ${value}`} />}\r\n {!value && !date && filteredAndSorted.length === 0 && <AlertInfo name='You do not have Text yet!'/>} \r\n </>\r\n ) \r\n}\r\n\r\nexport default TextList","import List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport Divider from '@mui/material/Divider';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useEffect } from 'react';\r\n\r\nimport AlertInfo from '../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,handleDownload,filteredMessages,handleSort,prodBaseURL } from '../../../../../helpers'\r\nimport { TAllMessages } from '../../../../../typescript/redux/allMessages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n maxHeight: '86vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n }, \r\n folderIcon: {\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n },\r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n }, \r\n})\r\n\r\ninterface IAudioList {\r\n messagesMemo: TAllMessages,\r\n value: string,\r\n date: any,\r\n setDisabled: React.Dispatch<boolean>,\r\n sort: boolean\r\n}\r\n\r\nconst AudioList = ({ messagesMemo,value,date,sort,setDisabled }: IAudioList) => {\r\n const classes = useStyles()\r\n const filtered = messagesMemo.filter(({type}) => type === 'audio')\r\n const filteredAndSorted = filteredMessages(handleSort('createdAt', filtered, sort), date,value)\r\n \r\n useEffect(() => {\r\n setDisabled(filtered.length > 0?false:true)\r\n }, [filtered, setDisabled])\r\n \r\n return(\r\n <>\r\n {filteredAndSorted.length > 0 &&\r\n <List className={classes.container}>\r\n {filteredAndSorted.map(({ message, createdAt, fullType }) =>\r\n <div key={createdAt}>\r\n <ListItem alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <LibraryMusicIcon onClick={() =>\r\n handleDownload(`${prodBaseURL}/${message}`, fullType)}\r\n className={classes.folderIcon} fontSize='large' />\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>}\r\n {(value || date) && filteredAndSorted.length === 0 && <AlertInfo name={`Can not find Audio by request: ${value}`} />}\r\n {!value && !date && filteredAndSorted.length === 0 && <AlertInfo name='You do not have Audio yet!'/>}\r\n </>)\r\n}\r\nexport default AudioList","import List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\nimport Divider from '@mui/material/Divider';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useEffect } from 'react';\r\n\r\nimport AlertInfo from '../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,handleDownload,filteredMessages,handleSort,prodBaseURL } from '../../../../../helpers'\r\nimport { TAllMessages } from '../../../../../typescript/redux/allMessages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n maxHeight: '86vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n }, \r\n folderIcon: {\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n },\r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n }, \r\n})\r\n\r\ninterface IVideoList {\r\n messagesMemo: TAllMessages,\r\n value: string,\r\n date: any,\r\n setDisabled: React.Dispatch<boolean>,\r\n sort: boolean\r\n}\r\n\r\nconst VideoList = ({ messagesMemo,value,date,sort,setDisabled }: IVideoList) => {\r\n const classes = useStyles()\r\n const filtered = messagesMemo.filter(({type}) => type === 'video')\r\n const filteredAndSorted = filteredMessages(handleSort('createdAt', filtered, sort),date,value)\r\n useEffect(() => {\r\n setDisabled(filtered.length > 0?false:true)\r\n }, [filtered, setDisabled])\r\n\r\n return (\r\n <>\r\n {filteredAndSorted.length > 0 &&\r\n <List className={classes.container}>\r\n {filteredAndSorted.map(({ message, createdAt, fullType }) =>\r\n <div key={createdAt}>\r\n <ListItem key={createdAt} alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <VideoLibraryIcon onClick={() =>\r\n handleDownload(`${prodBaseURL}/${message}`, fullType)}\r\n className={classes.folderIcon} fontSize='large' />\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n </ListItem>\r\n <Divider variant=\"inset\" />\r\n </div>)}\r\n </List>}\r\n {(value || date)&& filteredAndSorted.length === 0 && <AlertInfo name={`Can not find Video by request: ${value}`} />}\r\n {!value && !date && filteredAndSorted.length === 0 && <AlertInfo name='You do not have Video yet!'/>}\r\n </>\r\n ) \r\n}\r\n\r\nexport default VideoList","import {\r\n actionGetAllMessagesSuccess,\r\n actionGetAllMessagesReject,\r\n} from '../action';\r\nimport { getAllMessages } from '../../../api-data';\r\nimport { IAllMessagesState } from '../../../typescript/redux/allMessages/interfaces'\r\n\r\n\r\nconst asyncGetAllMessages= () => async (dispatch:any) => {\r\n try {\r\n const data = await getAllMessages<IAllMessagesState>()\r\n data && dispatch(actionGetAllMessagesSuccess(data))\r\n } catch (e) {\r\n dispatch(actionGetAllMessagesReject())\r\n } \r\n};\r\n\r\nexport { asyncGetAllMessages };\r\n\r\n\r\n\r\n\r\n","import { createSelector } from 'reselect';\r\nimport { IState } from '../../../typescript/redux/interfaces'\r\n\r\nconst getTotal = (state: IState) => state.chats.total;\r\nconst getLimit = (state:IState) => state.chats.limit;\r\nconst getPage = (state: IState) => state.chats.page;\r\nconst getChats = (state: IState) => state.chats.chats;\r\nconst getState = (state: IState) => state.chats;\r\nconst getStateMemo = createSelector([getState], state => state);\r\n\r\nexport { getTotal,getLimit,getPage,getChats,getState,getStateMemo };\r\n","import { createSelector } from 'reselect';\r\nimport { IState } from '../../../typescript/redux/interfaces'\r\n\r\nconst getAllMessages = (state: IState) => state.allMessages.messages;\r\nconst getState = (state: IState) => state.allMessages;\r\nconst getAllMessagesMemo = createSelector([getAllMessages], messages => messages);\r\n\r\nexport { getAllMessages,getState,getAllMessagesMemo };\r\n\r\n","import { IState } from '../../../typescript/redux/interfaces'\n\nconst getIsOpen = (state: IState) => state.control.isOpen;\nconst getScroll = (state: IState) => state.control.scroll;\nconst getState = (state:IState) => state.control;\n\nexport { getIsOpen,getScroll,getState };\n","import {\r\n actionSelectChat,\r\n actionGetChatById\r\n} from '../action';\r\nimport { startChat,getChatById } from '../../../api-data';\r\n\r\nimport { TChat } from '../../../typescript/redux/chat/types'\r\n\r\nconst asyncStartChatById = (id:string) => async (dispatch:any) => {\r\n try {\r\n const data = await startChat<TChat>(id)\r\n data&&dispatch(actionSelectChat(data))\r\n } catch(e) {}\r\n};\r\n\r\nconst asyncGetChatById = (id:string) => async (dispatch:any) => {\r\n try {\r\n const data = await getChatById<TChat>(id)\r\n data&&dispatch(actionGetChatById(data))\r\n } catch(e) {}\r\n};\r\n\r\n\r\n\r\nexport { asyncStartChatById,asyncGetChatById };\r\n\r\n\r\n\r\n\r\n","import { useState, useEffect } from 'react';\r\nimport { useDispatch,useSelector } from 'react-redux';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport ChatListRecent from './ChatListRecent'\r\nimport FilesList from './FilesList';\r\nimport MediaList from './MediaList';\r\nimport TextList from './TextList';\r\nimport AudioList from './AudioList'\r\nimport VideoList from './VideoList';\r\nimport { asyncGetAllMessages } from '../../../../redux/allMessages/operations';\r\nimport { getStateMemo } from '../../../../redux/chats/selector';\r\nimport { getAllMessagesMemo } from '../../../../redux/allMessages/selector';\r\nimport { getIsOpen } from '../../../../redux/control/selector';\r\nimport { sortByRecent,timeStampFilter } from '../../../../helpers';\r\nimport { asyncStartChatById } from '../../../../redux/chat/operations';\r\nimport { actionIsOpen } from '../../../../redux/control/action';\r\nimport { TChats } from '../../../../typescript/redux/chats/types';\r\n\r\n\r\nconst useStyles = makeStyles({\r\ncontainer: {\r\n height:'7vh',\r\n borderBottom: 'solid 2px #dddddd',\r\n display: 'flex',\r\n justifyContent: 'space-around',\r\n alignContent: \"center\",\r\n alignItems:\"center\",\r\n flexWrap: 'nowrap',\r\n color:'rgba(0, 0, 0, 0.6)'\r\n},\r\nitem: {\r\n height:'100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignContent: \"center\",\r\n alignItems: \"center\",\r\n cursor:'pointer',\r\n},\r\nicon: {\r\n fontSize: '1rem',\r\n lineHeight: 0,\r\n marginBottom: 0,\r\n fontWeight:600\r\n },\r\nunderline: {\r\n fontSize: '2.2rem',\r\n lineHeight: 0,\r\n },\r\n})\r\n\r\ninterface ISearchLists {\r\n value: string,\r\n setValue: React.Dispatch<string>\r\n sort: boolean,\r\n date: any,\r\n setDate: React.Dispatch<any>,\r\n setDisabled: React.Dispatch<boolean>,\r\n}\r\n\r\nconst SearchLists = ({ value,setValue,sort,date,setDate,setDisabled }: ISearchLists) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const { chats,total } = useSelector(getStateMemo)\r\n const messagesMemo = useSelector(getAllMessagesMemo)\r\n const isOpen = useSelector(getIsOpen)\r\n const [isActive, setIsActive] = useState<number>(0)\r\n const handleIsActive = (newValue: number): void => {\r\n setIsActive(newValue)\r\n value && setValue('')\r\n date&&setDate('')\r\n } \r\n\r\n const handleListItemClick = (companionId: string) => {\r\n isOpen&&dispatch(actionIsOpen(''))\r\n dispatch(asyncStartChatById(companionId))\r\n }\r\n const filteredChats = (arr: TChats) => arr.filter((el) => {\r\n const credentials = el.name + ' ' + el.lastName\r\n if (!date) {\r\n return credentials.toLowerCase().includes(value.toLowerCase())\r\n } else if (credentials.toLowerCase().includes(value.toLowerCase())\r\n &&timeStampFilter(date) === timeStampFilter(el.lastMessageCreatedAt ?\r\n el.lastMessageCreatedAt : el.createdAt)) {\r\n return el\r\n }\r\n })\r\n \r\n useEffect(() => {\r\n setDate('')\r\n }, [setDate])\r\n \r\n useEffect(() => {\r\n if (isActive === 0) setDisabled(total === '0'?true:false)\r\n }, [isActive,total,setDisabled])\r\n \r\n useEffect(() => {\r\n dispatch(asyncGetAllMessages())\r\n const handleReset = () => dispatch(asyncGetAllMessages())\r\n const idInterval = setInterval(handleReset, 3000);\r\n return () => clearInterval(idInterval);\r\n }, [dispatch]);\r\n \r\n \r\n const filteredAndSorted = filteredChats(sortByRecent(chats,sort))\r\n return (\r\n <>\r\n <div className={classes.container}>\r\n <div className={classes.item} style={{color:isActive === 0?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(0)}>\r\n <span className={classes.icon}>Chats</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 1?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(1)}>\r\n <span className={classes.icon}>Files</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 2?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(2)}>\r\n <span className={classes.icon}>Media</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 3?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(3)}>\r\n <span className={classes.icon}>Text</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 4?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(4)}>\r\n <span className={classes.icon}>Audio</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 5?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(5)}>\r\n <span className={classes.icon}>Video</span>\r\n <span className={classes.underline}>___</span>\r\n </div> \r\n </div>\r\n {isActive === 0 && <ChatListRecent value={value} date={date}\r\n filteredAndSorted={filteredAndSorted} handleListItemClick={handleListItemClick} />}\r\n {isActive === 1 && <FilesList messagesMemo={messagesMemo} value={value} date={date} sort={sort} setDisabled={setDisabled}/>}\r\n {isActive === 2 && <MediaList messagesMemo={messagesMemo} value={value} date={date} sort={sort} setDisabled={setDisabled}/>}\r\n {isActive === 3 && <TextList messagesMemo={messagesMemo} value={value} date={date} sort={sort} setDisabled={setDisabled}/>}\r\n {isActive === 4 && <AudioList messagesMemo={messagesMemo} value={value} date={date} sort={sort} setDisabled={setDisabled}/>}\r\n {isActive === 5 && <VideoList messagesMemo={messagesMemo} value={value} date={date} sort={sort} setDisabled={setDisabled}/>}\r\n </> \r\n )\r\n}\r\n\r\nexport default SearchLists","import { DatePicker } from \"@material-ui/pickers\";\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n },\r\n})\r\n\r\ninterface IStaticDatePicker {\r\n date: Date,\r\n disabled: boolean,\r\n changeDate: React.Dispatch<React.SetStateAction<any>>,\r\n handleOnOpen: () => void,\r\n}\r\n\r\nconst StaticDatePicker = ({ date,disabled, changeDate,handleOnOpen }: IStaticDatePicker) => {\r\n const classes = useStyles()\r\nreturn (\r\n <DatePicker\r\n className={classes.container}\r\n inputVariant='outlined'\r\n orientation=\"portrait\"\r\n variant=\"dialog\"\r\n openTo=\"date\"\r\n autoOk\r\n disabled={disabled}\r\n value={date?date:new Date()}\r\n onOpen={handleOnOpen}\r\n onChange={changeDate}\r\n />\r\n );\r\n};\r\n\r\nexport default StaticDatePicker;","import Toolbar from '@mui/material/Toolbar'\r\nimport IconButton from '@mui/material/IconButton'\r\nimport MenuIcon from '@mui/icons-material/Menu';\r\nimport SearchIcon from '@mui/icons-material/Search';\r\nimport InputBase from '@mui/material/InputBase';\r\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\r\nimport Switch from '@mui/material/Switch';\r\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\r\nimport { styled } from '@mui/material/styles';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { updateUser } from '../../../../api-data';\r\nimport StaticDatePicker from \"./StaticDatePicker\";\r\n\r\n\r\nconst Search = styled('div')(({ theme }:any) => ({\r\n position: 'relative',\r\n borderRadius: '20px',\r\n backgroundColor: '#f1f0f0',\r\n width: '100%',\r\n margin:'0 5% 0 5%'\r\n}));\r\n\r\nconst SearchIconWrapper = styled('div')(({ theme }) => ({\r\n padding: theme.spacing(0, 2),\r\n height: '100%',\r\n position: 'absolute',\r\n pointerEvents: 'none',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n}));\r\n\r\nconst StyledInputBase = styled(InputBase)(({ theme }) => ({\r\n color: 'inherit',\r\n '& .MuiInputBase-input': { \r\n fontWeight: 500,\r\n borderRadius: '20px',\r\n padding: theme.spacing(1, 1, 1, 0),\r\n paddingLeft: `calc(1em + ${theme.spacing(4)})`,\r\n transition: theme.transitions.create('width'),\r\n width: '100%',\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n toolBar: {\r\n color: '#b1aeae',\r\n height: '7vh',\r\n },\r\n activeSearch: {\r\n outline: '2px solid #2184f7',\r\n color: '#2184f7'\r\n },\r\n iconBtn: {\r\n '&:hover': {\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n iconArrow: {\r\n '&:hover': {\r\n transform: 'rotate(360deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n})\r\n\r\nconst label = { inputProps: { 'aria-label': 'Switch demo' } };\r\n\r\ninterface ISearchBar {\r\n handleClick:() => void,\r\n handleOpenIsSearch:() => void,\r\n handleSearch:(e: React.ChangeEvent<HTMLInputElement>) => void,\r\n isSearch: boolean,\r\n value: string,\r\n sort: boolean,\r\n setDate: React.Dispatch<any>,\r\n date:any,\r\n disabled: boolean\r\n}\r\n\r\nconst SearchBar = ({ handleClick, handleOpenIsSearch, handleSearch, isSearch,\r\n value, sort,setDate,date,disabled }: ISearchBar) => {\r\n const handleSort = () => updateUser({ sort: !sort })\r\n const handleOnOpen = () => setDate('') \r\n \r\n const classes = useStyles()\r\n return (\r\n <Toolbar className={classes.toolBar}>\r\n <IconButton onClick={handleClick}>\r\n {isSearch ? <ArrowBackIcon className={classes.iconArrow} /> : <MenuIcon className={classes.iconBtn} />}\r\n </IconButton>\r\n <div onFocus={handleOpenIsSearch} style={{display:'flex',width:'100%'}}>\r\n <Search className={value?classes.activeSearch:undefined}>\r\n <SearchIconWrapper>\r\n <SearchIcon />\r\n </SearchIconWrapper>\r\n <StyledInputBase\r\n value={value}\r\n onChange={handleSearch}\r\n placeholder={disabled?'Disabled':'Search'}\r\n inputProps={{ 'aria-label': 'search' }}\r\n disabled={disabled}/>\r\n </Search>\r\n <IconButton aria-label=\"delete\" size=\"medium\" disabled={disabled}>\r\n <StaticDatePicker date={date} disabled={disabled} \r\n changeDate={setDate} handleOnOpen={handleOnOpen} /> \r\n <CalendarTodayIcon fontSize='medium'\r\n style={{color:date?'#2184f7':'#b1aeae'}}/>\r\n </IconButton>\r\n </div>\r\n <Switch onClick={handleSort} checked={sort} {...label} disabled={disabled} />\r\n </Toolbar>\r\n )\r\n}\r\n\r\nexport default SearchBar","import Button from '@mui/material/Button';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport { removeChatForBoth } from '../../../../../../api-data';\r\nimport { firstLetter, slicedWord,prodBaseURL } from '../../../../../../helpers';\r\nimport { TChat } from '../../../../../../typescript/redux/chats/types';\r\n\r\nconst useStyles = makeStyles({\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n },\r\n titleWrapper: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n alignContent: 'center',\r\n alignItems:'center'\r\n },\r\n})\r\n\r\ninterface IDeleteModal {\r\n setModal: (a: boolean) => void,\r\n chat:TChat\r\n}\r\nconst DeleteModal = ({setModal,chat}:IDeleteModal) => {\r\n const classes = useStyles()\r\n const {name,lastName,avatarUrl,color,companionId} = chat\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeChatForBoth(companionId)\r\n setModal(false)\r\n }\r\n }\r\n \r\n return (\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <div className={classes.titleWrapper}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 38, height: 38,marginRight:2}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n <h3 style={{color: '#2c2c2c'}}>Delete chat</h3>\r\n </div>\r\n <p style={{color: '#050505'}}>{`Are you sure you want to delete the\r\n chat with ${`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}?`}</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE CHAT\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div>\r\n </div> \r\n )\r\n}\r\n\r\nexport default DeleteModal","import { makeStyles,Typography } from '@material-ui/core'\r\nimport { useState } from 'react';\r\nimport { styled } from '@mui/material/styles';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport NotificationsNoneIcon from '@mui/icons-material/NotificationsNone';\r\nimport VolumeOffIcon from '@mui/icons-material/VolumeOff';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport ListItemButton from '@mui/material/ListItemButton';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport Badge from '@mui/material/Badge';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\n\r\nimport { muteChat } from '../../../../../api-data';\r\nimport { TChat } from '../../../../../typescript/redux/chats/types';\r\nimport { firstLetter, slicedWord, timeStampEU,prodBaseURL } from '../../../../../helpers';\r\nimport DeleteModal from './DeleteModal';\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '8px 8px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(4),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst StyledBadge = styled(Badge)(({ theme }) => ({\r\n '& .MuiBadge-badge': {\r\n backgroundColor: '#44b700',\r\n color: '#44b700',\r\n boxShadow: `0 0 0 2px ${theme.palette.background.paper}`,\r\n '&::after': {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height: '100%',\r\n borderRadius: '50%',\r\n animation: 'ripple 1.2s infinite ease-in-out',\r\n border: '1px solid currentColor',\r\n content: '\"\"',\r\n },\r\n },\r\n '@keyframes ripple': {\r\n '0%': {\r\n transform: 'scale(.8)',\r\n opacity: 1,\r\n },\r\n '100%': {\r\n transform: 'scale(2.4)',\r\n opacity: 0,\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n listItemInnerText: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n flexWrap: 'nowrap',\r\n },\r\n listItemInnerText__icon: {\r\n marginLeft: 5,\r\n color: '#959595',\r\n },\r\n listItem_iconAvatar: {\r\n marginRight:10\r\n },\r\n listItem_iconRight: {\r\n marginRight: 10,\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n flexDirection: 'column'\r\n },\r\n listItem_iconTimeChecked: {\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n marginBottom:2\r\n },\r\n listItem_iconRightBtn: {\r\n background: '#0ac40a',\r\n borderRadius: '50%',\r\n color: '#ffffff',\r\n border: 'none',\r\n height: 24,\r\n width: 24,\r\n textAlign: 'center',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n fontSize: 12,\r\n marginLeft: 'auto',\r\n '&:hover': {\r\n outline: 'solid 3px #3ee415',\r\n }\r\n },\r\n listItem_iconRightBtnMute: {\r\n background: '#a7aaa7',\r\n borderRadius: '50%',\r\n color: '#ffffff',\r\n border: 'none',\r\n height: 24,\r\n width: 24,\r\n textAlign: 'center',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n fontSize: 12,\r\n marginLeft: 'auto',\r\n '&:hover': {\r\n outline: 'solid 3px #cccbcb',\r\n }\r\n },\r\n listItem_iconRightBtnHidden: {\r\n background: 'inherit',\r\n borderRadius: '50%',\r\n border: 'none',\r\n height: 24,\r\n width: 24,\r\n textAlign: 'center',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n fontSize: 12,\r\n marginLeft: 'auto', \r\n },\r\n listItem_icon_time: {\r\n fontSize: 12,\r\n marginLeft: 5,\r\n color: '#1b1b1b'\r\n },\r\n listItem_typing: {\r\n color: '#4d4d4d',\r\n animation: 'ripple 4s infinite ease-in-out', \r\n }, \r\n listItem_dots: {\r\n color: '#1b1b1b',\r\n fontWeight: 'bold',\r\n display:'inline-block',\r\n fontFamily: 'monospace',\r\n clipPath: 'inset(0 3ch 0 0)',\r\n animation: `$run 2s steps(5) infinite`, \r\n },\r\n '@keyframes run': {\r\n to: {\r\n clipPath: 'inset(0 -1ch 0 0)'\r\n },\r\n },\r\n})\r\n\r\ninterface IChatItem {\r\n chat: TChat,\r\n handleListItemClick: (companionId: string) => void,\r\n handleNewMsgs: (e: any,companionId: string) => void,\r\n}\r\nconst ChatItem = ({chat,handleListItemClick,handleNewMsgs}:IChatItem) => {\r\n const classes = useStyles()\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal, setModal] = useState<boolean>(false);\r\n const open = Boolean(anchorEl);\r\n const { name, lastName, avatarUrl, color, companionId, mute, seen, total, watched,\r\n typing, online, lastMessage, lastMessageCreatedAt, createdAt } = chat\r\n\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'mute') muteChat(companionId)\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n\r\n return (\r\n <div>\r\n {modal&&<DeleteModal setModal={setModal} chat={chat}/>}\r\n <ListItemButton\r\n selected={selected}\r\n onClick={() => handleListItemClick(companionId)}\r\n onContextMenu={(e) => handleContextMenu(e)}\r\n >\r\n <ListItemIcon className={classes.listItem_iconAvatar}>\r\n <StyledBadge overlap=\"circular\" variant={online === 'true'?'dot':'standard'}\r\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 54, height: 54 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </StyledBadge>\r\n </ListItemIcon> \r\n <ListItemText primary={<div className={classes.listItemInnerText}>\r\n <span>{`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}</span>\r\n {mute&&<VolumeOffIcon className={classes.listItemInnerText__icon} fontSize='small' />}</div>}\r\n secondary={typing ? <span className={classes.listItem_typing}>\r\n typing<span className={classes.listItem_dots}>...</span></span> :\r\n lastMessage ? slicedWord(lastMessage, 35) :\r\n `${firstLetter(name)}${slicedWord(name, 8, 1)} joined Telegram`}/>\r\n <ListItemIcon className={classes.listItem_iconRight}>\r\n <div className={classes.listItem_iconTimeChecked}>\r\n {watched&& <DoneAllIcon style={{ color: '#18bd03' }} fontSize='small' />}\r\n <Typography className={classes.listItem_icon_time} variant=\"h6\" color=\"initial\">\r\n {timeStampEU(lastMessageCreatedAt?lastMessageCreatedAt:createdAt)}\r\n </Typography>\r\n </div>\r\n {lastMessage && total > seen ? <button onClick={(e) => handleNewMsgs(e,companionId)}\r\n className={mute?classes.listItem_iconRightBtnMute:classes.listItem_iconRightBtn}>{total-seen}</button> :\r\n <button className={classes.listItem_iconRightBtnHidden}/>}\r\n </ListItemIcon> \r\n </ListItemButton>\r\n <StyledMenu\r\n id=\"demo-positioned-menu\"\r\n aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl}\r\n open={open}\r\n onClose={handleClose}\r\n > \r\n <MenuItem onClick={() => handleClose('mute')}>\r\n {mute ? <NotificationsNoneIcon /> : <VolumeOffIcon />}\r\n {mute ? 'Unmute chat':'Mute chat'}\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete chat\r\n </MenuItem> \r\n </StyledMenu> \r\n </div>\r\n );\r\n}\r\nexport default ChatItem","import List from '@mui/material/List';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useState,useEffect,useRef,useCallback } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\n\r\nimport AlertInfo from '../../../reusableComponents/AlertInfo'\r\nimport ChatItem from './ChatItem';\r\nimport { notification,playNotificationWithoutPermission,sortByRecent } from '../../../../helpers'\r\nimport { getStateMemo } from '../../../../redux/chats/selector'\r\nimport { getChatMemo } from '../../../../redux/chat/selector'\r\nimport { asyncStartChatById } from '../../../../redux/chat/operations'\r\nimport { actionRemoveChat } from '../../../../redux/chat/action'\r\nimport { actionScroll, actionIsOpen } from '../../../../redux/control/action'\r\nimport { getIsOpen } from '../../../../redux/control/selector';\r\nimport { TChats,TChat } from '../../../../typescript/redux/chats/types';\r\nimport { timeStampFilter,prodBaseURL } from '../../../../helpers';\r\n\r\nconst useStyles = makeStyles({\r\n list: {\r\n width: '100%',\r\n maxHeight: '93vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n },\r\n})\r\n\r\ninterface IChatsList {\r\n sort: boolean,\r\n}\r\n\r\nconst ChatsList = ({sort}:IChatsList) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const chatsRef = useRef<any>(null)\r\n const [sortedChats, setSortedChats] = useState<TChats>([]);\r\n const { total, chats } = useSelector(getStateMemo)\r\n const chat = useSelector(getChatMemo)\r\n const isOpen = useSelector(getIsOpen)\r\n const handleListItemClick = (companionId: string) => {\r\n isOpen&&dispatch(actionIsOpen(''))\r\n dispatch(asyncStartChatById(companionId))\r\n }\r\n\r\n const handleNewMsgs = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>, companionId: string) => {\r\n e.stopPropagation()\r\n dispatch(actionScroll(true))\r\n isOpen&&dispatch(actionIsOpen(''))\r\n dispatch(asyncStartChatById(companionId))\r\n }\r\n\r\n useEffect(() => {\r\n const handleNotification= (companionId: string) => {\r\n dispatch(asyncStartChatById(companionId))\r\n dispatch(actionScroll(true))\r\n }\r\n setSortedChats(sortByRecent(chats, sort))\r\n if (chat.companionId&&!sortedChats.find((el) => el.companionId === chat.companionId)) dispatch(actionRemoveChat())\r\n if (chatsRef.current) {\r\n chatsRef.current.forEach(({total,seen}: any,i:number) => {\r\n const oldDifferent = total - seen\r\n const chat = sortedChats[i]\r\n if(chat === undefined) return\r\n const newDifferent = chat.total - chat.seen\r\n if (newDifferent > oldDifferent && !chat.mute) {\r\n playNotificationWithoutPermission(`${prodBaseURL}/receive.mp3`)\r\n notification(chat.name,() => handleNotification(chat.companionId))\r\n } \r\n })\r\n }\r\n chatsRef.current = sortedChats\r\n }, [chats, chat,sort,sortedChats, dispatch])\r\n\r\n return total !== '0' ? (\r\n <List className={classes.list} component=\"nav\"\r\n aria-label=\"main mailbox folders\">\r\n {sortedChats.map((el) => <ChatItem key={el.number} chat={el} \r\n handleListItemClick={handleListItemClick} handleNewMsgs={handleNewMsgs} />)}\r\n </List>\r\n ):<AlertInfo name='You do not have Chats yet!' />;\r\n}\r\n\r\nexport default ChatsList","import Divider from '@mui/material/Divider';\r\nimport Paper from '@mui/material/Paper';\r\nimport MenuList from '@mui/material/MenuList';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport PermContactCalendarIcon from '@mui/icons-material/PermContactCalendar';\r\nimport SettingsIcon from '@mui/icons-material/Settings';\r\nimport Brightness3Icon from '@mui/icons-material/Brightness3'; \r\nimport HelpOutlineIcon from '@mui/icons-material/HelpOutline';\r\nimport BugReportIcon from '@mui/icons-material/BugReport';\r\nimport PersonAddAltIcon from '@mui/icons-material/PersonAddAlt';\r\nimport Switch from '@mui/material/Switch';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { updateUser } from '../../../../api-data';\r\n\r\nconst useStyles = makeStyles({\r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex:100\r\n },\r\n container: {\r\n position: 'absolute',\r\n width: 270,\r\n maxWidth: '100%',\r\n top: 60,\r\n left: 15,\r\n zIndex: 10,\r\n visibility: 'visible',\r\n },\r\n list: {\r\n background:'#fdfdfd'\r\n },\r\n listItemLast: {\r\n textAlign: 'center',\r\n },\r\n listIcon: {\r\n marginRight: 15,\r\n },\r\n listIconText: {\r\n marginRight: 15,\r\n paddingLeft:6\r\n }\r\n})\r\n\r\nconst label = { inputProps: { 'aria-label': 'Switch demo' } };\r\n\r\ninterface IContactsList {\r\n handleSelectedMenu: (i: number) => void,\r\n nightMode: boolean\r\n}\r\n\r\nconst MenuBar = ({handleSelectedMenu,nightMode}:IContactsList) => {\r\n const classes = useStyles()\r\n const handleNightMode = () => updateUser({ nightMode: !nightMode })\r\n\r\n return (\r\n <div className={classes.overlay} id='overlay'>\r\n <Paper className={classes.container}>\r\n <MenuList className={classes.list}>\r\n <MenuItem onClick={() => handleSelectedMenu(3)}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <PersonAddAltIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText>New Contact</ListItemText>\r\n </MenuItem> \r\n <MenuItem onClick={() => handleSelectedMenu(1)}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <PermContactCalendarIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText>Contacts</ListItemText>\r\n </MenuItem>\r\n \r\n <MenuItem onClick={() => handleSelectedMenu(2)}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <SettingsIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText>Settings</ListItemText>\r\n </MenuItem>\r\n <MenuItem style={{cursor:'default'}}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <Brightness3Icon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText>Night Mode</ListItemText>\r\n <Switch onClick={handleNightMode} checked={nightMode} {...label} style={{cursor:'pointer'}}/>\r\n </MenuItem>\r\n <a style={{ textDecoration: 'none', color: 'inherit' }} target='blank'\r\n href='https://www.makeuseof.com/tag/useful-telegram-features/'>\r\n <MenuItem>\r\n <ListItemIcon className={classes.listIcon}>\r\n <HelpOutlineIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText>Telegram Features</ListItemText>\r\n </MenuItem>\r\n </a>\r\n <a style={{ textDecoration: 'none', color: 'inherit' }} target='blank'\r\n href='https://bugs.telegram.org/?tag_ids=41&sort=time'>\r\n <MenuItem>\r\n <ListItemIcon className={classes.listIcon}>\r\n <BugReportIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText>Report bug</ListItemText>\r\n </MenuItem>\r\n </a>\r\n <a style={{ textDecoration: 'none', color: 'inherit' }} target='blank'\r\n href='https://www.msn.com/en-in/money/tech/telegram-webk-and-webz-web-apps-launched-whats-the-difference/ar-BB1fOwLR'>\r\n <MenuItem>\r\n <ListItemIcon className={classes.listIconText}>\r\n K\r\n </ListItemIcon>\r\n <ListItemText>Switch to K Version</ListItemText>\r\n </MenuItem>\r\n </a>\r\n <a style={{ textDecoration: 'none', color: 'inherit' }} target='blank'\r\n href='https://desktop.telegram.org/changelog'>\r\n <MenuItem>\r\n <ListItemIcon className={classes.listIconText}>\r\n W\r\n </ListItemIcon>\r\n <ListItemText>Switch to Old Version</ListItemText>\r\n </MenuItem>\r\n </a> \r\n <Divider />\r\n <MenuItem style={{cursor:'default'}}>\r\n <ListItemText secondary='Telegram WebZ 1.32.3' className={classes.listItemLast}/>\r\n </MenuItem>\r\n </MenuList>\r\n </Paper>\r\n </div>\r\n );\r\n}\r\n\r\nexport default MenuBar","import { makeStyles } from '@material-ui/core'\r\nimport { useState } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { styled } from '@mui/material/styles';\r\nimport Button from '@mui/material/Button';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport ListItemButton from '@mui/material/ListItemButton';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport {removeContact } from '../../../../../api-data';\r\nimport { actionIsOpen } from '../../../../../redux/control/action';\r\nimport { TContact } from '../../../../../typescript/redux/contacts/types';\r\nimport { TIsOpen } from '../../../../../typescript/redux/control/types';\r\nimport { firstLetter,slicedWord,timeStampEU,copied,prodBaseURL } from '../../../../../helpers';\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '8px 8px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(4),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n listItem_iconAvatar: {\r\n marginRight:10\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n },\r\n titleWrapper: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n alignContent: 'center',\r\n alignItems:'center'\r\n }, \r\n})\r\ninterface IContactItem {\r\n contact: TContact,\r\n handleListItemClick: (companionId: string) => void,\r\n isOpen: TIsOpen,\r\n}\r\nconst ContactItem = ({contact,handleListItemClick,isOpen}:IContactItem) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl);\r\n const { name, lastName, avatarUrl, color, companionId,createdAt, number,_id } = contact\r\n\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Number')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n isOpen === 'edit'&&dispatch(actionIsOpen('credentials'))\r\n removeContact(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n\r\n return (\r\n <div>\r\n <ListItemButton\r\n selected={selected}\r\n onClick={() => handleListItemClick(companionId)}\r\n onContextMenu={(e) => handleContextMenu(e)}\r\n >\r\n <ListItemIcon className={classes.listItem_iconAvatar}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 54, height: 54 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemIcon> \r\n <ListItemText primary={`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n secondary={`Registered since ${timeStampEU(createdAt)}`} />\r\n </ListItemButton> \r\n <StyledMenu\r\n id=\"demo-positioned-menu\"\r\n aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl}\r\n open={open}\r\n onClose={handleClose}\r\n >\r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={number}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy number\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete contact\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal&&<div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <div className={classes.titleWrapper}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 38, height: 38,marginRight:2}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n <h3 style={{color: '#2c2c2c'}}>Delete contact</h3>\r\n </div>\r\n <p style={{ color: '#050505' }}>{`Are you sure you want to delete contact\r\n ${`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}?`}</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE CONTACT\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>}\r\n </div>\r\n );\r\n}\r\nexport default ContactItem","import { createSelector } from 'reselect';\r\nimport { IState } from '../../../typescript/redux/interfaces'\r\n\r\nconst getTotal = (state: IState) => state.contacts.total;\r\nconst getLimit = (state:IState) => state.contacts.limit;\r\nconst getPage = (state: IState) => state.contacts.page;\r\nconst getContacts = (state: IState) => state.contacts.contacts;\r\nconst getState = (state: IState) => state.contacts;\r\n\r\nconst getContactsMemo = createSelector([getContacts], state => state);\r\n\r\nexport { getTotal,getLimit,getPage,getContacts,getState,getContactsMemo };\r\n","import List from '@mui/material/List';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { useEffect } from 'react';\r\n\r\nimport AlertInfo from '../../../reusableComponents/AlertInfo'\r\nimport ContactItem from './ContactItem';\r\nimport { getState } from '../../../../redux/contacts/selector'\r\nimport { asyncStartChatById } from '../../../../redux/chat/operations'\r\nimport { getIsOpen } from '../../../../redux/control/selector'\r\nimport { actionIsOpen } from '../../../../redux/control/action';\r\nimport { handleSort,timeStampFilter } from '../../../../helpers';\r\nimport { TContacts,TContact } from '../../../../typescript/redux/contacts/types';\r\n\r\nconst useStyles = makeStyles({\r\n list: {\r\n width: '100%',\r\n maxHeight: '93vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n },\r\n})\r\n\r\ninterface IContactList {\r\n value: string,\r\n handleClick: () => void,\r\n sort: boolean,\r\n date: any,\r\n setDisabled: React.Dispatch<boolean>,\r\n}\r\nconst ContactsList = ({value,handleClick,sort,date,setDisabled} : IContactList) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const { total, contacts } = useSelector(getState)\r\n const isOpen = useSelector(getIsOpen)\r\n\r\n const filteredContacts = ():TContacts => handleSort('name', contacts, sort).filter((el:TContact) => {\r\n const credentials = el.name + ' ' + el.lastName\r\n if (!date) {\r\n return credentials.toLowerCase().includes(value.toLowerCase())\r\n } else if (credentials.toLowerCase().includes(value.toLowerCase())\r\n && timeStampFilter(date) === timeStampFilter(el.createdAt)) {\r\n return el\r\n }\r\n })\r\n\r\n const handleListItemClick = (companionId:string) => {\r\n handleClick()\r\n isOpen&&dispatch(actionIsOpen(''))\r\n dispatch(asyncStartChatById(companionId))\r\n }\r\n\r\n const arr = filteredContacts()\r\n\r\n useEffect(() => {\r\n setDisabled(total === '0'?true:false)\r\n },[total,setDisabled])\r\n \r\n return total !== '0' ? (\r\n <List\r\n className={classes.list} component=\"nav\"\r\n aria-label=\"main mailbox folders\">\r\n {arr.length > 0 ? arr.map((contact) => <ContactItem key={contact.number}\r\n contact={contact} handleListItemClick={handleListItemClick} isOpen={isOpen}/>) :\r\n <AlertInfo name={`Can not find Contact by request : ${value}`} />}\r\n </List>\r\n ):<AlertInfo name='You do not have Contact yet!' />;\r\n}\r\n\r\nexport default ContactsList","import {\r\n actionGetContactsSuccess,\r\n actionGetContactsReject\r\n} from '../action';\r\nimport { addContact,getContacts} from '../../../api-data';\r\nimport { IContactsState } from '../../../typescript/redux/contacts/interfaces'\r\n\r\nconst asyncGetContacts = () => async (dispatch:any) => {\r\n try {\r\n const data = await getContacts<IContactsState>()\r\n data&&dispatch(actionGetContactsSuccess(data))\r\n } catch (e) {\r\n dispatch(actionGetContactsReject())\r\n } \r\n};\r\n\r\nconst asyncAddContact = (number:string) => async (dispatch:any) => {\r\n try {\r\n await addContact(number)\r\n } catch(e) {}\r\n};\r\n\r\n\r\nexport { asyncAddContact,asyncGetContacts };\r\n","import Toolbar from '@mui/material/Toolbar'\r\nimport IconButton from '@mui/material/IconButton'\r\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nconst useStyles = makeStyles({\r\n toolBar: {\r\n color: '#b1aeae',\r\n height: '7vh',\r\n },\r\n iconArrow: {\r\n '&:hover': {\r\n transform: 'rotate(360deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n})\r\n\r\ninterface ISearchBar {\r\n handleClick:() => void,\r\n}\r\n\r\nconst ToolBar = ({ handleClick }:ISearchBar) => {\r\n \r\n const classes = useStyles()\r\n return (\r\n <Toolbar className={classes.toolBar}>\r\n <IconButton onClick={handleClick}>\r\n <ArrowBackIcon className={classes.iconArrow} /> \r\n </IconButton>\r\n\r\n </Toolbar>\r\n )\r\n}\r\n\r\nexport default ToolBar","import { makeStyles, Button, TextField, Typography } from '@material-ui/core'\r\nimport React, { useState } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { asyncAddContact } from '../../../../redux/contacts/operations'\r\nimport ToolBar from './ToolBar';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent:'center',\r\n flexDirection: 'column',\r\n width: 350,\r\n margin: '0 auto',\r\n paddingBottom: 24,\r\n },\r\n title: {\r\n marginBottom: 20,\r\n textAlign: 'center',\r\n },\r\n buttonNext: {\r\n marginTop: 20,\r\n height: 50,\r\n color: '#f8f8f8',\r\n backgroundColor:'#1d74c5',\r\n },\r\n textField: {\r\n marginBottom:20\r\n }\r\n})\r\n\r\ninterface IAddContact {\r\n setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>,\r\n handleClick: () => void\r\n}\r\n\r\nconst AddContact = ({setSelectedIndex,handleClick}:IAddContact) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const [number, setNumber] = useState<string>('')\r\n\r\n const handleTextField = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n const value = e.target.value.split(' ').join('').trim()\r\n setNumber(value)\r\n }\r\n const handleAddContact = async () => {\r\n dispatch(asyncAddContact(number))\r\n setNumber('')\r\n setSelectedIndex(1) \r\n }\r\n\r\n const isValidNumber = () => {\r\n if (number.length < 13 || number.length > 13) return false\r\n if(number.slice(0,1) === '+') return true\r\n return true\r\n }\r\n\r\n const handlePressEnter = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n if(e.code === 'Enter' && isValidNumber()) handleAddContact()\r\n }\r\n\r\n \r\n return (\r\n <>\r\n <ToolBar handleClick={handleClick}/>\r\n <div onKeyDown={handlePressEnter} className={classes.container} >\r\n <Typography\r\n className={classes.title}\r\n variant=\"h5\"\r\n color=\"initial\">\r\n Add new contact\r\n </Typography> \r\n <TextField\r\n id=\"number\"\r\n name='NUMBER'\r\n label=\"Write down a number,+ is requirement\"\r\n value={number}\r\n fullWidth\r\n variant='outlined'\r\n onChange={handleTextField}\r\n className={classes.textField}\r\n required\r\n />\r\n {isValidNumber() &&\r\n <Button\r\n onClick={handleAddContact}\r\n className={classes.buttonNext}\r\n color='primary'\r\n variant=\"contained\"\r\n fullWidth\r\n > ADD\r\n </Button>}\r\n </div>\r\n </> \r\n );\r\n};\r\n\r\nexport default AddContact;","import { useState } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { styled } from '@mui/material/styles';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport LogoutIcon from '@mui/icons-material/Logout';\r\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\r\n\r\nimport { asyncLogout } from '../../../../../../redux/authorization/operations';\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(5),\r\n minWidth: 180,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(4),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst MenuList = () => {\r\n const dispatch = useDispatch()\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const open = Boolean(anchorEl);\r\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>): void =>\r\n setAnchorEl(e.currentTarget)\r\n\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'logout') dispatch(asyncLogout())\r\n setAnchorEl(null)\r\n }\r\n \r\n return (\r\n <>\r\n <IconButton onClick={handleClick} aria-label=\"delete\"\r\n style={{marginLeft:5}} size=\"medium\">\r\n <MoreVertIcon fontSize='medium'/>\r\n </IconButton>\r\n <StyledMenu\r\n id=\"demo-positioned-menu\"\r\n aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl}\r\n open={open}\r\n onClose={handleClose}\r\n >\r\n <MenuItem style={{fontWeight:500}} onClick={() => handleClose('logout')}>\r\n <LogoutIcon/>\r\n Log Out\r\n </MenuItem> \r\n </StyledMenu>\r\n </>\r\n );\r\n}\r\n\r\nexport default MenuList","import Stack from '@mui/material/Stack';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport MenuList from './MenuList';\r\nimport { makeStyles, Typography } from '@material-ui/core'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n height: '7vh',\r\n padding:10,\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n backgroundColor: '#ffffff',\r\n },\r\n iconArrow: {\r\n '&:hover': {\r\n transform: 'rotate(360deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n})\r\n\r\ninterface IToolBar {\r\n setSelectedIndex: (selectedIndex: number | null) => void,\r\n handleClick:() => void\r\n}\r\n\r\nconst ToolBar = ({setSelectedIndex,handleClick}:IToolBar) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n <Stack className={classes.container} direction=\"row\" spacing={21}>\r\n <IconButton onClick={handleClick} aria-label=\"delete\" size=\"medium\">\r\n <ArrowBackIcon className={classes.iconArrow} fontSize='medium'/>\r\n </IconButton>\r\n <Typography style={{ marginLeft: 20, color: '#474747' }} variant=\"h6\" color=\"initial\">Settings</Typography>\r\n <IconButton onClick={() => setSelectedIndex(4)} style={{ marginLeft: 'auto' }} aria-label=\"delete\" size=\"medium\">\r\n <EditIcon fontSize='medium' /> \r\n </IconButton>\r\n <MenuList/> \r\n </Stack>\r\n )\r\n}\r\n\r\nexport default ToolBar","import Button from '@mui/material/Button';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { removeUserAvatar } from '../../../../../../api-data';\r\n\r\nconst useStyles = makeStyles({\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n },\r\n titleWrapper: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n alignContent: 'center',\r\n alignItems:'center'\r\n },\r\n})\r\n\r\ninterface IDeleteModal {\r\n setModal: (a: boolean) => void,\r\n index: number,\r\n setIndex: any\r\n}\r\nconst DeleteModal = ({setModal,index,setIndex}:IDeleteModal) => {\r\n const classes = useStyles()\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeUserAvatar(index)\r\n setIndex(index-1)\r\n setModal(false)\r\n }\r\n }\r\n \r\n return (\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <div className={classes.titleWrapper}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete image</h3>\r\n </div>\r\n <p style={{color: '#050505'}}>{`Are you sure you want to delete the Image?`}</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE IMAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div>\r\n </div> \r\n )\r\n}\r\n\r\nexport default DeleteModal","import { makeStyles } from '@material-ui/core'\r\nimport { useSelector } from 'react-redux';\r\nimport { useState } from 'react';\r\nimport { getState } from '../../../../../redux/authorization/selector'\r\nimport { Carousel } from 'react-responsive-carousel';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { firstLetter, slicedWord, timeStampEU,prodBaseURL } from '../../../../../helpers'\r\nimport DeleteModal from './DeleteModal';\r\n\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n backgroundColor: '#ffffff',\r\n position:'relative',\r\n },\r\n nameTile: {\r\n position:'absolute',\r\n color: '#ffffff',\r\n backgroundColor: 'rgb(0,0,0)',\r\n borderRadius: 10,\r\n padding:8,\r\n fontSize: 18,\r\n zIndex:10,\r\n top: '7%',\r\n left: '50%', \r\n marginLeft: '-45%',\r\n opacity: 0.7,\r\n transition: 'opacity .35s ease-in-out'\r\n },\r\n timeTile: {\r\n position:'absolute',\r\n color: '#ffffff',\r\n backgroundColor: 'rgb(0,0,0)',\r\n borderRadius: 10,\r\n padding:4,\r\n fontSize: 15,\r\n top: '1%',\r\n left: '50%', \r\n marginLeft: '-45%',\r\n opacity: 0.7,\r\n transition: 'opacity .35s ease-in-out'\r\n },\r\n iconDeleteWrapper: {\r\n position: 'absolute',\r\n top: '1%',\r\n right: '9%',\r\n },\r\n iconDelete: {\r\n '&:hover': {\r\n opacity: 1,\r\n color: '#fa0000',\r\n animation: `$shake 0.5s`,\r\n }\r\n },\r\n '@keyframes shake': {\r\n '0%': { transform: 'translate(0.5px, 0.5px) rotate(0deg)'},\r\n '10%': { transform: 'translate(-0.5px, -1px) rotate(-1deg)'},\r\n '20%': { transform: 'translate(-1.5px, 0px) rotate(1deg)'},\r\n '30%': { transform: 'translate(1.5px, 1px) rotate(0deg)'},\r\n '40%': { transform: 'translate(0.5px, -0.5px) rotate(1deg)'},\r\n '50%': { transform: 'translate(-0.5px, 1px) rotate(-1deg)'},\r\n '60%': { transform: 'translate(-1.5px, 0.5px) rotate(0deg)'},\r\n '70%': { transform: 'translate(1.5px, 0.5px) rotate(-1deg)'},\r\n '80%': { transform: 'translate(-0.5px, -0.5px) rotate(1deg)'},\r\n '90%': { transform: 'translate(0.5px, 1px) rotate(0deg)'},\r\n '100%': { transform: 'translate(0.5px, -1px) rotate(-1deg)'},\r\n }, \r\n})\r\n\r\nconst SettingsPicture = () => {\r\n const classes = useStyles()\r\n const { name, lastName, avatarsArr, online } = useSelector(getState)\r\n const [modal, setModal] = useState<boolean>(false);\r\n const [index, setIndex] = useState<number>(0);\r\n const handleClick = (): void => setModal(true)\r\n\r\n return (\r\n <div className={classes.container}>\r\n {modal &&\r\n <DeleteModal setModal={setModal} index={index} setIndex={setIndex}/>}\r\n <Carousel onChange={(i)=> setIndex(i)} selectedItem={index}>\r\n {avatarsArr.map(({ avatarUrl, updatedAt }) =>\r\n <div key={avatarUrl}>\r\n <img alt='pic' src={`${prodBaseURL}/${avatarUrl}`}/>\r\n <p className=\"legend\">{timeStampEU(updatedAt)}</p> \r\n </div>)}\r\n </Carousel> \r\n <span className={classes.nameTile}>{`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}</span>\r\n <span className={classes.timeTile}>{online === 'true' ? 'online' : `last seen ${timeStampEU(online)}`}</span>\r\n {avatarsArr.length > 1 &&\r\n <div className={classes.iconDeleteWrapper}>\r\n <Avatar className={classes.iconDelete} onClick={handleClick}\r\n sx={{width: 36, height: 36, backgroundColor: 'rgb(0,0,0)',\r\n color: '#ffffff', opacity: 0.5,cursor:'pointer'}}>\r\n <DeleteOutlineIcon fontSize='medium'/> \r\n </Avatar> \r\n </div>}\r\n </div>\r\n )\r\n}\r\n\r\nexport default SettingsPicture","import { useSelector } from 'react-redux';\r\nimport Paper from '@mui/material/Paper';\r\nimport MenuList from '@mui/material/MenuList';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport PhoneIcon from '@mui/icons-material/Phone';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport { getNumber } from '../../../../../redux/authorization/selector'\r\nimport { copied} from '../../../../../helpers';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n backgroundColor: '#ffffff', \r\n },\r\n})\r\n\r\n\r\nconst SettingsMenu = () => {\r\n const classes = useStyles()\r\n const number = useSelector(getNumber)\r\n\r\n return (\r\n <Paper className={classes.container}>\r\n <MenuList>\r\n <CopyToClipboard onCopy={() => copied('Number')} text={number}>\r\n <MenuItem>\r\n <ListItemIcon style={{marginRight:15}}>\r\n <PhoneIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText primary={number} secondary='Phone' />\r\n </MenuItem>\r\n </CopyToClipboard> \r\n </MenuList>\r\n </Paper>\r\n );\r\n}\r\n\r\nexport default SettingsMenu","import ToolBar from \"./ToolBar\"\r\nimport SettingsPicture from \"./SettingsPicture\"\r\nimport SettingsMenu from \"./SettingsMenu\"\r\n\r\ninterface ISettingsBar {\r\n setSelectedIndex: (selectedIndex: number | null) => void,\r\n handleClick:() => void\r\n}\r\n\r\nconst SettingsBar = ({setSelectedIndex,handleClick}:ISettingsBar) => {\r\n return (\r\n <div style={{backgroundColor: '#f3f2f2',height:'100%',width:'100%'}}>\r\n <ToolBar setSelectedIndex={setSelectedIndex} handleClick={handleClick}/>\r\n <SettingsPicture />\r\n <SettingsMenu/>\r\n </div>\r\n )\r\n}\r\n\r\nexport default SettingsBar","import Stack from '@mui/material/Stack';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\r\nimport { makeStyles, Typography } from '@material-ui/core'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n paddingLeft: 10,\r\n height:'7vh',\r\n width: '100%',\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n backgroundColor: '#ffffff',\r\n },\r\n iconArrow: {\r\n '&:hover': {\r\n transform: 'rotate(360deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n})\r\n\r\ninterface IToolBar {\r\n setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>\r\n}\r\n\r\nconst ToolBar = ({setSelectedIndex}:IToolBar) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n <Stack className={classes.container} direction=\"row\" spacing={21}>\r\n <IconButton onClick={() => setSelectedIndex(2)} aria-label=\"delete\" size=\"medium\">\r\n <ArrowBackIcon className={classes.iconArrow} fontSize='medium'/>\r\n </IconButton>\r\n <Typography style={{marginLeft:20,color: '#474747'}} variant=\"h6\" color=\"initial\">Edit profile</Typography>\r\n </Stack>\r\n )\r\n}\r\n\r\nexport default ToolBar","import { makeStyles, TextField } from '@material-ui/core'\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport AddAPhotoIcon from '@mui/icons-material/AddAPhoto';\r\nimport { useEffect } from 'react';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport { format,firstLetter,prodBaseURL } from '../../../../../helpers'\r\nimport { IAuthorizationState } from '../../../../../typescript/redux/authorization/interfaces'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent:'center',\r\n flexDirection: 'column',\r\n width: '100%',\r\n padding: 20,\r\n paddingTop:0,\r\n position: 'relative',\r\n backgroundColor: '#ffffff',\r\n },\r\n imgWrapper: {\r\n cursor: 'pointer',\r\n marginBottom: 30,\r\n position: 'relative',\r\n },\r\n imgDropZoneOverlay: {\r\n position: 'absolute',\r\n width: 120,\r\n height: 120,\r\n borderRadius: '50%',\r\n backgroundColor: '#6868687d',\r\n left: 0,\r\n zIndex: 1,\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems:'center'\r\n },\r\n addPhoto: {\r\n color: '#ffffff',\r\n transform: 'scale(1.1)',\r\n '&:hover': {\r\n transform: 'scale(1.3)',\r\n },\r\n },\r\n avatarArrow: {\r\n cursor: 'pointer',\r\n alignSelf: 'flex-end',\r\n '&:hover': {\r\n backgroundColor: 'rgb(62, 149, 231)'\r\n }\r\n }\r\n})\r\n\r\ninterface IEditList {\r\n user: IAuthorizationState,\r\n name: string,\r\n setName: any,\r\n lastName: string,\r\n setLastName: any,\r\n openBtn: boolean,\r\n setOpenBtn: any,\r\n file:any,\r\n setFile: (file:any) => void\r\n}\r\n\r\nconst EditList = (props: IEditList) => {\r\n const classes = useStyles()\r\n const { user, name, setName, lastName, setLastName,\r\n openBtn, setOpenBtn,setFile } = props\r\n const { avatarUrl, color } = user\r\n const { getRootProps, getInputProps, acceptedFiles } = useDropzone({\r\n noDrag: true,\r\n accept:'image/*'\r\n });\r\n\r\n const handleTextField = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n !openBtn&&setOpenBtn(true)\r\n const value = format(e.target.value)\r\n const name = e.target.name\r\n switch (name) {\r\n case 'name':\r\n setName(value)\r\n break;\r\n case 'lastName':\r\n setLastName(value)\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (acceptedFiles.slice(-1)[0]) {\r\n setFile(acceptedFiles.slice(-1)[0])\r\n setOpenBtn(true)\r\n }\r\n }, [setFile,setOpenBtn,acceptedFiles])\r\n\r\n return (\r\n <div className={classes.container} > \r\n <ListItemAvatar className={classes.imgWrapper}>\r\n <div {...getRootProps({ className: classes.imgDropZoneOverlay })}>\r\n <AddAPhotoIcon className={classes.addPhoto} fontSize='large' />\r\n <input {...getInputProps()}/>\r\n </div>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 120, height: 120}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar> \r\n <TextField\r\n id=\"name\"\r\n name='name'\r\n label=\"Name\"\r\n value={name}\r\n fullWidth\r\n variant='outlined'\r\n onChange={handleTextField}\r\n style={{marginBottom:20}}\r\n />\r\n <TextField\r\n id=\"lastName\"\r\n name='lastName'\r\n label=\"LastName\"\r\n value={lastName}\r\n fullWidth\r\n variant='outlined'\r\n onChange={handleTextField}\r\n /> \r\n </div>\r\n )\r\n};\r\n\r\nexport default EditList;","import { makeStyles} from '@material-ui/core'\r\nimport Avatar from '@mui/material/Avatar';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n content: '',\r\n top: '92vh',\r\n right:20,\r\n },\r\n avatarArrow: {\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: 'rgb(62, 149, 231)'\r\n }\r\n },\r\n})\r\n\r\nconst SubmitBtn = ({handleSubmit}:{handleSubmit:() => void}) => {\r\n const classes = useStyles() \r\n\r\n return (\r\n <div className={classes.container}>\r\n <Avatar onClick={handleSubmit} className={classes.avatarArrow}\r\n sx={{width: 56, height: 56,backgroundColor: 'rgb(41, 139, 231)',color: '#ffffff'}}>\r\n <DoneIcon fontSize=\"medium\" /> \r\n </Avatar>\r\n </div> \r\n )\r\n};\r\n\r\nexport default SubmitBtn;","import { makeStyles } from '@material-ui/core'\r\nimport { useState,useEffect } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport ToolBar from './ToolBar'\r\nimport EditList from './EditList'\r\nimport SubmitBtn from './SubmitBtn';\r\nimport { getState } from '../../../../redux/authorization/selector'\r\nimport { updateCredentials,updateUserAvatar } from '../../../../api-data';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n height: '100%',\r\n backgroundColor: '#f3f2f2',\r\n position:'relative'\r\n }\r\n})\r\n\r\ninterface IEditBar {\r\n setSelectedIndex: React.Dispatch<React.SetStateAction<number | null>>\r\n}\r\n\r\nconst EditBar= ({setSelectedIndex}:IEditBar) => {\r\n const classes = useStyles()\r\n const user = useSelector(getState)\r\n const [name, setName] = useState<string>('')\r\n const [lastName, setLastName] = useState<string>('')\r\n const [openBtn, setOpenBtn] = useState<boolean>(false)\r\n const [file,setFile] = useState<any>(null)\r\n const {name:Name,lastName:LastName} = user\r\n\r\n const handleSubmit = async () => {\r\n if (name !== Name || lastName !== LastName){\r\n await updateCredentials({ name, lastName, originalName: name, originalLastName: lastName })\r\n }\r\n if (file) {\r\n const formData: any = new FormData()\r\n formData.append(\"avatar\", file);\r\n await updateUserAvatar(formData)\r\n }\r\n file && setFile(null)\r\n openBtn && setOpenBtn(false)\r\n }\r\n \r\n useEffect(() => {\r\n Name&&setName(Name)\r\n LastName && setLastName(LastName)\r\n }, [Name, LastName]) \r\n\r\n return (\r\n <div className={classes.container}>\r\n {openBtn&&<SubmitBtn handleSubmit={handleSubmit}/>}\r\n <ToolBar setSelectedIndex={setSelectedIndex}/>\r\n <EditList user={user} name={name} setName={setName}\r\n lastName={lastName} setLastName={setLastName} \r\n openBtn={openBtn} setOpenBtn={setOpenBtn}\r\n file={file} setFile={setFile}/>\r\n </div>\r\n )\r\n}\r\n\r\nexport default EditBar","import { useState, useRef, useEffect } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { createPortal } from 'react-dom';\r\n\r\nimport Grid from '@mui/material/Grid'\r\nimport SmallMenuBar from './SmallMenuBar'\r\nimport SearchLists from './SearchLists';\r\nimport SearchBar from './SearchBar'\r\nimport ChatsList from './ChatsList'\r\nimport MenuBar from './MenuBar'\r\nimport ContactsList from './ContactsList'\r\nimport AddContact from './AddContact'\r\nimport SettingsBar from './SettingsBar';\r\nimport EditBar from './EditBar';\r\nimport { getState } from '../../../redux/authorization/selector'\r\n\r\nconst LeftBar = () => {\r\n const { sort,nightMode } = useSelector(getState)\r\n const [isSearch, setIsSearch] = useState<boolean>(false)\r\n const [isMenu, setIsMenu] = useState<boolean>(false)\r\n const [isMenuSm, setIsMenuSm] = useState<boolean>(false);\r\n const [selectedIndex, setSelectedIndex] = useState<number | null>(null)\r\n const [disabled, setDisabled] = useState<boolean>(false)\r\n const [value, setValue] = useState<string>('')\r\n const [date, setDate] = useState<any>('');\r\n const modalRoot = useRef<HTMLDivElement|null>(null);\r\n const handleOpenIsSearch = () => !isSearch&&setIsSearch(true)\r\n const handleClick = (): void => {\r\n setValue('')\r\n setDate('')\r\n if (selectedIndex) setSelectedIndex(null)\r\n if(!isSearch) return setIsMenu(!isMenu)\r\n setIsSearch(false)\r\n setDisabled(false)\r\n }\r\n const handleSearch = (e: React.ChangeEvent<HTMLInputElement>):void => setValue(e.target.value)\r\n const handleEnterOpenMenuSm = (): void => {\r\n if(!isMenuSm) setIsMenuSm(true)\r\n }\r\n const handleLeaveCloseMenuSm = (): void => {\r\n if(isMenuSm) setIsMenuSm(false)\r\n }\r\n const handleSelectedMenu = (i: number) => {\r\n setIsSearch(true)\r\n setIsMenu(false)\r\n setIsMenuSm(false)\r\n setValue('')\r\n setDate('')\r\n setSelectedIndex(i)\r\n }\r\n \r\n useEffect(() => {\r\n const handleCloseModal = (e:any) => {\r\n if (e.target.id === 'overlay') {\r\n setIsMenu(false)\r\n setIsMenuSm(false)\r\n }\r\n }\r\n if (!modalRoot.current) {\r\n const modal = document.getElementById('modal-root') as HTMLDivElement | null\r\n if (modal) {\r\n modal.addEventListener('click',handleCloseModal)\r\n modalRoot.current = modal\r\n } \r\n }\r\n return () => {\r\n if (modalRoot.current) {\r\n modalRoot.current.removeEventListener('click',handleCloseModal)\r\n modalRoot.current = null \r\n }\r\n }\r\n }, [])\r\n\r\n return (\r\n <Grid item lg={3} style={{ position: 'relative', backgroundColor:'#ffffff'}}\r\n onMouseEnter={handleEnterOpenMenuSm} onMouseLeave={handleLeaveCloseMenuSm}>\r\n {selectedIndex !== 2 && selectedIndex !== 3 && selectedIndex !== 4 &&\r\n <SearchBar handleClick={handleClick} handleOpenIsSearch={handleOpenIsSearch} sort={sort} \r\n handleSearch={handleSearch} isSearch={isSearch} value={value} setDate={setDate}\r\n date={date} disabled={disabled} />}\r\n {!selectedIndex && isSearch && <SearchLists value={value} setValue={setValue}\r\n sort={sort} date={date} setDate={setDate} setDisabled={setDisabled}/>}\r\n {!selectedIndex&&!isSearch &&<ChatsList sort={sort}/>}\r\n {!selectedIndex && isMenuSm && !isSearch && <SmallMenuBar\r\n handleSelectedMenu={handleSelectedMenu} setIsMenuSm={setIsMenuSm} />}\r\n {isMenu && modalRoot.current &&\r\n createPortal(<MenuBar handleSelectedMenu={handleSelectedMenu} nightMode={nightMode}/>, modalRoot.current)}\r\n {selectedIndex === 1 && <ContactsList handleClick={handleClick} value={value}\r\n sort={sort} date={date} setDisabled={setDisabled} />}\r\n {selectedIndex === 2 && <SettingsBar setSelectedIndex={setSelectedIndex} handleClick={handleClick}/>}\r\n {selectedIndex === 3 && <AddContact setSelectedIndex={setSelectedIndex} handleClick={handleClick}/>}\r\n {selectedIndex === 4 && <EditBar setSelectedIndex={setSelectedIndex}/>}\r\n </Grid>\r\n )\r\n}\r\n\r\nexport default LeftBar","import ListItemButton from '@mui/material/ListItemButton';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { actionIsOpen } from '../../../../../redux/control/action'\r\nimport { getChat } from '../../../../../redux/chat/selector'\r\nimport { firstLetter,slicedWord,timeStampEU,prodBaseURL } from '../../../../../helpers'\r\n\r\nconst Credentials = () => {\r\n const dispatch = useDispatch()\r\n const { name, lastName, avatarUrl, color, online } = useSelector(getChat)\r\n \r\n return (\r\n <ListItemButton onClick={() => dispatch(actionIsOpen('credentials'))}>\r\n <ListItemIcon >\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 44, height: 44 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemIcon> \r\n <ListItemText primary={`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n secondaryTypographyProps={{ color: '#0379af' }} secondary={online === 'true' ?\r\n 'online' : `last seen ${timeStampEU(online)}`} />\r\n </ListItemButton>\r\n )\r\n}\r\n\r\nexport default Credentials","import { useState } from 'react';\r\nimport { useDispatch,useSelector } from 'react-redux';\r\nimport { styled } from '@mui/material/styles';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport NotificationsNoneIcon from '@mui/icons-material/NotificationsNone';\r\nimport VolumeOffIcon from '@mui/icons-material/VolumeOff';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\r\n\r\nimport { actionIsOpen } from '../../../../../../redux/control/action'\r\nimport { getChat } from '../../../../../../redux/chat/selector'\r\nimport { muteChat } from '../../../../../../api-data'\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(-2),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '14px 14px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(4),\r\n }\r\n },\r\n },\r\n}));\r\n\r\n\r\nconst MenuList = ({setModal}:{setModal:any}) => {\r\n const dispatch = useDispatch()\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const open = Boolean(anchorEl);\r\n const { companionId,mute } = useSelector(getChat)\r\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\r\n dispatch(actionIsOpen('menu'))\r\n setAnchorEl(e.currentTarget)\r\n }\r\n\r\n const handleClose = (type:string|undefined):void => {\r\n if (type === 'mute') muteChat(companionId)\r\n if (type === 'deleteModal') setModal(true)\r\n dispatch(actionIsOpen(''))\r\n setAnchorEl(null)\r\n }\r\n\r\n return (\r\n <>\r\n <IconButton onClick={handleClick} aria-label=\"delete\" size=\"medium\">\r\n <MoreVertIcon fontSize='medium'/>\r\n </IconButton>\r\n <StyledMenu\r\n id=\"demo-positioned-menu\"\r\n aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl}\r\n open={open}\r\n onClose={handleClose}\r\n >\r\n <MenuItem onClick={() => handleClose('mute')}>\r\n {mute ? <NotificationsNoneIcon /> : <VolumeOffIcon />}\r\n {mute ? 'Unmute':'Mute'}\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('deleteModal')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete chat\r\n </MenuItem> \r\n </StyledMenu>\r\n </>\r\n );\r\n}\r\n\r\nexport default MenuList","import Button from '@mui/material/Button';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useSelector } from 'react-redux';\r\n\r\nimport { getChat } from '../../../../../../redux/chat/selector';\r\nimport { removeChatForBoth } from '../../../../../../api-data';\r\nimport { firstLetter,slicedWord,prodBaseURL } from '../../../../../../helpers';\r\n\r\nconst useStyles = makeStyles({\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n },\r\n titleWrapper: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n alignContent: 'center',\r\n alignItems:'center'\r\n },\r\n})\r\n\r\nconst DeleteModal = ({setModal}:{setModal:any}) => {\r\n const classes = useStyles()\r\n const {name,lastName,avatarUrl,color,companionId} = useSelector(getChat)\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeChatForBoth(companionId)\r\n setModal(false)\r\n }\r\n }\r\n\r\n return (\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <div className={classes.titleWrapper}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 38, height: 38,marginRight:2}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n <h3 style={{color: '#2c2c2c'}}>Delete chat</h3>\r\n </div>\r\n <p style={{color: '#050505'}}>{`Are you sure you want to delete the\r\n chat with ${`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}?`}</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE CHAT\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div>\r\n </div> \r\n )\r\n}\r\n\r\nexport default DeleteModal","import Stack from '@mui/material/Stack';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport SearchIcon from '@mui/icons-material/Search';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useDispatch } from 'react-redux';\r\nimport { useState } from 'react';\r\n\r\nimport MenuList from './MenuList'\r\nimport DeleteModal from './DeleteModal';\r\nimport { actionIsOpen } from '../../../../../redux/control/action'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n marginLeft: 20,\r\n }, \r\n})\r\n\r\nconst Buttons = () => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const [modal,setModal] = useState<boolean>(false)\r\n\r\n return (\r\n <Stack className={classes.container} direction=\"row\">\r\n <IconButton onClick={() => dispatch(actionIsOpen('search'))} aria-label=\"delete\" size=\"medium\">\r\n <SearchIcon fontSize='medium'/>\r\n </IconButton>\r\n <MenuList setModal={setModal}/>\r\n {modal&&<DeleteModal setModal={setModal}/>} \r\n </Stack>\r\n );\r\n}\r\n\r\nexport default Buttons","import Toolbar from '@mui/material/Toolbar'\r\nimport AppBar from '@mui/material/AppBar';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport Credentials from './Credentials'\r\nimport Buttons from './Buttons'\r\n\r\nconst useStyles = makeStyles({\r\n toolBar: {\r\n color: '#6e6d6d',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n backgroundColor: '#ffffff',\r\n height:'7vh'\r\n },\r\n})\r\n\r\nconst HeaderBar = () => {\r\n const classes = useStyles()\r\n return (\r\n <AppBar position=\"static\">\r\n <Toolbar className={classes.toolBar}>\r\n <Credentials/>\r\n <Buttons/>\r\n </Toolbar>\r\n </AppBar> \r\n )\r\n}\r\n\r\nexport default HeaderBar\r\n\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\r\nimport Avatar from '@mui/material/Avatar';\r\n\r\nconst useStyles = makeStyles({ \r\n avatarArrowWrapper: {\r\n position:'absolute',\r\n right: 20,\r\n top: '70vh',\r\n width: 56,\r\n }, \r\n avatarArrow: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: 'rgb(41, 139, 231)',\r\n color: '#ffffff',\r\n }\r\n },\r\n listSeenIcon: {\r\n position: 'absolute',\r\n top: -8,\r\n left: 16,\r\n borderRadius: '50%',\r\n color: '#ffffff',\r\n border: 'none',\r\n height: 24,\r\n width: 24,\r\n textAlign: 'center',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n fontSize: 12,\r\n zIndex: 10,\r\n cursor:'pointer',\r\n }, \r\n});\r\n\r\ninterface IArrowBack {\r\n isArrow: boolean,\r\n isNew: {new:number,mute:boolean},\r\n handleScrollTo:() => void\r\n}\r\n\r\nconst ArrowBack = ({ isArrow, handleScrollTo, isNew }: IArrowBack) => {\r\n const classes = useStyles()\r\n\r\nreturn (\r\n <div className={classes.avatarArrowWrapper} style={{display: isArrow ? 'block' : 'none'}}>\r\n <button onClick={handleScrollTo} style={{display: isNew.new ? 'block' : 'none',\r\n background: isNew.mute ? '#a7aaa7' : '#0ac40a'}}\r\n className={classes.listSeenIcon}>{isNew.new}</button>\r\n <Avatar onClick={handleScrollTo} className={classes.avatarArrow}\r\n sx={{backgroundColor: '#ffffff', width: 56, height: 56,color: '#6b6b6b'}}>\r\n <ArrowDownwardIcon fontSize=\"medium\" /> \r\n </Avatar> \r\n </div> \r\n )\r\n}\r\n\r\nexport default ArrowBack","import { makeStyles } from '@material-ui/core'\r\nimport React from 'react';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport { useEffect } from 'react';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n position:'relative',\r\n },\r\n dropZone: {\r\n width: '100%',\r\n display: 'flex',\r\n position:'relative',\r\n height: 20,\r\n zIndex:10\r\n },\r\n})\r\n\r\ninterface IUploadFile {\r\n children:React.ReactNode,\r\n setFile: any,\r\n setValue: any,\r\n accept: string\r\n}\r\n \r\nconst UploadFile = ({children,setFile,setValue,accept}:IUploadFile) => {\r\n const classes = useStyles()\r\n const { getRootProps, getInputProps, acceptedFiles } = useDropzone({\r\n noDrag: true,\r\n accept\r\n });\r\n useEffect(() => {\r\n if (acceptedFiles.slice(-1)[0]) {\r\n setValue('')\r\n setFile(acceptedFiles.slice(-1)[0])\r\n }\r\n }, [setFile,setValue, acceptedFiles])\r\n \r\n return (\r\n <div className={classes.container} >\r\n {children}\r\n <div {...getRootProps({ className: classes.dropZone })}>\r\n <input placeholder='Photo or Video' {...getInputProps()}/>\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nexport default UploadFile","import MenuList from '@mui/material/MenuList';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport UploadFile from './UploadFile'\r\n\r\nconst useStyles = makeStyles({\r\n list: {\r\n background: '#fdfdfd',\r\n },\r\n listIcon: {\r\n position: 'absolute',\r\n left:0\r\n },\r\n listText: {\r\n position: 'absolute',\r\n left:40\r\n }, \r\n})\r\n\r\ninterface IFilesMenu {\r\n setIsOpenMenu: any,\r\n setFile: any,\r\n setValue: any,\r\n setType: any\r\n}\r\nconst FilesMenu = ({setIsOpenMenu,setFile,setValue,setType}:IFilesMenu) => {\r\n const classes = useStyles()\r\n const handleClose = (type:string) => {\r\n setType(type)\r\n setIsOpenMenu(false)\r\n }\r\n \r\n return (\r\n <MenuList className={classes.list}>\r\n <MenuItem onClick={() => handleClose('content')}>\r\n <UploadFile setFile={setFile} setValue={setValue} accept='image/*,video/*,audio/*'>\r\n <ListItemIcon className={classes.listIcon}>\r\n <InsertDriveFileIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText className={classes.listText}>Upload Image/Audio/Video</ListItemText>\r\n </UploadFile>\r\n </MenuItem>\r\n <MenuItem onClick={() => handleClose('application')}>\r\n <UploadFile setFile={setFile} setValue={setValue} accept='application/pdf,\r\n application/vnd.openxmlformats-officedocument.wordprocessingml.document'>\r\n <ListItemIcon className={classes.listIcon}>\r\n <InsertDriveFileIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText className={classes.listText}>Upload File</ListItemText>\r\n </UploadFile>\r\n </MenuItem> \r\n </MenuList>\r\n );\r\n}\r\n\r\nexport default FilesMenu","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport SendIcon from '@mui/icons-material/Send';\r\nimport MicNoneIcon from '@mui/icons-material/MicNone';\r\nimport VideocamIcon from '@mui/icons-material/Videocam';\r\nimport AttachFileIcon from '@mui/icons-material/AttachFile';\r\nimport SentimentSatisfiedAltIcon from '@mui/icons-material/SentimentSatisfiedAlt';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport Picker from 'emoji-picker-react';\r\nimport { useReactMediaRecorder } from \"react-media-recorder\";\r\nimport { useState } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\n\r\nimport FilesMenu from \"../FilesMenu\";\r\nimport {\r\n sentMessageById, sentImgMessageById, sentAudioMessageById,\r\n sentVideoMessageById,sentFileMessageById\r\n} from '../../../../../api-data'\r\nimport { getChat } from '../../../../../redux/chat/selector'\r\nimport { getIsOpen } from '../../../../../redux/control/selector'\r\nimport { playNotification,prodBaseURL } from \"../../../../../helpers\";\r\nimport { typingChat } from \"../../../../../api-data\";\r\n\r\nconst useStyles = makeStyles({ \r\n container: {\r\n width: '35vw',\r\n height:'6vh',\r\n position: 'fixed',\r\n bottom: '2vh',\r\n borderRadius: 8,\r\n padding: 10,\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n alignContent: 'start',\r\n alignItems: 'start',\r\n color: '#6b6b6b',\r\n backgroundColor: '#ffffff', \r\n },\r\n textarea: {\r\n width: '100%',\r\n height: '100%',\r\n outline: 'none',\r\n border:'none',\r\n padding: '0px 10px',\r\n marginLeft: 8,\r\n marginRight: 8,\r\n overflowY:'auto',\r\n resize: 'none',\r\n '&::placeholder': {\r\n color: 'rgb(82, 82, 82)',\r\n fontWeight: 600\r\n }\r\n }, \r\n attachIcon: {\r\n transform:'rotate(30deg)', \r\n },\r\n borderTop: {\r\n position: 'absolute',\r\n left: 0,\r\n top: '-2vh',\r\n width: '100%',\r\n height: 1,\r\n background:'#ffffff',\r\n }, \r\n filesMenu: {\r\n background: '#fdfdfd',\r\n position: 'absolute',\r\n width: '15vw',\r\n maxWidth: '100%',\r\n left: '61%',\r\n bottom:'10vh',\r\n zIndex: 10,\r\n visibility: 'visible',\r\n borderRadius: 10,\r\n padding: '4px 6px',\r\n },\r\n emoji: {\r\n position: 'absolute',\r\n bottom:'10vh',\r\n zIndex: 10,\r\n visibility: 'visible',\r\n },\r\n iconCancel: {\r\n position: 'absolute',\r\n left: -72,\r\n bottom:-1,\r\n display:'flex',\r\n backgroundColor: '#ffffff',\r\n color: 'rgb(243, 69, 69)',\r\n border:'solid 4px rgb(243, 69, 69)',\r\n borderRadius: '50%',\r\n '&:hover': {\r\n backgroundColor: 'rgb(243, 69, 69)',\r\n color: '#ffffff',\r\n }\r\n }, \r\n avatarCamera: {\r\n position: 'absolute',\r\n left: -72,\r\n bottom:-1,\r\n display: 'flex',\r\n borderRadius: '50%',\r\n zIndex: 10,\r\n border: 'solid 14px #ffffff',\r\n '&:hover': {\r\n backgroundColor: 'rgb(41, 139, 231)',\r\n border:'solid 14px rgb(41, 139, 231)',\r\n color: '#ffffff',\r\n }\r\n },\r\n avatarRight: {\r\n position: 'absolute',\r\n right: -72,\r\n bottom:-1,\r\n display: 'flex',\r\n borderRadius: '50%',\r\n zIndex: 10,\r\n border: 'solid 14px #ffffff',\r\n '&:hover': {\r\n backgroundColor: 'rgb(41, 139, 231)',\r\n border:'solid 14px rgb(41, 139, 231)',\r\n color: '#ffffff'\r\n }\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex:100\r\n },\r\n ringContainerLeft: {\r\n position: 'absolute',\r\n left: 10,\r\n top: -40,\r\n zIndex: 10,\r\n }, \r\n ringContainerRight: {\r\n position: 'absolute',\r\n right: 10,\r\n top: -40,\r\n zIndex: 10,\r\n },\r\n circle: {\r\n width: 15,\r\n height: 15,\r\n backgroundColor: '#ff0505',\r\n borderRadius: '50%',\r\n position: 'relative'\r\n },\r\n ringRing: {\r\n border: '3px solid #ff0505',\r\n borderRadius: '50%',\r\n height: 25,\r\n width: 25,\r\n position: 'absolute',\r\n right: -5,\r\n top: -5,\r\n animation: `$pulsate 1s ease-out`,\r\n animationIterationCount: 'infinite',\r\n opacity: 0\r\n },\r\n '@keyframes pulsate': {\r\n '0%': {transform: 'scale(0.1, 0.1)', opacity: 0},\r\n '50%': { opacity: 1},\r\n '100%': {transform: 'scale(1.2, 1.2)', opacity: 0},\r\n },\r\n});\r\n\r\ninterface ISendMessage{\r\n isArrow: boolean,\r\n}\r\n\r\nconst SendMessage = ({isArrow }:ISendMessage) => {\r\n const classes = useStyles();\r\n const { companionId } = useSelector(getChat)\r\n const isOpen = useSelector(getIsOpen)\r\n const [value, setValue] = useState<string>('')\r\n const [file, setFile] = useState<any>(false)\r\n const [isOpenMenu, setIsOpenMenu] = useState<boolean>(false)\r\n const [isOpenEmoji, setIsOpenEmoji] = useState<boolean>(false)\r\n const [isRecording, setIsRecording] = useState<boolean>(false)\r\n const [isFilming, setIsFilming] = useState<boolean>(false) \r\n const [type, setType] = useState<string>('')\r\n const { status, startRecording, stopRecording, mediaBlobUrl, clearBlobUrl } = useReactMediaRecorder({ audio: true });\r\n const { status: _status, startRecording: _startRecording, stopRecording: _stopRecording,\r\n mediaBlobUrl: _mediaBlobUrl, clearBlobUrl: _clearBlobUrl } = useReactMediaRecorder({ video: true });\r\n const onEmojiClick = (_e:any, emojiObject:any) => {\r\n setValue(prevValue => prevValue + emojiObject.emoji)\r\n setIsOpenEmoji(false)\r\n }; \r\n const clearMessage = () => {\r\n file &&setFile(false)\r\n isRecording && setIsRecording(false)\r\n isFilming && setIsFilming(false)\r\n value && setValue('')\r\n type && setType('')\r\n mediaBlobUrl && clearBlobUrl()\r\n _mediaBlobUrl && _clearBlobUrl()\r\n isOpenMenu && setIsOpenMenu(false)\r\n isOpenEmoji && setIsOpenEmoji(false)\r\n \r\n }\r\n const sentMessage = async () => {\r\n if (value) sentMessageById(companionId, value)\r\n if (mediaBlobUrl && type === 'recording') {\r\n const audio = new XMLHttpRequest();\r\n audio.open('GET', mediaBlobUrl, true);\r\n audio.responseType = 'blob';\r\n audio.onload = () => {\r\n if (audio.status === 200) {\r\n const blob = audio.response\r\n const file = new File([blob], 'audio.mp3', {\r\n type: 'audio/mpeg'\r\n })\r\n const formData: any = new FormData()\r\n formData.append(\"audio\", file)\r\n sentAudioMessageById(companionId, formData)\r\n clearBlobUrl()\r\n }\r\n }\r\n audio.send();\r\n }\r\n if (_mediaBlobUrl && type === 'filming') {\r\n const video = new XMLHttpRequest();\r\n video.open('GET', _mediaBlobUrl, true);\r\n video.responseType = 'blob';\r\n video.onload = () => {\r\n if (video.status === 200) {\r\n const blob = video.response\r\n const file = new File([blob], 'video.mp4', {\r\n type: 'video/mp4'\r\n })\r\n const formData: any = new FormData()\r\n formData.append(\"video\", file)\r\n sentVideoMessageById(companionId, formData)\r\n _clearBlobUrl()\r\n }\r\n }\r\n video.send();\r\n } \r\n if (file && type) {\r\n if (file.type.includes('image') && type === 'content') {\r\n const formData: any = new FormData()\r\n formData.append(\"image\", file);\r\n await sentImgMessageById(companionId, formData)\r\n }\r\n if (file.type.includes('audio') && type === 'content') {\r\n const formData: any = new FormData()\r\n formData.append(\"audio\", file);\r\n sentAudioMessageById(companionId, formData)\r\n } \r\n if (file.type.includes('video') && type === 'content') {\r\n const formData: any = new FormData()\r\n formData.append(\"video\", file);\r\n sentVideoMessageById(companionId, formData) \r\n }\r\n if (file.type.includes('application') && type === 'application') {\r\n const formData: any = new FormData()\r\n formData.append(\"file\", file);\r\n sentFileMessageById(companionId, formData) \r\n }\r\n }\r\n clearMessage()\r\n playNotification(`${prodBaseURL}/send.mp3`)\r\n } \r\n const handleTextarea = (e: React.ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)\r\n const handleFocusTextarea = async () => await typingChat(companionId,true)\r\n const handleBlurTextarea = async () => await typingChat(companionId,false) \r\n const handleOpenFileMenu = () => !isOpenMenu&&setIsOpenMenu(true)\r\n const handleCloseFileMenu = (e:any) => e.target.id === 'overlay'&&isOpenMenu&&setIsOpenMenu(false) \r\n const handleOpenEmoji = () => !isOpenEmoji&&setIsOpenEmoji(true)\r\n const handleCloseEmoji = (e: any) => e.target.id === 'overlay'&&isOpenEmoji&&setIsOpenEmoji(false) \r\n const handleRecording = () => {\r\n if (isRecording) return stopRecording()\r\n startRecording()\r\n setType('recording')\r\n setIsRecording(true) \r\n }\r\n const handleFilming = () => {\r\n if (isFilming) return _stopRecording()\r\n _startRecording()\r\n setType('filming')\r\n setIsFilming(true) \r\n }\r\n\r\n return (\r\n <div className={classes.container}>\r\n {isArrow && <div className={classes.borderTop}></div>}\r\n {isFilming && _status !== 'stopped' &&\r\n <div className={classes.ringContainerLeft}>\r\n <div className={classes.ringRing}></div>\r\n <div className={classes.circle}></div> \r\n </div>} \r\n {isRecording && status !== 'stopped' &&\r\n <div className={classes.ringContainerRight}>\r\n <div className={classes.ringRing}></div>\r\n <div className={classes.circle}></div> \r\n </div>} \r\n <CloseIcon onClick={clearMessage} fontSize=\"small\" className={classes.iconCancel}\r\n sx={{width: 56, height: 56, display: file || value || status === 'stopped'\r\n || _status === 'stopped' ? 'inline-block' : 'none'}} />\r\n <VideocamIcon onClick={handleFilming} className={classes.avatarCamera}\r\n sx={{backgroundColor: '#ffffff', color: '#7c7c7c', width: 56, height: 56}}\r\n style={{display: status !== 'idle' || _status === 'stopped' || file || value ? 'none' : 'block',\r\n animation: isFilming ? 'ripple 1.2s infinite ease-in-out' : 'none'\r\n }} />\r\n <SendIcon onClick={sentMessage} className={classes.avatarRight} \r\n sx={{backgroundColor: '#ffffff',color: 'rgb(41, 139, 231)', width: 56, height: 56}}\r\n style={{display: value || file || status === 'stopped' || _status === 'stopped' ? 'block':'none' }}/> \r\n <MicNoneIcon onClick={handleRecording} className={classes.avatarRight} \r\n sx={{backgroundColor: isRecording ? 'rgb(41, 139, 231)' : '#ffffff',\r\n color: isRecording ? '#ffffff' : '#6b6b6b', width: 56, height: 56}}\r\n style={{display: !value && !file && status !== 'stopped' && _status === 'idle' ? 'block' : 'none',\r\n animation:isRecording ? 'ripple 1.2s infinite ease-in-out': 'none'}}/>\r\n <SentimentSatisfiedAltIcon onClick={handleOpenEmoji} \r\n fontSize='medium' sx={{color: isOpenEmoji ? 'rgb(41, 139, 231)' : '#6b6b6b', cursor: 'pointer',\r\n pointerEvents: file || status !== 'idle' || _status !== 'idle' ? 'none' : \"auto\",\r\n '&:hover': { color: 'rgb(41, 139, 231)'}}} />\r\n <div onClick={handleCloseEmoji} className={classes.overlay} id='overlay'\r\n style={{ display: isOpenEmoji ? 'block':'none'}}>\r\n <div className={classes.emoji} style={{left: isOpen&&isOpen !== 'menu'?'32.5vw':'45vw'}}>\r\n <Picker onEmojiClick={onEmojiClick} />\r\n </div> \r\n </div>\r\n <textarea disabled={file || status !== 'idle' || _status !== 'idle' ? true : false} value={value} onBlur={handleBlurTextarea}\r\n onFocus={handleFocusTextarea} onChange={handleTextarea} className={classes.textarea}\r\n placeholder={file ? 'The File is ready to send' : status === 'idle' && _status === 'idle' ? 'Message ' :\r\n `${status === 'stopped' || _status === 'stopped' ?'Recorded':'Recording in progress'}`} rows={1}>\r\n </textarea>\r\n <AttachFileIcon onClick={handleOpenFileMenu} className={classes.attachIcon}\r\n fontSize='medium' sx={{color: isOpenMenu ? 'rgb(41, 139, 231)' : '#6b6b6b', cursor: 'pointer',\r\n pointerEvents: value || status !== 'idle' || _status !== 'idle' ? 'none' : \"auto\",'&:hover': { color: 'rgb(41, 139, 231)'}}} />\r\n <div onClick={handleCloseFileMenu} className={classes.overlay} id='overlay'\r\n style={{ display: isOpenMenu ? 'block':'none'}}>\r\n <div className={classes.filesMenu} style={{left: isOpen&&isOpen !== 'menu'?'52.5vw':'65vw'}}>\r\n <FilesMenu setFile={setFile} setValue={setValue} setIsOpenMenu={setIsOpenMenu} setType={setType}/>\r\n </div>\r\n </div> \r\n </div> \r\n )\r\n}\r\n\r\nexport default SendMessage","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { firstLetter,slicedWord,timeStampMessage,copied } from '../../../../../../helpers'\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-start\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n maxWidth: 450,\r\n padding: \"10px\",\r\n paddingBottom:18,\r\n backgroundColor: \"#ffffff\",\r\n border: \"1px solid #f0f0f0\",\r\n borderRadius: 7,\r\n },\r\n message: {\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ffffff\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ffffff\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"-1px\",\r\n left: \"-17px\"\r\n } \r\n },\r\n messageActive: {\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #babdbc\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #babdbc\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"-1px\",\r\n left: \"-17px\"\r\n } \r\n }, \r\n copyIcon: {\r\n color: '#b56ff7',\r\n cursor: 'pointer',\r\n marginRight: 7,\r\n '&:hover': {\r\n color: '#9c3bf8',\r\n },\r\n }, \r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 6,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\n\r\ninterface IMessageLeftText {\r\n message:string,\r\n name:string,\r\n lastName:string,\r\n createdAt: string,\r\n _id:string\r\n}\r\n\r\nconst MessageLeftText = ({message,name,lastName,createdAt,_id}:IMessageLeftText) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl);\r\n \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Message')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n\r\n return (\r\n <div className={classes.container}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#babdbc':undefined,\r\n border:selected?'#babdbc':undefined}}>\r\n <CopyToClipboard onCopy={() => copied('Message')} text={message}>\r\n <ContentCopyIcon className={classes.copyIcon} fontSize='large'/>\r\n </CopyToClipboard>\r\n <ListItemText className={selected?classes.messageActive:classes.message}\r\n primary={`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n primaryTypographyProps={{color: \"#0379af\"}}\r\n secondary={message}\r\n secondaryTypographyProps={{ color: \"#0e0d0d\" }} />\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={message}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy message\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)}; \r\n\r\nexport default MessageLeftText\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport DownloadForOfflineIcon from '@mui/icons-material/DownloadForOffline';\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage, timeStampEU,handleDownload,copied } from '../../../../../../helpers'\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-start\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n width: 400,\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'space-between',\r\n borderRadius: 7,\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#ffffff',\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ffffff\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ffffff\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n left: \"-17px\"\r\n } \r\n },\r\n wrapperActive: {\r\n width: 400,\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'space-between',\r\n borderRadius: 7,\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#babdbc',\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #babdbc\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #babdbc\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n left: \"-17px\"\r\n } \r\n }, \r\n image: {\r\n borderRadius: 7,\r\n width: 300,\r\n maxHeight: 400,\r\n cursor: 'pointer',\r\n }, \r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 0,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n bntDownload: {\r\n backgroundColor: 'inherit',\r\n color: '#54b0fc',\r\n width: 30,\r\n height:30,\r\n '&:hover': {\r\n backgroundColor: '#54b0fc',\r\n color:'#ffffff'\r\n }\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n boxSizing: 'border-box',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center'\r\n },\r\n wrapperOverlayImg: {\r\n width: '30%',\r\n maxHeight: '80%',\r\n position: 'relative',\r\n display: 'flex',\r\n },\r\n overlayDownloadIcon: {\r\n position: 'absolute',\r\n content: '',\r\n right: 0,\r\n top: -40,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n borderRadius: '50%',\r\n '&:hover': {\r\n backgroundColor: '#ffffff',\r\n color: '#b8b7b7',\r\n }\r\n },\r\n overlayTime: {\r\n position: 'absolute',\r\n content: '', \r\n color: '#ffffff',\r\n top: -30,\r\n left: 0,\r\n borderRadius: 10,\r\n padding:'2px 6px 2px 6px',\r\n backgroundColor:'#707070'\r\n }, \r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlayDelete: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessagesLeftImage {\r\n url:string,\r\n createdAt:string,\r\n color: string,\r\n message: string,\r\n messages: any,\r\n fullType: string,\r\n _id:string\r\n}\r\n\r\nconst MessagesLeftImage = ({url,createdAt,color,message,messages,fullType,_id}:IMessagesLeftImage) => {\r\n const classes = useStyles();\r\n const [watch, setWatch] = useState<boolean>(false)\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl); \r\n const handleOpenWatch = () => !watch&&setWatch(true)\r\n const handleCloseWatch = (e:any) => e.target.id === 'overlay'&&watch&&setWatch(false)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Link')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n return (watch ?\r\n <div onClick={handleCloseWatch} id='overlay' className={classes.overlay}>\r\n <div className={classes.wrapperOverlayImg}>\r\n <span className={classes.overlayTime}>{timeStampEU(createdAt)}</span>\r\n <DownloadForOfflineIcon className={classes.overlayDownloadIcon} fontSize='large'\r\n onClick={() => handleDownload(url, fullType)}/>\r\n <img width='100%' height='auto' alt='imageItem' src={url} />\r\n </div>\r\n </div> :\r\n <div className={classes.container}>\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={selected? classes.wrapperActive:classes.wrapper}>\r\n <ImageIcon fontSize='large' style={{ color: '#bd9a00' }} />\r\n <img onClick={handleOpenWatch} className={classes.image} alt='message pic' src={url}\r\n style={{ backgroundColor: url ? '' : color }} width='300' height='400' />\r\n <IconButton onClick={() => handleDownload(url, fullType)} className={classes.bntDownload} >\r\n <FileDownloadIcon fontSize='medium'/>\r\n </IconButton> \r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Image link\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlayDelete} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessagesLeftImage\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport AudioFileIcon from '@mui/icons-material/AudioFile';\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport ReactAudioPlayer from 'react-audio-player';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\n\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,handleDownload,copied } from '../../../../../../helpers'\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-start\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#ffffff',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ffffff\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ffffff\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n left: \"-17px\"\r\n } \r\n },\r\n wrapperActive: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#babdbc',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #babdbc\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #babdbc\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n left: \"-17px\"\r\n } \r\n },\r\n bntDownload: {\r\n backgroundColor: 'inherit',\r\n color: '#54b0fc',\r\n width: 30,\r\n height:30,\r\n '&:hover': {\r\n backgroundColor: '#54b0fc',\r\n color:'#ffffff'\r\n }\r\n },\r\n player: {\r\n margin: '0 5px 0 5px',\r\n borderRadius:7\r\n },\r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 0,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessageLeftAudio {\r\n url:string,\r\n createdAt: string,\r\n fullType: string,\r\n _id:string\r\n}\r\n\r\nconst MessageLeftAudio = ({ url,createdAt,fullType,_id }:IMessageLeftAudio) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl); \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Link')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n\r\n\r\n return (\r\n <div className={classes.container}>\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={selected? classes.wrapperActive:classes.wrapper}>\r\n <AudioFileIcon fontSize='large' style={{ color:'#0294c0'}}/> \r\n <ReactAudioPlayer className={classes.player}\r\n src={url}\r\n controls\r\n />\r\n <IconButton onClick={() => handleDownload(url, fullType)} className={classes.bntDownload} >\r\n <FileDownloadIcon fontSize='medium'/>\r\n </IconButton>\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Audio link\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessageLeftAudio\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport VideoFileIcon from '@mui/icons-material/VideoFile';\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,handleDownload,copied } from '../../../../../../helpers'\r\nconst { Player } = require('video-react')\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-start\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: 400,\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#ffffff',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ffffff\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ffffff\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n left: \"-17px\"\r\n } \r\n },\r\n wrapperActive: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: 400,\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#babdbc',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #babdbc\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #babdbc\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n left: \"-17px\"\r\n } \r\n }, \r\n bntDownload: {\r\n backgroundColor: 'inherit',\r\n color: '#54b0fc',\r\n width: 30,\r\n height: 30,\r\n marginLeft:5,\r\n '&:hover': {\r\n backgroundColor: '#54b0fc',\r\n color:'#ffffff'\r\n }\r\n },\r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 0,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n player: {\r\n backgroundColor: '#ffffff',\r\n },\r\n playerActive: {\r\n backgroundColor: '#babdbc',\r\n }, \r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessageLeftVideo {\r\n url:string,\r\n createdAt: string,\r\n fullType: string,\r\n _id:string\r\n}\r\n\r\nconst MessageLeftVideo = ({ url,createdAt,fullType,_id }:IMessageLeftVideo) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl);\r\n \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Link')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n \r\n\r\n return (\r\n <div className={classes.container}>\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={selected? classes.wrapperActive:classes.wrapper}>\r\n <VideoFileIcon fontSize='large' style={{ color:'#03b003'}}/> \r\n <Player className={selected?classes.playerActive:classes.player} playsInline src={url}/>\r\n <IconButton onClick={() => handleDownload(url, fullType)} className={classes.bntDownload} >\r\n <FileDownloadIcon fontSize='medium'/>\r\n </IconButton>\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Video link\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessageLeftVideo\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,copied } from '../../../../../../helpers'\r\n\r\nconst FileViewer = require('react-file-viewer')\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-start\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: 200,\r\n padding: '5px 5px 12px 5px',\r\n backgroundColor: '#ffffff',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ffffff\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ffffff\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n left: \"-17px\"\r\n } \r\n },\r\n wrapperActive: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: 200,\r\n padding: '5px 5px 12px 5px',\r\n backgroundColor: '#babdbc',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #babdbc\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #babdbc\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n left: \"-17px\"\r\n } \r\n }, \r\n bntDownload: {\r\n backgroundColor: 'inherit',\r\n color: '#54b0fc',\r\n width: 30,\r\n height:30,\r\n '&:hover': {\r\n backgroundColor: '#54b0fc',\r\n color:'#ffffff'\r\n }\r\n },\r\n title: {\r\n margin: '0 30px 0 5px',\r\n color: '#0e0d0d',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#54b0fc',\r\n }\r\n },\r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 0,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n overlay: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height:'100%',\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n border:'solid 2px #0084ff',\r\n cursor: 'pointer',\r\n zIndex:100\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlayDelete: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessageLeftFile {\r\n url:string,\r\n createdAt: string,\r\n type: string,\r\n _id:string\r\n}\r\n\r\nconst MessageLeftFile = ({ url,createdAt,type,_id }:IMessageLeftFile) => {\r\n const classes = useStyles();\r\n const [read, setRead] = useState<boolean>(false)\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl); \r\n const handleOpenRead = () => !read&&setRead(true)\r\n const handleCloseRead = () => read && setRead(false)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Link')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n\r\n return (\r\n <div className={classes.container}>\r\n {read&&<div className={classes.overlay} id='overlay' onClick={handleCloseRead}>\r\n <FileViewer\r\n allowFullScreen={true}\r\n fileType={type}\r\n filePath={url}\r\n onError={handleCloseRead}\r\n />\r\n </div>}\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={selected? classes.wrapperActive:classes.wrapper}>\r\n <InsertDriveFileIcon fontSize='large' style={{ color: '#99b401' }} />\r\n {!read && <span className={classes.title} onClick={handleOpenRead}>Read File</span>}\r\n <a href={url} target=\"_blank\" rel=\"noreferrer\" download>\r\n <IconButton className={classes.bntDownload} >\r\n <FileDownloadIcon fontSize='medium'/>\r\n </IconButton>\r\n </a>\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy File link\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlayDelete} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessageLeftFile\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { firstLetter, slicedWord, timeStampMessage, copied } from '../../../../../../helpers'\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n maxWidth: 450,\r\n padding: \"10px\",\r\n paddingBottom:18,\r\n backgroundColor: \"#deffa9\",\r\n border: \"1px solid #d5ff91\",\r\n borderRadius: 7,\r\n },\r\n message: {\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #deffa9\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #deffa9\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"-1px\",\r\n right: \"-17px\"\r\n }\r\n },\r\n messageActive: {\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ced8d7\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ced8d7\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"-1px\",\r\n right: \"-17px\"\r\n }\r\n }, \r\n copyIcon: {\r\n color: '#b56ff7',\r\n cursor: 'pointer',\r\n marginRight: 7,\r\n '&:hover': {\r\n color: '#9c3bf8',\r\n },\r\n },\r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 6,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessageRightText {\r\n message:string,\r\n name:string,\r\n lastName:string,\r\n createdAt: string,\r\n _id:string\r\n}\r\n\r\nconst MessageRightText = ({message,name,lastName,createdAt,_id}:IMessageRightText) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl);\r\n \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Message')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n\r\n return (\r\n <div className={classes.container}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':undefined,\r\n border:selected?'#ced8d7':undefined}}>\r\n <CopyToClipboard onCopy={() => copied('Message')} text={message}>\r\n <ContentCopyIcon className={classes.copyIcon} fontSize='large'/>\r\n </CopyToClipboard>\r\n <ListItemText className={selected?classes.messageActive:classes.message} \r\n primary={`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n primaryTypographyProps={{color: \"#42aee0\"}}\r\n secondary={message}\r\n secondaryTypographyProps={{ color: \"#0e0d0d\" }} />\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={message}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy message\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessageRightText\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport DownloadForOfflineIcon from '@mui/icons-material/DownloadForOffline';\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage, timeStampEU,handleDownload,copied } from '../../../../../../helpers'\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n width: 400,\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'space-between',\r\n borderRadius: 7,\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#deffa9',\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #deffa9\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #deffa9\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\"\r\n } \r\n },\r\n wrapperActive: {\r\n width: 400,\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'space-between',\r\n borderRadius: 7,\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#ced8d7',\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ced8d7\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ced8d7\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\"\r\n } \r\n }, \r\n image: {\r\n borderRadius: 7,\r\n width: 300,\r\n maxHeight: 400,\r\n cursor:'pointer',\r\n }, \r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 0,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n bntDownload: {\r\n backgroundColor: 'inherit',\r\n color: '#54b0fc',\r\n width: 30,\r\n height:30,\r\n '&:hover': {\r\n backgroundColor: '#54b0fc',\r\n color:'#ffffff'\r\n }\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n boxSizing: 'border-box',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center'\r\n },\r\n wrapperOverlayImg: {\r\n width: '30%',\r\n maxHeight: '80%',\r\n position: 'relative',\r\n display: 'flex',\r\n },\r\n overlayDownloadIcon: {\r\n position: 'absolute',\r\n content: '',\r\n right: 0,\r\n top: -40,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n borderRadius: '50%',\r\n '&:hover': {\r\n backgroundColor: '#ffffff',\r\n color: '#b8b7b7',\r\n }\r\n },\r\n overlayTime: {\r\n position: 'absolute',\r\n content: '', \r\n color: '#ffffff',\r\n top: -30,\r\n left: 0,\r\n borderRadius: 10,\r\n padding:'2px 6px 2px 6px',\r\n backgroundColor:'#707070'\r\n }, \r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlayDelete: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessageRightImage {\r\n url:string,\r\n createdAt:string,\r\n color: string,\r\n message: string,\r\n messages: any,\r\n fullType: string,\r\n _id:string\r\n}\r\n\r\nconst MessageRightImage = ({url,createdAt,color,message,messages,fullType,_id}:IMessageRightImage) => {\r\n const classes = useStyles();\r\n const [watch, setWatch] = useState<boolean>(false)\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl); \r\n const handleOpenWatch = () => !watch&&setWatch(true)\r\n const handleCloseWatch = (e:any) => e.target.id === 'overlay'&&watch&&setWatch(false)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Link')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n return (watch ?\r\n <div onClick={handleCloseWatch} id='overlay' className={classes.overlay}>\r\n <div className={classes.wrapperOverlayImg}>\r\n <span className={classes.overlayTime}>{timeStampEU(createdAt)}</span>\r\n <DownloadForOfflineIcon className={classes.overlayDownloadIcon} fontSize='large'\r\n onClick={() => handleDownload(url, fullType)}/>\r\n <img width='100%' height='auto' alt='imageItem' src={url} />\r\n </div>\r\n </div> :\r\n <div className={classes.container}>\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={selected? classes.wrapperActive:classes.wrapper}>\r\n <ImageIcon fontSize='large' style={{ color: '#bd9a00' }} />\r\n <img onClick={handleOpenWatch} className={classes.image} alt='message pic' src={url}\r\n style={{ backgroundColor: url ? '' : color }} width='300' height='400' />\r\n <IconButton onClick={() => handleDownload(url, fullType)} className={classes.bntDownload}>\r\n <FileDownloadIcon fontSize='medium'/>\r\n </IconButton>\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Image link\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlayDelete} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessageRightImage\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport AudioFileIcon from '@mui/icons-material/AudioFile';\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport ReactAudioPlayer from 'react-audio-player';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,handleDownload,copied } from '../../../../../../helpers'\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#deffa9',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #deffa9\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #deffa9\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\"\r\n } \r\n },\r\n wrapperActive: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#ced8d7',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ced8d7\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ced8d7\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\"\r\n } \r\n },\r\n bntDownload: {\r\n backgroundColor: 'inherit',\r\n color: '#54b0fc',\r\n width: 30,\r\n height:30,\r\n '&:hover': {\r\n backgroundColor: '#54b0fc',\r\n color:'#ffffff'\r\n }\r\n },\r\n player: {\r\n margin: '0 5px 0 5px',\r\n borderRadius: 7,\r\n },\r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 0,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessageRightAudio {\r\n url:string,\r\n createdAt: string,\r\n fullType: string,\r\n _id:string\r\n}\r\n\r\nconst MessageRightAudio = ({ url,createdAt,fullType,_id }:IMessageRightAudio) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl); \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Link')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n\r\n return (\r\n <div className={classes.container}>\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={selected? classes.wrapperActive:classes.wrapper}>\r\n <AudioFileIcon fontSize='large' style={{ color:'#0294c0'}}/> \r\n <ReactAudioPlayer className={classes.player} \r\n src={url}\r\n controls\r\n />\r\n <IconButton onClick={() => handleDownload(url, fullType)} className={classes.bntDownload}>\r\n <FileDownloadIcon fontSize='medium'/>\r\n </IconButton>\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Audio link\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessageRightAudio\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport VideoFileIcon from '@mui/icons-material/VideoFile';\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,handleDownload,copied } from '../../../../../../helpers'\r\n\r\nconst { Player } = require('video-react')\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: 400,\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#deffa9',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #deffa9\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #deffa9\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\"\r\n } \r\n },\r\n wrapperActive: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: 400,\r\n padding: '12px 5px 12px 5px',\r\n backgroundColor: '#ced8d7',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ced8d7\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ced8d7\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\"\r\n } \r\n }, \r\n bntDownload: {\r\n backgroundColor: 'inherit',\r\n color: '#54b0fc',\r\n width: 30,\r\n height: 30,\r\n marginLeft:5,\r\n '&:hover': {\r\n backgroundColor: '#54b0fc',\r\n color:'#ffffff'\r\n }\r\n }, \r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 0,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n player: {\r\n backgroundColor: '#deffa9',\r\n },\r\n playerActive: {\r\n backgroundColor: '#ced8d7',\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessageRightVideo {\r\n url:string,\r\n createdAt: string,\r\n fullType: string,\r\n _id:string\r\n}\r\n\r\nconst MessageRightVideo = ({ url,createdAt,fullType,_id }:IMessageRightVideo) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl);\r\n \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Link')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n \r\n return (\r\n <div className={classes.container}>\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={selected? classes.wrapperActive:classes.wrapper}>\r\n <VideoFileIcon fontSize='large' style={{ color:'#03b003'}}/> \r\n <Player className={selected?classes.playerActive:classes.player} playsInline src={url}/>\r\n <IconButton onClick={() => handleDownload(url, fullType)} className={classes.bntDownload}>\r\n <FileDownloadIcon fontSize='medium'/>\r\n </IconButton>\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Video link\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessageRightVideo\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport { IconButton } from \"@material-ui/core\";\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport FileDownloadIcon from '@mui/icons-material/FileDownload';\r\nimport Button from '@mui/material/Button';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,copied } from '../../../../../../helpers'\r\n\r\nconst FileViewer = require('react-file-viewer')\r\n\r\nconst StyledMenu = styled((props:any) => (\r\n <Menu\r\n elevation={0}\r\n anchorOrigin={{\r\n vertical: 'top',\r\n horizontal: 'right',\r\n }}\r\n transformOrigin={{\r\n vertical: 'bottom',\r\n horizontal: 'right',\r\n }}\r\n {...props}\r\n />\r\n))(({ theme }:any) => ({\r\n '& .MuiPaper-root': {\r\n borderRadius: 10,\r\n marginTop: theme.spacing(0),\r\n minWidth: 220,\r\n color:\r\n theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[500],\r\n boxShadow:\r\n 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',\r\n '& .MuiMenu-list': {\r\n padding: '4px 4px',\r\n },\r\n '& .MuiMenuItem-root': {\r\n marginBottom: theme.spacing(1),\r\n '& .MuiSvgIcon-root': {\r\n fontSize: 21,\r\n color: theme.palette.text.secondary,\r\n marginRight: theme.spacing(2),\r\n }\r\n },\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"flex-end\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: 200,\r\n padding: '5px 5px 12px 5px',\r\n backgroundColor: '#deffa9',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #deffa9\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #deffa9\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\"\r\n } \r\n },\r\n wrapperActive: {\r\n position: 'relative',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: 200,\r\n padding: '5px 5px 12px 5px',\r\n backgroundColor: '#ced8d7',\r\n borderRadius: 7,\r\n \"&:after\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"15px solid #ced8d7\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: \"0\",\r\n right: \"-15px\"\r\n },\r\n \"&:before\": {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderBottom: \"17px solid #ced8d7\",\r\n borderLeft: \"16px solid transparent\",\r\n borderRight: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\"\r\n } \r\n }, \r\n bntDownload: {\r\n backgroundColor: 'inherit',\r\n color: '#54b0fc',\r\n width: 30,\r\n height:30,\r\n '&:hover': {\r\n backgroundColor: '#54b0fc',\r\n color:'#ffffff'\r\n }\r\n }, \r\n title: {\r\n margin: '0 30px 0 5px',\r\n color: '#0e0d0d',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#54b0fc',\r\n }\r\n },\r\n time: {\r\n position: \"absolute\",\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n bottom: 0,\r\n right: 6,\r\n color: '#414141',\r\n padding: 3,\r\n borderRadius: 5,\r\n },\r\n overlay: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n width: '100%',\r\n height:'100%',\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n border:'solid 2px #0084ff',\r\n cursor: 'pointer',\r\n zIndex:100\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlayDelete: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n }, \r\n});\r\n\r\ninterface IMessageRightFile {\r\n url:string,\r\n createdAt: string,\r\n type: string,\r\n _id:string\r\n}\r\n\r\nconst MessageRightFile = ({ url,createdAt,type,_id }:IMessageRightFile) => {\r\n const classes = useStyles();\r\n const [read, setRead] = useState<boolean>(false)\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const [selected, setSelected] = useState<boolean>(false);\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl); \r\n const handleOpenRead = () => !read&&setRead(true)\r\n const handleCloseRead = () => read && setRead(false)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Link')\r\n if (type === 'delete') setModal(true)\r\n setAnchorEl(null)\r\n setSelected(false)\r\n }\r\n\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n removeMessageById(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>):void => {\r\n e.preventDefault()\r\n setAnchorEl(e.currentTarget)\r\n setSelected(true)\r\n } \r\n\r\n return (\r\n <div className={classes.container}>\r\n {read&&<div className={classes.overlay} id='overlay' onClick={handleCloseRead}>\r\n <FileViewer\r\n allowFullScreen={true}\r\n fileType={type}\r\n filePath={url}\r\n onError={handleCloseRead}\r\n />\r\n </div>}\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={selected? classes.wrapperActive:classes.wrapper}>\r\n <InsertDriveFileIcon fontSize='large' style={{ color: '#99b401' }} />\r\n {!read && <span className={classes.title} onClick={handleOpenRead}>Read File</span>}\r\n <a href={url} target=\"_blank\" rel=\"noreferrer\" download>\r\n <IconButton className={classes.bntDownload}>\r\n <FileDownloadIcon fontSize='medium'/>\r\n </IconButton>\r\n </a>\r\n <div className={classes.time}>{timeStampMessage(createdAt)}</div>\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy File link\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete message\r\n </MenuItem> \r\n </StyledMenu>\r\n {modal &&\r\n <div onClick={handleDeleteModal} className={classes.overlayDelete} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <h3 style={{color: '#2c2c2c'}}>Delete message</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete message?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGE\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>} \r\n </div>\r\n </div> \r\n)};\r\n\r\nexport default MessageRightFile\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n marginBottom:15\r\n },\r\n wrapper: {\r\n textAlign: 'center',\r\n padding: '1px 10px 3px 10px',\r\n backgroundColor: 'rgba(104, 105, 104, 0.8)',\r\n color:'#ffffff',\r\n borderRadius: 7,\r\n fontSize: \".85em\",\r\n fontWeight:600,\r\n },\r\n});\r\n\r\ninterface IMessageTime {\r\n message:string,\r\n}\r\n\r\nconst MessageTime = ({ message }:IMessageTime) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n <div className={classes.container}>\r\n <span className={classes.wrapper}>{message}</span>\r\n </div> \r\n)};\r\n\r\nexport default MessageTime\r\n","import { createSelector } from 'reselect';\r\nimport { IState } from '../../../typescript/redux/interfaces'\r\n\r\nconst getMessages = (state: IState) => state.messages.messages;\r\nconst getState = (state: IState) => state.messages;\r\nconst getMessagesMemo = createSelector([getMessages], messages => messages);\r\n\r\nexport { getMessages,getState,getMessagesMemo };\r\n\r\n","import {\r\n actionGetMessagesSuccess,\r\n actionGetMessagesReject\r\n} from '../action';\r\nimport { getMessagesById } from '../../../api-data';\r\nimport { IMessagesState } from '../../../typescript/redux/messages/interfaces'\r\n\r\n\r\nconst asyncGetMessagesById= (id:string,cb:any) => async (dispatch:any) => {\r\n try {\r\n const data = await getMessagesById<IMessagesState>(id)\r\n data && dispatch(actionGetMessagesSuccess(data))\r\n cb&&cb()\r\n } catch (e) {\r\n dispatch(actionGetMessagesReject())\r\n } \r\n};\r\n\r\n\r\nexport { asyncGetMessagesById };\r\n\r\n\r\n\r\n\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { useState, useEffect, useRef, useCallback } from \"react\";\r\nimport { useSelector,useDispatch } from \"react-redux\";\r\n\r\nimport ArrowBack from \"./ArrowBack\";\r\nimport SendMessage from \"./SendMessage\";\r\nimport MessageLeftText from './Messages/MessageLeftText'\r\nimport MessageLeftImage from './Messages/MessageLeftImage'\r\nimport MessageLeftAudio from './Messages/MessageLeftAudio'\r\nimport MessageLeftVideo from './Messages/MessageLeftVideo'\r\nimport MessageLeftFile from \"./Messages/MessageLeftFile\";\r\nimport MessageRightText from './Messages/MessageRightText'\r\nimport MessageRightImage from './Messages/MessageRightImage'\r\nimport MessageRightAudio from './Messages/MessageRightAudio'\r\nimport MessageRightVideo from './Messages/MessageRightVideo'\r\nimport MessageRightFile from \"./Messages/MessageRightFile\";\r\nimport MessageTime from \"./Messages/MessageTime\";\r\nimport AlertInfo from \"../../../reusableComponents/AlertInfo\";\r\nimport { getMessagesMemo } from '../../../../redux/messages/selector'\r\nimport { getNumber } from '../../../../redux/authorization/selector'\r\nimport { getChat } from '../../../../redux/chat/selector'\r\nimport { getScroll } from '../../../../redux/control/selector'\r\nimport { actionScroll } from '../../../../redux/control/action'\r\nimport { asyncGetMessagesById } from '../../../../redux/messages/operations'\r\nimport { asyncGetChatById } from \"../../../../redux/chat/operations\";\r\nimport { seenChat } from \"../../../../api-data\";\r\nimport { timeStampFilter,prodBaseURL } from \"../../../../helpers\";\r\nconst debounce = require('lodash.debounce');\r\n\r\nconst useStyles = makeStyles({ \r\n container: {\r\n height: '93vh',\r\n width: \"100%\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n alignContent:\"center\",\r\n flexDirection: \"column\",\r\n position: \"relative\",\r\n },\r\n messagesScroll: {\r\n paddingTop: 30,\r\n overflowY: \"scroll\",\r\n maxHeight: '83vh',\r\n width: \"100%\",\r\n display: \"flex\",\r\n justifyContent: 'center',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n },\r\n messagesEmpty: {\r\n overflowY: \"hidden\",\r\n width: \"100%\",\r\n display: \"flex\",\r\n justifyContent: 'center',\r\n paddingTop: 30,\r\n }, \r\n messagesBody: {\r\n width: \"60%\",\r\n }, \r\n});\r\n\r\nconst ChatBar = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch()\r\n const messages = useSelector(getMessagesMemo)\r\n const userNumber = useSelector(getNumber)\r\n const { companionId,total,seen,mute } = useSelector(getChat)\r\n const scroll = useSelector(getScroll)\r\n const [isArrow, setIsArrow] = useState<boolean>(false)\r\n const [isNew, setIsNew] = useState<{new:number,mute:boolean}>({new:0,mute:false})\r\n const divRef = useRef<any | null>(null)\r\n let time:any\r\n const handleScrollTo = () => {\r\n divRef.current&&divRef.current.scrollTo({\r\n top: divRef.current.scrollHeight,\r\n behavior: 'smooth'\r\n })\r\n }\r\n\r\n const handleScroll = useCallback(({ target:{scrollHeight,scrollTop,clientHeight}}: any) => {\r\n const different = scrollHeight - Math.floor(scrollTop)\r\n const reached = different - clientHeight\r\n if (total !== seen&&reached < 10) seenChat(companionId)\r\n setIsArrow(different === clientHeight ? false : true)\r\n }, [total,seen, companionId])\r\n \r\n const debouncedHandleScroll = debounce(handleScroll, 300)\r\n \r\n useEffect(() => {\r\n if (scroll) {\r\n dispatch(asyncGetMessagesById(companionId, handleScrollTo))\r\n dispatch(actionScroll(false))\r\n }\r\n }, [dispatch, scroll, companionId])\r\n \r\n useEffect(() => {\r\n dispatch(asyncGetMessagesById(companionId, handleScrollTo))\r\n const handleReset = () => {\r\n dispatch(asyncGetChatById(companionId))\r\n dispatch(asyncGetMessagesById(companionId, null))\r\n }\r\n const idInterval = setInterval(handleReset, 3000);\r\n return () => clearInterval(idInterval);\r\n }, [dispatch, companionId]);\r\n \r\n useEffect(() => {\r\n setIsNew({ new:total-seen,mute})\r\n }, [total,seen,mute]); \r\n\r\n useEffect(() => {\r\n if (divRef.current) {\r\n const { scrollHeight, clientHeight } = divRef.current\r\n if(total !== seen&&scrollHeight === clientHeight) seenChat(companionId)\r\n }\r\n }, [total,seen,companionId]);\r\n\r\n return (\r\n <div className={classes.container} >\r\n <ArrowBack isArrow={isArrow} isNew={isNew} handleScrollTo={handleScrollTo}/>\r\n <div ref={divRef} onScroll={debouncedHandleScroll}\r\n className={messages.length > 0 ? classes.messagesScroll : classes.messagesEmpty}>\r\n <div className={classes.messagesBody}>\r\n {messages.length > 0 ? messages.map(({ message, name, lastName, color,\r\n createdAt,number, type,fullType,_id }) => {\r\n let isTime\r\n if (!time) {\r\n isTime = true\r\n time = createdAt\r\n } else if (timeStampFilter(time) !== timeStampFilter(createdAt)) {\r\n time = createdAt\r\n isTime = true\r\n }\r\n const url = `${prodBaseURL}/${message}`\r\n if (number !== userNumber) {\r\n if (type === 'text') return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageLeftText\r\n message={message}\r\n createdAt={createdAt}\r\n name={name}\r\n lastName={lastName}\r\n _id={_id}\r\n /></div>)\r\n if (type === 'image') return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageLeftImage \r\n url={url}\r\n createdAt={createdAt}\r\n color={color}\r\n message={message}\r\n messages={messages}\r\n fullType={fullType}\r\n _id={_id}\r\n /></div>)\r\n if (type === 'audio') return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageLeftAudio \r\n url={url}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n _id={_id}\r\n /></div>)\r\n if (type === 'video') return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageLeftVideo \r\n url={url}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n _id={_id}\r\n /></div>)\r\n if (type) return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageLeftFile \r\n url={url}\r\n createdAt={createdAt}\r\n type={type}\r\n _id={_id}\r\n /></div>) \r\n } else {\r\n if (type === 'text') return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageRightText \r\n message={message}\r\n createdAt={createdAt}\r\n name={name}\r\n lastName={lastName}\r\n _id={_id}\r\n /></div>)\r\n if (type === 'image') return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageRightImage \r\n url={url}\r\n createdAt={createdAt}\r\n color={color}\r\n message={message}\r\n messages={messages}\r\n fullType={fullType}\r\n _id={_id}\r\n /></div>)\r\n if (type === 'audio') return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageRightAudio \r\n url={url}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n _id={_id}\r\n /></div>)\r\n if (type === 'video') return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageRightVideo \r\n url={url}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n _id={_id}\r\n /></div>)\r\n if (type) return (<div key={createdAt}>\r\n {isTime&&<MessageTime message={timeStampFilter(createdAt)}/>}\r\n <MessageRightFile \r\n url={url}\r\n createdAt={createdAt}\r\n type={type}\r\n _id={_id}\r\n /></div>) \r\n }\r\n }) : <AlertInfo name='You do not have messages yet!' />}\r\n </div>\r\n </div> \r\n <SendMessage isArrow={isArrow} /> \r\n </div>\r\n );\r\n}\r\n\r\nexport default ChatBar","import { DatePicker } from \"@material-ui/pickers\";\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\ninterface IStaticDatePicker {\r\n disabled:boolean,\r\n date: Date,\r\n changeDate: React.Dispatch<React.SetStateAction<any>>,\r\n handleOnOpen: () => void\r\n}\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n\r\n},\r\n})\r\n\r\nconst StaticDatePicker = ({ disabled, date, changeDate,handleOnOpen }: IStaticDatePicker) => {\r\n const classes = useStyles()\r\nreturn (\r\n <DatePicker\r\n disabled={disabled}\r\n className={classes.container}\r\n inputVariant='outlined'\r\n orientation=\"portrait\"\r\n variant=\"dialog\"\r\n openTo=\"date\"\r\n autoOk\r\n value={date?date:new Date()}\r\n onOpen={handleOnOpen}\r\n onChange={changeDate}\r\n />\r\n );\r\n};\r\n\r\nexport default StaticDatePicker;","import InputBase from '@mui/material/InputBase';\r\nimport Toolbar from '@mui/material/Toolbar'\r\nimport IconButton from '@mui/material/IconButton';\r\nimport SearchIcon from '@mui/icons-material/Search';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\r\nimport Switch from '@mui/material/Switch';\r\nimport { styled } from '@mui/material/styles';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\n\r\nimport { actionIsOpen } from '../../../../../../redux/control/action'\r\nimport { getMessages } from '../../../../../../redux/messages/selector'\r\nimport { getChat } from '../../../../../../redux/chat/selector'\r\nimport { sortChat } from '../../../../../../api-data';\r\nimport StaticDatePicker from \"./StaticDatePicker\";\r\n\r\nconst SearchBar = styled('div')(({ theme }:any) => ({\r\n position: 'relative',\r\n borderRadius: '20px',\r\n backgroundColor: '#f1f0f0', \r\n width: '100%',\r\n margin:'0 5% 0 5%'\r\n}));\r\n\r\nconst SearchIconWrapper = styled('div')(({ theme }) => ({\r\n padding: theme.spacing(0, 2),\r\n height: '100%',\r\n position: 'absolute',\r\n pointerEvents: 'none',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n}));\r\n\r\nconst StyledInputBase = styled(InputBase)(({ theme }) => ({\r\n color: 'inherit',\r\n '& .MuiInputBase-input': { \r\n fontWeight: 500,\r\n borderRadius: '20px',\r\n padding: theme.spacing(1, 1, 1, 0),\r\n paddingLeft: `calc(1em + ${theme.spacing(4)})`,\r\n transition: theme.transitions.create('width'),\r\n width: '100%',\r\n },\r\n}));\r\n\r\nconst useStyles = makeStyles({\r\n toolBar: {\r\n color: '#b1aeae',\r\n height:'7vh'\r\n },\r\n searchBarActive: {\r\n outline: '2px solid #2184f7',\r\n color: '#2184f7',\r\n },\r\n})\r\n\r\nconst label = { inputProps: { 'aria-label': 'Switch demo' } };\r\n\r\ninterface ISearch {\r\n handleSearch: (e: React.ChangeEvent<HTMLInputElement>) => void,\r\n value: string,\r\n setDate: React.Dispatch<any>,\r\n date:any,\r\n}\r\n\r\nconst Search = ({handleSearch,value,setDate,date}:ISearch) => {\r\n const dispatch = useDispatch()\r\n const classes = useStyles()\r\n const { sort, companionId } = useSelector(getChat)\r\n const messages = useSelector(getMessages)\r\n const disabled = messages.length > 0 ? false : true\r\n const handleOnOpen = () => setDate('')\r\n const handleSort = () => sortChat(companionId)\r\n\r\n return (\r\n <Toolbar className={classes.toolBar} >\r\n <IconButton onClick={() => dispatch(actionIsOpen(''))} aria-label=\"delete\" size=\"medium\">\r\n <CloseIcon fontSize='medium'/>\r\n </IconButton>\r\n <SearchBar className={!value||disabled?undefined:classes.searchBarActive}>\r\n <SearchIconWrapper>\r\n <SearchIcon />\r\n </SearchIconWrapper>\r\n <StyledInputBase\r\n disabled={disabled}\r\n onChange={handleSearch}\r\n placeholder={disabled?'Disabled':'Search'}\r\n value={value}\r\n inputProps={{ 'aria-label': 'search' }}\r\n />\r\n </SearchBar> \r\n <IconButton aria-label=\"delete\" size=\"medium\" disabled={disabled}>\r\n <StaticDatePicker disabled={disabled} date={date}\r\n changeDate={setDate} handleOnOpen={handleOnOpen} /> \r\n <CalendarTodayIcon fontSize='medium'\r\n style={{color:date?'#2184f7':'#b1aeae'}}/>\r\n </IconButton>\r\n <Switch onClick={handleSort} checked={sort} {...label} disabled={disabled} /> \r\n </Toolbar>\r\n )\r\n}\r\n\r\nexport default Search","import { makeStyles } from '@material-ui/core'\r\nimport { useSelector } from 'react-redux'\r\nimport React, { useState } from 'react'\r\nimport List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport Typography from '@mui/material/Typography';\r\nimport Divider from '@mui/material/Divider';\r\nimport Search from './Search'\r\nimport AlertInfo from \"../../../../reusableComponents/AlertInfo\";\r\nimport { getMessages } from '../../../../../redux/messages/selector'\r\nimport { getChat } from '../../../../../redux/chat/selector'\r\nimport { timeStampEU, timeStampFilter, firstLetter, slicedWord, handleSort,prodBaseURL } from '../../../../../helpers'\r\nimport { TMessages } from '../../../../../typescript/redux/messages/types';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n height: '100%',\r\n backgroundColor: '#ffffff'\r\n },\r\n list: {\r\n maxHeight: '93vh',\r\n overflowY: 'scroll',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n }, \r\n },\r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n})\r\n\r\nconst SearchList= () => {\r\n const classes = useStyles()\r\n const { sort } = useSelector(getChat)\r\n const messages = useSelector(getMessages)\r\n const [value, setValue] = useState<string>('')\r\n const [date, setDate] = useState<any>('');\r\n const handleSearch = (e: React.ChangeEvent<HTMLInputElement>): void => setValue(e.target.value)\r\n\r\n const filteredMessages = (arr:TMessages) => arr.filter((el) => {\r\n if (!date) {\r\n return el.message.toLowerCase().includes(value.toLowerCase())\r\n } else if (el.message.toLowerCase().includes(value.toLowerCase())\r\n && timeStampFilter(date) === timeStampFilter(el.createdAt)) {\r\n return el\r\n }\r\n })\r\n const arr:TMessages = filteredMessages(handleSort('createdAt',messages,sort))\r\nreturn (\r\n <div className={classes.container}>\r\n <Search handleSearch={handleSearch} value={value}\r\n setDate={setDate} date={date} />\r\n <div className={messages.length > 0 ?classes.list:undefined}>\r\n {messages.length > 0 ? arr.length > 0 ?\r\n <List sx={{ width: '100%' }}>\r\n {arr.map(({ name, lastName, avatarUrl, color, message, createdAt }) =>\r\n <div key={createdAt}>\r\n <ListItem alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 44, height: 44, marginRight:2 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n secondary={<>\r\n <Typography\r\n sx={{ display: 'block',wordBreak:'break-word' }}\r\n component=\"span\"\r\n variant=\"body2\"\r\n color=\"text.primary\"\r\n >\r\n {message}\r\n </Typography>\r\n {timeStampEU(createdAt)}\r\n </>}\r\n />\r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List> :\r\n <AlertInfo name={`Can not find message by request: ${value}`}/>:\r\n <AlertInfo name='You do not have messages yet!' />}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default SearchList","import Stack from '@mui/material/Stack';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport PersonAddAltIcon from '@mui/icons-material/PersonAddAlt';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport { makeStyles, Typography } from '@material-ui/core'\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { useState,useEffect } from 'react';\r\nimport { actionIsOpen } from '../../../../../../redux/control/action'\r\nimport { getContactsMemo } from '../../../../../../redux/contacts/selector'\r\nimport { getChat } from '../../../../../../redux/chat/selector'\r\nimport { asyncAddContact } from '../../../../../../redux/contacts/operations';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n height:'7vh'\r\n },\r\n iconClose: {\r\n '&:hover': {\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n }, \r\n})\r\n\r\nconst ToolBar = () => {\r\n const dispatch = useDispatch()\r\n const classes = useStyles()\r\n const contactsMemo = useSelector(getContactsMemo)\r\n const { number } = useSelector(getChat)\r\n const [isContact, setIsContact] = useState<boolean>(false)\r\n\r\n useEffect(() => {\r\n const contact = contactsMemo.find((el) => el.number === number)\r\n if (contact) {\r\n setIsContact(true)\r\n } else {\r\n setIsContact(false)\r\n } \r\n }, [contactsMemo,number])\r\n \r\n return (\r\n <Stack className={classes.container} direction=\"row\">\r\n <IconButton onClick={() => dispatch(actionIsOpen(''))} aria-label=\"delete\" size=\"medium\">\r\n <CloseIcon className={classes.iconClose} fontSize='medium'/>\r\n </IconButton>\r\n <Typography variant=\"h6\" color=\"initial\" style={{marginLeft:20,color: '#474747'}}>Profile</Typography>\r\n <IconButton style={{marginLeft:'auto',marginRight:'3%'}} aria-label=\"delete\" size=\"medium\">\r\n {isContact ? <EditIcon onClick={() => dispatch(actionIsOpen('edit'))} fontSize='medium' /> :\r\n <PersonAddAltIcon onClick={() => dispatch(asyncAddContact(number))} fontSize='medium' />}\r\n </IconButton>\r\n </Stack>\r\n )\r\n}\r\n\r\nexport default ToolBar","import { makeStyles } from '@material-ui/core'\r\nimport { useSelector } from 'react-redux';\r\nimport { Carousel } from 'react-responsive-carousel';\r\nimport { firstLetter,slicedWord,timeStampEU,prodBaseURL } from '../../../../../../helpers'\r\nimport { getChat } from '../../../../../../redux/chat/selector'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'relative',\r\n },\r\n nameTile: {\r\n position:'absolute',\r\n color: '#ffffff',\r\n backgroundColor: 'rgb(0,0,0)',\r\n borderRadius: 10,\r\n padding:8,\r\n fontSize: 18,\r\n zIndex:10,\r\n top: '6%',\r\n left: '50%', \r\n marginLeft: '-45%',\r\n opacity: 0.7,\r\n transition: 'opacity .35s ease-in-out'\r\n },\r\n timeTile: {\r\n position:'absolute',\r\n color: '#ffffff',\r\n backgroundColor: 'rgb(0,0,0)',\r\n borderRadius: 10,\r\n padding:4,\r\n fontSize: 15,\r\n top: '1%',\r\n left: '50%', \r\n marginLeft: '-45%',\r\n opacity: 0.7,\r\n transition: 'opacity .35s ease-in-out'\r\n }, \r\n})\r\n\r\nconst ProfilePicture = () => {\r\n const classes = useStyles()\r\n const { name, lastName, online, avatarsArr} = useSelector(getChat)\r\n return (\r\n <div className={classes.container}>\r\n <Carousel>\r\n {avatarsArr.map(({avatarUrl,updatedAt}) => <div>\r\n <img alt='pic' src={`${prodBaseURL}/${avatarUrl}`}/>\r\n <p className=\"legend\">{timeStampEU(updatedAt)}</p>\r\n </div>)}\r\n </Carousel> \r\n <span className={classes.nameTile}>{`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}</span>\r\n <span className={classes.timeTile}>{online === 'true'?'online':`last seen ${timeStampEU(online)}`}</span>\r\n </div>\r\n )\r\n}\r\n\r\nexport default ProfilePicture","import { useSelector } from 'react-redux';\r\nimport Paper from '@mui/material/Paper';\r\nimport MenuList from '@mui/material/MenuList';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport PhoneIcon from '@mui/icons-material/Phone';\r\nimport NotificationsIcon from '@mui/icons-material/Notifications';\r\nimport SortIcon from '@mui/icons-material/Sort';\r\nimport Switch from '@mui/material/Switch';\r\nimport Divider from '@mui/material/Divider';\r\nimport AlternateEmailIcon from '@mui/icons-material/AlternateEmail';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport { getChat } from '../../../../../../redux/chat/selector'\r\nimport { muteChat,sortChat } from '../../../../../../api-data'\r\nimport { copied,firstLetter,slicedWord } from '../../../../../../helpers';\r\n\r\nconst useStyles = makeStyles({\r\n listIcon: {\r\n marginRight: 15,\r\n },\r\n})\r\n\r\nconst label = { inputProps: { 'aria-label': 'Switch demo' } };\r\n\r\nconst ProfileMenu = ({disabled}:{disabled:boolean}) => {\r\n const classes = useStyles()\r\n const { number, mute,sort,companionId,originalName,originalLastName } = useSelector(getChat)\r\n const handleMute = () => muteChat(companionId)\r\n const handleSort = () => sortChat(companionId)\r\n \r\n const credentials = `${firstLetter(originalName)}${slicedWord(originalName, 15, 1)}\r\n ${firstLetter(originalLastName)}${slicedWord(originalLastName, 15, 1)}`\r\n return (\r\n <Paper>\r\n <MenuList>\r\n <CopyToClipboard onCopy={() => copied('Number')} text={number}>\r\n <MenuItem>\r\n <ListItemIcon className={classes.listIcon}>\r\n <PhoneIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText primary={number} secondary='Phone' />\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <Divider variant=\"inset\" />\r\n <CopyToClipboard onCopy={() => copied('Username')} text={credentials}>\r\n <MenuItem style={{cursor:'pointer'}}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <AlternateEmailIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText primary={credentials} secondary='Username' />\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <Divider variant=\"inset\"/> \r\n <MenuItem style={{cursor:'default'}}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <NotificationsIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText primary='Notification' />\r\n <Switch style={{ cursor:'pointer'}} onClick={handleMute} {...label} checked={!mute} />\r\n </MenuItem>\r\n <Divider variant=\"inset\" />\r\n <MenuItem disabled={disabled} style={{cursor:'default'}}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <SortIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText primary={`Sort by Date`} />\r\n <Switch style={{ cursor:'pointer'}} onClick={handleSort} {...label} checked={sort} />\r\n </MenuItem> \r\n </MenuList>\r\n </Paper>\r\n );\r\n}\r\n\r\nexport default ProfileMenu","import List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport Divider from '@mui/material/Divider';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport AlertInfo from '../../../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,handleDownload,prodBaseURL } from '../../../../../../../helpers'\r\nimport { TMessages } from '../../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n folderIcon: {\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n },\r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n }, \r\n})\r\nconst AudioList = ({ filteredAndSorted }: { filteredAndSorted: TMessages }) => {\r\n const classes = useStyles()\r\n \r\n return filteredAndSorted.length > 0 ?(\r\n <List>\r\n {filteredAndSorted.map(({ message, createdAt, fullType }) =>\r\n <div key={createdAt}>\r\n <ListItem alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <LibraryMusicIcon onClick={() =>\r\n handleDownload(`${prodBaseURL}/${message}`, fullType)}\r\n className={classes.folderIcon} fontSize='large' />\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>\r\n ): <AlertInfo name='You do not have Audio yet!'/> \r\n}\r\n\r\nexport default AudioList","\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useState } from 'react';\r\nimport ImageListItem from '@mui/material/ImageListItem';\r\nimport DownloadForOfflineIcon from '@mui/icons-material/DownloadForOffline';\r\nimport { handleDownload,timeStampEU,prodBaseURL } from '../../../../../../../../helpers'\r\n\r\nconst useStyles = makeStyles({ \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n boxSizing: 'border-box',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center'\r\n },\r\n wrapper: {\r\n width: '30%',\r\n maxHeight: '80%',\r\n position: 'relative',\r\n display: 'flex',\r\n },\r\n downloadIcon: {\r\n position: 'absolute',\r\n content: '',\r\n right: 0,\r\n top: -40,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n borderRadius: '50%',\r\n '&:hover': {\r\n backgroundColor: '#ffffff',\r\n color: '#b8b7b7',\r\n }\r\n },\r\n img: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n scale:0.98\r\n }\r\n },\r\n time: {\r\n position: 'absolute',\r\n content: '', \r\n color: '#ffffff',\r\n top: -30,\r\n left: 0,\r\n borderRadius: 10,\r\n padding:'2px 6px 2px 6px',\r\n backgroundColor:'#707070'\r\n }\r\n});\r\nconst MediaListItem = ({ message,fullType,updatedAt }: { message: string,fullType:string,updatedAt:string }) => {\r\n const classes = useStyles();\r\n const [watch, setWatch] = useState<boolean>(false)\r\n const handleOpenWatch = () => !watch && setWatch(true)\r\n const handleCloseWatch = (e:any) => e.target.id === 'overlay'&&watch&&setWatch(false)\r\n \r\n const url = `${prodBaseURL}/${message}`\r\n \r\n return (watch ?\r\n <div onClick={handleCloseWatch} id='overlay' className={classes.overlay}>\r\n <div className={classes.wrapper}>\r\n <span className={classes.time}>{timeStampEU(updatedAt)}</span>\r\n <DownloadForOfflineIcon className={classes.downloadIcon} fontSize='large'\r\n onClick={() => handleDownload(url, fullType)}/>\r\n <img width='100%' height='auto' alt='imageItem' src={url} />\r\n </div>\r\n </div> :\r\n <ImageListItem>\r\n <img onClick={handleOpenWatch} className={classes.img}\r\n src={`${url}?w=164&h=164&fit=crop&auto=format`}\r\n srcSet={`${url}?w=164&h=164&fit=crop&auto=format&dpr=2 2x`}\r\n alt='imageItem' loading=\"lazy\" />\r\n </ImageListItem>\r\n \r\n )\r\n}\r\n\r\nexport default MediaListItem","import ImageList from '@mui/material/ImageList';\r\nimport MediaListItem from './MediaListItem';\r\n\r\nimport AlertInfo from '../../../../../../reusableComponents/AlertInfo';\r\nimport { TMessages } from '../../../../../../../typescript/redux/messages/types'\r\n\r\nconst MediaList = ({ filteredAndSorted }: { filteredAndSorted: TMessages }) => {\r\n \r\n return filteredAndSorted.length > 0 ?(\r\n <ImageList sx={{ width: '100%', height: 'auto',overflow:'hidden' }} cols={3} rowHeight={164}>\r\n {filteredAndSorted.map(({message,createdAt,fullType,updatedAt}) => \r\n <MediaListItem key={createdAt} message={message} fullType={fullType} updatedAt={updatedAt}/>)}\r\n </ImageList>\r\n ): <AlertInfo name='You do not have Media yet!'/> \r\n}\r\n\r\nexport default MediaList","import List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport FolderIcon from '@mui/icons-material/Folder';\r\nimport Divider from '@mui/material/Divider';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport AlertInfo from '../../../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,handleDownload,prodBaseURL } from '../../../../../../../helpers'\r\nimport { TMessages } from '../../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n folderIcon: {\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n },\r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n }, \r\n})\r\n\r\nconst FilesList = ({ filteredAndSorted }: { filteredAndSorted: TMessages }) => {\r\n const classes = useStyles()\r\n \r\n return filteredAndSorted.length > 0 ?(\r\n <List>\r\n {filteredAndSorted.map(({ message, createdAt, fullType }) =>\r\n <div key={createdAt}>\r\n <ListItem alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <FolderIcon onClick={() =>\r\n handleDownload(`${prodBaseURL}/${message}`, fullType)}\r\n className={classes.folderIcon} fontSize='large' />\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>\r\n ): <AlertInfo name='You do not have Files yet!'/> \r\n}\r\n\r\nexport default FilesList","import List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport Divider from '@mui/material/Divider';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport AlertInfo from '../../../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,firstLetter,copied,prodBaseURL } from '../../../../../../../helpers'\r\nimport { TMessages } from '../../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n copyIcon: {\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n }, \r\n})\r\n\r\nconst TextList = ({ filteredAndSorted }: { filteredAndSorted: TMessages }) => {\r\n const classes = useStyles()\r\n \r\n return filteredAndSorted.length > 0 ?(\r\n <List>\r\n {filteredAndSorted.map(({ message, createdAt, lastName, name, color, avatarUrl }) =>\r\n <div key={createdAt}>\r\n <ListItem alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 38, height: 38}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar>\r\n <ListItemText style={{ wordBreak: 'break-word',marginRight:2 }} primary={message}\r\n secondary={timeStampEU(createdAt)} secondaryTypographyProps={{color: '#020202',paddingTop:0.5}}\r\n />\r\n <CopyToClipboard onCopy={() => copied('Message')} text={message}>\r\n <ContentCopyIcon className={classes.copyIcon} fontSize='large' />\r\n </CopyToClipboard> \r\n </ListItem>\r\n <Divider variant=\"inset\" />\r\n </div>)}\r\n </List>\r\n ): <AlertInfo name='You do not have Text yet!'/> \r\n}\r\n\r\nexport default TextList","import List from '@mui/material/List';\r\nimport ListItem from '@mui/material/ListItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\nimport Divider from '@mui/material/Divider';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport AlertInfo from '../../../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,handleDownload,prodBaseURL } from '../../../../../../../helpers'\r\nimport { TMessages } from '../../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n folderIcon: {\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n },\r\n listItem: {\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n }, \r\n})\r\nconst VideoList = ({ filteredAndSorted }: { filteredAndSorted: TMessages }) => {\r\n const classes = useStyles()\r\n\r\n return filteredAndSorted.length > 0 ?(\r\n <List>\r\n {filteredAndSorted.map(({ message, createdAt, fullType }) =>\r\n <div key={createdAt}>\r\n <ListItem key={createdAt} alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <VideoLibraryIcon onClick={() =>\r\n handleDownload(`${prodBaseURL}/${message}`, fullType)}\r\n className={classes.folderIcon} fontSize='large' />\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>\r\n ): <AlertInfo name='You do not have Audio yet!'/> \r\n}\r\n\r\nexport default VideoList","import { useState,useEffect } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport AudioList from './AudioList';\r\nimport MediaList from './MediaList';\r\nimport FilesList from './FilesList';\r\nimport TextList from './TextList';\r\nimport VideoList from './VideoList'\r\nimport { getMessagesMemo } from '../../../../../../redux/messages/selector'\r\nimport { handleSort } from '../../../../../../helpers';\r\nimport { getChat } from '../../../../../../redux/chat/selector'\r\nimport { TMessages } from '../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\ncontainer: {\r\n borderBottom: 'solid 2px #dddddd',\r\n display: 'flex',\r\n justifyContent: 'space-around',\r\n alignContent: \"center\",\r\n alignItems:\"center\",\r\n flexWrap: 'nowrap',\r\n height:'7vh',\r\n color:'rgba(0, 0, 0, 0.6)'\r\n },\r\n item: {\r\n height:'100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignContent: \"center\",\r\n alignItems: \"center\",\r\n cursor:'pointer',\r\n },\r\nicon: {\r\n fontSize: '1rem',\r\n lineHeight: 0,\r\n marginBottom: 0,\r\n fontWeight:600\r\n },\r\nunderline: {\r\n fontSize: '2.5rem',\r\n lineHeight: 0,\r\n },\r\n})\r\n\r\nconst ProfileLists = ({setDisabled}:{setDisabled: React.Dispatch<boolean>,}) => {\r\n const classes = useStyles()\r\n const { sort } = useSelector(getChat)\r\n const messagesMemo = useSelector(getMessagesMemo)\r\n const [isActive, setIsActive] = useState<number>(0)\r\n const handleIsActive = (newValue: number): void => setIsActive(newValue)\r\n const filterBy = ['text', 'image', 'text', 'audio', 'video']\r\n const sorted: TMessages = handleSort('createdAt', messagesMemo, sort)\r\n const filteredAndSorted = sorted.filter((el) => {\r\n if (isActive !== 0) {\r\n if(el.type === filterBy[isActive]) return el\r\n } else {\r\n if(el.type !== filterBy[isActive]) return el\r\n }\r\n })\r\n useEffect(() => {\r\n setDisabled(filteredAndSorted.length > 0?false:true)\r\n },[filteredAndSorted,setDisabled])\r\n return (\r\n <>\r\n <div className={classes.container}>\r\n <div className={classes.item} style={{color:isActive === 0?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(0)}>\r\n <span className={classes.icon}>Files</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 1?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(1)}>\r\n <span className={classes.icon}>Media</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 2?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(2)}>\r\n <span className={classes.icon}>Text</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 3?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(3)}>\r\n <span className={classes.icon}>Audio</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n <div className={classes.item} style={{color:isActive === 4?'#1976d2':\"rgba(0, 0, 0, 0.6)\"}}\r\n onClick={() => handleIsActive(4)}>\r\n <span className={classes.icon}>Video</span>\r\n <span className={classes.underline}>___</span>\r\n </div>\r\n </div>\r\n {isActive === 0 && <FilesList filteredAndSorted={filteredAndSorted}/>} \r\n {isActive === 1 && <MediaList filteredAndSorted={filteredAndSorted}/>}\r\n {isActive === 2 && <TextList filteredAndSorted={filteredAndSorted}/>}\r\n {isActive === 3 && <AudioList filteredAndSorted={filteredAndSorted} />}\r\n {isActive === 4 && <VideoList filteredAndSorted={filteredAndSorted}/>}\r\n </> \r\n )\r\n}\r\n\r\nexport default ProfileLists","import { makeStyles } from '@material-ui/core'\r\nimport { useState } from 'react'\r\nimport ToolBar from './ToolBar'\r\nimport ProfilePicture from './ProfilePicture'\r\nimport ProfileMenu from './ProfileMenu'\r\nimport ProfileLists from './ProfileLists'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n backgroundColor: '#ffffff',\r\n height: '100%',\r\n width:'100%',\r\n position:'relative'\r\n },\r\n scrollContainer: {\r\n overflowY: 'scroll',\r\n maxHeight: '93vh',\r\n width: '100%',\r\n '&::-webkit-scrollbar': {\r\n width: '0.4em'\r\n },\r\n '&::-webkit-scrollbar-track': {\r\n boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',\r\n backgroundColor: '#eceeec',\r\n },\r\n '&::-webkit-scrollbar-thumb': {\r\n backgroundColor: '#ccc8c8',\r\n },\r\n \"&::-webkit-scrollbar-thumb:focus\": {\r\n backgroundColor: \"#959595\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:active\": {\r\n backgroundColor: \"#959595\",\r\n }, \r\n },\r\n})\r\n\r\nconst CredentialsList = () => {\r\n const classes = useStyles()\r\n const [disabled, setDisabled] = useState<boolean>(false)\r\n return (\r\n <div className={classes.container}>\r\n <ToolBar />\r\n <div className={classes.scrollContainer}>\r\n <ProfilePicture />\r\n <ProfileMenu disabled={disabled}/>\r\n <ProfileLists setDisabled={setDisabled}/>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default CredentialsList","import Stack from '@mui/material/Stack';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\r\nimport { makeStyles, Typography } from '@material-ui/core'\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport { actionIsOpen } from '../../../../../../redux/control/action'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n height:'7vh',\r\n width: '100%',\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n backgroundColor: '#ffffff',\r\n },\r\n iconArrow: {\r\n '&:hover': {\r\n transform: 'rotate(360deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n})\r\n\r\nconst ToolBar = () => {\r\n const dispatch = useDispatch()\r\n const classes = useStyles()\r\n\r\n return (\r\n <Stack className={classes.container} direction=\"row\" spacing={21}>\r\n <IconButton onClick={() => dispatch(actionIsOpen('credentials'))} aria-label=\"delete\" size=\"medium\">\r\n <ArrowBackIcon className={classes.iconArrow} fontSize='medium'/>\r\n </IconButton>\r\n <Typography style={{marginLeft:20,color: '#474747'}} variant=\"h6\" color=\"initial\">Edit chat</Typography>\r\n </Stack>\r\n )\r\n}\r\n\r\nexport default ToolBar","import { makeStyles, TextField, Typography } from '@material-ui/core'\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport { format,firstLetter,slicedWord,prodBaseURL } from '../../../../../../helpers'\r\nimport { TChat } from '../../../../../../typescript/redux/chat/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent:'center',\r\n flexDirection: 'column',\r\n width: '100%',\r\n margin: '0 auto',\r\n padding: 20,\r\n marginBottom:15,\r\n position: 'relative',\r\n backgroundColor: '#ffffff',\r\n },\r\n textField: {\r\n marginBottom:20\r\n },\r\n notifications: {\r\n width: '100%',\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n alignContent: 'start',\r\n alignItems: 'start',\r\n marginBottom:'auto'\r\n },\r\n avatarArrow: {\r\n cursor: 'pointer',\r\n alignSelf: 'flex-end',\r\n '&:hover': {\r\n backgroundColor: 'rgb(62, 149, 231)'\r\n }\r\n }\r\n})\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IEditList {\r\n chat: TChat,\r\n name: string,\r\n setName: any,\r\n lastName: string,\r\n setLastName: any,\r\n mute: boolean,\r\n setMute: any,\r\n openBtn: boolean,\r\n setOpenBtn: any, \r\n}\r\n\r\nconst EditList = (props: IEditList) => {\r\n const classes = useStyles()\r\n const {chat,name,setName,lastName,setLastName,mute,setMute,openBtn,setOpenBtn} = props\r\n const { avatarUrl,color,originalName,originalLastName } = chat\r\n const handleNotifications = () => {\r\n setMute(!mute)\r\n !openBtn&&setOpenBtn(true)\r\n }\r\n const handleTextField = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n !openBtn&&setOpenBtn(true)\r\n const value = format(e.target.value)\r\n const name = e.target.name\r\n switch (name) {\r\n case 'name':\r\n setName(value)\r\n break;\r\n case 'lastName':\r\n setLastName(value)\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n \r\n return (\r\n <div className={classes.container} > \r\n <ListItemAvatar style={{marginBottom:10}}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 120, height: 120,marginRight:2}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar> \r\n <Typography style={{color: '#080808',fontSize:22,fontWeight:500}}>\r\n {`${firstLetter(originalName)}${slicedWord(originalName, 15, 1)} \r\n ${firstLetter(originalLastName)}${slicedWord(originalLastName, 15, 1)}`}\r\n </Typography>\r\n <Typography style={{fontSize:17,marginBottom:20}}>original name</Typography> \r\n <TextField\r\n id=\"name\"\r\n name='name'\r\n label=\"Name\"\r\n value={name}\r\n fullWidth\r\n variant='outlined'\r\n onChange={handleTextField}\r\n className={classes.textField}\r\n />\r\n <TextField\r\n id=\"lastName\"\r\n name='lastName'\r\n label=\"LastName\"\r\n value={lastName}\r\n fullWidth\r\n variant='outlined'\r\n onChange={handleTextField}\r\n className={classes.textField}\r\n />\r\n <div className={classes.notifications}>\r\n <Checkbox onChange={handleNotifications} {...label} checked={!mute} style={{marginRight:20}} />\r\n <ListItemText primary=\"Notifications\" primaryTypographyProps={{ color: \"#0e0d0d\" }}\r\n secondary={!mute ? 'Disabled':'Enabled'} />\r\n </div> \r\n </div>\r\n )\r\n};\r\n\r\nexport default EditList;","import { makeStyles } from '@material-ui/core'\r\nimport Button from '@mui/material/Button';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport { useState } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { actionIsOpen } from '../../../../../../redux/control/action'\r\nimport { removeContact } from '../../../../../../api-data';\r\nimport { TContact } from '../../../../../../typescript/redux/contacts/types';\r\nimport { slicedWord,firstLetter,prodBaseURL } from '../../../../../../helpers';\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n padding: '20px 10px 20px 10px',\r\n backgroundColor: '#ffffff',\r\n },\r\n modalDelete: {\r\n background: '#ffffff',\r\n position: 'absolute',\r\n content:'',\r\n width: '20%',\r\n height:'auto',\r\n left: '40%',\r\n bottom: '48.5%',\r\n borderRadius: 10,\r\n padding: 10,\r\n display: 'flex',\r\n flexDirection:'column'\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n height: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflowY: 'hidden',\r\n },\r\n titleWrapper: {\r\n display: 'flex',\r\n justifyContent: 'flex-start',\r\n alignContent: 'center',\r\n alignItems:'center'\r\n },\r\n})\r\n\r\nconst Delete = ({ isContact }:{ isContact:TContact}) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const {_id,avatarUrl,color,name,lastName} = isContact\r\n const [modal,setModal] = useState<boolean>(false)\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'delete') {\r\n dispatch(actionIsOpen('credentials'))\r\n removeContact(_id)\r\n setModal(false)\r\n }\r\n } \r\n const handleOpenModal = () => setModal(true)\r\n return (\r\n <>\r\n <ul className={classes.container}>\r\n <MenuItem onClick={handleOpenModal} style={{fontSize:19,color:'#f02a2a'}} >\r\n <DeleteOutlineIcon fontSize='medium' style={{marginRight:27}}/>\r\n Delete contact\r\n </MenuItem> \r\n </ul>\r\n {modal&&<div onClick={handleDeleteModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalDelete}>\r\n <div className={classes.titleWrapper}>\r\n <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 38, height: 38,marginRight:2}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n <h3 style={{color: '#2c2c2c'}}>Delete contact</h3>\r\n </div>\r\n <p style={{ color: '#050505' }}>{`Are you sure you want to delete contact\r\n ${`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}?`}</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE CONTACT\r\n </Button> \r\n <Button id='cancel' variant=\"text\" style={{fontWeight:500,fontSize:22}}>\r\n CANCEL\r\n </Button>\r\n </div> \r\n </div>}\r\n </>\r\n );\r\n}\r\n\r\nexport default Delete","import { makeStyles} from '@material-ui/core'\r\nimport Avatar from '@mui/material/Avatar';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n top: '92vh',\r\n left: 20,\r\n }, \r\n avatarArrow: {\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: 'rgb(62, 149, 231)'\r\n }\r\n }\r\n})\r\n\r\nconst SubmitBtn = ({handleSubmit}:{handleSubmit:() => void}) => {\r\n const classes = useStyles() \r\n\r\n return (\r\n <div className={classes.container}>\r\n <Avatar onClick={handleSubmit} className={classes.avatarArrow}\r\n sx={{width: 56, height: 56,backgroundColor: 'rgb(41, 139, 231)',color: '#ffffff'}}>\r\n <DoneIcon fontSize=\"medium\" /> \r\n </Avatar>\r\n </div> \r\n )\r\n};\r\n\r\nexport default SubmitBtn;","import { makeStyles } from '@material-ui/core'\r\nimport { useState,useEffect } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport ToolBar from './ToolBar'\r\nimport EditList from './EditList'\r\nimport Delete from './Delete'\r\nimport SubmitBtn from './SubmitBtn';\r\nimport { getContactsMemo } from '../../../../../redux/contacts/selector'\r\nimport { getChat } from '../../../../../redux/chat/selector'\r\nimport { muteChat,updateContact } from '../../../../../api-data';\r\n\r\nconst useStyles = makeStyles({\r\n editBar: {\r\n backgroundColor: '#f3f2f2',\r\n height: '100%',\r\n position:'relative'\r\n }\r\n})\r\n\r\nconst EditBar= () => {\r\n const classes = useStyles()\r\n const contactsMemo = useSelector(getContactsMemo)\r\n const chat = useSelector(getChat)\r\n const [isContact, setIsContact] = useState<any>(false)\r\n const [name, setName] = useState<string>('')\r\n const [lastName, setLastName] = useState<string>('')\r\n const [mute, setMute] = useState<boolean>(true)\r\n const [openBtn, setOpenBtn] = useState<boolean>(false)\r\n const {name:Name,lastName:LastName,mute:Mute,companionId,_id} = chat\r\n\r\n const handleSubmit = () => {\r\n if (mute !== !Mute) {\r\n muteChat(companionId)\r\n }\r\n if (name !== Name || lastName !== LastName) {\r\n updateContact(isContact._id,_id,name,lastName,companionId)\r\n } \r\n openBtn&&setOpenBtn(false)\r\n }\r\n\r\n useEffect(() => {\r\n const contact = contactsMemo.find((el) => el.number === chat.number)\r\n contact && setIsContact(contact) \r\n }, [contactsMemo, chat.number])\r\n \r\n useEffect(() => {\r\n setName(Name)\r\n setLastName(LastName)\r\n setMute(!Mute)\r\n }, [Name, LastName, Mute]) \r\n\r\n return (\r\n <div className={classes.editBar}>\r\n {openBtn&&<SubmitBtn handleSubmit={handleSubmit}/>}\r\n <ToolBar />\r\n <EditList chat={chat} name={name} setName={setName} lastName={lastName}\r\n setLastName={setLastName} mute={mute} setMute={setMute}\r\n openBtn={openBtn} setOpenBtn={setOpenBtn} />\r\n <Delete isContact={isContact} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default EditBar","import { useSelector } from 'react-redux'\r\nimport SearchList from './SearchList'\r\nimport CredentialsList from './CredentialsList'\r\nimport EditBar from './EditBar'\r\nimport { getIsOpen } from '../../../../redux/control/selector'\r\n\r\n\r\nconst RightListsAndBars = () => {\r\n const isOpen = useSelector(getIsOpen)\r\n return (\r\n <>\r\n {isOpen === 'credentials' && <CredentialsList />}\r\n {isOpen === 'search' && <SearchList />}\r\n {isOpen === 'edit' && <EditBar/>}\r\n </>\r\n )\r\n}\r\n\r\nexport default RightListsAndBars","import Grid from '@mui/material/Grid'\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useSelector } from 'react-redux'\r\nimport { getIsOpen } from '../../../redux/control/selector'\r\nimport { getChatMemo } from '../../../redux/chat/selector'\r\n\r\nimport HeaderBar from './HeaderBar'\r\nimport ChatBar from './ChatBar'\r\nimport RightListsAndBars from './RightListsAndBars'\r\n\r\n\r\nconst useStyles = makeStyles({\r\n chatBar: {\r\n background: 'linear-gradient(to bottom right, #e7f097 , #b1e667,#f4f75e)',\r\n },\r\n})\r\n\r\nconst RightBar = () => {\r\n const classes = useStyles()\r\n const isOpen = useSelector(getIsOpen)\r\n const { _id } = useSelector(getChatMemo)\r\n const handleIsOpen = isOpen&&isOpen !== 'menu'\r\n\r\n return _id?\r\n <Grid item lg={9} style={{display:'flex'}}>\r\n <Grid item lg={handleIsOpen?8:12}>\r\n <Grid item lg={12} >\r\n <HeaderBar/>\r\n </Grid> \r\n <Grid item lg={12} className={classes.chatBar}>\r\n <ChatBar />\r\n </Grid>\r\n </Grid>\r\n <Grid item lg={handleIsOpen?4:0}>\r\n <RightListsAndBars/>\r\n </Grid> \r\n </Grid>\r\n : <Grid item lg={9} className={classes.chatBar}/>\r\n}\r\n\r\nexport default RightBar","import {\r\n actionGetChatsSuccess,\r\n actionGetChatsReject,\r\n} from '../action';\r\nimport { getChats} from '../../../api-data';\r\nimport { IChatsRes } from '../../../typescript/redux/chats/interfaces'\r\n\r\nconst asyncGetChats = () => async (dispatch:any) => {\r\n try {\r\n const data = await getChats<IChatsRes>()\r\n data&&dispatch(actionGetChatsSuccess(data))\r\n } catch (e) {\r\n dispatch(actionGetChatsReject())\r\n }\r\n};\r\n\r\nexport { asyncGetChats };\r\n\r\n\r\n\r\n\r\n","import Grid from '@mui/material/Grid'\r\nimport LeftBar from './LeftBar'\r\nimport RightBar from './RightBar'\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useDispatch } from 'react-redux'\r\nimport { useEffect } from 'react'\r\nimport { asyncGetContacts } from '../../redux/contacts/operations'\r\nimport { asyncGetChats } from '../../redux/chats/operations'\r\nimport { asyncCurrentUser } from '../../redux/authorization/operations'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n minHeight: '100vh',\r\n maxHeight: '100vh',\r\n },\r\n})\r\n\r\nconst HomePage = () => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n\r\n useEffect(() => {\r\n dispatch(asyncGetChats())\r\n dispatch(asyncGetContacts())\r\n dispatch(asyncCurrentUser())\r\n const handleReset = () => {\r\n dispatch(asyncGetChats())\r\n dispatch(asyncGetContacts())\r\n dispatch(asyncCurrentUser())\r\n }\r\n const idInterval = setInterval(handleReset, 3000);\r\n return () => clearInterval(idInterval);\r\n }, [dispatch]);\r\n \r\nreturn (\r\n <Grid className={classes.container} container spacing={0} >\r\n <LeftBar/>\r\n <RightBar/>\r\n </Grid>\r\n )\r\n}\r\n\r\nexport default HomePage"],"sourceRoot":""}
|