HomePage.fc85d94f.chunk.js.map 805 KB

1
  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/chats/operations/index.ts","redux/chats/selector/index.ts","redux/allMessages/selector/index.ts","redux/control/selector/index.ts","redux/chat/operations/index.ts","redux/pinnedMessages/selector/index.ts","components/HomePage/LeftBar/SearchLists/index.tsx","redux/allMessages/operations/index.ts","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","redux/contacts/operations/index.ts","components/HomePage/LeftBar/ContactsList/index.tsx","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","img/transparentPic.png","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/CentralBar/HeaderBar/Credentials/index.tsx","components/HomePage/CentralBar/HeaderBar/Buttons/MenuList/index.tsx","components/HomePage/CentralBar/HeaderBar/Buttons/DeleteModal/index.tsx","components/HomePage/CentralBar/HeaderBar/Buttons/index.tsx","components/HomePage/CentralBar/HeaderBar/PinnedBar/index.tsx","components/HomePage/CentralBar/HeaderBar/index.tsx","components/HomePage/CentralBar/ChatBar/ArrowBack/index.tsx","components/HomePage/CentralBar/ChatBar/SendMessage/FilesMenu/UploadFile/index.tsx","components/HomePage/CentralBar/ChatBar/SendMessage/FilesMenu/index.tsx","hooks/index.tsx","components/HomePage/CentralBar/ChatBar/SendMessage/ReplyBar/index.tsx","components/HomePage/CentralBar/ChatBar/SendMessage/ForwardBar/index.tsx","components/HomePage/CentralBar/ChatBar/SendMessage/EditBar/index.tsx","components/HomePage/CentralBar/ChatBar/SendMessage/index.tsx","components/HomePage/CentralBar/ChatBar/UnpinBar/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageLeftDeleted/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageLeftText/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageLeftReply/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageLeftForward/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageLeftImage/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageLeftAudio/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageLeftVideo/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageLeftFile/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageRightDeleted/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageRightText/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageRightReply/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageRightForward/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageRightImage/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageRightAudio/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageRightVideo/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageRightFile/index.tsx","components/HomePage/CentralBar/ChatBar/Messages/MessageDivider/index.tsx","components/HomePage/CentralBar/ChatBar/ForwardSearchList/ForwardSearch/StaticDatePicker/index.tsx","components/HomePage/CentralBar/ChatBar/ForwardSearchList/ForwardSearch/index.tsx","components/HomePage/CentralBar/ChatBar/ForwardSearchList/ForwardList/ForwardItem/index.tsx","components/HomePage/CentralBar/ChatBar/ForwardSearchList/ForwardList/index.tsx","components/HomePage/CentralBar/ChatBar/ForwardSearchList/index.tsx","redux/messages/selector/index.ts","redux/pinnedMessages/operations/index.ts","redux/messages/operations/index.ts","components/HomePage/CentralBar/ChatBar/index.tsx","components/HomePage/CentralBar/index.tsx","components/HomePage/RightBar/SearchList/Search/StaticDatePicker/index.tsx","components/HomePage/RightBar/SearchList/Search/index.tsx","components/HomePage/RightBar/SearchList/index.tsx","components/HomePage/RightBar/CredentialsList/ToolBar/index.tsx","components/HomePage/RightBar/CredentialsList/ProfilePicture/index.tsx","components/HomePage/RightBar/CredentialsList/ProfileMenu/index.tsx","components/HomePage/RightBar/CredentialsList/ProfileLists/AudioList/index.tsx","components/HomePage/RightBar/CredentialsList/ProfileLists/MediaList/MediaListItem/index.tsx","components/HomePage/RightBar/CredentialsList/ProfileLists/MediaList/index.tsx","components/HomePage/RightBar/CredentialsList/ProfileLists/FilesList/index.tsx","components/HomePage/RightBar/CredentialsList/ProfileLists/TextList/index.tsx","components/HomePage/RightBar/CredentialsList/ProfileLists/VideoList/index.tsx","components/HomePage/RightBar/CredentialsList/ProfileLists/index.tsx","components/HomePage/RightBar/CredentialsList/index.tsx","components/HomePage/RightBar/EditBar/ToolBar/index.tsx","components/HomePage/RightBar/EditBar/EditList/index.tsx","components/HomePage/RightBar/EditBar/Delete/index.tsx","components/HomePage/RightBar/EditBar/SubmitBtn/index.tsx","components/HomePage/RightBar/EditBar/index.tsx","components/HomePage/RightBar/index.tsx","components/HomePage/CallBar/index.tsx","img/wallpaper.jpg","img/wallpaperNight.jpg","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","setPopup","classes","dispatch","useDispatch","useState","anchorEl","setAnchorEl","open","Boolean","handleClose","className","Avatar","onClick","e","currentTarget","sx","bgcolor","width","height","id","aria-labelledby","onClose","MenuItem","actionLeftIsOpen","stackItem","display","flexDirection","justifyContent","alignContent","alignItems","background","titleName","paddingTop","RecentItem","handleListItemClick","chat","name","lastName","avatarUrl","companionId","alt","src","prodAwsS3","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","style","wordBreak","stack","maxHeight","overflowY","animationDuration","animationDirection","animation","webkitBoxShadow","backgroundColor","left","ChatListRecent","value","date","filteredAndSortedChats","length","direction","slice","map","List","component","aria-label","folderIcon","margin","listItem","FilesList","filteredAndSortedMessages","handleScrollToTheMessage","fullType","_id","ListItem","ListItemAvatar","Divider","overlay","overflow","boxSizing","topBar","wrapperCredentials","wrapperIcons","magnifying","transform","downloadIcon","iconCloseOverlay","transition","wrapperImage","innerImage","objectFit","img","scale","MediaListItem","message","updatedAt","watch","setWatch","setScale","refView","useRef","handleCloseWatch","target","url","primaryTypographyProps","secondaryTypographyProps","current","handleDownload","ref","ImageListItem","srcSet","loading","MediaList","ImageList","cols","rowHeight","TextList","AudioList","VideoList","asyncGetChats","a","getChats","data","actionGetChatsSuccess","actionGetChatsReject","getStateMemo","createSelector","state","chats","getAllMessagesMemo","allMessages","messages","getLeftIsOpen","control","leftIsOpen","getRightIsOpen","rightIsOpen","getScrollChat","scrollChat","getOpenPinned","openPinned","getState","asyncStartChatById","startChat","actionSelectChat","asyncGetChatById","getChatById","actionGetChatById","getPinnedMessagesMemo","pinnedMessages","borderBottom","StyledTabs","Tabs","TabIndicatorProps","children","borderLeft","borderRight","StyledTab","Tab","disableRipple","fontWeight","textTransform","SearchLists","setValue","sort","setDate","setDisabled","chatDivRef","useSelector","total","messagesMemo","pinnedMessagesMemo","isActive","setIsActive","scrollTo","nodeRef","childNodes","toScrollNode","find","el","scrollIntoView","behavior","setTimeout","some","actionOpenPinned","actionRightIsOpen","useEffect","handleReset","getAllMessages","actionGetAllMessagesSuccess","actionGetAllMessagesReject","idInterval","setInterval","refreshAppTime","clearInterval","useMemo","sortByRecent","filter","credentials","toLowerCase","includes","timeStampFilter","filtered","filterBy","type","filteredMessages","handleSort","Box","onChange","_e","newValue","label","StaticDatePicker","disabled","changeDate","handleOnOpen","DatePicker","inputVariant","orientation","openTo","autoOk","Date","onOpen","Search","SearchIconWrapper","pointerEvents","StyledInputBase","InputBase","paddingLeft","transitions","create","toolBar","activeSearch","outline","iconBtn","iconArrow","inputProps","SearchBar","handleClick","handleOpenIsSearch","handleSearch","Toolbar","IconButton","onFocus","placeholder","size","Switch","updateUser","asyncCurrentUser","checked","modalDelete","content","bottom","titleWrapper","DeleteModal","setModal","removeChatForBoth","actionRemoveChat","Button","StyledBadge","Badge","paper","border","opacity","listItemInnerText__icon","listItem_iconTimeChecked","listItem_iconRightBtn","textAlign","listItem_iconRightBtnMute","pinnedIcon","listIconsRightContainer","listItem_typing","listItem_dots","fontFamily","clipPath","to","iconClose","handleNewMsgs","pinned","selectedCompanionId","selected","setSelected","modal","mute","seen","watched","typing","online","seenCompanion","openedChat","muteChat","onContextMenu","preventDefault","handleContextMenu","overlap","pinChat","handlePin","list","ChatsList","chatsRef","silentMode","getSilentMode","getChatMemo","actionScrollChat","stopPropagation","handleNotification","useCallback","sortedChats","pinnedArr","sortedAndFilteredArr","push","forEach","i","oldDifferent","playNotificationWithoutPermission","prodBaseURL","notification","number","visibility","listItemLast","listIcon","listIconText","MenuBar","nightMode","Paper","textDecoration","href","ContactItem","contact","copied","onCopy","pinContact","removeContact","getContactsMemo","contacts","asyncGetContacts","getContacts","actionGetContactsSuccess","actionGetContactsReject","asyncAddContact","addContact","ContactsList","filteredContacts","ToolBar","title","buttonNext","textField","AddContact","setNumber","handleAddContact","isValidNumber","onKeyDown","code","TextField","fullWidth","split","join","trim","required","MenuList","asyncLogout","index","setIndex","removeUserAvatar","nameTitle","timeTitle","countryTitle","credentialsTitle","credentialsLowTitle","iconDeleteWrapper","iconDelete","SettingsPicture","getAuthorizationState","avatarsArr","country","isDefault","selectedItem","transparentPic","SettingsMenu","getNumber","SettingsBar","imgWrapper","capturedPicture","capturePhoto","EditList","user","setName","setLastName","openBtn","setOpenBtn","file","setFile","camera","setCamera","selfie","setSelfie","useDropzone","noDrag","accept","getRootProps","getInputProps","acceptedFiles","handleTextField","format","audio","screenshotFormat","videoConstraints","facingMode","getScreenshot","playNotification","avatarArrow","SubmitBtn","handleSubmit","EditBar","Name","LastName","updateCredentials","originalName","originalLastName","fetch","then","res","blob","imgFile","File","formData","FormData","append","updateUserAvatar","LeftBar","popup","modalRoot","handleCloseModal","modalHtml","document","getElementById","addEventListener","removeEventListener","Grid","item","lg","onMouseEnter","onMouseLeave","createPortal","Credentials","getChat","setModalDelete","setIsSomeSelected","Buttons","handleStartCall","listWrapper","listWrapperDashes","listStyle","modalUnpin","PinnedBar","handleOpenPinned","openedPin","setOpenedPin","openedIndex","setOpenedIndex","heightPerDash","heightOfDash","prevState","toUpperCase","pinMessageById","toolBarPinned","pinnedBack","toolBarRight","buttonDelete","HeaderBar","selectedArr","isSomeSelected","handleClearSelect","AppBar","removeSelectedMessagesById","avatarArrowWrapper","listSeenIcon","ArrowBack","isArrow","handleScrollTo","isNew","new","dropZone","UploadFile","setType","prevType","onFileDialogCancel","listText","FilesMenu","setIsOpenMenu","typeFile","usePrevious","replyTop","replyIconClose","replyListWrapper","replyColumn","ReplyBar","isReply","handleCloseReply","forwardTop","forwardIconClose","forwardListWrapper","forwardColumn","ForwardBar","isForward","handleCloseForward","setIsForward","editTop","editListWrapper","editIconClose","editColumn","isEdit","handleCloseEdit","caption","containerActive","textarea","resize","attachIcon","borderTop","filesMenu","emoji","captionTextField","iconCancel","avatarCamera","avatarRight","pauseLeft","pauseRight","avatarPause","animationIterationCount","ringContainerLeft","ringContainerRight","circle","ringRing","overlayCamera","SendMessage","setIsReply","setIsEdit","modalForward","setCaption","isOpenCaption","setIsOpenCaption","isOpenMenu","isOpenEmoji","setIsOpenEmoji","isOpenCaptionEmoji","setIsOpenCaptionEmoji","isRecording","setIsRecording","isFilming","setIsFilming","isOpenCamera","setIsOpenCamera","status","setStatus","_status","_setStatus","useReactMediaRecorder","blobPropertyBag","startRecording","stopRecording","mediaBlobUrl","clearBlobUrl","video","_startRecording","_stopRecording","_mediaBlobUrl","_clearBlobUrl","onEmojiClick","emojiObject","flag","prevValue","clearMessage","sentMessage","sentMessageById","sentMessageReplyById","sentMessageForwardById","companionIdForwardToAndFrom","sentMessageEditById","XMLHttpRequest","responseType","onload","response","sentAudioMessageById","send","sentVideoMessageById","sentImgMessageById","sentFileMessageById","handleFocusTextarea","typingChat","handleBlurTextarea","handleRecording","handleFilming","defaultState","obj","multiline","InputProps","startAdornment","InputAdornment","onBlur","rows","handleCaptureAvatar","unpinBar","UnpinBar","handleUnpinAll","wrapper","font","wrapperInner","deletedInformation","informationWrapper","paddingRight","time","emojiTitle","emojiCompanionTitle","emojiActive","checkboxSelect","column","avatarIcon","tongueOne","tongueTwo","MessageLeftDeleted","tongue","edited","forwardReplyName","forwardReplyLastName","emojiCompanion","isSelected","handleSelected","handleReply","handleForward","handleOpenTheChat","handleEdit","align","timeStampMessage","emojisArr","Number","Checkbox","idEmoji","updateMessageById","String","removeMessageById","MessageLeftText","wrapperInnerMessage","copyIcon","replyListItem","MessageLeftReply","replyMessage","replyName","replyLastName","replyCaption","oldId","MessageLeftForward","forwardName","forwardLastName","forwardMessage","forwardCaption","handleScrollToTheChat","image","bntDownload","minHeight","overlayDelete","MessagesLeftImage","player","MessageLeftAudio","controls","Player","require","playerActive","MessageLeftVideo","playsInline","FileViewer","MessageLeftFile","read","setRead","handleCloseRead","allowFullScreen","fileType","filePath","onError","MessageRightDeleted","MessageRightText","MessageRightReply","MessageRightForward","MessageRightImage","MessageRightAudio","MessageRightVideo","MessageRightFile","MessageDivider","searchBarActive","ForwardSearch","ForwardItem","handleForwardTo","ForwardList","filteredAndSorted","ForwardSearchList","setModalForward","getSort","newCompanionId","getMessages","getMessagesMemo","asyncFindPinnedMessages","actionGetPinnedMessagesSuccess","actionGetPinnedMessagesReject","asyncGetMessagesById","cb","getMessagesById","actionGetMessagesSuccess","actionGetMessagesReject","debounce","messagesScroll","messagesEmpty","messagesBody","ChatBar","unread","setSelectedArr","userNumber","chatNumber","setIsArrow","setIsNew","getSeconds","Math","round","getTime","renderArr","scrollHeight","handleScroll","scrollTop","clientHeight","different","floor","seenChat","debouncedHandleScroll","onScroll","isUnread","isTime","deleted","isTongue","nextTongue","urlForward","urlReply","MessageLeftImage","CentralBar","backgroundImage","unpinAllMessagesById","sortChat","SearchList","contactsMemo","isContact","setIsContact","ProfilePicture","ProfileMenu","ProfileLists","scrollContainer","CredentialsList","notifications","alignSelf","setMute","Delete","editBar","Mute","updateContact","RightBar","Peer","shareScreenActive","shareScreenDisabled","modalCall","justifyItems","rightIcons","rightIconWrapper","rightIconWrapperClose","borderTopRightRadius","bottomWrapper","bottomItem","bottomIcon","bottomIconEndAccept","ringPulsate","titleIconBottom","CallBar","callStatus","setCallStatus","socket","myVideoRef","userVideoRef","connectionRef","mySocket","setMySocket","companionSocket","setCompanionSocket","companionSignal","setCompanionSignal","setAvatarUrl","setColor","handleLeaveCall","destroy","navigator","mediaDevices","getUserMedia","stream","peer","initiator","trickle","on","emit","socketId","signalData","from","userId","console","log","signal","handleAnswerCall","srcObject","socketIdChat","autoPlay","io","prodSocketURL","centralAndRight","myVideo","HomePage","getNightMode","wallpaperNight","wallpaper","muted","draggable","throttleDrag","hideDefaultLines","renderDirections","rotationPosition","origin","onDrag"],"mappings":"4WAaMA,EAAaC,aAAO,SAACC,GAAD,OACxB,cAACC,EAAA,EAAD,aACEC,UAAW,EACXC,aAAc,CACZC,SAAU,MACVC,WAAY,SAEdC,gBAAiB,CACfF,SAAU,SACVC,WAAY,UAEVL,MAXWD,EAahB,gBAAGQ,EAAH,EAAGA,MAAH,MAAoB,CACrB,mBAAoB,CAClBC,aAAc,GACdC,UAAWF,EAAMG,SAAS,GAC1BC,SAAU,IACVC,MACyB,UAAvBL,EAAMM,QAAQC,KAAmB,kBAAoBP,EAAMM,QAAQE,KAAK,KAC1EC,UACE,uJACF,kBAAmB,CACjBC,QAAS,WAEX,sBAAuB,CACrBC,aAAcX,EAAMG,QAAQ,GAC5B,qBAAsB,CACpBS,SAAU,GACVP,MAAOL,EAAMM,QAAQO,KAAKC,UAC1BC,YAAaf,EAAMG,QAAQ,UAM7Ba,EAAYC,YAAW,CACzBC,UAAW,CACPC,SAAU,WACVC,SAAU,OACVC,IAAK,OACLC,MAAO,GACPC,OAAQ,GACRC,OAAO,aAmDAC,EA5CO,SAAC,GAA8B,IAA7BC,EAA4B,EAA5BA,SAChBC,EAAUX,IACVY,EAAWC,cAFiC,EAGlBC,mBAAc,MAHI,mBAG3CC,EAH2C,KAGjCC,EAHiC,KAI5CC,EAAOC,QAAQH,GAGfI,EAAc,WAClBT,GAAS,GACTM,EAAY,OAGd,OACE,sBAA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,cAAC,GAAD,CAAYvqB,YAAaA,EAAa+B,WAAYA,EAChDzJ,YAAaA,EAAautB,gBAAiBA,EAC3CpS,gBAtBgB,kBAAMyU,EAAc,iBAuBtC,cAAC,GAAD,CAAUloB,YAAaA,EAAa+B,WAAYA,OAElD,cAAC+Q,EAAA,EAAD,CAAMC,MAAI,EAACC,GAAI,EAAG5Y,MAAO,CAACyrB","file":"static/js/HomePage.fc85d94f.chunk.js","sourcesContent":["import { makeStyles } from '@material-ui/core'\r\nimport React, { useState } from 'react';\r\nimport { useDispatch } from 'react-redux';\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 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\nimport { actionLeftIsOpen } from '../../../../redux/control/action';\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 setPopup:React.Dispatch<React.SetStateAction<boolean>>,\r\n}\r\nconst SmallMenuBar = ({setPopup}:ISmallMenuBar) => {\r\n const classes = useStyles()\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<HTMLDivElement>):void => setAnchorEl(e.currentTarget)\r\n\r\n const handleClose = ():void => {\r\n setPopup(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 dispatch(actionLeftIsOpen('contact'))\r\n }}>\r\n <PersonAddAltIcon/>\r\n New Contact\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleClose();\r\n dispatch(actionLeftIsOpen('contacts'))\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,prodAwsS3 } 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?`${prodAwsS3}/${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,prodAwsS3 } 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?`${prodAwsS3}/${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 style={{wordBreak:'break-word'}}>{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: '88vh',\r\n overflowY: 'scroll',\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`, \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 '@keyframes moveElement': {\r\n '0%': { left: '-100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IChatListRecent {\r\n value: string,\r\n date:any,\r\n filteredAndSortedChats: TChats,\r\n handleListItemClick: (companionId: string) => void,\r\n}\r\n\r\nconst ChatListRecent = ({value,date,filteredAndSortedChats,handleListItemClick}:IChatListRecent) => {\r\n const classes = useStyles()\r\n\r\nreturn (\r\n <>\r\n {!value && !date && filteredAndSortedChats.length > 0 &&\r\n <Stack direction=\"row\" className={classes.stack}>\r\n {filteredAndSortedChats.slice(0, 6).map((chat) =>\r\n <RecentItem key={chat.companionId} handleListItemClick={handleListItemClick} chat={chat} />)}\r\n </Stack>}\r\n {(value || date) && filteredAndSortedChats.length > 0 &&\r\n <List className={classes.container} component=\"nav\" aria-label=\"main mailbox folders\">\r\n {filteredAndSortedChats.map((chat) =>\r\n <ChatItem key={chat.companionId} handleListItemClick={handleListItemClick} chat={chat} />)}\r\n </List>}\r\n {(value || date) && filteredAndSortedChats.length === 0 && <AlertInfo name={`Can not find Chat by request: ${value}`} />}\r\n {!value && !date && filteredAndSortedChats.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 Avatar from '@mui/material/Avatar';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\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,prodAwsS3,firstLetter } 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: '88vh',\r\n overflowY: 'scroll',\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`, \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 margin: 'auto 0px',\r\n color: '#54b0fc',\r\n },\r\n listItem: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '-100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IFilesList {\r\n filteredAndSortedMessages: TAllMessages,\r\n value: string,\r\n date: any,\r\n handleScrollToTheMessage:(_id:string,companionId:string) => void\r\n}\r\n\r\nconst FilesList = ({ filteredAndSortedMessages,value,date,handleScrollToTheMessage }: IFilesList) => {\r\n const classes = useStyles()\r\n \r\n return (\r\n <>\r\n {filteredAndSortedMessages.length > 0 &&\r\n <List className={classes.container}>\r\n {filteredAndSortedMessages.map(({ createdAt, fullType,_id,companionId,name,avatarUrl,lastName,color }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id,companionId)}\r\n alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar> \r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n <InsertDriveFileIcon className={classes.folderIcon} fontSize='large' /> \r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>}\r\n {(value || date)&& filteredAndSortedMessages.length === 0 && <AlertInfo name={`Can not find Files by request: ${value}`} />}\r\n {!value && !date && filteredAndSortedMessages.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,useRef } from 'react';\r\nimport ImageListItem from '@mui/material/ImageListItem';\r\nimport DownloadForOfflineIcon from '@mui/icons-material/DownloadForOffline';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport ZoomOutIcon from '@mui/icons-material/ZoomOut';\r\nimport ZoomInIcon from '@mui/icons-material/ZoomIn';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport { handleDownload, timeStampEU, prodAwsS3,firstLetter, slicedWord } 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 overflow: 'auto',\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 topBar: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n height: '7vh',\r\n width: '100vw',\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n backgroundColor: 'rgba(65, 65, 65, 0.9)',\r\n zIndex: 10,\r\n padding: '0px 20px'\r\n },\r\n wrapperCredentials: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n }, \r\n wrapperIcons: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n }, \r\n magnifying : {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'scale(1.1)'\r\n }\r\n }, \r\n downloadIcon: {\r\n marginLeft:5,\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 iconCloseOverlay: {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n }, \r\n wrapperImage: {\r\n borderRadius: 5,\r\n maxWidth:500,\r\n maxHeight: 750,\r\n display: 'flex',\r\n overflow: 'auto'\r\n },\r\n innerImage: {\r\n objectFit: 'cover',\r\n }, \r\n img: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n scale:0.98\r\n }\r\n }, \r\n});\r\n\r\ninterface IMediaListItem {\r\n message: string,\r\n fullType: string,\r\n updatedAt: string,\r\n handleScrollToTheMessage: (_id: string,companionId:string) => void,\r\n id: string,\r\n companionId: string,\r\n name: string,\r\n lastName: string,\r\n color: string\r\n}\r\n\r\n\r\nconst MediaListItem = ({ message,fullType,updatedAt,handleScrollToTheMessage,id,companionId,name,lastName,color }: IMediaListItem) => {\r\n const classes = useStyles();\r\n const [watch, setWatch] = useState<boolean>(false)\r\n const [scale, setScale] = useState<number>(1)\r\n const refView = useRef<null | any>(null)\r\n const handleIncreaseScale = () => {\r\n if (scale < 5) {\r\n refView.current.style.transform = `scale(${scale+0.25},${scale+0.25})`\r\n refView.current.style.transformOrigin = `${50 / scale + 0.25}px ${50 / scale + 0.25}px`\r\n setScale(scale+0.25)\r\n }\r\n }\r\n const handleDecreaseScale = () => {\r\n if (scale >= 0.5) {\r\n refView.current.style.transform = `scale(${scale-0.25},${scale-0.25})`\r\n refView.current.style.transformOrigin = `${50/scale-0.25}px ${50/scale-0.25}px`\r\n setScale(scale-0.25)\r\n }\r\n } \r\n const handleOpenWatch = () => !watch && setWatch(true)\r\n const handleCloseWatch = (e:any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'close') {\r\n setWatch(false)\r\n setScale(1)\r\n }\r\n } \r\n \r\n const url = `${prodAwsS3}/${message}`\r\n \r\n return (watch ?\r\n <div onClick={(e) => {\r\n handleCloseWatch(e)\r\n handleScrollToTheMessage(id,companionId)\r\n }} id='overlay' className={classes.overlay}>\r\n <div className={classes.topBar}>\r\n <div className={classes.wrapperCredentials}>\r\n <ListItemIcon >\r\n <Avatar alt={name} src={url?url:undefined}\r\n sx={{ background: color, width: 44, height: 44 }}>\r\n {!url&&`${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 primaryTypographyProps={{ color: '#ffffff' }}\r\n secondary={timeStampEU(updatedAt)} secondaryTypographyProps={{ color: '#ffffff' }} />\r\n </div>\r\n <div className={classes.wrapperIcons}>\r\n <ZoomOutIcon onClick={handleDecreaseScale}\r\n className={classes.magnifying} fontSize='large' />\r\n <ZoomInIcon onClick={handleIncreaseScale}\r\n className={classes.magnifying} fontSize='large' />\r\n <DownloadForOfflineIcon onClick={() => handleDownload(url, fullType)}\r\n className={classes.downloadIcon} fontSize='large' />\r\n <CloseIcon id='close' onClick={handleCloseWatch}\r\n className={classes.iconCloseOverlay} fontSize='large' />\r\n </div> \r\n </div>\r\n <div ref={refView} className={classes.wrapperImage}>\r\n <img className={classes.innerImage}\r\n 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\n\r\nimport MediaListItem from './MediaListItem';\r\nimport AlertInfo from '../../../../reusableComponents/AlertInfo';\r\nimport { TAllMessages } from '../../../../../typescript/redux/allMessages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n width: '100%',\r\n maxHeight: '88vh',\r\n overflowY: 'scroll',\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`, \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 '@keyframes moveElement': {\r\n '0%': { left: '-100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IMediaList {\r\n filteredAndSortedMessages: TAllMessages,\r\n value: string,\r\n date: any,\r\n handleScrollToTheMessage:(_id:string,companionId:string) => void\r\n}\r\n\r\nconst MediaList = ({ filteredAndSortedMessages,value,date,handleScrollToTheMessage }: IMediaList) => {\r\n const classes = useStyles()\r\n \r\n return (\r\n <>\r\n {filteredAndSortedMessages.length > 0 &&\r\n <ImageList className={classes.container} cols={3} rowHeight={164}>\r\n {filteredAndSortedMessages.map(({message,createdAt,fullType,updatedAt,_id,companionId,name,lastName,color}) => \r\n <MediaListItem key={createdAt} message={message} fullType={fullType}\r\n updatedAt={updatedAt} handleScrollToTheMessage={handleScrollToTheMessage} id={_id}\r\n companionId={companionId} name={name} lastName={lastName} color={color}/>)}\r\n </ImageList>}\r\n {(value || date) && filteredAndSortedMessages.length === 0 && <AlertInfo name={`Can not find Media by request: ${value}`} />}\r\n {!value && !date && filteredAndSortedMessages.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 { makeStyles } from '@material-ui/core'\r\n\r\nimport AlertInfo from '../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,firstLetter,prodAwsS3 } 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: '88vh',\r\n overflowY: 'scroll',\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`, \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 cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n folderIcon: {\r\n margin: 'auto 0px',\r\n color: '#54b0fc',\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '-100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface ITextList {\r\n filteredAndSortedMessages: TAllMessages,\r\n value: string,\r\n date: any,\r\n handleScrollToTheMessage:(_id:string,companionId:string) => void\r\n}\r\n\r\nconst TextList = ({ filteredAndSortedMessages,value,date,handleScrollToTheMessage }: ITextList) => {\r\n const classes = useStyles()\r\n \r\n return (\r\n <>\r\n {filteredAndSortedMessages.length > 0 &&\r\n <List className={classes.container}>\r\n {filteredAndSortedMessages.map(({ message, createdAt, lastName, name, color, avatarUrl,_id,companionId }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id,companionId)}\r\n alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40}}>\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 <ContentCopyIcon className={classes.folderIcon} fontSize='large' /> \r\n </ListItem>\r\n <Divider variant=\"inset\" />\r\n </div>)}\r\n </List>}\r\n {(value || date) && filteredAndSortedMessages.length === 0 && <AlertInfo name={`Can not find Text by request: ${value}`} />}\r\n {!value && !date && filteredAndSortedMessages.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 Avatar from '@mui/material/Avatar';\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,firstLetter,prodAwsS3 } 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: '88vh',\r\n overflowY: 'scroll',\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`, \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 margin: 'auto 0px',\r\n color: '#54b0fc',\r\n },\r\n listItem: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '-100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IAudioList {\r\n filteredAndSortedMessages: TAllMessages,\r\n value: string,\r\n date: any,\r\n handleScrollToTheMessage:(_id:string,companionId:string) => void\r\n}\r\n\r\nconst AudioList = ({ filteredAndSortedMessages,value,date,handleScrollToTheMessage }: IAudioList) => {\r\n const classes = useStyles()\r\n \r\n return(\r\n <>\r\n {filteredAndSortedMessages.length > 0 &&\r\n <List className={classes.container}>\r\n {filteredAndSortedMessages.map(({ createdAt, fullType,_id,companionId,name,avatarUrl,lastName,color }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id,companionId)}\r\n alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar> \r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n <LibraryMusicIcon className={classes.folderIcon} fontSize='large'/> \r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>}\r\n {(value || date) && filteredAndSortedMessages.length === 0 && <AlertInfo name={`Can not find Audio by request: ${value}`} />}\r\n {!value && !date && filteredAndSortedMessages.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 Avatar from '@mui/material/Avatar';\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,prodAwsS3,firstLetter } 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: '88vh',\r\n overflowY: 'scroll',\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`, \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 margin: 'auto 0px',\r\n color: '#54b0fc',\r\n },\r\n listItem: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '-100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IVideoList {\r\n filteredAndSortedMessages: TAllMessages,\r\n value: string,\r\n date: any,\r\n handleScrollToTheMessage:(_id:string,companionId:string) => void\r\n}\r\n\r\nconst VideoList = ({ filteredAndSortedMessages,value,date,handleScrollToTheMessage }: IVideoList) => {\r\n const classes = useStyles()\r\n\r\n return (\r\n <>\r\n {filteredAndSortedMessages.length > 0 &&\r\n <List className={classes.container}>\r\n {filteredAndSortedMessages.map(({ createdAt, fullType,_id,companionId,name,avatarUrl,lastName,color }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id,companionId)}\r\n key={createdAt} alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar> \r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n <VideoLibraryIcon className={classes.folderIcon} fontSize='large'/> \r\n </ListItem>\r\n <Divider variant=\"inset\" />\r\n </div>)}\r\n </List>}\r\n {(value || date)&& filteredAndSortedMessages.length === 0 && <AlertInfo name={`Can not find Video by request: ${value}`} />}\r\n {!value && !date && filteredAndSortedMessages.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 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 { 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 getLeftIsOpen = (state: IState) => state.control.leftIsOpen;\nconst getRightIsOpen = (state: IState) => state.control.rightIsOpen;\nconst getScrollChat = (state: IState) => state.control.scrollChat;\nconst getOpenPinned = (state: IState) => state.control.openPinned;\nconst getState = (state:IState) => state.control;\n\nexport { getLeftIsOpen,getRightIsOpen,getScrollChat,getOpenPinned,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 { createSelector } from 'reselect';\r\nimport { IState } from '../../../typescript/redux/interfaces'\r\n\r\nconst getPinnedMessages = (state: IState) => state.pinnedMessages;\r\nconst getState = (state: IState) => state.pinnedMessages;\r\nconst getPinnedMessagesMemo = createSelector([getPinnedMessages], pinnedMessages => pinnedMessages);\r\n\r\nexport { getPinnedMessages,getState,getPinnedMessagesMemo };\r\n","import { useState, useEffect,useMemo } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport Tab from '@mui/material/Tab';\r\nimport Tabs from '@mui/material/Tabs';\r\nimport Box from '@mui/material/Box';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { styled } from '@mui/material/styles';\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 { asyncGetChats } from '../../../../redux/chats/operations';\r\nimport { getStateMemo } from '../../../../redux/chats/selector';\r\nimport { getAllMessagesMemo } from '../../../../redux/allMessages/selector';\r\nimport { getState } from '../../../../redux/control/selector';\r\nimport { sortByRecent,filterBy,filteredMessages,handleSort,timeStampFilter,refreshAppTime } from '../../../../helpers';\r\nimport { asyncStartChatById } from '../../../../redux/chat/operations';\r\nimport { getPinnedMessagesMemo } from '../../../../redux/pinnedMessages/selector';\r\nimport { actionLeftIsOpen,actionRightIsOpen,actionOpenPinned } from '../../../../redux/control/action';\r\nimport { TMessage } from '../../../../typescript/redux/messages/types';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n height: '5vh',\r\n display: \"flex\",\r\n alignContent: \"end\",\r\n alignItems: \"end\",\r\n width:'100%',\r\n borderBottom: 'solid 2px #dddddd',\r\n },\r\n})\r\n\r\ninterface StyledTabsProps {\r\n children?: React.ReactNode;\r\n value: number;\r\n onChange: (event: React.SyntheticEvent, newValue: number) => void;\r\n}\r\n\r\nconst StyledTabs = styled((props: StyledTabsProps) => (\r\n <Tabs\r\n {...props}\r\n TabIndicatorProps={{ children: <span className=\"MuiTabs-indicatorSpan\" /> }}\r\n />\r\n))({\r\n '& .MuiTabs-flexContainer': {\r\n display: \"flex\",\r\n width: '100%',\r\n padding:'0px 10px',\r\n justifyContent: \"space-between\"\r\n },\r\n '& .MuiTabs-indicator': {\r\n height: 0,\r\n backgroundColor: 'transparent',\r\n borderBottom: '3px solid #1976d2',\r\n borderLeft: '3px solid transparent',\r\n borderRight: '3px solid transparent',\r\n },\r\n});\r\n\r\nconst StyledTab = styled((props:{label: string}) => <Tab disableRipple {...props} />)({\r\n fontSize: '1rem',\r\n fontWeight: 550,\r\n textTransform: 'none',\r\n minWidth: 'auto',\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 chatDivRef: any | null\r\n}\r\n\r\nconst SearchLists = ({ value,setValue,sort,date,setDate,setDisabled,chatDivRef}: 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 pinnedMessagesMemo = useSelector(getPinnedMessagesMemo)\r\n const { leftIsOpen,rightIsOpen,openPinned } = useSelector(getState)\r\n const [isActive, setIsActive] = useState<number>(0)\r\n const handleIsActive = (_e:any,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 rightIsOpen && dispatch(actionRightIsOpen(''))\r\n openPinned&&dispatch(actionOpenPinned(false))\r\n dispatch(asyncStartChatById(companionId))\r\n }\r\n \r\n const scrollTo = (nodeRef: any,id:string) => {\r\n const childNodes = nodeRef.current.childNodes[0].childNodes\r\n let toScrollNode = [...childNodes].find((el: any) => el.id === id)\r\n if (toScrollNode) {\r\n toScrollNode = [...toScrollNode.childNodes].slice(-1)[0]\r\n toScrollNode.style.backgroundColor = 'rgba(70, 70, 70, 0.4)'\r\n toScrollNode.style.boxShadow = '0px 0px 6px 0px #ffffff'\r\n toScrollNode.scrollIntoView({ behavior: 'smooth' })\r\n setTimeout(() => {\r\n toScrollNode.style.backgroundColor = 'unset'\r\n toScrollNode.style.boxShadow = 'unset'\r\n }, 2000)\r\n }\r\n }\r\n \r\n const handleScrollToTheMessage = (_id: string, companionId: string) => {\r\n if (openPinned && !pinnedMessagesMemo.some((el) => (el._id === _id && el.companionId === companionId))) {\r\n dispatch(actionOpenPinned(false)) \r\n }\r\n if (chatDivRef.current && chatDivRef.current.id === companionId) {\r\n scrollTo(chatDivRef,_id)\r\n } else if (chatDivRef.current && chatDivRef.current.id !== companionId) {\r\n rightIsOpen&&dispatch(actionRightIsOpen(''))\r\n dispatch(asyncStartChatById(companionId))\r\n setTimeout(() => {\r\n if(chatDivRef.current) scrollTo(chatDivRef,_id)\r\n }, 3000) \r\n } else if (!chatDivRef.current) {\r\n rightIsOpen&&dispatch(actionRightIsOpen(''))\r\n dispatch(asyncStartChatById(companionId))\r\n setTimeout(() => {\r\n if(chatDivRef.current) scrollTo(chatDivRef,_id)\r\n }, 3000)\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) {\r\n dispatch(actionLeftIsOpen('searchChats'))\r\n } else {\r\n dispatch(actionLeftIsOpen('searchAllMessages'))\r\n }\r\n }, [isActive,dispatch]) \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 const handleReset = () => {\r\n if (leftIsOpen === 'searchChats') {\r\n dispatch(asyncGetChats())\r\n } else if (leftIsOpen === 'searchAllMessages') {\r\n dispatch(asyncGetAllMessages())\r\n }\r\n }\r\n handleReset()\r\n const idInterval = setInterval(handleReset, refreshAppTime);\r\n return () => clearInterval(idInterval);\r\n }, [leftIsOpen,dispatch]);\r\n \r\n \r\n const filteredAndSortedChats = useMemo(() => {\r\n return sortByRecent(chats,sort).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 } else return undefined\r\n })\r\n }, [chats, date, value, sort])\r\n\r\n const filteredAndSortedMessages = useMemo(() => {\r\n const filtered = messagesMemo.filter((el:TMessage) => filterBy[isActive === 0?0:isActive-1].includes(el.type))\r\n if(isActive > 0) setDisabled(filtered.length > 0?false:true) \r\n return filteredMessages(handleSort('createdAt', filtered, sort), date, value)\r\n }, [messagesMemo, date, isActive, sort, value,setDisabled])\r\n\r\n return (\r\n <>\r\n <Box className={classes.container}>\r\n <StyledTabs sx={{width:'100%'}} onChange={handleIsActive} value={isActive} aria-label=\"wrapped label tabs example\">\r\n <StyledTab label='Chats' />\r\n <StyledTab label='Files' />\r\n <StyledTab label='Media' />\r\n <StyledTab label='Text' />\r\n <StyledTab label='Audio' />\r\n <StyledTab label='Video' />\r\n </StyledTabs>\r\n </Box>\r\n {isActive === 0 && <ChatListRecent value={value} date={date}\r\n filteredAndSortedChats={filteredAndSortedChats} handleListItemClick={handleListItemClick} />}\r\n {isActive === 1 && <FilesList filteredAndSortedMessages={filteredAndSortedMessages} value={value} date={date} handleScrollToTheMessage={handleScrollToTheMessage}/>}\r\n {isActive === 2 && <MediaList filteredAndSortedMessages={filteredAndSortedMessages} value={value} date={date} handleScrollToTheMessage={handleScrollToTheMessage}/>}\r\n {isActive === 3 && <TextList filteredAndSortedMessages={filteredAndSortedMessages} value={value} date={date} handleScrollToTheMessage={handleScrollToTheMessage}/>}\r\n {isActive === 4 && <AudioList filteredAndSortedMessages={filteredAndSortedMessages} value={value} date={date} handleScrollToTheMessage={handleScrollToTheMessage}/>}\r\n {isActive === 5 && <VideoList filteredAndSortedMessages={filteredAndSortedMessages} value={value} date={date} handleScrollToTheMessage={handleScrollToTheMessage}/>}\r\n </> \r\n )\r\n}\r\n\r\nexport default SearchLists","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 { 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 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 Toolbar from '@mui/material/Toolbar'\r\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\r\nimport StaticDatePicker from \"./StaticDatePicker\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useDispatch } from 'react-redux';\r\nimport { updateUser } from '../../../../api-data';\r\nimport { TLeftIsOpen } from '../../../../typescript/redux/control/types';\r\nimport { asyncCurrentUser } from '../../../../redux/authorization/operations';\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 display: 'flex',\r\n alignContent: 'center',\r\n alignItems:'center',\r\n color: '#b1aeae',\r\n height: '7vh',\r\n padding: 0,\r\n margin:0,\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:(e: any) => void,\r\n handleSearch:(e: React.ChangeEvent<HTMLInputElement>) => void,\r\n leftIsOpen: TLeftIsOpen,\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, leftIsOpen,\r\n value, sort, setDate, date, disabled }: ISearchBar) => {\r\n const dispatch = useDispatch()\r\n const handleSort = () => {\r\n updateUser({ sort: !sort })\r\n setTimeout(() => {\r\n dispatch(asyncCurrentUser())\r\n }, 1000);\r\n }\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 {leftIsOpen ? <ArrowBackIcon className={classes.iconArrow} /> : <MenuIcon className={classes.iconBtn} />}\r\n </IconButton>\r\n <div onFocus={handleOpenIsSearch} style={{display:'flex',width:'100%'}}>\r\n <Search id='search' className={value?classes.activeSearch:undefined}>\r\n <SearchIconWrapper id='search'>\r\n <SearchIcon id='search'/>\r\n </SearchIconWrapper>\r\n <StyledInputBase\r\n id='search'\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 <Switch id='sort' onClick={handleSort} checked={sort} {...label} disabled={disabled} />\r\n </div>\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\nimport { useDispatch } from 'react-redux';\r\n\r\nimport { removeChatForBoth } from '../../../../../../api-data';\r\nimport { actionRightIsOpen } from '../../../../../../redux/control/action';\r\nimport { actionRemoveChat } from '../../../../../../redux/chat/action';\r\nimport { firstLetter, slicedWord,prodAwsS3 } 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 dispatch = useDispatch()\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 dispatch(actionRemoveChat())\r\n dispatch(actionRightIsOpen(''))\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?`${prodAwsS3}/${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\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\n\r\nimport { muteChat,pinChat } from '../../../../../api-data';\r\nimport { TChat } from '../../../../../typescript/redux/chats/types';\r\nimport { firstLetter, slicedWord, timeStampEU,prodAwsS3 } 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 },\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 cursor: 'pointer',\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: 10,\r\n '&:hover': {\r\n outline: 'solid 3px #3ee415',\r\n }\r\n },\r\n listItem_iconRightBtnMute: {\r\n cursor: 'pointer',\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: 10,\r\n '&:hover': {\r\n outline: 'solid 3px #cccbcb',\r\n }\r\n },\r\n pinnedIcon: {\r\n transform: 'rotate(45deg)',\r\n },\r\n listIconsRightContainer: {\r\n marginLeft: 'auto',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n },\r\n listItem_icon_time: {\r\n fontSize: 12,\r\n marginLeft: 5,\r\n },\r\n listItem_typing: {\r\n animation: 'ripple 4s infinite ease-in-out', \r\n }, \r\n listItem_dots: {\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 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\ninterface IChatItem {\r\n chat: TChat,\r\n handleListItemClick: (companionId: string) => void,\r\n handleNewMsgs: (e: any, companionId: string) => void,\r\n id: string,\r\n pinned: boolean,\r\n selectedCompanionId: string,\r\n}\r\nconst ChatItem = ({chat,handleListItemClick,handleNewMsgs,id,pinned,selectedCompanionId}: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,seenCompanion } = chat\r\n const openedChat = companionId === selectedCompanionId\r\n const handlePin = (id: string, pinned:boolean) => {\r\n pinChat(id,!pinned)\r\n handleClose(undefined)\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 <>\r\n {modal&&<DeleteModal setModal={setModal} chat={chat}/>}\r\n <ListItemButton\r\n sx={{backgroundColor: openedChat ? '#26afee' : selected ? 'rgba(0, 0, 0, 0.1)' : 'transparent',\r\n '&:hover':{backgroundColor:openedChat ? '#26afee':'rgba(0, 0, 0, 0.1)'}}}\r\n onClick={() => handleListItemClick(companionId)}\r\n onContextMenu={(e) => handleContextMenu(e)}>\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?`${prodAwsS3}/${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 primaryTypographyProps={{color:openedChat?'#ffffff':'#000000'}} 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 style={{color:openedChat?'#ffffff':'#959595'}}\r\n className={classes.listItemInnerText__icon} fontSize='small' />}</div>}\r\n secondary={typing ? <span style={{color:openedChat?'#ffffff':'#4d4d4d'}}\r\n className={classes.listItem_typing}>\r\n typing<span style={{color:openedChat?'#ffffff':'#1b1b1b'}}\r\n className={classes.listItem_dots}>...</span></span> :\r\n lastMessage ? slicedWord(lastMessage, 28) :\r\n `${firstLetter(name)}${slicedWord(name, 15, 1)} joined Telegram`}\r\n secondaryTypographyProps={{color:openedChat?'#ffffff':'#000000'}}/>\r\n <ListItemIcon className={classes.listItem_iconRight}>\r\n <div className={classes.listItem_iconTimeChecked}>\r\n {watched &&<DoneAllIcon style={{ color: openedChat ? '#ffffff' : '#18bd03' }} fontSize='small' />}\r\n {!watched&&seenCompanion < total&& <DoneIcon style={{ color: openedChat ? '#ffffff' :'#18bd03' }} fontSize='small' />}\r\n <Typography className={classes.listItem_icon_time} style={{ color: openedChat ? '#ffffff' : '#1b1b1b' }}\r\n variant=\"h6\" color=\"initial\">\r\n {timeStampEU(lastMessageCreatedAt?lastMessageCreatedAt:createdAt)}\r\n </Typography>\r\n </div>\r\n <div className={classes.listIconsRightContainer}>\r\n {pinned && <PushPinIcon className={classes.pinnedIcon} fontSize='small'\r\n style={{color:openedChat?'#ffffff':'#959595'}}/>}\r\n {lastMessage && total > seen &&\r\n <button onClick={(e) => handleNewMsgs(e, companionId)}\r\n style={{outline:openedChat?'none':undefined,color:openedChat&&!mute?'#26afee':openedChat?'#ffffff':undefined,backgroundColor:openedChat&&!mute?'#ffffff':openedChat?'#a7aaa7':undefined}}\r\n className={mute ? classes.listItem_iconRightBtnMute : classes.listItem_iconRightBtn}>\r\n {total - seen}\r\n </button>} \r\n </div>\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 onClick={() => handlePin(id,pinned)}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin chat':'Pin 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 </>\r\n );\r\n}\r\nexport default ChatItem","import List from '@mui/material/List';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useEffect,useRef,useCallback,useMemo } 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 { getSilentMode } from '../../../../redux/authorization/selector'\r\nimport { asyncGetChatById } from '../../../../redux/chat/operations'\r\nimport { asyncGetChats } from '../../../../redux/chats/operations';\r\nimport { actionRightIsOpen,actionScrollChat,actionOpenPinned } from '../../../../redux/control/action'\r\nimport { TChats,TChat } from '../../../../typescript/redux/chats/types';\r\nimport { prodBaseURL,refreshAppTime } 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 setDisabled: React.Dispatch<boolean>,\r\n}\r\n\r\nconst ChatsList = ({sort,setDisabled}:IChatsList) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const chatsRef = useRef<any>(null)\r\n const silentMode = useSelector(getSilentMode)\r\n const { total, chats } = useSelector(getStateMemo)\r\n const chat = useSelector(getChatMemo) \r\n \r\n const handleListItemClick = (companionId: string) => {\r\n dispatch(actionRightIsOpen(''))\r\n dispatch(actionOpenPinned(false))\r\n dispatch(asyncGetChatById(companionId))\r\n if(chat.companionId !== companionId) setTimeout(() => dispatch(actionScrollChat(true)), 500)\r\n }\r\n\r\n const handleNewMsgs = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>, companionId: string) => {\r\n e.stopPropagation()\r\n dispatch(actionRightIsOpen(''))\r\n dispatch(actionOpenPinned(false))\r\n dispatch(asyncGetChatById(companionId))\r\n setTimeout(() => dispatch(actionScrollChat(true)), 500)\r\n }\r\n\r\n const handleNotification = useCallback((companionId: string) => {\r\n dispatch(asyncGetChatById(companionId))\r\n dispatch(actionOpenPinned(false))\r\n dispatch(actionRightIsOpen(''))\r\n setTimeout(() => dispatch(actionScrollChat(true)), 500)\r\n }, [dispatch])\r\n\r\n const sortedChats = useMemo((): TChats => {\r\n const pinnedArr: any[] = []\r\n const sortedAndFilteredArr: TChats = sortByRecent(chats, sort)\r\n .filter((el: TChat) => {\r\n if (el.pinned === true) {\r\n pinnedArr.push(el)\r\n return undefined\r\n } else return el\r\n })\r\n return [...pinnedArr,...sortedAndFilteredArr]\r\n },[chats,sort])\r\n \r\n useEffect(() => {\r\n const handleReset = () => dispatch(asyncGetChats())\r\n handleReset()\r\n const idInterval = setInterval(handleReset, refreshAppTime);\r\n return () => clearInterval(idInterval);\r\n }, [dispatch]); \r\n\r\n useEffect(() => {\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 !silentMode&&playNotificationWithoutPermission(`${prodBaseURL}/telegramReceive.mp3`)\r\n notification(chat.name, () => handleNotification(chat.companionId))\r\n } \r\n })\r\n }\r\n chatsRef.current = sortedChats\r\n }, [chat,sortedChats,handleNotification,dispatch,silentMode])\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 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 id={el._id} pinned={el.pinned} selectedCompanionId={chat.companionId} />)}\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 NotificationsIcon from '@mui/icons-material/Notifications';\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 { useEffect } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { updateUser } from '../../../../api-data';\r\nimport { asyncCurrentUser } from '../../../../redux/authorization/operations';\r\nimport { actionLeftIsOpen } from '../../../../redux/control/action';\r\nimport { refreshAppTime } 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 },\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 nightMode: boolean,\r\n silentMode: boolean,\r\n}\r\n\r\nconst MenuBar = ({nightMode,silentMode}:IContactsList) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const handleNightMode = () => updateUser({ nightMode: !nightMode })\r\n const handleSilentMode = () => updateUser({ silentMode: !silentMode })\r\n\r\n useEffect(() => {\r\n const handleReset = () => dispatch(asyncCurrentUser())\r\n handleReset()\r\n const idInterval = setInterval(handleReset, refreshAppTime);\r\n return () => clearInterval(idInterval);\r\n }, [dispatch]); \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={() => dispatch(actionLeftIsOpen('contact'))}>\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={() => dispatch(actionLeftIsOpen('contacts'))}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <PermContactCalendarIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText>Contacts</ListItemText>\r\n </MenuItem>\r\n <MenuItem onClick={() => dispatch(actionLeftIsOpen('settings'))}>\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 <MenuItem style={{cursor:'default'}}>\r\n <ListItemIcon className={classes.listIcon}>\r\n <NotificationsIcon fontSize=\"medium\" />\r\n </ListItemIcon>\r\n <ListItemText>Silent Mode</ListItemText>\r\n <Switch onClick={handleSilentMode} checked={silentMode} {...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 PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport {removeContact,pinContact } from '../../../../../api-data';\r\nimport { actionRightIsOpen } from '../../../../../redux/control/action';\r\nimport { TContact } from '../../../../../typescript/redux/contacts/types';\r\nimport { TRightIsOpen } from '../../../../../typescript/redux/control/types';\r\nimport { firstLetter,slicedWord,timeStampEU,copied,prodAwsS3 } 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 iconClose: {\r\n '&:hover': {\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n pinnedIcon: {\r\n marginLeft: 'auto',\r\n transform: 'rotate(45deg)',\r\n color: '#959595',\r\n }, \r\n})\r\ninterface IContactItem {\r\n contact: TContact,\r\n handleListItemClick: (companionId: string) => void,\r\n rightIsOpen: TRightIsOpen,\r\n id: string,\r\n pinned: boolean\r\n}\r\nconst ContactItem = ({contact,handleListItemClick,rightIsOpen,id,pinned}: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 handlePin = (id: string, pinned:boolean) => {\r\n pinContact(id,!pinned)\r\n handleClose(undefined)\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 rightIsOpen === 'edit'&&dispatch(actionRightIsOpen('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?`${prodAwsS3}/${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 {pinned && <PushPinIcon className={classes.pinnedIcon} fontSize='small' />}\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 onClick={() => handlePin(id,pinned)}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin contact':'Pin contact'}\r\n </MenuItem> \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?`${prodAwsS3}/${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\nconst getStateMemo = createSelector([getState], state => state);\r\n\r\nexport { getTotal,getLimit,getPage,getContacts,getState,getContactsMemo,getStateMemo };\r\n","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 List from '@mui/material/List';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { useEffect,useMemo } from 'react';\r\n\r\nimport AlertInfo from '../../../reusableComponents/AlertInfo'\r\nimport ContactItem from './ContactItem';\r\nimport { getStateMemo } from '../../../../redux/contacts/selector'\r\nimport { asyncGetContacts } from '../../../../redux/contacts/operations';\r\nimport { asyncStartChatById } from '../../../../redux/chat/operations'\r\nimport { getRightIsOpen } from '../../../../redux/control/selector'\r\nimport { actionLeftIsOpen, actionRightIsOpen,actionOpenPinned } from '../../../../redux/control/action';\r\nimport { handleSort,timeStampFilter,refreshAppTime } 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(getStateMemo)\r\n const rightIsOpen = useSelector(getRightIsOpen)\r\n\r\n const handleListItemClick = (companionId: string) => {\r\n handleClick()\r\n dispatch(actionRightIsOpen(''))\r\n dispatch(actionOpenPinned(false))\r\n dispatch(asyncStartChatById(companionId))\r\n }\r\n\r\n useEffect(() => {\r\n dispatch(actionLeftIsOpen('contacts'))\r\n }, [dispatch]) \r\n\r\n useEffect(() => {\r\n setDisabled(total === '0'?true:false)\r\n }, [total, setDisabled])\r\n \r\n useEffect(() => {\r\n const handleReset = () => dispatch(asyncGetContacts())\r\n handleReset()\r\n const idInterval = setInterval(handleReset, refreshAppTime);\r\n return () => clearInterval(idInterval);\r\n }, [dispatch]);\r\n\r\n const filteredContacts = useMemo((): TContacts => {\r\n const pinnedArr: any[] = []\r\n const sortedAndFilteredArr: TContacts = handleSort('name', contacts, sort)\r\n .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 } else return undefined\r\n }).filter((el: TContact) => {\r\n if (el.pinned === true) {\r\n pinnedArr.push(el)\r\n return undefined\r\n } else return el\r\n })\r\n return [...pinnedArr,...sortedAndFilteredArr]\r\n },[contacts,date,value,sort]) \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 {filteredContacts.length > 0 ? filteredContacts.map((contact) => <ContactItem key={contact.number}\r\n contact={contact} handleListItemClick={handleListItemClick}\r\n rightIsOpen={rightIsOpen} id={contact._id} pinned={contact.pinned} />) :\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 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 { actionLeftIsOpen } from '../../../../redux/control/action';\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 handleClick: () => void\r\n}\r\n\r\nconst AddContact = ({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 dispatch(actionLeftIsOpen('contacts'))\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 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 { makeStyles, Typography } from '@material-ui/core'\r\nimport { useDispatch } from 'react-redux';\r\nimport MenuList from './MenuList';\r\nimport { actionLeftIsOpen } from '../../../../../redux/control/action';\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 handleClick:() => void\r\n}\r\n\r\nconst ToolBar = ({handleClick}:IToolBar) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\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={() => dispatch(actionLeftIsOpen('edit'))} 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","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AQMAAACyIsh+AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAAAeSURBVHic7cEBAQAAAIIg/69uSEABAAAAAAAAAL8GIDoAASo5tcIAAAAASUVORK5CYII=\"","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 { getAuthorizationState } 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, prodAwsS3 } from '../../../../../helpers'\r\nimport transparentPic from './../../../../../img/transparentPic.png'\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 nameTitle: {\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 timeTitle: {\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 countryTitle: {\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: '13%',\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 credentialsTitle: {\r\n position:'absolute',\r\n color: '#ffffff',\r\n fontSize: 100,\r\n top: '30%',\r\n left: '38%',\r\n },\r\n credentialsLowTitle: {\r\n position:'absolute',\r\n color: '#ffffff',\r\n fontSize: 25,\r\n top: '90%',\r\n left: '9%',\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,createdAt,color,country } = useSelector(getAuthorizationState)\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 const isDefault = avatarsArr.length === 0 ? false: 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 {isDefault ?\r\n avatarsArr.map(({ avatarUrl, updatedAt }) =>\r\n <div key={avatarUrl}>\r\n <img alt='pic' src={`${prodAwsS3}/${avatarUrl}`}/>\r\n <p className=\"legend\">{timeStampEU(updatedAt)}</p> \r\n </div>) :\r\n [\r\n <div>\r\n <img alt='transparentPic' src={transparentPic}\r\n style={{ background: `linear-gradient(to bottom, ${color}, ${color} 80%, #5d5d5d 100%)` }} />\r\n <p className=\"legend\">{timeStampEU(createdAt)}</p> \r\n </div>\r\n ]\r\n }\r\n </Carousel> \r\n <span className={classes.nameTitle}>{`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}</span>\r\n <span className={classes.timeTitle}>{online === 'true' ? 'online' : `last seen ${timeStampEU(online)}`}</span>\r\n <span className={classes.countryTitle}>{country}</span>\r\n {!isDefault&&<span className={classes.credentialsTitle}>{`${firstLetter(name)}${firstLetter(lastName)}`}</span>}\r\n {!isDefault&&<span className={classes.credentialsLowTitle}>{`${firstLetter(name)}${firstLetter(lastName)}`}</span>} \r\n {avatarsArr.length > 0 &&\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='Copy number' />\r\n </MenuItem>\r\n </CopyToClipboard> \r\n </MenuList>\r\n </Paper>\r\n );\r\n}\r\n\r\nexport default SettingsMenu","import { useEffect } from \"react\"\r\nimport { useDispatch } from \"react-redux\"\r\nimport ToolBar from \"./ToolBar\"\r\nimport SettingsPicture from \"./SettingsPicture\"\r\nimport SettingsMenu from \"./SettingsMenu\"\r\nimport { asyncCurrentUser } from '../../../../redux/authorization/operations'\r\nimport { refreshAppTime } from '../../../../helpers'\r\n\r\ninterface ISettingsBar {\r\n handleClick:() => void\r\n}\r\n\r\nconst SettingsBar = ({ handleClick }: ISettingsBar) => {\r\n const dispatch = useDispatch()\r\n\r\n useEffect(() => {\r\n const handleReset = () => dispatch(asyncCurrentUser())\r\n handleReset()\r\n const idInterval = setInterval(handleReset, refreshAppTime);\r\n return () => clearInterval(idInterval);\r\n }, [dispatch]);\r\n \r\n return (\r\n <div style={{backgroundColor: '#f3f2f2',height:'100%',width:'100%'}}>\r\n <ToolBar 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\nimport { useDispatch } from 'react-redux';\r\nimport { actionLeftIsOpen } from '../../../../../redux/control/action';\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\n\r\nconst ToolBar = () => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n\r\n return (\r\n <Stack className={classes.container} direction=\"row\" spacing={21}>\r\n <IconButton onClick={() => dispatch(actionLeftIsOpen('settings'))} 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 PhotoCameraFrontIcon from '@mui/icons-material/PhotoCameraFront';\r\nimport CameraIcon from '@mui/icons-material/Camera';\r\nimport { useEffect } from 'react';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport Webcam from \"react-webcam\";\r\nimport { format,firstLetter,prodAwsS3,prodBaseURL,playNotification } 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 marginBottom: 30,\r\n width: '100%',\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n flexDirection: 'row',\r\n justifyContent:'center'\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 display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n flexDirection:'column'\r\n },\r\n capturedPicture: {\r\n borderRadius: 10,\r\n border:'solid 2px rgb(62, 149, 231)'\r\n }, \r\n capturePhoto: {\r\n color: '#ffffff',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#48ff00',\r\n animation: `$rotating 2s linear infinite`\r\n },\r\n }, \r\n '@keyframes rotating': {\r\n\t 'from': { transform: 'rotate(0deg)'},\r\n\t 'to': { transform: 'rotate(360deg)'},\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 camera: boolean,\r\n setCamera: any,\r\n selfie:any,\r\n setSelfie: (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,file,setFile,camera,setCamera,selfie,setSelfie } = props\r\n const { avatarUrl, color,silentMode } = user\r\n const { getRootProps, getInputProps, acceptedFiles } = useDropzone({\r\n noDrag: true,\r\n accept:'image/*'\r\n });\r\n \r\n const videoConstraints = {\r\n width: 1280,\r\n height: 720,\r\n facingMode: \"user\"\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 const handleOpenCamera = () => {\r\n setCamera(true)\r\n file&&setFile(null)\r\n }\r\n\r\n const handleCloseCamera = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay') setCamera(false)\r\n }\r\n\r\n useEffect(() => {\r\n if (acceptedFiles.slice(-1)[0]) {\r\n setFile(acceptedFiles.slice(-1)[0])\r\n setSelfie(false)\r\n setOpenBtn(true)\r\n }\r\n }, [setFile,setSelfie,setOpenBtn,acceptedFiles])\r\n\r\n return (\r\n <div className={classes.container}>\r\n <div className={classes.imgWrapper}>\r\n <div {...getRootProps()}>\r\n <AddAPhotoIcon fontSize='large'\r\n sx={{color: file ? 'rgb(62, 149, 231)' : '#6b6b6b',\r\n '&:hover': { color: 'rgb(41, 139, 231)' },cursor:'pointer'}} />\r\n <input {...getInputProps()}/>\r\n </div>\r\n <ListItemAvatar style={{margin:'0px 20px'}}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 120, height: 120,fontSize:30}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar>\r\n <PhotoCameraFrontIcon onClick={handleOpenCamera} fontSize='large'\r\n sx={{color: selfie ? 'rgb(62, 149, 231)' : '#6b6b6b',\r\n '&:hover': { color: 'rgb(41, 139, 231)' },cursor:'pointer'}}/>\r\n </div>\r\n {camera &&\r\n <div onClick={handleCloseCamera} id='overlay'\r\n className={classes.overlay}>\r\n <Webcam\r\n audio={false}\r\n screenshotFormat=\"image/jpeg\"\r\n width='40%'\r\n videoConstraints={videoConstraints}\r\n style={{marginBottom:30}}\r\n >\r\n {({ getScreenshot }) => <>\r\n <CameraIcon onClick={() => {\r\n setSelfie(getScreenshot())\r\n setOpenBtn(true)\r\n !silentMode&&playNotification(`${prodBaseURL}/cameraCapture.mp3`)\r\n }}\r\n className={classes.capturePhoto} fontSize='large' style={{marginBottom:30}} />\r\n <img className={classes.capturedPicture} width='300' height='174'\r\n style={{visibility:selfie?'visible':'hidden'}} src={selfie} alt='chosen pic'></img>\r\n </>}\r\n </Webcam>\r\n </div>}\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:30}}\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,useDispatch } from 'react-redux';\r\nimport ToolBar from './ToolBar'\r\nimport EditList from './EditList'\r\nimport SubmitBtn from './SubmitBtn';\r\nimport { getAuthorizationState } from '../../../../redux/authorization/selector'\r\nimport { asyncCurrentUser } from '../../../../redux/authorization/operations';\r\nimport { updateCredentials, updateUserAvatar } from '../../../../api-data';\r\nimport { refreshAppTime } from '../../../../helpers';\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\n\r\n\r\nconst EditBar= () => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const user = useSelector(getAuthorizationState)\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 [camera, setCamera] = useState<boolean>(false)\r\n const [selfie, setSelfie] = useState<any>(null)\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 (selfie) {\r\n fetch(selfie)\r\n .then(res => res.blob())\r\n .then(blob => {\r\n const imgFile = new File([blob], \"selfie\", { type: \"image/jpeg\" })\r\n const formData: any = new FormData()\r\n formData.append(\"avatar\", imgFile);\r\n updateUserAvatar(formData)\r\n })\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 selfie && setSelfie(null)\r\n openBtn && setOpenBtn(false)\r\n }\r\n\r\n useEffect(() => {\r\n const handleReset = () => !openBtn && dispatch(asyncCurrentUser())\r\n handleReset()\r\n const idInterval = setInterval(handleReset, refreshAppTime);\r\n return () => clearInterval(idInterval);\r\n }, [openBtn,dispatch]); \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 />\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} camera={camera} setCamera={setCamera}\r\n selfie={selfie} setSelfie={setSelfie}/>\r\n </div>\r\n )\r\n}\r\n\r\nexport default EditBar","import { useState, useRef, useEffect } from 'react';\r\nimport { useSelector,useDispatch } 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 { getAuthorizationState } from '../../../redux/authorization/selector';\r\nimport { getLeftIsOpen } from '../../../redux/control/selector';\r\nimport { actionLeftIsOpen } from '../../../redux/control/action';\r\n\r\nconst LeftBar = ({chatDivRef}:{chatDivRef: any | null}) => {\r\n const dispatch = useDispatch()\r\n const { sort, nightMode,silentMode } = useSelector(getAuthorizationState)\r\n const leftIsOpen = useSelector(getLeftIsOpen)\r\n const [modal, setModal] = useState<boolean>(false)\r\n const [popup, setPopup] = useState<boolean>(false);\r\n const [disabled, setDisabled] = useState<boolean>(true)\r\n const [value, setValue] = useState<string>('')\r\n const [date, setDate] = useState<any>('');\r\n const modalRoot = useRef<HTMLDivElement | null>(null);\r\n \r\n const handleOpenIsSearch = (e:any) => {\r\n const id = e.target.id\r\n if(leftIsOpen === '' && id === 'sort') return\r\n leftIsOpen === '' && dispatch(actionLeftIsOpen('searchChats'))\r\n }\r\n \r\n const handleClick = () => {\r\n dispatch(actionLeftIsOpen(''))\r\n setModal(true)\r\n }\r\n \r\n const handleSearch = (e: React.ChangeEvent<HTMLInputElement>):void => setValue(e.target.value)\r\n const handleEnterOpenMenuSm = () => !popup&&setPopup(true)\r\n \r\n const handleLeaveCloseMenuSm = () => popup&&setPopup(false)\r\n \r\n useEffect(() => {\r\n setValue('')\r\n setDate('') \r\n setModal(false)\r\n setPopup(false)\r\n },[leftIsOpen])\r\n \r\n useEffect(() => {\r\n const handleCloseModal = (e:any) => {\r\n if (e.target.id === 'overlay') {\r\n setModal(false)\r\n setPopup(false)\r\n }\r\n }\r\n if (!modalRoot.current) {\r\n const modalHtml = document.getElementById('modal-root') as HTMLDivElement | null\r\n if (modalHtml) {\r\n modalHtml.addEventListener('click',handleCloseModal)\r\n modalRoot.current = modalHtml\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 {leftIsOpen === '' || leftIsOpen === 'contacts'\r\n || leftIsOpen === 'searchChats' || leftIsOpen === 'searchAllMessages' ?\r\n <SearchBar handleClick={handleClick} handleOpenIsSearch={handleOpenIsSearch} sort={sort} \r\n handleSearch={handleSearch} leftIsOpen={leftIsOpen} value={value} setDate={setDate}\r\n date={date} disabled={disabled} />:null}\r\n {leftIsOpen === 'searchChats' || leftIsOpen === 'searchAllMessages' ?<SearchLists value={value} setValue={setValue}\r\n sort={sort} date={date} setDate={setDate} setDisabled={setDisabled} chatDivRef={chatDivRef}/>:null}\r\n {leftIsOpen === ''&&<ChatsList sort={sort} setDisabled={setDisabled}/>}\r\n {leftIsOpen === '' && popup && <SmallMenuBar setPopup={setPopup} />}\r\n {modal && modalRoot.current &&\r\n createPortal(<MenuBar nightMode={nightMode} silentMode={silentMode}/>, modalRoot.current)}\r\n {leftIsOpen === 'contacts' && <ContactsList handleClick={handleClick} value={value}\r\n sort={sort} date={date} setDisabled={setDisabled} />}\r\n {leftIsOpen === 'contact' && <AddContact handleClick={handleClick}/>}\r\n {leftIsOpen === 'settings' && <SettingsBar handleClick={handleClick}/>}\r\n {leftIsOpen === 'edit' && <EditBar/>}\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 { actionRightIsOpen } from '../../../../../redux/control/action'\r\nimport { getChat } from '../../../../../redux/chat/selector'\r\nimport { firstLetter,slicedWord,timeStampEU,prodAwsS3 } 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(actionRightIsOpen('credentials'))}>\r\n <ListItemIcon >\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${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 { 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\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\n\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\ninterface IMenuList {\r\n setModalDelete:any,\r\n setIsSomeSelected: React.Dispatch<React.SetStateAction<boolean>>,\r\n}\r\n\r\nconst MenuList = ({setModalDelete,setIsSomeSelected}:IMenuList) => {\r\n const [anchorEl, setAnchorEl] = useState<any>(null);\r\n const open = Boolean(anchorEl);\r\n const { companionId, mute } = useSelector(getChat)\r\n \r\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\r\n e.stopPropagation()\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') setModalDelete(true)\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 onClick={() => {\r\n setIsSomeSelected(true)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select message\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,useDispatch } from 'react-redux';\r\n\r\nimport { getChat } from '../../../../../../redux/chat/selector';\r\nimport { actionRemoveChat } from '../../../../../../redux/chat/action';\r\nimport { actionRightIsOpen } from '../../../../../../redux/control/action'\r\nimport { removeChatForBoth } from '../../../../../../api-data';\r\nimport { firstLetter,slicedWord,prodAwsS3 } 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 = ({setModalDelete}:{setModalDelete:any}) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\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 setModalDelete(false)\r\n if (id === 'delete') {\r\n removeChatForBoth(companionId)\r\n setModalDelete(false)\r\n dispatch(actionRemoveChat())\r\n dispatch(actionRightIsOpen(''))\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?`${prodAwsS3}/${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 PhoneIcon from '@mui/icons-material/Phone';\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 { actionRightIsOpen } from '../../../../../redux/control/action'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n marginLeft: 20,\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems:'center'\r\n }, \r\n})\r\n\r\ninterface IButtons {\r\n setIsSomeSelected: React.Dispatch<React.SetStateAction<boolean>>,\r\n handleStartCall: () => void\r\n}\r\n\r\nconst Buttons = ({setIsSomeSelected,handleStartCall}:IButtons) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const [modalDelete, setModalDelete] = useState<boolean>(false)\r\n const handleOpenSearch = (e: any) => {\r\n e.stopPropagation()\r\n dispatch(actionRightIsOpen('search'))\r\n }\r\n\r\n return (\r\n <Stack className={classes.container} direction=\"row\">\r\n <IconButton onClick={handleOpenSearch} aria-label=\"delete\" size=\"medium\">\r\n <SearchIcon fontSize='medium'/>\r\n </IconButton>\r\n <IconButton onClick={handleStartCall} aria-label=\"delete\" size=\"medium\">\r\n <PhoneIcon fontSize='medium'/>\r\n </IconButton> \r\n <MenuList setModalDelete={setModalDelete} setIsSomeSelected={setIsSomeSelected}/>\r\n {modalDelete && <DeleteModal setModalDelete={setModalDelete} />}\r\n </Stack>\r\n );\r\n}\r\n\r\nexport default Buttons","import Stack from '@mui/material/Stack';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport MenuOpenIcon from '@mui/icons-material/MenuOpen';\r\nimport Button from '@mui/material/Button';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useSelector } from 'react-redux';\r\nimport { useState,useEffect} from 'react';\r\n\r\nimport { TMessage } from '../../../../../typescript/redux/messages/types';\r\nimport { getPinnedMessagesMemo } from '../../../../../redux/pinnedMessages/selector';\r\nimport { pinMessageById } from '../../../../../api-data';\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n marginLeft: 20,\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n position:'relative'\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 listWrapper: {\r\n background: '#fdfdfd',\r\n padding: 0,\r\n },\r\n listWrapperDashes: {\r\n position: 'absolute',\r\n top: 0,\r\n width: 2,\r\n height: '100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent:'space-around',\r\n flexWrap:'nowrap',\r\n listStyle:'none'\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 modalUnpin: {\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 folderIcon: {\r\n color: '#54b0fc',\r\n },\r\n})\r\n\r\ninterface IPinnedBar {\r\n chatDivRef: any | null,\r\n handleOpenPinned: () => void,\r\n}\r\n\r\nconst PinnedBar = ({chatDivRef,handleOpenPinned}:IPinnedBar) => {\r\n const classes = useStyles()\r\n const pinnedMessagesMemo = useSelector(getPinnedMessagesMemo)\r\n const [openedPin, setOpenedPin] = useState<TMessage | null>(null)\r\n const [openedIndex, setOpenedIndex] = useState<number>(0)\r\n const [modal, setModal] = useState<boolean>(false)\r\n const heightPerDash = 100/pinnedMessagesMemo.length\r\n const heightOfDash = heightPerDash-((heightPerDash/100)*20)\r\n \r\n const handleActivePin = () => {\r\n const childNodes = chatDivRef.current.childNodes[0].childNodes\r\n let toScrollNode: any\r\n if (pinnedMessagesMemo.length - 1 === openedIndex) {\r\n setOpenedIndex(0)\r\n toScrollNode = [ ...childNodes ].find((el:any) => el.id === pinnedMessagesMemo[0]._id)\r\n } else {\r\n setOpenedIndex(prevState => prevState + 1)\r\n toScrollNode = [...childNodes].find((el: any) => el.id === pinnedMessagesMemo[openedIndex + 1]._id)\r\n }\r\n if (toScrollNode) {\r\n toScrollNode = [...toScrollNode.childNodes].slice(-1)[0]\r\n toScrollNode.style.backgroundColor = 'rgba(70, 70, 70, 0.4)'\r\n toScrollNode.style.boxShadow = '0px 0px 6px 0px #ffffff'\r\n toScrollNode.scrollIntoView({ behavior: 'smooth' })\r\n setTimeout(() => {\r\n toScrollNode.style.backgroundColor = 'unset'\r\n toScrollNode.style.boxShadow = 'unset'\r\n }, 2000)\r\n }\r\n }\r\n const handleUnpin = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') return setModal(false)\r\n if (id === 'unpin' && openedPin) {\r\n pinMessageById(openedPin._id, !openedPin.pinned)\r\n setModal(false)\r\n if (openedIndex - 1 >= 0) {\r\n return setOpenedIndex(prevState => prevState - 1)\r\n } else {\r\n setOpenedIndex(0)\r\n }\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n setOpenedPin(pinnedMessagesMemo[openedIndex])\r\n }, [pinnedMessagesMemo,openedIndex])\r\n\r\n return openedPin ?\r\n <Stack className={classes.container} direction=\"row\">\r\n <ul className={classes.listWrapperDashes}>\r\n {pinnedMessagesMemo.map(({ _id }) =>\r\n <li key={_id} style={{backgroundColor:openedPin._id === _id? \"#00aeff\":\"#addbf0\",\r\n height: `${heightOfDash}%`}}></li>)}\r\n </ul> \r\n <ul className={classes.listWrapper}>\r\n <MenuItem onClick={handleActivePin}>\r\n <ListItemText style={{margin:'0px 10px 0px 20px'}}\r\n primary={`Pinned Message ${openedIndex + 1} of ${pinnedMessagesMemo.length}`}\r\n primaryTypographyProps={{ color: \"#0379af\",fontSize:16 }}\r\n secondary={`Type : ${openedPin.type.toUpperCase()}`}\r\n secondaryTypographyProps={{ fontSize:16 }}/> \r\n {openedPin.type === 'text' &&<ContentCopyIcon className={classes.folderIcon} fontSize='large' />}\r\n {openedPin.type === 'audio' &&<LibraryMusicIcon className={classes.folderIcon} fontSize='large' />}\r\n {openedPin.type === 'video' &&<VideoLibraryIcon className={classes.folderIcon} fontSize='large' />}\r\n {openedPin.type === 'image' &&<ImageIcon className={classes.folderIcon} fontSize='large' />}\r\n {openedPin.type === 'pdf'&&<InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />} \r\n {openedPin.type === 'docx'&&<InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />} \r\n </MenuItem> \r\n </ul>\r\n <IconButton onClick={() => setModal(true)} aria-label=\"delete\" size=\"medium\">\r\n <CloseIcon className={classes.iconClose} fontSize='medium'/>\r\n </IconButton>\r\n <IconButton onClick={handleOpenPinned} aria-label=\"delete\" size=\"medium\">\r\n <MenuOpenIcon fontSize='medium'/>\r\n </IconButton>\r\n {modal &&\r\n <div onClick={handleUnpin} className={classes.overlay} id='overlay'>\r\n <div className={classes.modalUnpin}>\r\n <h3 style={{color: '#2c2c2c'}}>Telegram</h3>\r\n <p style={{ color: '#050505' }}>Would you like to unpin this message?</p>\r\n <Button id='unpin' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n UNPIN\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 </Stack> :\r\n null\r\n}\r\n\r\nexport default PinnedBar","import Toolbar from '@mui/material/Toolbar'\r\nimport AppBar from '@mui/material/AppBar';\r\nimport { makeStyles,Typography } from '@material-ui/core'\r\nimport Button from '@mui/material/Button';\r\nimport { useState } from 'react';\r\nimport { useSelector,useDispatch } from 'react-redux';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\r\nimport Credentials from './Credentials'\r\nimport Buttons from './Buttons'\r\nimport PinnedBar from './PinnedBar';\r\nimport { removeSelectedMessagesById } from '../../../../api-data';\r\nimport { getChatMemo } from '../../../../redux/chat/selector';\r\nimport { actionRightIsOpen,actionOpenPinned } from '../../../../redux/control/action';\r\nimport { TPinnedMessages } from '../../../../typescript/redux/pinnedMessages/types'; \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 toolBarPinned: {\r\n color: '#6e6d6d',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent:'center',\r\n backgroundColor: '#ffffff',\r\n height: '7vh',\r\n cursor:'pointer'\r\n },\r\n pinnedBack: {\r\n display: 'flex',\r\n width:'100%',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n flexWrap: 'nowrap',\r\n }, \r\n credentials: {\r\n background: '#fdfdfd',\r\n width:'100%',\r\n height: '100%',\r\n margin:'0 auto'\r\n }, \r\n toolBarRight: {\r\n display: 'flex',\r\n }, \r\n buttonDelete: {\r\n color: '#f8f8f8',\r\n backgroundColor:'#1d74c5',\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 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 IHeaderBar {\r\n chatDivRef: any | null,\r\n selectedArr: string[] | [],\r\n isSomeSelected: boolean,\r\n setIsSomeSelected: React.Dispatch<React.SetStateAction<boolean>>,\r\n handleClearSelect: () => void,\r\n openPinned: boolean,\r\n pinnedMessagesMemo: TPinnedMessages,\r\n handleStartCall: () => void,\r\n}\r\n\r\nconst HeaderBar = ({chatDivRef,selectedArr,isSomeSelected,setIsSomeSelected,handleClearSelect,openPinned,pinnedMessagesMemo,handleStartCall}:IHeaderBar) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const { companionId } = useSelector(getChatMemo)\r\n const [modal, setModal] = useState<boolean>(false)\r\n const handleClosePinned = (e: any) => {\r\n e.stopPropagation()\r\n dispatch(actionOpenPinned(false))\r\n }\r\n const handleOpenPinned = () => dispatch(actionOpenPinned(true))\r\n const handleOpenCredentials = (e: any) => {\r\n e.stopPropagation()\r\n dispatch(actionRightIsOpen('credentials'))\r\n }\r\n const handleOpenModal = (): void => setModal(true)\r\n const handleDeleteModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay') return setModal(false)\r\n if (id === 'cancel') {\r\n handleClearSelect()\r\n setModal(false)\r\n }\r\n if (id === 'delete') {\r\n removeSelectedMessagesById(companionId,selectedArr)\r\n handleClearSelect()\r\n setModal(false)\r\n }\r\n } \r\n\r\n return (<>\r\n {!isSomeSelected&&openPinned &&pinnedMessagesMemo.length > 0&&\r\n <AppBar position=\"static\">\r\n <Toolbar className={classes.toolBarPinned}>\r\n <div onClick={handleOpenCredentials} className={classes.pinnedBack}>\r\n <IconButton onClick={handleClosePinned}\r\n 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\">\r\n {`${pinnedMessagesMemo.length} pinned messages`}\r\n </Typography>\r\n </div>\r\n <Buttons setIsSomeSelected={setIsSomeSelected} handleStartCall={handleStartCall}/>\r\n </Toolbar>\r\n </AppBar>}\r\n {!openPinned && !isSomeSelected &&\r\n <AppBar position=\"static\">\r\n <Toolbar className={classes.toolBar}>\r\n <Credentials/>\r\n <div className={classes.toolBarRight}>\r\n <PinnedBar chatDivRef={chatDivRef} handleOpenPinned={handleOpenPinned}/>\r\n <Buttons setIsSomeSelected={setIsSomeSelected} handleStartCall={handleStartCall}/>\r\n </div>\r\n </Toolbar>\r\n </AppBar>} \r\n {isSomeSelected &&\r\n <AppBar position=\"static\">\r\n <Toolbar className={classes.toolBar}>\r\n <Button color='primary' onClick={handleOpenModal}\r\n variant=\"contained\" className={classes.buttonDelete}\r\n style={{visibility: selectedArr.length === 0 ? 'hidden' : 'visible',\r\n fontWeight:500}}>\r\n {`DELETE ${selectedArr.length}`}\r\n </Button>\r\n <Button onClick={handleClearSelect} style={{color:'#1d74c5',fontWeight:500}}>\r\n CANCEL\r\n </Button>\r\n </Toolbar>\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 messages</h3>\r\n <p style={{ color: '#050505' }}>Are you sure you want to delete messages?</p>\r\n <Button id='delete' variant=\"text\" color=\"error\" style={{fontWeight:500,fontSize:22}}>\r\n DELETE MESSAGES\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 </AppBar>}\r\n </>\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 openPinned: boolean\r\n}\r\n\r\nconst ArrowBack = ({ isArrow, handleScrollTo, isNew,openPinned }: 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&&!openPinned ? '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 setType: any,\r\n prevType: string | undefined\r\n}\r\n \r\nconst UploadFile = ({children,setFile,setValue,accept,setType,prevType}:IUploadFile) => {\r\n const classes = useStyles()\r\n const onFileDialogCancel = () => setType(prevType)\r\n const { getRootProps, getInputProps, acceptedFiles } = useDropzone({\r\n noDrag: true,accept,onFileDialogCancel});\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 { usePrevious } from '../../../../../../hooks';\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 type: string\r\n}\r\nconst FilesMenu = ({setIsOpenMenu,setFile,setValue,setType,type}:IFilesMenu) => {\r\n const classes = useStyles()\r\n const prevType = usePrevious(type);\r\n const handleClose = (typeFile:string) => {\r\n setIsOpenMenu(false)\r\n setType(typeFile)\r\n }\r\n return (\r\n <MenuList className={classes.list}>\r\n <MenuItem onClick={() => handleClose('content')}>\r\n <UploadFile setFile={setFile} setValue={setValue} setType={setType} prevType={prevType} 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} setType={setType} prevType={prevType} 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 { useRef,useEffect } from 'react';\r\n\r\nconst usePrevious = (typeFile: string): string | undefined => {\r\n const ref = useRef<string | undefined>();\r\n useEffect(() => {\r\n ref.current = typeFile;\r\n });\r\n return ref.current;\r\n};\r\n\r\nexport {\r\n usePrevious\r\n}","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\n\r\nimport { firstLetter,slicedWord } from \"../../../../../../helpers\";\r\nimport { TMessage } from \"../../../../../../typescript/redux/messages/types\";\r\n\r\nconst useStyles = makeStyles({ \r\n replyTop : {\r\n position: 'absolute',\r\n left: 0,\r\n top: '-7vh',\r\n height: '6vh',\r\n width: '100%',\r\n borderRadius: 8,\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n color: '#6b6b6b',\r\n border:'solid 2px rgb(41, 139, 231)',\r\n backgroundColor: '#ffffff',\r\n padding: '0px 5px',\r\n zIndex:2,\r\n },\r\n replyIconClose: {\r\n cursor: 'pointer',\r\n marginLeft: 5,\r\n marginRight: 5,\r\n '&:hover': {\r\n color:'#f02a2a',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n replyListWrapper: {\r\n width: '100%',\r\n },\r\n replyColumn: {\r\n height: '80%',\r\n width: 2,\r\n backgroundColor: 'rgb(41, 139, 231)',\r\n marginRight:10\r\n },\r\n folderIcon: {\r\n color: '#54b0fc',\r\n }, \r\n});\r\n\r\ninterface IReplyBar {\r\n isReply:TMessage,\r\n handleCloseReply: () => void,\r\n handleScrollToTheMessage:(_id:string) => void\r\n}\r\n\r\nconst ReplyBar = ({ isReply, handleCloseReply,handleScrollToTheMessage }: IReplyBar) => {\r\n const classes = useStyles();\r\n \r\n return (\r\n <div className={classes.replyTop}>\r\n <ReplyIcon style={{margin:'0px 7px',color: \"rgb(41, 139, 231)\"}}/>\r\n <div className={classes.replyColumn}></div>\r\n <ul className={classes.replyListWrapper}>\r\n <MenuItem onClick={() => handleScrollToTheMessage(isReply._id)}>\r\n <ListItemText\r\n primary={`${firstLetter(isReply.name)}${slicedWord(isReply.name, 15, 1)} \r\n ${firstLetter(isReply.lastName)}${slicedWord(isReply.lastName, 15, 1)}`}\r\n primaryTypographyProps={{ color: \"rgb(41, 139, 231)\",fontSize:16 }}\r\n secondary={`Type : ${isReply.type.toUpperCase()}`}\r\n secondaryTypographyProps={{ fontSize: 16 }} />\r\n {isReply.type === 'text' &&<ContentCopyIcon className={classes.folderIcon} fontSize='large' />}\r\n {isReply.type === 'audio' &&<LibraryMusicIcon className={classes.folderIcon} fontSize='large' />}\r\n {isReply.type === 'video' &&<VideoLibraryIcon className={classes.folderIcon} fontSize='large' />}\r\n {isReply.type === 'image' &&<ImageIcon className={classes.folderIcon} fontSize='large' />}\r\n {isReply.type === 'pdf'&&<InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />} \r\n {isReply.type === 'docx'&&<InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />}\r\n </MenuItem>\r\n </ul>\r\n <CloseIcon onClick={handleCloseReply} className={classes.replyIconClose} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default ReplyBar","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\n\r\nimport { firstLetter,slicedWord } from \"../../../../../../helpers\";\r\nimport { TMessage } from \"../../../../../../typescript/redux/messages/types\";\r\nimport { asyncGetChatById } from '../../../../../../redux/chat/operations'\r\nimport { actionRightIsOpen, actionOpenPinned } from '../../../../../../redux/control/action'\r\n\r\nconst useStyles = makeStyles({ \r\n forwardTop : {\r\n position: 'absolute',\r\n left: 0,\r\n top: '-7vh',\r\n height: '6vh',\r\n width: '100%',\r\n borderRadius: 8,\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n color: '#6b6b6b',\r\n border:'solid 2px rgb(41, 139, 231)',\r\n backgroundColor: '#ffffff',\r\n padding: '0px 5px',\r\n zIndex:2,\r\n },\r\n forwardIconClose: {\r\n cursor: 'pointer',\r\n marginLeft: 5,\r\n marginRight: 5,\r\n '&:hover': {\r\n color:'#f02a2a',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n forwardListWrapper: {\r\n width: '100%',\r\n },\r\n forwardColumn: {\r\n height: '80%',\r\n width: 2,\r\n backgroundColor: 'rgb(41, 139, 231)',\r\n marginRight:10\r\n },\r\n folderIcon: {\r\n color: '#54b0fc',\r\n }, \r\n});\r\n\r\ninterface IForwardBar {\r\n companionId: string,\r\n isForward:TMessage,\r\n handleCloseForward: () => void,\r\n handleScrollToTheMessage: (_id: string) => void,\r\n setIsForward: React.Dispatch<React.SetStateAction<TMessage | undefined>>,\r\n}\r\n\r\nconst ForwardBar = ({ companionId,isForward, handleCloseForward,handleScrollToTheMessage,setIsForward }: IForwardBar) => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch()\r\n \r\n const handleScrollHereOrBack = () => {\r\n if (companionId === isForward.companionId) return handleScrollToTheMessage(isForward._id)\r\n setIsForward(undefined)\r\n dispatch(actionRightIsOpen(''))\r\n dispatch(actionOpenPinned(false))\r\n dispatch(asyncGetChatById(isForward.companionId))\r\n setTimeout(() => handleScrollToTheMessage(isForward._id), 2000)\r\n }\r\n \r\n return (\r\n <div className={classes.forwardTop}>\r\n <ReplyIcon style={{margin:'0px 7px',color: \"rgb(41, 139, 231)\",transform :'rotateY(180deg)'}} />\r\n <div className={classes.forwardColumn}></div>\r\n <ul className={classes.forwardListWrapper}>\r\n <MenuItem onClick={handleScrollHereOrBack}>\r\n <ListItemText\r\n primary={`${firstLetter(isForward.name)}${slicedWord(isForward.name, 15, 1)} \r\n ${firstLetter(isForward.lastName)}${slicedWord(isForward.lastName, 15, 1)}`}\r\n primaryTypographyProps={{ color: \"rgb(41, 139, 231)\",fontSize:16 }}\r\n secondary={`Type : ${isForward.type.toUpperCase()}`}\r\n secondaryTypographyProps={{ fontSize:16 }}/> \r\n {isForward.type === 'text' &&<ContentCopyIcon className={classes.folderIcon} fontSize='large' />}\r\n {isForward.type === 'audio' &&<LibraryMusicIcon className={classes.folderIcon} fontSize='large' />}\r\n {isForward.type === 'video' &&<VideoLibraryIcon className={classes.folderIcon} fontSize='large' />}\r\n {isForward.type === 'image' &&<ImageIcon className={classes.folderIcon} fontSize='large' />}\r\n {isForward.type === 'pdf'&&<InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />} \r\n {isForward.type === 'docx'&&<InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />} \r\n </MenuItem>\r\n </ul>\r\n <CloseIcon onClick={handleCloseForward} className={classes.forwardIconClose} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default ForwardBar","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport ListItemText from '@mui/material/ListItemText';\r\n\r\nimport { TMessage } from \"../../../../../../typescript/redux/messages/types\";\r\n\r\nconst useStyles = makeStyles({ \r\n editTop : {\r\n position: 'absolute',\r\n left: 0,\r\n top: '-7vh',\r\n height: '6vh',\r\n width: '100%',\r\n borderRadius: 8,\r\n display: 'flex',\r\n flexWrap: 'nowrap',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n color: '#6b6b6b',\r\n border:'solid 2px rgb(41, 139, 231)',\r\n backgroundColor: '#ffffff',\r\n padding: '0px 5px',\r\n zIndex:2,\r\n },\r\n editListWrapper: {\r\n width: '100%',\r\n wordBreak: 'break-word',\r\n overflowY: \"auto\",\r\n height: '6vh',\r\n }, \r\n editIconClose: {\r\n cursor: 'pointer',\r\n marginLeft: 5,\r\n marginRight: 5,\r\n '&:hover': {\r\n color:'#f02a2a',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n editColumn: {\r\n height: '80%',\r\n width: 2,\r\n backgroundColor: 'rgb(41, 139, 231)',\r\n marginRight:10\r\n }, \r\n});\r\n\r\ninterface IEditBar {\r\n isEdit:TMessage,\r\n handleCloseEdit: () => void,\r\n handleScrollToTheMessage:(_id:string) => void\r\n}\r\n\r\nconst EditBar = ({ isEdit, handleCloseEdit,handleScrollToTheMessage }: IEditBar) => {\r\n const classes = useStyles();\r\n \r\n return (\r\n <div className={classes.editTop}>\r\n <EditIcon style={{margin:'0px 7px',color: \"rgb(41, 139, 231)\"}}/>\r\n <div className={classes.editColumn}></div>\r\n <ul className={classes.editListWrapper}>\r\n <li onClick={() => handleScrollToTheMessage(isEdit._id)}>\r\n <ListItemText\r\n primary={`Edit ${isEdit.type === 'text'?'Message and Caption':'only Caption'}`}\r\n primaryTypographyProps={{ color: \"rgb(41, 139, 231)\",fontSize:16 }}\r\n secondary={isEdit.type === 'text' ? `Message: ${isEdit.message} , Caption: ${isEdit.caption}`:`Caption: ${isEdit.caption}`}\r\n secondaryTypographyProps={{ fontSize: 16}} />\r\n </li>\r\n </ul>\r\n <CloseIcon onClick={handleCloseEdit} className={classes.editIconClose} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default EditBar","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 PauseIcon from '@mui/icons-material/Pause';\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 PhotoCameraFrontIcon from '@mui/icons-material/PhotoCameraFront';\r\nimport CommentIcon from '@mui/icons-material/Comment';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport Webcam from \"react-webcam\";\r\nimport CameraIcon from '@mui/icons-material/Camera';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Picker from 'emoji-picker-react';\r\nimport InputAdornment from '@mui/material/InputAdornment';\r\n\r\nimport { useReactMediaRecorder } from \"react-media-recorder\";\r\nimport { useState,useEffect,useCallback } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\n\r\nimport FilesMenu from \"./FilesMenu\";\r\nimport ReplyBar from './ReplyBar'\r\nimport ForwardBar from \"./ForwardBar\";\r\nimport EditBar from \"./EditBar\";\r\nimport {\r\n sentMessageById, sentImgMessageById, sentAudioMessageById,\r\n sentVideoMessageById, sentFileMessageById, sentMessageEditById,\r\n sentMessageReplyById, sentMessageForwardById\r\n} from '../../../../../api-data'\r\nimport { getChat } from '../../../../../redux/chat/selector'\r\nimport { getRightIsOpen } from '../../../../../redux/control/selector'\r\nimport { playNotification,prodBaseURL } from \"../../../../../helpers\";\r\nimport { typingChat } from \"../../../../../api-data\";\r\nimport { TMessage } from \"../../../../../typescript/redux/messages/types\";\r\n\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 border:'solid 2px #ffffff',\r\n backgroundColor: '#ffffff', \r\n },\r\n containerActive: {\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 border:'solid 2px rgb(41, 139, 231)',\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: 'inherit',\r\n fontWeight: 600,\r\n fontSize:20\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: -21,\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:'9vh',\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 zIndex: 10,\r\n visibility: 'visible',\r\n },\r\n captionTextField: {\r\n zIndex: 10,\r\n visibility: 'visible', \r\n width: '35vw',\r\n backgroundColor: '#ffffff',\r\n borderRadius: 4,\r\n height: '6vh',\r\n overflowY: 'auto',\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 pauseLeft: {\r\n position: 'absolute',\r\n left: -72,\r\n bottom:-1,\r\n zIndex: 10, \r\n },\r\n pauseRight: {\r\n position: 'absolute',\r\n right: -72,\r\n bottom:-1,\r\n zIndex: 10, \r\n }, \r\n avatarPause: {\r\n backgroundColor: '#ffffff',\r\n cursor: 'pointer',\r\n animation: `$shake 1s`,\r\n animationIterationCount:'infinite',\r\n '&:hover': {\r\n backgroundColor: '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: -25,\r\n top: -25,\r\n zIndex: 10,\r\n }, \r\n ringContainerRight: {\r\n position: 'absolute',\r\n right: -25,\r\n top: -25,\r\n zIndex: 10,\r\n },\r\n circle: {\r\n width: 15,\r\n height: 15,\r\n backgroundColor: 'rgb(255, 4, 4)',\r\n borderRadius: '50%',\r\n position: 'relative'\r\n },\r\n ringRing: {\r\n border: '3px solid rgb(255, 4, 4)',\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 '@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 overlayCamera: {\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 display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n flexDirection:'column'\r\n },\r\n capturedPicture: {\r\n borderRadius: 10,\r\n border:'solid 2px rgb(62, 149, 231)'\r\n }, \r\n capturePhoto: {\r\n color: '#ffffff',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#48ff00',\r\n animation: `$rotating 2s linear infinite`\r\n },\r\n }, \r\n '@keyframes rotating': {\r\n\t 'from': { transform: 'rotate(0deg)'},\r\n\t 'to': { transform: 'rotate(360deg)'},\r\n }, \r\n});\r\n\r\ninterface ISendMessage{\r\n isArrow: boolean,\r\n silentMode: boolean,\r\n isReply:TMessage | undefined,\r\n setIsReply: React.Dispatch<React.SetStateAction<TMessage | undefined>>,\r\n isForward: TMessage | undefined,\r\n setIsForward: React.Dispatch<React.SetStateAction<TMessage | undefined>>,\r\n isEdit: TMessage | undefined, \r\n setIsEdit: React.Dispatch<React.SetStateAction<TMessage | undefined>>,\r\n modalForward: boolean,\r\n handleScrollToTheMessage: (_id: string) => void,\r\n}\r\n\r\nconst SendMessage = ({isArrow,silentMode,isReply,setIsReply,isForward,setIsForward,isEdit,setIsEdit,modalForward,handleScrollToTheMessage }:ISendMessage) => {\r\n const classes = useStyles();\r\n const { companionId } = useSelector(getChat)\r\n const rightIsOpen = useSelector(getRightIsOpen)\r\n const [value, setValue] = useState<string>('')\r\n const [file, setFile] = useState<any>(false)\r\n const [caption, setCaption] = useState<string>('')\r\n const [isOpenCaption, setIsOpenCaption] = useState<boolean>(false)\r\n const [isOpenMenu, setIsOpenMenu] = useState<boolean>(false)\r\n const [isOpenEmoji, setIsOpenEmoji] = useState<boolean>(false)\r\n const [isOpenCaptionEmoji, setIsOpenCaptionEmoji] = useState<boolean>(false)\r\n const [isRecording, setIsRecording] = useState<boolean>(false)\r\n const [isFilming, setIsFilming] = useState<boolean>(false)\r\n const [isOpenCamera, setIsOpenCamera] = useState<boolean>(false)\r\n const [type, setType] = useState<string>('')\r\n const [status, setStatus] = useState<string | null>(null)\r\n const [_status, _setStatus] = useState<string | null>(null)\r\n const { startRecording, stopRecording, mediaBlobUrl, clearBlobUrl, } = useReactMediaRecorder({ audio: true,blobPropertyBag:{type: \"audio/mp3\"}});\r\n const { startRecording: _startRecording, stopRecording: _stopRecording,\r\n mediaBlobUrl: _mediaBlobUrl, clearBlobUrl: _clearBlobUrl } = useReactMediaRecorder({ video: true, blobPropertyBag: { type: \"video/mp4\" } });\r\n const videoConstraints = {\r\n width: 1280,\r\n height: 720,\r\n facingMode: \"user\"\r\n };\r\n const onEmojiClick = (_e: any, emojiObject: any, flag: string) => {\r\n if (flag === 'input') {\r\n setValue(prevValue => prevValue + emojiObject.emoji)\r\n setIsOpenEmoji(false)\r\n }\r\n if (flag ==='caption') {\r\n setCaption(prevValue => prevValue + emojiObject.emoji)\r\n setIsOpenCaptionEmoji(false)\r\n } \r\n }; \r\n const clearMessage = () => {\r\n setFile(false)\r\n setIsRecording(false)\r\n setIsFilming(false)\r\n setValue('')\r\n setCaption('')\r\n setType('')\r\n clearBlobUrl()\r\n _clearBlobUrl()\r\n setIsOpenMenu(false)\r\n setIsOpenEmoji(false)\r\n setIsOpenCaption(false)\r\n setIsOpenCaptionEmoji(false)\r\n setStatus(null)\r\n _setStatus(null)\r\n }\r\n\r\n const sentMessage = async () => {\r\n if (value && !isReply && !isForward && !isEdit) sentMessageById(companionId, value, caption.trim())\r\n if (value && isReply && !isForward && !isEdit) {\r\n sentMessageReplyById(isReply._id, value, caption.trim())\r\n setIsReply(undefined)\r\n }\r\n if (value&&isForward && !isEdit && !isReply) {\r\n sentMessageForwardById(isForward._id,isForward.companionIdForwardToAndFrom,value,caption.trim())\r\n setIsForward(undefined)\r\n } \r\n if (isEdit && !isForward && !isReply) {\r\n sentMessageEditById(isEdit._id, value, caption.trim())\r\n setIsEdit(undefined)\r\n } \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,caption.trim())\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,caption.trim())\r\n _clearBlobUrl()\r\n }\r\n }\r\n video.send();\r\n } \r\n if (file && type && type !== 'base64') { \r\n if (file.type.includes('image') && type === 'content') {\r\n const formData: any = new FormData()\r\n formData.append(\"image\", file);\r\n sentImgMessageById(companionId, formData, caption.trim())\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,caption.trim())\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,caption.trim()) \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,caption.trim()) \r\n } \r\n }\r\n if (typeof file === 'string' && type === 'base64') {\r\n fetch(file).then(res => res.blob()).then(blob => {\r\n const imgFile = new File([blob], \"selfie\", { type: \"image/jpeg\" })\r\n const formData: any = new FormData()\r\n formData.append(\"image\", imgFile);\r\n sentImgMessageById(companionId, formData, caption.trim())\r\n })\r\n } \r\n clearMessage()\r\n !silentMode&&playNotification(`${prodBaseURL}/send.mp3`)\r\n } \r\n const handleTextarea = (e: React.ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)\r\n const handleTextareaCaption = (e: React.ChangeEvent<HTMLTextAreaElement>) => setCaption(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 handleOpenCaptionEmoji = () => !isOpenEmoji && setIsOpenCaptionEmoji(true)\r\n const handleOpenCaption = () => !isOpenCaption && setIsOpenCaption(true)\r\n const handleCloseCaption = (e: any) => {\r\n if (e.target.id === 'overlay') {\r\n if(isOpenCaptionEmoji) return setIsOpenCaptionEmoji(false)\r\n isOpenCaption && setIsOpenCaption(false)\r\n }\r\n } \r\n const handleRecording = () => {\r\n if (isRecording) {\r\n setStatus('stopped')\r\n stopRecording()\r\n return \r\n }\r\n startRecording()\r\n setStatus('recording')\r\n setType('recording')\r\n setIsRecording(true) \r\n }\r\n const handleFilming = () => {\r\n if (isFilming) {\r\n _setStatus('stopped')\r\n _stopRecording()\r\n return \r\n }\r\n _startRecording()\r\n _setStatus('recording')\r\n setType('filming')\r\n setIsFilming(true) \r\n }\r\n const handleOpenCamera = () => setIsOpenCamera(true)\r\n\r\n const handleCloseCamera = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay') setIsOpenCamera(false)\r\n }\r\n \r\n const handleCaptureAvatar = (getScreenshot:() => string| null) => {\r\n setFile(getScreenshot())\r\n setType('base64')\r\n !silentMode&&playNotification(`${prodBaseURL}/cameraCapture.mp3`)\r\n }\r\n\r\n const handleCloseReply = () => {\r\n setIsReply(undefined)\r\n clearMessage()\r\n }\r\n\r\n const handleCloseForward= () => {\r\n setIsForward(undefined)\r\n clearMessage()\r\n }\r\n \r\n const handleCloseEdit = () => {\r\n setIsEdit(undefined)\r\n clearMessage()\r\n } \r\n\r\n const defaultState = useCallback(() => {\r\n stopRecording()\r\n _stopRecording()\r\n clearBlobUrl()\r\n _clearBlobUrl()\r\n setStatus(null)\r\n _setStatus(null)\r\n setIsRecording(false)\r\n setIsFilming(false) \r\n setFile(false)\r\n setValue('')\r\n setCaption('')\r\n setType('')\r\n setIsOpenMenu(false)\r\n setIsOpenEmoji(false)\r\n setIsOpenCaption(false)\r\n setIsOpenCaptionEmoji(false)\r\n },[_clearBlobUrl,clearBlobUrl,_stopRecording,stopRecording])\r\n\r\n useEffect(() => {\r\n defaultState()\r\n }, [isReply, isForward,isEdit, companionId])\r\n \r\n useEffect(() => {\r\n setIsReply(undefined)\r\n setIsEdit(undefined)\r\n }, [companionId, setIsReply,setIsEdit])\r\n\r\n useEffect(() => {\r\n if (isEdit) {\r\n isEdit.type ==='text'&&setValue(isEdit.message?isEdit.message:'')\r\n setCaption(isEdit.caption?isEdit.caption:'')\r\n }\r\n }, [isEdit, companionId]) \r\n \r\n useEffect(() => {\r\n const companionIdForwardToAndFrom = isForward?.companionIdForwardToAndFrom\r\n if(companionIdForwardToAndFrom&&companionIdForwardToAndFrom !== companionId) setIsForward(undefined)\r\n }, [companionId])\r\n \r\n return (\r\n <div className={(value&&isEdit&&isEdit.type === 'text') || (isEdit&&isEdit.type !== 'text') || (value&&!isEdit) || file || status === 'stopped' || _status === 'stopped' ?classes.containerActive:classes.container}>\r\n {isArrow && <div className={classes.borderTop}></div>}\r\n {isReply && <ReplyBar isReply={isReply} handleCloseReply={handleCloseReply}\r\n handleScrollToTheMessage={handleScrollToTheMessage} />}\r\n {isEdit && <EditBar isEdit={isEdit} handleCloseEdit={handleCloseEdit}\r\n handleScrollToTheMessage={handleScrollToTheMessage} />} \r\n {isForward && !modalForward && <ForwardBar companionId={companionId} \r\n isForward={isForward} handleCloseForward={handleCloseForward}\r\n handleScrollToTheMessage={handleScrollToTheMessage} setIsForward={setIsForward}/>}\r\n {isFilming && _status !== 'stopped' && \r\n <>\r\n <div className={classes.pauseLeft}>\r\n <Avatar onClick={handleFilming } className={classes.avatarPause}\r\n sx={{backgroundColor: '#ffffff',color:'#6b6b6b',width: 56, height: 56}}>\r\n <PauseIcon fontSize=\"large\"/> \r\n </Avatar> \r\n </div>\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 </>} \r\n {isRecording && status !== 'stopped' && \r\n <> \r\n <div className={classes.pauseRight}>\r\n <Avatar onClick={handleRecording} className={classes.avatarPause}\r\n sx={{backgroundColor: '#ffffff',color:'#6b6b6b',width: 56, height: 56}}>\r\n <PauseIcon fontSize=\"large\"/> \r\n </Avatar> \r\n </div> \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 </>} \r\n <CloseIcon onClick={clearMessage} fontSize=\"small\" className={classes.iconCancel}\r\n sx={{width: 56, height: 56, display: file || (value&&!isReply&&!isForward&&!isEdit) || (status === 'stopped'&&type)\r\n || (_status === 'stopped'&&type) ? 'inline-block' : 'none'}} />\r\n <VideocamIcon onClick={handleFilming} className={classes.avatarCamera}\r\n sx={{backgroundColor: '#ffffff', color: '#6b6b6b', width: 56, height: 56}}\r\n style={{ display: status !== null || _status === 'stopped' || file || value || isFilming || isReply || isForward || isEdit? 'none' : 'block' }} /> \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&&isEdit&&isEdit.type === 'text') || (isEdit&&isEdit.type !== 'text') || (value&&!isEdit) || file || status === 'stopped' || _status === 'stopped'? 'block':'none' }}/>\r\n <MicNoneIcon onClick={handleRecording} className={classes.avatarRight} \r\n sx={{backgroundColor:'#ffffff',color: '#6b6b6b', width: 56, height: 56}}\r\n style={{display: !value && !file && status !== 'stopped' && _status === null&&!isRecording && !isReply && !isForward && !isEdit ? 'block' : '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 || _status || (isEdit&&isEdit.type !== 'text') ? 'none' : \"auto\",\r\n '&:hover': { color: 'rgb(41, 139, 231)' }, marginRight:1}}/>\r\n <CommentIcon onClick={handleOpenCaption} \r\n fontSize='medium' sx={{color: isOpenCaption || caption ? 'rgb(41, 139, 231)' : '#6b6b6b', cursor: 'pointer',\r\n pointerEvents: value || file || status === 'stopped' || _status === 'stopped' || (isEdit&&isEdit.type !== 'text')? 'auto' : \"none\",\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: rightIsOpen?'32.5vw':'45vw',bottom:'9vh'}}>\r\n <Picker onEmojiClick={(e,obj) => onEmojiClick(e,obj,'input')} />\r\n </div> \r\n </div>\r\n <div onClick={handleCloseCaption} className={classes.overlay} id='overlay'\r\n style={{ display: isOpenCaption ? 'block' : 'none' }}>\r\n {isOpenCaptionEmoji && <div className={classes.emoji}\r\n style={{ left: rightIsOpen ? '32.5vw' : '45vw',bottom:isReply || isForward || isEdit?'23vh':'16vh' }}>\r\n <Picker onEmojiClick={(e,obj) => onEmojiClick(e,obj,'caption')} />\r\n </div>} \r\n <TextField multiline className={classes.captionTextField} onChange={handleTextareaCaption}\r\n style={{left: rightIsOpen ? '32.5vw' : '45vw', top: isReply || isForward || isEdit?'78.5vh':'85vh' }}\r\n placeholder='Caption' value={caption} id=\"caption\" name='caption' variant='outlined'\r\n InputProps={{\r\n startAdornment: (<InputAdornment position=\"start\" sx={{marginRight:4}}>\r\n <SentimentSatisfiedAltIcon onClick={handleOpenCaptionEmoji}\r\n sx={{color: isOpenCaptionEmoji ? 'rgb(41, 139, 231)' : '#6b6b6b', cursor: 'pointer',\r\n '&:hover': { color: 'rgb(41, 139, 231)' },position:'fixed',top: isReply || isForward || isEdit?'80vh':'86.5vh'}} />\r\n </InputAdornment>\r\n ),}}/>\r\n </div>\r\n <textarea disabled={file || type === 'recording' || type === 'filming' || (isEdit&&isEdit.type !== 'text')? 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 === null && _status === null ? 'Message' :\r\n `${status === 'stopped' || _status === 'stopped' ? type === 'recording' || type === 'filming'?'Recorded':'Message':'Recording in progress...'}`} rows={1}\r\n style={{color:value || file || type === 'recording' || type === 'filming' ?'rgb(41, 139, 231)':'#6b6b6b'}}>\r\n </textarea>\r\n <PhotoCameraFrontIcon onClick={handleOpenCamera} fontSize='medium'\r\n sx={{color: isOpenCamera || type === 'base64' ? 'rgb(62, 149, 231)' : '#6b6b6b', marginRight: 1, cursor: 'pointer',\r\n pointerEvents: type === 'content' || type === 'application' || value || status !== null\r\n || _status !== null || isReply || isForward || isEdit ? 'none' : \"auto\",\r\n '&:hover': { color: 'rgb(41, 139, 231)'}}}/>\r\n <AttachFileIcon onClick={handleOpenFileMenu} className={classes.attachIcon}\r\n fontSize='medium' sx={{color: isOpenMenu || type === 'content' || type === 'application' ? 'rgb(41, 139, 231)' : '#6b6b6b', cursor: 'pointer',\r\n pointerEvents: type === 'base64' || value || status !== null || _status !== null || isReply || isForward || isEdit? 'none' : \"auto\", '&:hover':\r\n { 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: rightIsOpen?'52.5vw':'65vw'}}>\r\n <FilesMenu setFile={setFile} setValue={setValue} setIsOpenMenu={setIsOpenMenu} setType={setType} type={type}/>\r\n </div>\r\n </div>\r\n {isOpenCamera &&\r\n <div onClick={handleCloseCamera} id='overlay' className={classes.overlayCamera}>\r\n <Webcam audio={false} screenshotFormat=\"image/jpeg\" width='40%'\r\n videoConstraints={videoConstraints} style={{marginBottom:30}}>\r\n {({ getScreenshot }) => <>\r\n <CameraIcon onClick={() => handleCaptureAvatar(getScreenshot)}\r\n className={classes.capturePhoto} fontSize='large' style={{marginBottom:30}} />\r\n <img className={classes.capturedPicture} width='300' height='174'\r\n style={{visibility:file?'visible':'hidden'}} src={file} alt='chosen pic'></img>\r\n </>}\r\n </Webcam>\r\n </div>}\r\n </div> \r\n )\r\n}\r\n\r\nexport default SendMessage","import { makeStyles } from '@material-ui/core'\r\nimport { TPinnedMessages } from '../../../../../typescript/redux/pinnedMessages/types' \r\n\r\nconst useStyles = makeStyles({\r\n unpinBar: { \r\n backgroundColor: '#ffffff',\r\n color:'#2b97fd',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width: '100%',\r\n height: '7vh',\r\n position: 'fixed',\r\n cursor:'pointer',\r\n bottom: '0vh',\r\n fontSize:18,\r\n '&:hover': {\r\n color: '#0084ff',\r\n }\r\n }, \r\n})\r\n\r\ninterface IUnpinBar {\r\n pinnedMessagesMemo: TPinnedMessages,\r\n handleUnpinAll: () => void,\r\n}\r\n\r\nconst UnpinBar = ({pinnedMessagesMemo,handleUnpinAll}:IUnpinBar) => {\r\n const classes = useStyles() \r\n\r\n return (\r\n <div onClick={handleUnpinAll} className={classes.unpinBar}>\r\n {`UNPIN ALL ${pinnedMessagesMemo.length} MESSAGES`}\r\n </div>\r\n )\r\n}\r\n\r\nexport default UnpinBar\r\n\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { firstLetter,slicedWord,timeStampMessage,copied,emojisArr,prodAwsS3 } 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 alignItems: 'flex-start',\r\n alignContent: 'flex-start',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 0px 4px 22px'\r\n }, \r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:200,\r\n padding: 5,\r\n borderRadius: 7,\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n },\r\n wrapperInner: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n width: '100%',\r\n cursor: 'pointer',\r\n padding:'0px 10px',\r\n '&:hover': {\r\n backgroundColor: 'rgba(104, 105, 104, 0.2)'\r\n }\r\n },\r\n deletedInformation: {\r\n display: 'flex',\r\n justifyContent:'start',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n }, \r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n color: '#414141',\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n right: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n right: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n left: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n folderIcon: {\r\n color: '#535353',\r\n marginRight:5\r\n },\r\n column: {\r\n position: 'absolute',\r\n content: '',\r\n width: 2,\r\n left:0,\r\n top:'10%',\r\n height:'80%',\r\n backgroundColor: '#535353',\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n left: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\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\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageLeftDeleted {\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n companionIdForwardToAndFrom: string,\r\n avatarUrl: string,\r\n color: string,\r\n message: string,\r\n name: string,\r\n lastName: string,\r\n forwardReplyName:string,\r\n forwardReplyLastName: string,\r\n caption: string,\r\n createdAt: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit: (_id: string) => void,\r\n handleOpenTheChat: (companionIdForwardToAndFrom:string | null) => void,\r\n}\r\n\r\nconst MessageLeftDeleted = ({tongue,watched,edited,companionIdForwardToAndFrom,avatarUrl,color,message,name,lastName,forwardReplyName,forwardReplyLastName,caption,createdAt,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,handleEdit,handleOpenTheChat}:IMessageLeftDeleted) => {\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 checked = isSelected(_id)\r\n \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n }\r\n\r\n \r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#babdbc':'#ffffff',pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#00b333\"}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.wrapperInner} onClick={() => handleOpenTheChat(companionIdForwardToAndFrom)}>\r\n <div className={classes.column}></div>\r\n <Typography style={{color: \"#535353\"}} variant=\"h6\" align=\"right\">\r\n {`${companionIdForwardToAndFrom?'Forwarded from':'Replied to'} ${firstLetter(forwardReplyName)}${slicedWord(forwardReplyName, 15, 1)}\r\n ${firstLetter(forwardReplyLastName)}${slicedWord(forwardReplyLastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.deletedInformation}>\r\n <DeleteOutlineIcon className={classes.folderIcon} fontSize='large' />\r\n <Typography style={{color: \"#535353\"}} variant=\"h6\" align=\"right\">\r\n The Message was Deleted\r\n </Typography>\r\n </div>\r\n </div>\r\n <ListItemText primary={message} primaryTypographyProps={{ color: \"#000000\" }} />\r\n <ListItemText secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched&&<VisibilityIcon style={{ color: '#959595', marginLeft: 5 }} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={`${message} ${caption}`}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem> \r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 MessageLeftDeleted\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { firstLetter,slicedWord,timeStampMessage,copied,emojisArr,prodAwsS3 } 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 alignItems: 'flex-start',\r\n alignContent: 'flex-start',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 0px 4px 22px'\r\n }, \r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:200,\r\n padding: 5,\r\n borderRadius: 7,\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n },\r\n wrapperInner: {\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n }, \r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n color: '#414141',\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n right: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n right: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n left: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n left: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\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\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageLeftText {\r\n message: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n name:string,\r\n lastName:string,\r\n createdAt: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void,\r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n}\r\n\r\nconst MessageLeftText = ({message,tongue,watched,edited,avatarUrl,color,name,lastName,createdAt,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward}: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 const checked = isSelected(_id)\r\n \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n \r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#babdbc':\"#ffffff\",pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#00b333\"}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.wrapperInner}>\r\n <ListItemText primary={message} primaryTypographyProps={{ color: \"#000000\" }} />\r\n <ListItemText secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n </div>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched&&<VisibilityIcon style={{ color: '#959595', marginLeft: 5 }} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={`${message?message:''} ${caption?caption:''}`}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem> \r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 Typography from '@mui/material/Typography';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport Button from '@mui/material/Button';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { firstLetter,slicedWord,timeStampMessage,copied,emojisArr,handleDownload,prodAwsS3 } 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 alignItems: 'flex-start',\r\n alignContent: 'flex-start',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 0px 4px 22px'\r\n }, \r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:200,\r\n padding: 5,\r\n borderRadius: 7,\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n },\r\n wrapperInner: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n width: '100%',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: 'rgba(104, 105, 104, 0.2)'\r\n }\r\n },\r\n wrapperInnerMessage: {\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n marginLeft:20,\r\n },\r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n color: '#414141',\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 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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n right: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n right: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 folderIcon: {\r\n color: '#26afee',\r\n },\r\n replyListItem: {\r\n display: 'flex',\r\n width: '100%',\r\n flexWrap: 'nowrap',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n },\r\n checkboxSelect: {\r\n position: 'absolute',\r\n left: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n column: {\r\n position: 'absolute',\r\n content: '',\r\n width: 2,\r\n left:43,\r\n top:'10%',\r\n height:'80%',\r\n backgroundColor: '#26afee',\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n left: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\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\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageLeftReply {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n replyMessage: string,\r\n message: string,\r\n name: string,\r\n lastName: string, \r\n replyName:string,\r\n replyLastName: string,\r\n replyCaption: string,\r\n createdAt: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n fullType: string,\r\n handleScrollToTheMessage: (_id: string) => void,\r\n oldId: string\r\n}\r\n\r\nconst MessageLeftReply = ({url,tongue,watched,edited,avatarUrl,color,replyMessage,message,name,lastName,replyName,replyLastName,replyCaption,createdAt,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,fullType,handleScrollToTheMessage,oldId}:IMessageLeftReply) => {\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 checked = isSelected(_id)\r\n \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n }\r\n \r\n const handleClickIcon = () => handleDownload(url, fullType) \r\n \r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#babdbc':'#ffffff',pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#00b333\"}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.wrapperInner}>\r\n {fullType === null &&<ContentCopyIcon className={classes.folderIcon} fontSize='large'/>}\r\n {fullType&&fullType.includes('audio') &&<LibraryMusicIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType&&fullType.includes('video') &&<VideoLibraryIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType&&fullType.includes('image') &&<ImageIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType && fullType.includes('application') && <InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />}\r\n <div className={classes.column}></div>\r\n <div className={classes.wrapperInnerMessage} onClick={() => handleScrollToTheMessage(oldId)}>\r\n <Typography style={{color: \"#26afee\"}} variant=\"h6\" align=\"right\">\r\n {`Replied to ${firstLetter(replyName)}${slicedWord(replyName, 15, 1)}\r\n ${firstLetter(replyLastName)}${slicedWord(replyLastName, 15, 1)}`}\r\n </Typography>\r\n <ListItemText primary={fullType === null?replyMessage:fullType} primaryTypographyProps={{ color: \"#535353\" }} />\r\n <ListItemText secondary={replyCaption} secondaryTypographyProps={{color: \"#535353\"}}/>\r\n </div>\r\n </div> \r\n <ListItemText primary={message} primaryTypographyProps={{ color: \"#000000\" }} />\r\n <ListItemText secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched&&<VisibilityIcon style={{ color: '#959595', marginLeft: 5 }} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem>\r\n {fullType&&<MenuItem onClick={handleClickIcon}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem>} \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={`${replyMessage&&fullType === null ? replyMessage : fullType} ${replyCaption ? replyCaption : ''} ${message ? message : ''} ${caption ? caption : ''}`}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem> \r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 MessageLeftReply\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport Typography from '@mui/material/Typography';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport Button from '@mui/material/Button';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { firstLetter,slicedWord,timeStampMessage,copied,emojisArr,handleDownload,prodAwsS3 } 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 alignItems: 'flex-start',\r\n alignContent: 'flex-start',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 0px 4px 22px'\r\n }, \r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:200,\r\n padding: 5,\r\n borderRadius: 7,\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n },\r\n wrapperInner: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n width: '100%',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: 'rgba(104, 105, 104, 0.2)'\r\n }\r\n },\r\n wrapperInnerMessage: {\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n marginLeft:20,\r\n }, \r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n color: '#414141',\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n right: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n right: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n left: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n folderIcon: {\r\n color: '#26afee',\r\n },\r\n column: {\r\n position: 'absolute',\r\n content: '',\r\n width: 2,\r\n left:43,\r\n top:'10%',\r\n height:'80%',\r\n backgroundColor: '#26afee',\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n left: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\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\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageLeftForward {\r\n url: string,\r\n companionIdForwardToAndFrom: string,\r\n oldId: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n message: string,\r\n name: string,\r\n lastName: string,\r\n forwardName:string,\r\n forwardLastName: string,\r\n forwardMessage: string,\r\n forwardCaption: string,\r\n createdAt: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleScrollToTheChat: (companionIdForwardToAndFrom:string,oldId:string) => void,\r\n fullType: string\r\n}\r\n\r\nconst MessageLeftForward = ({url,companionIdForwardToAndFrom,oldId,tongue,watched,edited,avatarUrl,color,message,name,lastName,forwardName,forwardLastName,forwardMessage,forwardCaption,createdAt,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,handleScrollToTheChat,fullType}:IMessageLeftForward) => {\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 checked = isSelected(_id)\r\n \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n }\r\n\r\n const handleClickIcon = () => handleDownload(url, fullType) \r\n \r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#babdbc':'#ffffff',pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#00b333\"}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.wrapperInner}>\r\n {fullType === null &&<ContentCopyIcon className={classes.folderIcon} fontSize='large'/>}\r\n {fullType&&fullType.includes('audio') &&<LibraryMusicIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType&&fullType.includes('video') &&<VideoLibraryIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType&&fullType.includes('image') &&<ImageIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType && fullType.includes('application') && <InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />}\r\n <div className={classes.column}></div>\r\n <div className={classes.wrapperInnerMessage} onClick={() => handleScrollToTheChat(companionIdForwardToAndFrom,oldId)}>\r\n <Typography style={{color: \"#26afee\"}} variant=\"h6\" align=\"right\">\r\n {`Forwarded from ${firstLetter(forwardName)}${slicedWord(forwardName, 15, 1)}\r\n ${firstLetter(forwardLastName)}${slicedWord(forwardLastName, 15, 1)}`}\r\n </Typography>\r\n <ListItemText primary={fullType === null?forwardMessage:fullType} primaryTypographyProps={{ color: \"#535353\" }} />\r\n <ListItemText secondary={forwardCaption} secondaryTypographyProps={{color: \"#535353\"}}/>\r\n </div>\r\n </div>\r\n <ListItemText primary={message} primaryTypographyProps={{ color: \"#000000\" }} />\r\n <ListItemText secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched&&<VisibilityIcon style={{ color: '#959595', marginLeft: 5 }} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n {fullType&&<MenuItem onClick={handleClickIcon}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem>} \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={`${forwardMessage&&fullType === null ? forwardMessage : fullType} ${forwardCaption ? forwardCaption : ''} ${message ? message : ''} ${caption ? caption : ''}`}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem> \r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 MessageLeftForward\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState, useRef } from \"react\";\r\nimport Typography from '@mui/material/Typography';\r\nimport DownloadForOfflineIcon from '@mui/icons-material/DownloadForOffline';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport ZoomOutIcon from '@mui/icons-material/ZoomOut';\r\nimport ZoomInIcon from '@mui/icons-material/ZoomIn';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage, timeStampEU,handleDownload,copied,emojisArr,firstLetter, slicedWord,prodAwsS3 } 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 alignItems: 'flex-start',\r\n alignContent: 'flex-start',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 0px 4px 22px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n width: 400,\r\n borderRadius: 7,\r\n padding: 5,\r\n },\r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n color: '#414141',\r\n }, \r\n image: {\r\n borderRadius: 7,\r\n width: '100%',\r\n maxHeight: 'auto',\r\n cursor: 'pointer',\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 minHeight: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflow: 'auto',\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 topBar: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n height: '7vh',\r\n width: '100vw',\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n backgroundColor: 'rgba(65, 65, 65, 0.9)',\r\n zIndex: 10,\r\n padding: '0px 20px'\r\n },\r\n wrapperCredentials: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n }, \r\n wrapperIcons: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n }, \r\n magnifying : {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'scale(1.1)'\r\n }\r\n }, \r\n downloadIcon: {\r\n marginLeft:5,\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 iconCloseOverlay: {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n }, \r\n wrapperImage: {\r\n borderRadius: 5,\r\n maxWidth:500,\r\n maxHeight: 750,\r\n display: 'flex',\r\n overflow: 'auto'\r\n },\r\n innerImage: {\r\n objectFit: 'cover',\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n right: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n right: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n left: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n left: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\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\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessagesLeftImage {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n createdAt:string,\r\n fullType: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n name: string,\r\n lastName: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n}\r\n\r\nconst MessagesLeftImage = ({url,tongue,watched,edited,avatarUrl,color,createdAt,fullType,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,name,lastName,nightMode,handleReply,handleForward}: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 [scale, setScale] = useState<number>(1)\r\n const refView = useRef<null | any>(null)\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl);\r\n const checked = isSelected(_id)\r\n const handleIncreaseScale = () => {\r\n if (scale < 5) {\r\n refView.current.style.transform = `scale(${scale+0.25},${scale+0.25})`\r\n refView.current.style.transformOrigin = `${50 / scale + 0.25}px ${50 / scale + 0.25}px`\r\n setScale(scale+0.25)\r\n }\r\n }\r\n const handleDecreaseScale = () => {\r\n if (scale >= 0.5) {\r\n refView.current.style.transform = `scale(${scale-0.25},${scale-0.25})`\r\n refView.current.style.transformOrigin = `${50/scale-0.25}px ${50/scale-0.25}px`\r\n setScale(scale-0.25)\r\n }\r\n } \r\n const handleOpenWatch = () => !watch&&setWatch(true)\r\n const handleCloseWatch = (e:any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'close') {\r\n setWatch(false)\r\n refView.current.style.transform = 'scale(1)'\r\n setScale(1)\r\n }\r\n } \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n \r\n return (watch ?\r\n <div onClick={handleCloseWatch} id='overlay' className={classes.overlay}>\r\n <div className={classes.topBar}>\r\n <div className={classes.wrapperCredentials}>\r\n <ListItemIcon >\r\n <Avatar alt={name} src={url?url:undefined}\r\n sx={{ background: color, width: 44, height: 44 }}>\r\n {!url&&`${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 primaryTypographyProps={{ color: '#ffffff' }}\r\n secondary={timeStampEU(createdAt)} secondaryTypographyProps={{ color: '#ffffff' }} />\r\n </div>\r\n <div className={classes.wrapperIcons}>\r\n <ZoomOutIcon onClick={handleDecreaseScale}\r\n className={classes.magnifying} fontSize='large' />\r\n <ZoomInIcon onClick={handleIncreaseScale}\r\n className={classes.magnifying} fontSize='large' />\r\n <DownloadForOfflineIcon onClick={() => handleDownload(url, fullType)}\r\n className={classes.downloadIcon} fontSize='large' />\r\n <CloseIcon id='close' onClick={handleCloseWatch}\r\n className={classes.iconCloseOverlay} fontSize='large' />\r\n </div> \r\n </div>\r\n <div ref={refView} className={classes.wrapperImage}>\r\n <img className={classes.innerImage}\r\n width='100%' height='auto' alt='imageItem' src={url} />\r\n </div>\r\n </div> :\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#babdbc':'#ffffff',pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#00b333\",marginBottom:10}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\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 <ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched&&<VisibilityIcon style={{ color: '#959595', marginLeft: 5 }} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <MenuItem onClick={() => handleDownload(url, fullType)}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem> \r\n {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>}\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem> \r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 ListItemText from '@mui/material/ListItemText';\r\nimport Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\n\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { prodAwsS3,timeStampMessage,handleDownload,copied,emojisArr,slicedWord,firstLetter } 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 alignItems: 'flex-start',\r\n alignContent: 'flex-start',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 0px 4px 22px'\r\n }, \r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n padding: 5,\r\n width:350,\r\n borderRadius: 7,\r\n },\r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n color: '#414141',\r\n }, \r\n player: {\r\n borderRadius: 7,\r\n width:'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 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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n right: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n right: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n left: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n left: -54,\r\n bottom: 10,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\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\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageLeftAudio {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n name: string,\r\n lastName: string,\r\n createdAt: string,\r\n fullType: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n}\r\n\r\nconst MessageLeftAudio = ({ url,tongue,watched,edited,avatarUrl,color,name,lastName,createdAt,fullType,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward }: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 checked = isSelected(_id)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {\r\n updateMessageById(_id, '')\r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)}\r\n className={classes.wrapper} style={{backgroundColor: selected ? '#babdbc' : \"#ffffff\",pointerEvents: isSomeSelected ? 'none' : 'auto'}}>\r\n <Typography style={{color: \"#00b333\",marginBottom:10}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <ReactAudioPlayer className={classes.player} src={url} controls />\r\n <ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched&&<VisibilityIcon style={{ color: '#959595', marginLeft: 5 }} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <MenuItem onClick={() => handleDownload(url, fullType)}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem> \r\n {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>}\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem> \r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { prodAwsS3,timeStampMessage,handleDownload,copied,emojisArr,slicedWord,firstLetter } 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 alignItems: 'flex-start',\r\n alignContent: 'flex-start',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 0px 4px 22px'\r\n }, \r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n width: 400,\r\n padding: 5,\r\n borderRadius: 7,\r\n },\r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n color: '#414141',\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 player: {\r\n backgroundColor: '#ffffff',\r\n width: '100%',\r\n },\r\n playerActive: {\r\n backgroundColor: '#babdbc',\r\n width: '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 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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n right: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n right: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n left: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n left: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\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\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageLeftVideo {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n name: string,\r\n lastName: string,\r\n createdAt: string,\r\n fullType: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n}\r\n\r\nconst MessageLeftVideo = ({ url,tongue,watched,edited,avatarUrl,color,name,lastName,createdAt,fullType,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward }: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 const checked = isSelected(_id)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#babdbc':'#ffffff',pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#00b333\",marginBottom:10}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <Player className={selected?classes.playerActive:classes.player} playsInline src={url}/>\r\n <ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched&&<VisibilityIcon style={{ color: '#959595', marginLeft: 5 }} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <MenuItem onClick={() => handleDownload(url, fullType)}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem> \r\n {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>}\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem> \r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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, useRef } from \"react\";\r\nimport Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ZoomOutIcon from '@mui/icons-material/ZoomOut';\r\nimport ZoomInIcon from '@mui/icons-material/ZoomIn';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport VisibilityIcon from '@mui/icons-material/Visibility';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,copied,emojisArr,slicedWord,firstLetter,handleDownload,prodAwsS3 } 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 alignItems: 'flex-start',\r\n alignContent: 'flex-start',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n padding:'4px 0px 4px 22px'\r\n }, \r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:300,\r\n padding: 5,\r\n borderRadius: 7, \r\n },\r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n color: '#414141',\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: 'auto',\r\n zIndex: 100,\r\n overflow: 'auto',\r\n },\r\n wrapperIcons: {\r\n position: 'absolute',\r\n top: 14,\r\n right: 40,\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n padding: '2px 10px',\r\n borderRadius: 10,\r\n backgroundColor: 'rgba(65, 65, 65, 0.9)',\r\n zIndex:150\r\n }, \r\n magnifying : {\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n marginRight:10,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'scale(1.1)'\r\n }\r\n },\r\n iconCloseOverlay: {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n right: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n right: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n left: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n folderIcon: {\r\n marginRight: 7,\r\n color: '#54b0fc',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n color: '#016cc3'\r\n },\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n left: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderLeft: \"15px solid transparent\",\r\n borderRight: \"15px solid transparent\",\r\n bottom: '0px',\r\n left: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\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\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageLeftFile {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n name: string,\r\n lastName: string,\r\n createdAt: string,\r\n type: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n}\r\n\r\nconst MessageLeftFile = ({ url,tongue,watched,edited,avatarUrl,color,name,lastName,createdAt,type,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward }: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 [scale, setScale] = useState<number>(1)\r\n const [modal, setModal] = useState<boolean>(false)\r\n const refView = useRef<null | any>(null)\r\n const open = Boolean(anchorEl);\r\n const checked = isSelected(_id)\r\n const handleIncreaseScale = () => {\r\n if (scale < 5) {\r\n refView.current.style.transform = `scale(${scale+0.25},${scale+0.25})`\r\n refView.current.style.transformOrigin = `${50 / scale + 0.25}px ${50 / scale + 0.25}px`\r\n setScale(scale+0.25)\r\n }\r\n }\r\n const handleDecreaseScale = () => {\r\n if (scale >= 0.5) {\r\n refView.current.style.transform = `scale(${scale-0.25},${scale-0.25})`\r\n refView.current.style.transformOrigin = `${50/scale-0.25}px ${50/scale-0.25}px`\r\n setScale(scale-0.25)\r\n }\r\n } \r\n const handleOpenRead = () => !read&&setRead(true)\r\n const handleDownloadFile = (e: any) => {\r\n e.stopPropagation()\r\n handleDownload(url, type)\r\n }\r\n const handleCloseRead = (e:any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'close') {\r\n setRead(false)\r\n setScale(1)\r\n }\r\n }\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n {read && <div className={classes.wrapperIcons}>\r\n <ZoomOutIcon onClick={handleDecreaseScale} className={classes.magnifying} fontSize='large' />\r\n <ZoomInIcon onClick={handleIncreaseScale} className={classes.magnifying} fontSize='large' />\r\n <CloseIcon id='close' onClick={handleCloseRead} className={classes.iconCloseOverlay} fontSize='large' />\r\n </div>} \r\n {read && <div className={classes.overlay} id='overlay'\r\n onClick={handleCloseRead}>\r\n <div ref={refView}>\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>}\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#babdbc':\"#ffffff\",pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#00b333\",marginBottom:10}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n {!read &&<Button fullWidth onClick={handleOpenRead} variant=\"contained\" color='warning' style={{fontWeight:500,fontSize:18}}>\r\n Read File\r\n </Button>}\r\n <ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched&&<VisibilityIcon style={{ color: '#959595', marginLeft: 5 }} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#babdbc' : \"#ffffff\"}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <MenuItem onClick={handleDownloadFile}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem> \r\n {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>}\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { firstLetter, slicedWord, timeStampMessage, copied,emojisArr,prodAwsS3 } from '../../../../../../helpers'\r\nimport { removeMessageById,updateMessageById,pinMessageById } 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 alignItems: 'flex-end',\r\n alignContent: 'flex-end',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 22px 4px 0px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:200,\r\n padding: 5,\r\n borderRadius: 7,\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n },\r\n wrapperInner: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n width: '100%',\r\n cursor: 'pointer',\r\n padding:'0px 10px',\r\n '&:hover': {\r\n backgroundColor: 'rgba(104, 105, 104, 0.2)'\r\n }\r\n },\r\n deletedInformation: {\r\n display: 'flex',\r\n justifyContent:'start',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n },\r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n left: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n left: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n right: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n folderIcon: {\r\n color: '#535353',\r\n marginRight:5\r\n },\r\n column: {\r\n position: 'absolute',\r\n content: '',\r\n width: 2,\r\n left:0,\r\n top:'10%',\r\n height:'80%',\r\n backgroundColor: '#535353',\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n right: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"15px solid transparent\",\r\n borderLeft: \"15px solid transparent\",\r\n bottom: '0px',\r\n right: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"16px solid transparent\",\r\n borderLeft: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\",\r\n }, \r\n});\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageRightDeleted {\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n companionIdForwardToAndFrom: string,\r\n avatarUrl: string,\r\n color: string,\r\n message: string,\r\n name: string,\r\n lastName: string,\r\n forwardReplyName:string,\r\n forwardReplyLastName: string,\r\n caption: string,\r\n createdAt: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit: (_id: string) => void,\r\n handleOpenTheChat: (companionIdForwardToAndFrom:string | null) => void,\r\n}\r\n\r\nconst MessageRightDeleted = ({tongue,watched,edited,avatarUrl,companionIdForwardToAndFrom,color,message,name,lastName,forwardReplyName,forwardReplyLastName,caption,createdAt,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,handleEdit,handleOpenTheChat}:IMessageRightDeleted) => {\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 checked = isSelected(_id)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':'#deffa9', pointerEvents: isSomeSelected ? 'none' : 'auto'}}>\r\n <Typography style={{color: \"#26afee\"}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.wrapperInner} onClick={() => handleOpenTheChat(companionIdForwardToAndFrom)}>\r\n <div className={classes.column}></div>\r\n <Typography style={{color: \"#535353\"}} variant=\"h6\" align=\"right\">\r\n {`${companionIdForwardToAndFrom?'Forwarded from':'Replied to'} ${firstLetter(forwardReplyName)}${slicedWord(forwardReplyName, 15, 1)}\r\n ${firstLetter(forwardReplyLastName)}${slicedWord(forwardReplyLastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.deletedInformation}>\r\n <DeleteOutlineIcon className={classes.folderIcon} fontSize='large' />\r\n <Typography style={{color: \"#535353\"}} variant=\"h6\" align=\"right\">\r\n The Message was Deleted\r\n </Typography>\r\n </div>\r\n </div>\r\n <ListItemText primary={message} primaryTypographyProps={{ color: \"#000000\" }} />\r\n <ListItemText secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#18bd03'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched ? <DoneAllIcon style={{ color: '#18bd03', marginLeft: 5 }} fontSize='small' /> :\r\n <DoneIcon style={{ color: '#18bd03',marginLeft:5}} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleEdit(_id)\r\n handleClose(undefined)\r\n }}>\r\n <EditIcon/>\r\n Edit\r\n </MenuItem> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={`${message} ${caption}`}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 MessageRightDeleted\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { firstLetter, slicedWord, timeStampMessage, copied,emojisArr,prodAwsS3 } from '../../../../../../helpers'\r\nimport { removeMessageById,updateMessageById,pinMessageById } 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 alignItems: 'flex-end',\r\n alignContent: 'flex-end',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 22px 4px 0px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:200,\r\n padding: 5,\r\n borderRadius: 7,\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n },\r\n wrapperInner: {\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n }, \r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n left: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n left: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n right: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n right: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"15px solid transparent\",\r\n borderLeft: \"15px solid transparent\",\r\n bottom: '0px',\r\n right: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"16px solid transparent\",\r\n borderLeft: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\",\r\n }, \r\n});\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageRightText {\r\n message: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n name:string,\r\n lastName:string,\r\n createdAt: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit:(_id: string) => void,\r\n}\r\n\r\nconst MessageRightText = ({message,tongue,watched,edited,avatarUrl,color,name,lastName,createdAt,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,handleEdit}: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 const checked = isSelected(_id)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':\"#deffa9\",pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#26afee\"}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.wrapperInner}>\r\n <ListItemText primary={message} primaryTypographyProps={{ color: \"#000000\" }} />\r\n <ListItemText secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n </div>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#18bd03'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched ? <DoneAllIcon style={{ color: '#18bd03', marginLeft: 5 }} fontSize='small' /> :\r\n <DoneIcon style={{ color: '#18bd03',marginLeft:5}} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleEdit(_id)\r\n handleClose(undefined)\r\n }}>\r\n <EditIcon/>\r\n Edit\r\n </MenuItem> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={`${message ? message : ''} ${caption ? caption : ''}`}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 Typography from '@mui/material/Typography';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport Button from '@mui/material/Button';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { firstLetter, slicedWord, timeStampMessage, copied,emojisArr,handleDownload,prodAwsS3 } from '../../../../../../helpers'\r\nimport { removeMessageById,updateMessageById,pinMessageById } 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 alignItems: 'flex-end',\r\n alignContent: 'flex-end',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 22px 4px 0px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:200,\r\n padding: 5,\r\n borderRadius: 7,\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n },\r\n wrapperInner: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n width: '100%',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: 'rgba(104, 105, 104, 0.2)'\r\n }\r\n },\r\n wrapperInnerMessage: {\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n marginLeft:20,\r\n }, \r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n left: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n left: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 folderIcon: {\r\n color: '#00b333',\r\n },\r\n checkboxSelect: {\r\n position: 'absolute',\r\n right: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n column: {\r\n position: 'absolute',\r\n content: '',\r\n width: 2,\r\n left:43,\r\n top:'10%',\r\n height:'80%',\r\n backgroundColor: '#00b333',\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n right: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"15px solid transparent\",\r\n borderLeft: \"15px solid transparent\",\r\n bottom: '0px',\r\n right: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"16px solid transparent\",\r\n borderLeft: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\",\r\n }, \r\n});\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageRightReply {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n replyMessage: string,\r\n message: string,\r\n name: string,\r\n lastName: string,\r\n replyName:string,\r\n replyLastName: string,\r\n replyCaption: string,\r\n createdAt: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit:(_id: string) => void,\r\n fullType: string,\r\n handleScrollToTheMessage: (_id: string) => void,\r\n oldId: string\r\n}\r\n\r\nconst MessageRightReply = ({url,tongue,watched,edited,avatarUrl,color,replyMessage,message,name,lastName,replyName,replyLastName,replyCaption,createdAt,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,handleEdit,fullType,handleScrollToTheMessage,oldId}:IMessageRightReply) => {\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 checked = isSelected(_id)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n }\r\n \r\n const handleClickIcon = () => handleDownload(url, fullType) \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':'#deffa9',pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#26afee\"}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.wrapperInner}>\r\n {fullType === null &&<ContentCopyIcon className={classes.folderIcon} fontSize='large'/>}\r\n {fullType&&fullType.includes('audio') &&<LibraryMusicIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType&&fullType.includes('video') &&<VideoLibraryIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType&&fullType.includes('image') &&<ImageIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType && fullType.includes('application') && <InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />}\r\n <div className={classes.column}></div>\r\n <div className={classes.wrapperInnerMessage} onClick={() => handleScrollToTheMessage(oldId)}>\r\n <Typography style={{color: \"#00b333\"}} variant=\"h6\" align=\"right\">\r\n {`Replied to ${firstLetter(replyName)}${slicedWord(replyName, 15, 1)}\r\n ${firstLetter(replyLastName)}${slicedWord(replyLastName, 15, 1)}`}\r\n </Typography>\r\n <ListItemText primary={fullType === null?replyMessage:fullType} primaryTypographyProps={{ color: \"#535353\" }} />\r\n <ListItemText secondary={replyCaption} secondaryTypographyProps={{color: \"#535353\"}}/>\r\n </div>\r\n </div>\r\n <ListItemText primary={message} primaryTypographyProps={{ color: \"#000000\" }} />\r\n <ListItemText secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#18bd03'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched ? <DoneAllIcon style={{ color: '#18bd03', marginLeft: 5 }} fontSize='small' /> :\r\n <DoneIcon style={{ color: '#18bd03',marginLeft:5}} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem>\r\n {fullType&&<MenuItem onClick={handleClickIcon}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem>} \r\n <MenuItem onClick={() => {\r\n handleEdit(_id)\r\n handleClose(undefined)\r\n }}>\r\n <EditIcon/>\r\n Edit\r\n </MenuItem> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={`${replyMessage&&fullType === null ? replyMessage : fullType} ${replyCaption ? replyCaption : ''} ${message ? message : ''} ${caption ? caption : ''}`}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 MessageRightReply\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState } from \"react\";\r\nimport Typography from '@mui/material/Typography';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport Button from '@mui/material/Button';\r\nimport LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\nimport DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { firstLetter, slicedWord, timeStampMessage, copied,emojisArr,handleDownload,prodAwsS3 } from '../../../../../../helpers'\r\nimport { removeMessageById,updateMessageById,pinMessageById } 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 alignItems: 'flex-end',\r\n alignContent: 'flex-end',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 22px 4px 0px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:200,\r\n padding: 5,\r\n borderRadius: 7,\r\n wordBreak:'break-word',\r\n textAlign: \"left\",\r\n font: \"400 .9em 'Open Sans', sans-serif\",\r\n },\r\n wrapperInner: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n width: '100%',\r\n cursor: 'pointer',\r\n '&:hover': {\r\n backgroundColor: 'rgba(104, 105, 104, 0.2)'\r\n }\r\n },\r\n wrapperInnerMessage: {\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n marginLeft:20,\r\n }, \r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n left: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n left: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n right: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n folderIcon: {\r\n color: '#00b333',\r\n },\r\n column: {\r\n position: 'absolute',\r\n content: '',\r\n width: 2,\r\n left:43,\r\n top:'10%',\r\n height:'80%',\r\n backgroundColor: '#00b333',\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n right: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"15px solid transparent\",\r\n borderLeft: \"15px solid transparent\",\r\n bottom: '0px',\r\n right: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"16px solid transparent\",\r\n borderLeft: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\",\r\n }, \r\n});\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageRightForward {\r\n url: string,\r\n oldId: string,\r\n companionIdForwardToAndFrom: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n message: string,\r\n name: string,\r\n lastName: string,\r\n forwardName:string,\r\n forwardLastName: string,\r\n forwardMessage: string,\r\n forwardCaption: string,\r\n caption: string,\r\n createdAt: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit:(_id: string) => void,\r\n handleScrollToTheChat: (companionIdForwardToAndFrom:string,oldId:string) => void,\r\n fullType: string\r\n}\r\n\r\nconst MessageRightForward = ({url,oldId,companionIdForwardToAndFrom,tongue,watched,edited,avatarUrl,color,message,name,lastName,forwardName,forwardLastName,forwardMessage,forwardCaption,caption,createdAt,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,handleEdit,handleScrollToTheChat,fullType}:IMessageRightForward) => {\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 checked = isSelected(_id)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n }\r\n \r\n const handleClickIcon = () => handleDownload(url, fullType) \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':'#deffa9', pointerEvents: isSomeSelected ? 'none' : 'auto'}}>\r\n <Typography style={{color: \"#26afee\"}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <div className={classes.wrapperInner}>\r\n {fullType === null &&<ContentCopyIcon className={classes.folderIcon} fontSize='large'/>}\r\n {fullType&&fullType.includes('audio') &&<LibraryMusicIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType&&fullType.includes('video') &&<VideoLibraryIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType&&fullType.includes('image') &&<ImageIcon className={classes.folderIcon} fontSize='large' />}\r\n {fullType && fullType.includes('application') && <InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />}\r\n <div className={classes.column}></div>\r\n <div className={classes.wrapperInnerMessage} onClick={() => handleScrollToTheChat(companionIdForwardToAndFrom,oldId)}>\r\n <Typography style={{color: \"#00b333\"}} variant=\"h6\" align=\"right\">\r\n {`Forwarded from ${firstLetter(forwardName)}${slicedWord(forwardName, 15, 1)}\r\n ${firstLetter(forwardLastName)}${slicedWord(forwardLastName, 15, 1)}`}\r\n </Typography>\r\n <ListItemText primary={fullType === null?forwardMessage:fullType} primaryTypographyProps={{ color: \"#535353\" }} />\r\n <ListItemText secondary={forwardCaption} secondaryTypographyProps={{color: \"#535353\"}}/>\r\n </div>\r\n </div>\r\n <ListItemText primary={message} primaryTypographyProps={{ color: \"#000000\" }} />\r\n <ListItemText secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#18bd03'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched ? <DoneAllIcon style={{ color: '#18bd03', marginLeft: 5 }} fontSize='small' /> :\r\n <DoneIcon style={{ color: '#18bd03',marginLeft:5}} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem>\r\n {fullType&&<MenuItem onClick={handleClickIcon}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem>} \r\n <MenuItem onClick={() => {\r\n handleEdit(_id)\r\n handleClose(undefined)\r\n }}>\r\n <EditIcon/>\r\n Edit\r\n </MenuItem> \r\n <CopyToClipboard onCopy={() => handleClose('copy')} text={`${forwardMessage&&fullType === null ? forwardMessage : fullType} ${forwardCaption ? forwardCaption : ''} ${message ? message : ''} ${caption ? caption : ''}`}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 MessageRightForward\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { styled } from '@mui/material/styles';\r\nimport { useState, useRef } from \"react\";\r\nimport Typography from '@mui/material/Typography';\r\nimport DownloadForOfflineIcon from '@mui/icons-material/DownloadForOffline';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport ZoomOutIcon from '@mui/icons-material/ZoomOut';\r\nimport ZoomInIcon from '@mui/icons-material/ZoomIn';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage, timeStampEU,handleDownload,copied,emojisArr,firstLetter, slicedWord,prodAwsS3 } 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 alignItems: 'flex-end',\r\n alignContent: 'flex-end',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 22px 4px 0px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n width: 400,\r\n borderRadius: 7,\r\n padding: 5,\r\n },\r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n }, \r\n image: {\r\n borderRadius: 7,\r\n width: '100%',\r\n maxHeight: 'auto',\r\n cursor: 'pointer',\r\n }, \r\n overlay: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n width: '100vw',\r\n minHeight: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n overflow: 'auto',\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 topBar: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n height: '7vh',\r\n width: '100vw',\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n backgroundColor: 'rgba(65, 65, 65, 0.9)',\r\n zIndex: 10,\r\n padding: '0px 20px'\r\n },\r\n wrapperCredentials: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n }, \r\n wrapperIcons: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n }, \r\n magnifying : {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'scale(1.1)'\r\n }\r\n }, \r\n downloadIcon: {\r\n marginLeft:5,\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 iconCloseOverlay: {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n },\r\n wrapperImage: {\r\n borderRadius: 5,\r\n maxWidth:500,\r\n maxHeight: 750,\r\n display: 'flex',\r\n overflow: 'auto'\r\n },\r\n innerImage: {\r\n objectFit: 'cover',\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n left: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n left: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n right: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n right: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"15px solid transparent\",\r\n borderLeft: \"15px solid transparent\",\r\n bottom: '0px',\r\n right: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"16px solid transparent\",\r\n borderLeft: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\",\r\n }, \r\n});\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageRightImage {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n createdAt:string,\r\n fullType: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n name: string,\r\n lastName: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit:(_id: string) => void,\r\n}\r\n\r\nconst MessageRightImage = ({url,tongue,watched,edited,avatarUrl,color,createdAt,fullType,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,name,lastName,nightMode,handleReply,handleForward,handleEdit}: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 [scale, setScale] = useState<number>(1)\r\n const refView = useRef<null | any>(null)\r\n const open = Boolean(anchorEl);\r\n const checked = isSelected(_id)\r\n const handleIncreaseScale = () => {\r\n if (scale < 5) {\r\n refView.current.style.transform = `scale(${scale+0.25},${scale+0.25})`\r\n refView.current.style.transformOrigin = `${50 / scale + 0.25}px ${50 / scale + 0.25}px`\r\n setScale(scale+0.25)\r\n }\r\n }\r\n const handleDecreaseScale = () => {\r\n if (scale >= 0.5) {\r\n refView.current.style.transform = `scale(${scale-0.25},${scale-0.25})`\r\n refView.current.style.transformOrigin = `${50/scale-0.25}px ${50/scale-0.25}px`\r\n setScale(scale-0.25)\r\n }\r\n } \r\n const handleOpenWatch = () => !watch&&setWatch(true)\r\n const handleCloseWatch = (e:any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'close') {\r\n setWatch(false)\r\n refView.current.style.transform = 'scale(1)'\r\n setScale(1)\r\n }\r\n } \r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n\r\n return (watch ?\r\n <div onClick={handleCloseWatch} id='overlay' className={classes.overlay}>\r\n <div className={classes.topBar}>\r\n <div className={classes.wrapperCredentials}>\r\n <ListItemIcon >\r\n <Avatar alt={name} src={url?url:undefined}\r\n sx={{ background: color, width: 44, height: 44 }}>\r\n {!url&&`${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 primaryTypographyProps={{ color: '#ffffff' }}\r\n secondary={timeStampEU(createdAt)} secondaryTypographyProps={{ color: '#ffffff' }} />\r\n </div>\r\n <div className={classes.wrapperIcons}>\r\n <ZoomOutIcon onClick={handleDecreaseScale}\r\n className={classes.magnifying} fontSize='large' />\r\n <ZoomInIcon onClick={handleIncreaseScale}\r\n className={classes.magnifying} fontSize='large' />\r\n <DownloadForOfflineIcon onClick={() => handleDownload(url, fullType)}\r\n className={classes.downloadIcon} fontSize='large' />\r\n <CloseIcon id='close' onClick={handleCloseWatch}\r\n className={classes.iconCloseOverlay} fontSize='large' />\r\n </div> \r\n </div>\r\n <div ref={refView} className={classes.wrapperImage}>\r\n <img className={classes.innerImage}\r\n width='100%' height='auto' alt='imageItem' src={url} />\r\n </div>\r\n </div> :\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':'#deffa9',pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#26afee\",marginBottom:10}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\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 <ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#18bd03'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched ? <DoneAllIcon style={{ color: '#18bd03', marginLeft: 5 }} fontSize='small' /> :\r\n <DoneIcon style={{ color: '#18bd03',marginLeft:5}} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleEdit(_id)\r\n handleClose(undefined)\r\n }}>\r\n <EditIcon/>\r\n Edit\r\n </MenuItem> \r\n <MenuItem onClick={() => handleDownload(url, fullType)}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem> \r\n {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>}\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 Avatar from '@mui/material/Avatar';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport Menu from '@mui/material/Menu';\r\nimport MenuItem from '@mui/material/MenuItem';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,handleDownload,copied,emojisArr,firstLetter,slicedWord,prodAwsS3 } 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 alignItems: 'flex-end',\r\n alignContent: 'flex-end',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 22px 4px 0px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n padding: 5,\r\n width:350,\r\n borderRadius: 7,\r\n },\r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n }, \r\n player: {\r\n borderRadius: 7,\r\n width:'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 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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n left: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n left: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n right: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n right: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"15px solid transparent\",\r\n borderLeft: \"15px solid transparent\",\r\n bottom: '0px',\r\n right: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"16px solid transparent\",\r\n borderLeft: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\",\r\n }, \r\n});\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageRightAudio {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n name: string,\r\n lastName: string,\r\n createdAt: string,\r\n fullType: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit:(_id: string) => void,\r\n}\r\n\r\nconst MessageRightAudio = ({ url,tongue,watched,edited,avatarUrl,color,name,lastName,createdAt,fullType,caption,_id,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,nightMode,handleReply,handleForward,handleEdit }: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 checked = isSelected(_id)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':'#deffa9',pointerEvents: isSomeSelected ? 'none' : 'auto' }}>\r\n <Typography style={{color: \"#26afee\",marginBottom:10}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <ReactAudioPlayer className={classes.player} src={url} controls />\r\n <ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#18bd03'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched ? <DoneAllIcon style={{ color: '#18bd03', marginLeft: 5 }} fontSize='small' /> :\r\n <DoneIcon style={{ color: '#18bd03',marginLeft:5}} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleEdit(_id)\r\n handleClose(undefined)\r\n }}>\r\n <EditIcon/>\r\n Edit\r\n </MenuItem> \r\n <MenuItem onClick={() => handleDownload(url, fullType)}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem> \r\n {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>}\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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 Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,handleDownload,copied,emojisArr,slicedWord,firstLetter,prodAwsS3 } 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 alignItems: 'flex-end',\r\n alignContent: 'flex-end',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n position: 'relative',\r\n padding:'4px 22px 4px 0px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n width: 400,\r\n padding: 5,\r\n borderRadius: 7,\r\n }, \r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\r\n },\r\n player: {\r\n backgroundColor: '#deffa9',\r\n width: '100%',\r\n },\r\n playerActive: {\r\n backgroundColor: '#ced8d7',\r\n width: '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 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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n left: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n left: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n right: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n right: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"15px solid transparent\",\r\n borderLeft: \"15px solid transparent\",\r\n bottom: '0px',\r\n right: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"16px solid transparent\",\r\n borderLeft: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\",\r\n }, \r\n});\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageRightVideo {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n name: string,\r\n lastName: string,\r\n createdAt: string,\r\n fullType: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit:(_id: string) => void,\r\n}\r\n\r\nconst MessageRightVideo = ({ url,tongue,watched,edited,avatarUrl,color,name,lastName,createdAt,fullType,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,handleEdit }: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 const checked = isSelected(_id)\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n \r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':'#deffa9',pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#26afee\",marginBottom:10}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n <Player className={selected?classes.playerActive:classes.player} playsInline src={url}/>\r\n <ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#18bd03'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched ? <DoneAllIcon style={{ color: '#18bd03', marginLeft: 5 }} fontSize='small' /> :\r\n <DoneIcon style={{ color: '#18bd03',marginLeft:5}} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleEdit(_id)\r\n handleClose(undefined)\r\n }}>\r\n <EditIcon/>\r\n Edit\r\n </MenuItem> \r\n <MenuItem onClick={() => handleDownload(url, fullType)}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem> \r\n {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>}\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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,useRef } from \"react\";\r\nimport Typography from '@mui/material/Typography';\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 Divider from '@mui/material/Divider';\r\nimport CheckBoxIcon from '@mui/icons-material/CheckBox';\r\nimport Checkbox from '@mui/material/Checkbox';\r\nimport PushPinIcon from '@mui/icons-material/PushPin';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ZoomOutIcon from '@mui/icons-material/ZoomOut';\r\nimport ZoomInIcon from '@mui/icons-material/ZoomIn';\r\nimport ReplyIcon from '@mui/icons-material/Reply';\r\nimport DoneAllIcon from '@mui/icons-material/DoneAll';\r\nimport DoneIcon from '@mui/icons-material/Done';\r\nimport DownloadIcon from '@mui/icons-material/Download';\r\nimport EditIcon from '@mui/icons-material/Edit';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport { CopyToClipboard } from 'react-copy-to-clipboard';\r\nimport { removeMessageById,updateMessageById,pinMessageById } from \"../../../../../../api-data\";\r\nimport { timeStampMessage,copied,emojisArr,slicedWord,firstLetter,handleDownload,prodAwsS3} 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 alignItems: 'flex-end',\r\n alignContent: 'flex-end',\r\n flexDirection:'column',\r\n borderRadius: 7,\r\n padding:'4px 22px 4px 0px'\r\n },\r\n wrapper: {\r\n position: 'relative',\r\n display: 'flex',\r\n alignItems: 'start',\r\n alignContent: 'start',\r\n flexDirection: 'column',\r\n maxWidth: 450,\r\n minWidth:300,\r\n padding: 5,\r\n borderRadius: 7,\r\n }, \r\n informationWrapper: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n justifyContent: 'flex-end',\r\n width: '100%',\r\n paddingRight:3,\r\n },\r\n time: {\r\n fontSize: \".65em\",\r\n fontWeight:600,\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: 'auto',\r\n zIndex: 100,\r\n overflow: 'auto',\r\n },\r\n wrapperIcons: {\r\n position: 'absolute',\r\n top: 14,\r\n right: 30,\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n padding: '2px 10px',\r\n borderRadius: 10,\r\n backgroundColor: 'rgba(65, 65, 65, 0.9)',\r\n zIndex:150\r\n }, \r\n magnifying : {\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n marginRight:10,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'scale(1.1)'\r\n }\r\n },\r\n iconCloseOverlay: {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\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 emojiTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '0.2rem',\r\n left: -40,\r\n },\r\n emojiCompanionTitle: {\r\n position: \"absolute\",\r\n fontSize: \"1.7em\",\r\n fontWeight:600,\r\n bottom: '2.2rem',\r\n left: -40,\r\n }, \r\n emoji: {\r\n\t\tcursor: 'pointer',\r\n\t\tfontSize: '1.7rem',\r\n transition: 'all 0.3s',\r\n '&:hover': {\r\n transform: 'scale(1.5)'\r\n }\r\n },\r\n emojiActive: {\r\n cursor: 'pointer',\r\n fontSize: '1.2rem',\r\n animation: `$emoji 0.6s ease-out`,\r\n\t\tanimationDirection: 'forwards',\r\n\t\tanimationIterationCount: 1,\r\n }, \r\n '@keyframes emoji': {\r\n\t '5%': { transform: 'translateY(1rem)'},\r\n\t '10%': { transform: 'translateY(0) scale(1)',opacity: 1},\r\n\t '50%': { transform: 'translateY(-4rem) scale(1.5) rotateY(90deg)'},\r\n\t '80%': {opacity: 0},\r\n\t '100%': {transform: 'translateY(-8rem) scale(2) rotateY(180deg)',opacity: 0},\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 checkboxSelect: {\r\n position: 'absolute',\r\n right: -64,\r\n top: -10,\r\n pointerEvents: 'auto'\r\n },\r\n avatarIcon: {\r\n position: 'absolute',\r\n right: -54,\r\n bottom: 0,\r\n },\r\n tongueOne: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"15px solid transparent\",\r\n borderLeft: \"15px solid transparent\",\r\n bottom: '0px',\r\n right: \"-15px\",\r\n},\r\ntongueTwo: {\r\n content: \"''\",\r\n position: \"absolute\",\r\n width: \"0\",\r\n height: \"0\",\r\n borderRight: \"16px solid transparent\",\r\n borderLeft: \"16px solid transparent\",\r\n bottom: \"0px\",\r\n right: \"-17px\",\r\n }, \r\n});\r\n\r\nconst label = { inputProps: { 'aria-label': 'Checkbox demo' } };\r\n\r\ninterface IMessageRightFile {\r\n url: string,\r\n tongue: boolean,\r\n watched: boolean,\r\n edited: boolean,\r\n avatarUrl: string,\r\n color: string,\r\n name: string,\r\n lastName: string,\r\n createdAt: string,\r\n type: string,\r\n caption: string,\r\n emoji: string,\r\n emojiCompanion: string,\r\n pinned: boolean,\r\n isSomeSelected: boolean,\r\n isSelected:(_id:string) => boolean,\r\n handleSelected: (_id:string) => void, \r\n _id: string,\r\n nightMode: boolean,\r\n handleReply: (_id: string) => void,\r\n handleForward: (_id: string) => void,\r\n handleEdit:(_id: string) => void,\r\n}\r\n\r\nconst MessageRightFile = ({ url,tongue,watched,edited,avatarUrl,color,name,lastName,createdAt,type,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,handleForward,handleEdit }: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 [scale, setScale] = useState<number>(1)\r\n const [modal,setModal] = useState<boolean>(false)\r\n const open = Boolean(anchorEl);\r\n const checked = isSelected(_id)\r\n const refView = useRef<null | any>(null)\r\n const handleIncreaseScale = () => {\r\n if (scale < 5) {\r\n refView.current.style.transform = `scale(${scale+0.25},${scale+0.25})`\r\n refView.current.style.transformOrigin = `${50 / scale + 0.25}px ${50 / scale + 0.25}px`\r\n setScale(scale+0.25)\r\n }\r\n }\r\n const handleDecreaseScale = () => {\r\n if (scale >= 0.5) {\r\n refView.current.style.transform = `scale(${scale-0.25},${scale-0.25})`\r\n refView.current.style.transformOrigin = `${50/scale-0.25}px ${50/scale-0.25}px`\r\n setScale(scale-0.25)\r\n }\r\n } \r\n const handleOpenRead = () => !read&&setRead(true)\r\n const handleDownloadFile = (e: any) => {\r\n e.stopPropagation()\r\n handleDownload(url, type)\r\n }\r\n const handleCloseRead = (e:any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'close') {\r\n setRead(false)\r\n setScale(1)\r\n }\r\n }\r\n const handleClose = (type: string | undefined): void => {\r\n if (type === 'copy') copied('Text')\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 const handleEmojiMenu = ({ target }: any): void => {\r\n const idEmoji = target.id\r\n if (idEmoji === emoji) {updateMessageById(_id,'') \r\n } else updateMessageById(_id,idEmoji)\r\n } \r\n\r\n return (\r\n <div className={classes.container} style={{marginBottom:tongue?12:0}}>\r\n {read && <div className={classes.wrapperIcons}>\r\n <ZoomOutIcon onClick={handleDecreaseScale} className={classes.magnifying} fontSize='large' />\r\n <ZoomInIcon onClick={handleIncreaseScale} className={classes.magnifying} fontSize='large' />\r\n <CloseIcon id='close' onClick={handleCloseRead} className={classes.iconCloseOverlay} fontSize='large' />\r\n </div>} \r\n {read && <div className={classes.overlay} id='overlay'\r\n onClick={handleCloseRead}>\r\n <div ref={refView}>\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>}\r\n <div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}\r\n style={{backgroundColor:selected?'#ced8d7':\"#deffa9\",pointerEvents:isSomeSelected?'none':'auto'}}>\r\n <Typography style={{color: \"#26afee\",marginBottom:10}} variant=\"h6\" align=\"right\">\r\n {`${firstLetter(name)}${slicedWord(name, 15, 1)} \r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n </Typography>\r\n {!read &&<Button fullWidth onClick={handleOpenRead} variant=\"contained\" color='warning' style={{fontWeight:500,fontSize:18}}>\r\n Read File\r\n </Button>}\r\n <ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: \"#000000\"}}/>\r\n <div className={classes.informationWrapper}>\r\n <div className={classes.time} style={{ color: '#18bd03'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>\r\n {watched ? <DoneAllIcon style={{ color: '#18bd03', marginLeft: 5 }} fontSize='small' /> :\r\n <DoneIcon style={{ color: '#18bd03',marginLeft:5}} fontSize='small' />}\r\n </div>\r\n {tongue&&<div className={classes.avatarIcon}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </div>}\r\n {tongue&&<span className={classes.tongueOne} style={{borderBottom: `15px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {tongue&&<span className={classes.tongueTwo} style={{borderBottom: `17px solid ${selected?'#ced8d7':'#deffa9'}`}}></span>}\r\n {emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}\r\n {emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}\r\n {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}\r\n onClick={() => handleSelected(_id)}/></div>}\r\n <StyledMenu id=\"demo-positioned-menu\" aria-labelledby=\"demo-positioned-button\"\r\n anchorEl={anchorEl} open={open} onClose={handleClose}>\r\n <MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >\r\n {emojisArr.map((el:string, i:number) =>\r\n <div key={el} className={emoji === String(i)?classes.emojiActive:classes.emoji} id={String(i)}>{el}</div>)}\r\n </MenuItem>\r\n <Divider />\r\n <MenuItem onClick={() => {\r\n handleReply(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon />\r\n Reply\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleForward(_id)\r\n handleClose(undefined)\r\n }}>\r\n <ReplyIcon style={{transform :'rotateY(180deg)'}} />\r\n Forward\r\n </MenuItem>\r\n <MenuItem onClick={() => {\r\n handleEdit(_id)\r\n handleClose(undefined)\r\n }}>\r\n <EditIcon/>\r\n Edit\r\n </MenuItem> \r\n <MenuItem onClick={handleDownloadFile}>\r\n <DownloadIcon/>\r\n Download\r\n </MenuItem> \r\n {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>\r\n <MenuItem>\r\n <ContentCopyIcon />\r\n Copy Text\r\n </MenuItem>\r\n </CopyToClipboard>}\r\n <MenuItem onClick={() => {\r\n pinMessageById(_id, !pinned)\r\n handleClose(undefined)\r\n }}>\r\n {pinned ?\r\n <CloseIcon className={classes.iconClose} /> :\r\n <PushPinIcon />}\r\n {pinned?'Unpin':'Pin'}\r\n </MenuItem> \r\n <MenuItem onClick={() => {\r\n handleSelected(_id)\r\n handleClose(undefined)\r\n }}>\r\n <CheckBoxIcon />\r\n Select\r\n </MenuItem>\r\n <MenuItem style={{color:'#f02a2a'}} onClick={() => handleClose('delete')}>\r\n <DeleteOutlineIcon style={{color:'#f02a2a'}}/>\r\n Delete\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: 12\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 IMessageDivider {\r\n message:string,\r\n}\r\n\r\nconst MessageDivider = ({ message }:IMessageDivider) => {\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 MessageDivider\r\n","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 InputBase from '@mui/material/InputBase';\r\nimport SearchIcon from '@mui/icons-material/Search';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport IconButton from '@mui/material/IconButton';\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 { useDispatch } from 'react-redux';\r\n\r\nimport StaticDatePicker from \"./StaticDatePicker\";\r\nimport { updateUser } from '../../../../../../api-data';\r\nimport { asyncCurrentUser } from '../../../../../../redux/authorization/operations';\r\n\r\nconst SearchBar = styled('div')(() => ({\r\n position: 'relative',\r\n borderRadius: '20px',\r\n backgroundColor: '#f1f0f0', \r\n width: '100%',\r\n margin: '0px 5px',\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 width: '100%',\r\n display: 'flex',\r\n flexWrap:'nowrap',\r\n alignItems: 'center',\r\n alignContent: 'center',\r\n padding: '0px 5px',\r\n },\r\n searchBarActive: {\r\n outline: '2px solid #2184f7',\r\n color: '#2184f7',\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 label = { inputProps: { 'aria-label': 'Switch demo' } };\r\n\r\ninterface IForwardSearch {\r\n handleSearch: (e: React.ChangeEvent<HTMLInputElement>) => void,\r\n value: string,\r\n total: string,\r\n sort: boolean,\r\n setDate: React.Dispatch<any>,\r\n date:any,\r\n}\r\n\r\nconst ForwardSearch = ({handleSearch,value,total,sort,setDate,date}:IForwardSearch) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const disabled = total === '0' ? true : false\r\n const handleSort = () => {\r\n updateUser({ sort: !sort })\r\n setTimeout(() => {\r\n dispatch(asyncCurrentUser())\r\n }, 1000);\r\n }\r\n const handleOnOpen = () => setDate('')\r\n \r\n return (\r\n <div className={classes.toolBar} >\r\n <IconButton aria-label=\"delete\" size=\"medium\">\r\n <CloseIcon id='cancel' className={classes.iconClose} 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 date={date} disabled={disabled} \r\n changeDate={setDate} handleOnOpen={handleOnOpen} /> \r\n <CalendarTodayIcon fontSize='medium' style={{color:date?'#2184f7':'#b1aeae'}}/>\r\n </IconButton>\r\n <Switch onClick={handleSort} checked={sort} {...label} disabled={disabled} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default ForwardSearch","import { makeStyles } from '@material-ui/core'\r\nimport { styled } from '@mui/material/styles';\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\n\r\nimport { firstLetter, slicedWord, timeStampEU,prodAwsS3 } from '../../../../../../../helpers';\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 listItem_iconAvatar: {\r\n marginRight:10\r\n },\r\n})\r\n\r\ninterface IForwardItem {\r\n name: string,\r\n lastName: string,\r\n avatarUrl: string,\r\n color: string,\r\n online: string,\r\n companionId: string,\r\n handleForwardTo: (companionId: string) => void,\r\n}\r\nconst ForwardItem = ({name,lastName,avatarUrl,color,online,companionId,handleForwardTo}:IForwardItem) => {\r\n const classes = useStyles()\r\n \r\n return (\r\n <div>\r\n <ListItemButton onClick={() => handleForwardTo(companionId)}>\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?`${prodAwsS3}/${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={`${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 </div>\r\n );\r\n}\r\nexport default ForwardItem","import List from '@mui/material/List';\r\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport AlertInfo from '../../../../../reusableComponents/AlertInfo'\r\nimport ForwardItem from './ForwardItem'\r\nimport { TChats } from '../../../../../../typescript/redux/chats/types';\r\n\r\n\r\nconst useStyles = makeStyles({\r\n list: {\r\n width: '100%',\r\n maxHeight: '63vh',\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 IForwardList {\r\n value: string,\r\n date:string,\r\n filteredAndSorted:TChats,\r\n handleForwardTo: (companionId: string) => void,\r\n}\r\n\r\nconst ForwardList = ({ value,date,filteredAndSorted,handleForwardTo }: IForwardList) => {\r\n const classes = useStyles()\r\n \r\n\r\n return <>\r\n <List className={classes.list} component=\"nav\"\r\n aria-label=\"main mailbox folders\">\r\n {filteredAndSorted.map(({ name, lastName, avatarUrl, color, online, companionId, number }) =>\r\n <ForwardItem key={number} name={name} lastName={lastName}\r\n avatarUrl={avatarUrl} color={color} online={online}\r\n companionId={companionId} handleForwardTo={handleForwardTo} />)}\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 </List>\r\n </>\r\n}\r\n\r\nexport default ForwardList","import { makeStyles } from '@material-ui/core'\r\nimport { useState,useMemo } from 'react'\r\nimport { useSelector,useDispatch } from 'react-redux'\r\n\r\nimport ForwardSearch from './ForwardSearch'\r\nimport ForwardList from './ForwardList'\r\nimport { asyncGetChatById } from '../../../../../redux/chat/operations'\r\nimport { actionRightIsOpen,actionScrollChat,actionOpenPinned } from '../../../../../redux/control/action'\r\nimport { getStateMemo } from '../../../../../redux/chats/selector'\r\nimport { getSort } from '../../../../../redux/authorization/selector'\r\nimport { TMessage } from '../../../../../typescript/redux/messages/types'\r\nimport { sortByRecent,timeStampFilter } 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 }, \r\n container: {\r\n backgroundColor: 'white',\r\n width: '22vw',\r\n position: 'absolute',\r\n top: '15vh',\r\n height:'70vh',\r\n left: '39vw',\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n alignItems: 'start',\r\n alignContent:'start',\r\n borderRadius:10,\r\n }\r\n})\r\n\r\ninterface IForwardSearchList {\r\n setModalForward: React.Dispatch<React.SetStateAction<boolean>>,\r\n setIsForward: React.Dispatch<React.SetStateAction<TMessage | undefined>>,\r\n companionId: string,\r\n}\r\nconst ForwardSearchList = ({setModalForward,setIsForward,companionId}:IForwardSearchList) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const sort = useSelector(getSort)\r\n const { total,chats } = useSelector(getStateMemo)\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 const handleCloseForwardModal = (e: any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'cancel') {\r\n setModalForward(false)\r\n setIsForward(undefined)\r\n }\r\n }\r\n const handleForwardTo = (newCompanionId: string) => {\r\n setModalForward(false)\r\n dispatch(actionRightIsOpen(''))\r\n dispatch(actionOpenPinned(false))\r\n dispatch(asyncGetChatById(newCompanionId))\r\n setIsForward((prevState) => \r\n prevState ? { ...prevState, companionIdForwardToAndFrom: newCompanionId } : prevState)\r\n if (companionId !== newCompanionId) setTimeout(() => dispatch(actionScrollChat(true)), 500)\r\n }\r\n\r\n const filteredAndSorted = useMemo(() => {\r\n return sortByRecent(chats,sort).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 } else return undefined\r\n })\r\n }, [chats, date, value, sort]) \r\n\r\n return (\r\n <div onClick={handleCloseForwardModal} className={classes.overlay} id='overlay'>\r\n <div className={classes.container}>\r\n <ForwardSearch handleSearch={handleSearch} value={value} total={total}\r\n sort={sort} date={date} setDate={setDate}/>\r\n <ForwardList value={value} date={date} filteredAndSorted={filteredAndSorted} handleForwardTo={handleForwardTo}/>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default ForwardSearchList","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 actionGetPinnedMessagesSuccess,\r\n actionGetPinnedMessagesReject,\r\n} from '../action';\r\n\r\nimport { TPinnedMessages, TPinnedMessage } from '../../../typescript/redux/pinnedMessages/types'\r\nimport { handleSort } from '../../../helpers';\r\n\r\n\r\nconst asyncFindPinnedMessages= (messages:TPinnedMessages) => async (dispatch:any) => {\r\n try {\r\n const pinnedMessages = handleSort('updatedAt', messages.filter((el: TPinnedMessage) => el.pinned === true), true)\r\n if(pinnedMessages) dispatch(actionGetPinnedMessagesSuccess(pinnedMessages))\r\n } catch (e) {\r\n dispatch(actionGetPinnedMessagesReject())\r\n } \r\n};\r\n\r\n\r\nexport { asyncFindPinnedMessages };\r\n\r\n\r\n\r\n\r\n","import {\r\n actionGetMessagesSuccess,\r\n actionGetMessagesReject\r\n} from '../action';\r\nimport { asyncFindPinnedMessages } from '../../pinnedMessages/operations'\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 if (data) {\r\n dispatch(actionGetMessagesSuccess(data))\r\n dispatch(asyncFindPinnedMessages(data.messages))\r\n }\r\n cb&&cb()\r\n } catch (e) {\r\n dispatch(actionGetMessagesReject())\r\n \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, useCallback, useMemo } from \"react\";\r\nimport { useSelector,useDispatch } from \"react-redux\";\r\n\r\nimport ArrowBack from \"./ArrowBack\";\r\nimport SendMessage from \"./SendMessage\";\r\nimport UnpinBar from \"./UnpinBar\";\r\nimport MessageLeftDeleted from \"./Messages/MessageLeftDeleted\";\r\nimport MessageLeftText from './Messages/MessageLeftText'\r\nimport MessageLeftReply from \"./Messages/MessageLeftReply\";\r\nimport MessageLeftForward from \"./Messages/MessageLeftForward\";\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 MessageRightDeleted from \"./Messages/MessageRightDeleted\";\r\nimport MessageRightText from './Messages/MessageRightText'\r\nimport MessageRightReply from \"./Messages/MessageRightReply\";\r\nimport MessageRightForward from \"./Messages/MessageRightForward\";\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 MessageDivider from \"./Messages/MessageDivider\";\r\nimport AlertInfo from \"../../../reusableComponents/AlertInfo\";\r\nimport ForwardSearchList from \"./ForwardSearchList\";\r\nimport { getMessagesMemo } from '../../../../redux/messages/selector'\r\nimport { getAuthorizationState } from '../../../../redux/authorization/selector'\r\nimport { getChat } from '../../../../redux/chat/selector'\r\nimport { getScrollChat } from '../../../../redux/control/selector'\r\nimport { actionScrollChat,actionOpenPinned,actionRightIsOpen } from '../../../../redux/control/action'\r\nimport { asyncGetMessagesById } from '../../../../redux/messages/operations'\r\nimport { asyncGetChatById,asyncStartChatById } from \"../../../../redux/chat/operations\";\r\nimport { seenChat } from \"../../../../api-data\";\r\nimport { TPinnedMessages } from \"../../../../typescript/redux/pinnedMessages/types\";\r\nimport { TMessage } from \"../../../../typescript/redux/allMessages/types\"; \r\nimport { timeStampFilter,prodAwsS3,refreshAppTime } 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\ninterface IChatBar {\r\n chatDivRef: any | null,\r\n selectedArr: string[] | [],\r\n setSelectedArr: React.Dispatch<React.SetStateAction<string[] | []>>,\r\n isSomeSelected: boolean,\r\n setIsSomeSelected: React.Dispatch<React.SetStateAction<boolean>>,\r\n openPinned: boolean,\r\n pinnedMessagesMemo: TPinnedMessages,\r\n handleUnpinAll: () => void,\r\n}\r\n\r\nconst ChatBar = ({chatDivRef,selectedArr,setSelectedArr,isSomeSelected,setIsSomeSelected,openPinned,pinnedMessagesMemo,handleUnpinAll}:IChatBar) => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch()\r\n const messagesMemo = useSelector(getMessagesMemo)\r\n const { number:userNumber,nightMode,silentMode} = useSelector(getAuthorizationState)\r\n const { companionId,total,seen,mute,seenCompanion,number:chatNumber } = useSelector(getChat)\r\n const scrollChat = useSelector(getScrollChat)\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 [isReply, setIsReply] = useState<TMessage | undefined>(undefined)\r\n const [isForward, setIsForward] = useState<TMessage | undefined>(undefined)\r\n const [isEdit, setIsEdit] = useState<TMessage | undefined>(undefined)\r\n const [modalForward, setModalForward] = useState<boolean>(false)\r\n let time: any\r\n let tongue: any\r\n let unread: any\r\n const getSeconds = (createdAt:string) => Math.round(new Date(createdAt).getTime()/ 1000)\r\n const isSelected = (_id: string) => selectedArr.some((el: string) => el === _id) \r\n const handleSelected = (_id: string) => {\r\n !isSomeSelected&&setIsSomeSelected(true)\r\n if (selectedArr.some((el: string) => el === _id)) \r\n setSelectedArr(selectedArr.filter((el:string) => el !== _id))\r\n else setSelectedArr([...selectedArr,_id])\r\n }\r\n\r\n const handleReply = (_id: string) => {\r\n openPinned && dispatch(actionOpenPinned(false))\r\n isEdit&&setIsEdit(undefined)\r\n setIsReply(renderArr.find((el) => el._id ===_id))\r\n }\r\n \r\n const handleForward = (_id: string) => {\r\n openPinned && dispatch(actionOpenPinned(false))\r\n isReply && setIsReply(undefined)\r\n isEdit&&setIsEdit(undefined)\r\n setIsForward(renderArr.find((el) => el._id === _id))\r\n setModalForward(true)\r\n }\r\n\r\n const handleEdit = (_id: string) => {\r\n openPinned && dispatch(actionOpenPinned(false))\r\n isReply && setIsReply(undefined)\r\n setIsEdit(renderArr.find((el) => el._id ===_id))\r\n } \r\n \r\n const handleScrollTo = useCallback(() => {\r\n chatDivRef.current&&chatDivRef.current.scrollTo({\r\n top: chatDivRef.current.scrollHeight,\r\n behavior: 'smooth'\r\n })\r\n },[chatDivRef])\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 && !openPinned) seenChat(companionId)\r\n setIsArrow(different === clientHeight ? false : true)\r\n }, [total,seen, companionId,openPinned])\r\n \r\n const debouncedHandleScroll = debounce(handleScroll, 300)\r\n\r\n const renderArr = useMemo(() => {\r\n return !openPinned ? messagesMemo : pinnedMessagesMemo\r\n }, [messagesMemo, pinnedMessagesMemo, openPinned])\r\n \r\n const handleScrollToTheMessage = (_id:string) => {\r\n const childNodes = chatDivRef.current.childNodes[0].childNodes\r\n let toScrollNode = [...childNodes].find((el: any) => el.id === _id)\r\n if (toScrollNode) {\r\n toScrollNode = [...toScrollNode.childNodes].slice(-1)[0]\r\n toScrollNode.style.backgroundColor = 'rgba(70, 70, 70, 0.4)'\r\n toScrollNode.style.boxShadow = '0px 0px 6px 0px #ffffff'\r\n toScrollNode.scrollIntoView({ behavior: 'smooth' })\r\n setTimeout(() => {\r\n toScrollNode.style.backgroundColor = 'unset'\r\n toScrollNode.style.boxShadow = 'unset'\r\n }, 2000)\r\n }\r\n } \r\n\r\n const handleScrollToTheChat = (companionIdForwardToAndFrom:string,oldId:string) => {\r\n if (companionId === companionIdForwardToAndFrom) return handleScrollToTheMessage(oldId)\r\n dispatch(actionRightIsOpen(''))\r\n dispatch(actionOpenPinned(false))\r\n dispatch(asyncStartChatById(companionIdForwardToAndFrom))\r\n setTimeout(() => handleScrollToTheMessage(oldId), 2000)\r\n }\r\n \r\n const handleOpenTheChat = (companionIdForwardToAndFrom: string | null) => {\r\n if (companionIdForwardToAndFrom&&companionId !== companionIdForwardToAndFrom) {\r\n dispatch(actionRightIsOpen(''))\r\n dispatch(actionOpenPinned(false))\r\n dispatch(asyncStartChatById(companionIdForwardToAndFrom))\r\n }\r\n }\r\n \r\n useEffect(() => {\r\n if (scrollChat) {\r\n dispatch(asyncGetMessagesById(companionId, handleScrollTo))\r\n dispatch(actionScrollChat(false))\r\n }\r\n }, [dispatch,handleScrollTo, scrollChat, companionId])\r\n \r\n useEffect(() => {\r\n const handleReset = () => {\r\n dispatch(asyncGetChatById(companionId))\r\n dispatch(asyncGetMessagesById(companionId, null))\r\n }\r\n handleReset()\r\n const idInterval = setInterval(handleReset, refreshAppTime);\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 (chatDivRef.current&&openPinned) {\r\n const { scrollHeight, clientHeight } = chatDivRef.current\r\n if (scrollHeight === clientHeight && isArrow) setIsArrow(false)\r\n }\r\n }, [chatDivRef,openPinned,pinnedMessagesMemo.length, isArrow]); \r\n\r\n useEffect(() => {\r\n const handleReset = () => {\r\n if (chatDivRef.current&&!openPinned) {\r\n const { scrollHeight, clientHeight } = chatDivRef.current\r\n if (total !== seen && scrollHeight === clientHeight) seenChat(companionId)\r\n }\r\n }\r\n const idInterval = setInterval(handleReset, refreshAppTime);\r\n return () => clearInterval(idInterval);\r\n }, [total, seen, chatDivRef, companionId, openPinned]);\r\n \r\n return (\r\n <div className={classes.container} >\r\n <ArrowBack isArrow={isArrow} isNew={isNew} handleScrollTo={handleScrollTo} openPinned={openPinned}/>\r\n {isForward && modalForward && <ForwardSearchList setModalForward={setModalForward}\r\n setIsForward={setIsForward} companionId={companionId}/>}\r\n <div id={companionId} ref={chatDivRef} onScroll={debouncedHandleScroll}\r\n className={messagesMemo.length > 0 ? classes.messagesScroll : classes.messagesEmpty}>\r\n <div className={classes.messagesBody}>\r\n {messagesMemo.length > 0 ? renderArr.map(({ replyMessage,message, name, lastName,avatarUrl,color,pinned,\r\n createdAt, number, type, fullType, replyName, replyLastName, replyCaption, caption, emoji, emojiCompanion,\r\n _id, oldId, forwardName, forwardLastName, companionIdForwardToAndFrom,forwardMessage,forwardCaption,edited,deleted},i) => {\r\n const watched = seenCompanion - (i + 1) < 0 ? false : true\r\n let isUnread\r\n let isTime\r\n let isTongue = false\r\n const nextTongue = renderArr[i + 1]\r\n if (!unread && chatNumber === number&& seen - (i + 1) < 0) {\r\n isUnread = true\r\n unread = true\r\n }\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 if (!tongue&&nextTongue&&nextTongue.number === number) {\r\n if (getSeconds(nextTongue.createdAt) - getSeconds(createdAt) < 600) {\r\n isTongue = false\r\n } else {\r\n isTongue = true\r\n }\r\n tongue = number\r\n } else if (!tongue&&nextTongue&&nextTongue.number !== number) {\r\n isTongue = true\r\n tongue = null\r\n } else if (tongue&&nextTongue&&tongue === number&&nextTongue.number === number) {\r\n if (getSeconds(nextTongue.createdAt) - getSeconds(createdAt) < 600) {\r\n isTongue = false\r\n } else {\r\n isTongue = true\r\n }\r\n tongue = number\r\n } else if (tongue&&nextTongue&&tongue === number&&nextTongue.number !== number) {\r\n isTongue = true\r\n tongue = null\r\n } else if (tongue&&!nextTongue&&tongue === number) {\r\n isTongue = true\r\n tongue = null\r\n } else if (tongue&&!nextTongue&&tongue !== number) {\r\n isTongue = false\r\n tongue = number\r\n }\r\n if(renderArr.length-1 === i) isTongue = true\r\n if (nextTongue && timeStampFilter(nextTongue.createdAt) !== timeStampFilter(createdAt)) {\r\n isTongue = true\r\n }\r\n const url = `${prodAwsS3}/${message}`\r\n const urlForward = `${prodAwsS3}/${forwardMessage}`\r\n const urlReply = `${prodAwsS3}/${replyMessage}`\r\n if (number !== userNumber) {\r\n if (type === 'text' && !oldId && !companionIdForwardToAndFrom && !deleted) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}> \r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageLeftText\r\n message={message}\r\n tongue={isTongue}\r\n watched={!unread}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n createdAt={createdAt}\r\n name={name}\r\n lastName={lastName}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected}\r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward} \r\n /></div>)\r\n if (type === 'text' && deleted) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}> \r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageLeftDeleted\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n companionIdForwardToAndFrom={companionIdForwardToAndFrom}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n forwardReplyName={companionIdForwardToAndFrom?forwardName:replyName}\r\n forwardReplyLastName={companionIdForwardToAndFrom?forwardLastName:replyLastName}\r\n message={message}\r\n createdAt={createdAt}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n handleOpenTheChat={handleOpenTheChat}\r\n /></div>) \r\n if (type === 'text' && companionIdForwardToAndFrom) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}> \r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageLeftForward\r\n url={urlForward}\r\n companionIdForwardToAndFrom={companionIdForwardToAndFrom}\r\n oldId={oldId}\r\n tongue={isTongue}\r\n watched={!unread}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n forwardName={forwardName}\r\n forwardLastName={forwardLastName}\r\n forwardMessage={forwardMessage}\r\n forwardCaption={forwardCaption}\r\n message={message}\r\n createdAt={createdAt}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n fullType={fullType}\r\n handleScrollToTheChat={handleScrollToTheChat}\r\n /></div>) \r\n if (type === 'text' && oldId) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}> \r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageLeftReply\r\n url={urlReply}\r\n tongue={isTongue}\r\n watched={!unread}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n replyMessage={replyMessage}\r\n message={message}\r\n createdAt={createdAt}\r\n name={name}\r\n lastName={lastName}\r\n replyName={replyName}\r\n replyLastName={replyLastName}\r\n replyCaption={replyCaption}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n fullType={fullType}\r\n handleScrollToTheMessage={handleScrollToTheMessage}\r\n oldId={oldId}\r\n /></div>) \r\n if (type === 'image') return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageLeftImage \r\n url={url}\r\n tongue={isTongue}\r\n watched={!unread}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n name={name}\r\n lastName={lastName}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n /></div>)\r\n if (type === 'audio') return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageLeftAudio \r\n url={url}\r\n tongue={isTongue}\r\n watched={!unread}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n /></div>)\r\n if (type === 'video') return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageLeftVideo \r\n url={url}\r\n tongue={isTongue}\r\n watched={!unread}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n /></div>)\r\n if (type) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageLeftFile \r\n url={url}\r\n tongue={isTongue}\r\n watched={!unread}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n createdAt={createdAt}\r\n type={type}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n /></div>) \r\n } else {\r\n if (type === 'text' && !oldId && !companionIdForwardToAndFrom && !deleted) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageRightText \r\n message={message}\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n createdAt={createdAt}\r\n name={name}\r\n lastName={lastName}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n /></div>)\r\n if (type === 'text' && deleted) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageRightDeleted\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n companionIdForwardToAndFrom={companionIdForwardToAndFrom}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n forwardReplyName={companionIdForwardToAndFrom?forwardName:replyName}\r\n forwardReplyLastName={companionIdForwardToAndFrom?forwardLastName:replyLastName}\r\n message={message}\r\n createdAt={createdAt}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n handleOpenTheChat={handleOpenTheChat}\r\n /></div>) \r\n if (type === 'text' && companionIdForwardToAndFrom) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageRightForward\r\n url={urlForward}\r\n oldId={oldId}\r\n companionIdForwardToAndFrom={companionIdForwardToAndFrom}\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n forwardName={forwardName}\r\n forwardLastName={forwardLastName}\r\n forwardMessage={forwardMessage}\r\n forwardCaption={forwardCaption}\r\n message={message}\r\n createdAt={createdAt}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n fullType={fullType}\r\n handleScrollToTheChat={handleScrollToTheChat}\r\n /></div>) \r\n if (type === 'text' && oldId) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageRightReply\r\n url={urlReply}\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n replyMessage={replyMessage}\r\n message={message}\r\n createdAt={createdAt}\r\n name={name}\r\n lastName={lastName}\r\n replyName={replyName}\r\n replyLastName={replyLastName}\r\n replyCaption={replyCaption}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected} \r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n fullType={fullType}\r\n handleScrollToTheMessage={handleScrollToTheMessage}\r\n oldId={oldId}\r\n /></div>) \r\n if (type === 'image') return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageRightImage \r\n url={url}\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected}\r\n _id={_id}\r\n name={name}\r\n lastName={lastName}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n /></div>)\r\n if (type === 'audio') return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageRightAudio \r\n url={url}\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected}\r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n /></div>)\r\n if (type === 'video') return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageRightVideo \r\n url={url}\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n createdAt={createdAt}\r\n fullType={fullType}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected}\r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n /></div>)\r\n if (type) return (<div key={createdAt} id={_id} style={{borderRadius: 7}}>\r\n {isTime&&<MessageDivider message={timeStampFilter(createdAt)}/>}\r\n {isUnread&&<MessageDivider message='Unread Messages'/>}\r\n <MessageRightFile \r\n url={url}\r\n tongue={isTongue}\r\n watched={watched}\r\n edited={edited}\r\n avatarUrl={avatarUrl}\r\n color={color}\r\n name={name}\r\n lastName={lastName}\r\n createdAt={createdAt}\r\n type={type}\r\n caption={caption}\r\n emoji={emoji}\r\n emojiCompanion={emojiCompanion}\r\n pinned={pinned}\r\n isSomeSelected={isSomeSelected}\r\n isSelected={isSelected}\r\n handleSelected={handleSelected}\r\n _id={_id}\r\n nightMode={nightMode}\r\n handleReply={handleReply}\r\n handleForward={handleForward}\r\n handleEdit={handleEdit}\r\n /></div>) \r\n }\r\n }) : <AlertInfo name='You do not have messages yet!' />}\r\n </div>\r\n </div>\r\n {!openPinned && !isSomeSelected && <SendMessage isArrow={isArrow} silentMode={silentMode} isReply={isReply} setIsReply={setIsReply}\r\n isForward={isForward} setIsForward={setIsForward}\r\n isEdit={isEdit} setIsEdit={setIsEdit}\r\n modalForward={modalForward} handleScrollToTheMessage={handleScrollToTheMessage}/>}\r\n {openPinned&&!isSomeSelected&&<UnpinBar pinnedMessagesMemo={pinnedMessagesMemo} handleUnpinAll={handleUnpinAll} />}\r\n </div>\r\n );\r\n}\r\n\r\nexport default ChatBar","import Grid from '@mui/material/Grid'\r\nimport { useState,useEffect } from 'react'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\n\r\nimport HeaderBar from './HeaderBar'\r\nimport ChatBar from './ChatBar'\r\nimport { getPinnedMessagesMemo } from '../../../redux/pinnedMessages/selector'\r\nimport { TRightIsOpen } from '../../../typescript/redux/control/types'\r\nimport { getOpenPinned } from '../../../redux/control/selector'\r\nimport { actionOpenPinned } from '../../../redux/control/action'\r\nimport { unpinAllMessagesById } from '../../../api-data'\r\n\r\ninterface ICentralBar {\r\n rightIsOpen: TRightIsOpen,\r\n chatDivRef: any | null,\r\n companionId: string,\r\n backgroundImage: string,\r\n handleStartCall: () => void,\r\n}\r\n\r\nconst CentralBar = ({rightIsOpen,chatDivRef,companionId,backgroundImage,handleStartCall}:ICentralBar) => {\r\n const dispatch = useDispatch()\r\n const pinnedMessagesMemo = useSelector(getPinnedMessagesMemo)\r\n const openPinned = useSelector(getOpenPinned)\r\n const [selectedArr, setSelectedArr] = useState<string[] | []>([])\r\n const [isSomeSelected, setIsSomeSelected] = useState<boolean>(false)\r\n \r\n const handleClearSelect = () => {\r\n selectedArr.length > 0 && setSelectedArr([])\r\n isSomeSelected && setIsSomeSelected(false)\r\n }\r\n\r\n const handleUnpinAll = () => {\r\n openPinned && dispatch(actionOpenPinned(false))\r\n unpinAllMessagesById(pinnedMessagesMemo.map(({_id}) => _id))\r\n }\r\n \r\n useEffect(() => {\r\n if(pinnedMessagesMemo.length === 0 && openPinned) dispatch(actionOpenPinned(false))\r\n }, [openPinned,pinnedMessagesMemo,dispatch])\r\n \r\n useEffect(() => {\r\n setIsSomeSelected(false)\r\n setSelectedArr([])\r\n }, [companionId]) \r\n\r\n return ( \r\n <Grid item lg={rightIsOpen?8:12}>\r\n <Grid item lg={12} >\r\n <HeaderBar chatDivRef={chatDivRef} selectedArr={selectedArr} isSomeSelected={isSomeSelected}\r\n handleClearSelect={handleClearSelect} setIsSomeSelected={setIsSomeSelected}\r\n openPinned={openPinned} pinnedMessagesMemo={pinnedMessagesMemo} handleStartCall={handleStartCall}/>\r\n </Grid> \r\n <Grid item lg={12} style={{backgroundImage}}>\r\n <ChatBar chatDivRef={chatDivRef} selectedArr={selectedArr} setSelectedArr={setSelectedArr}\r\n isSomeSelected={isSomeSelected} setIsSomeSelected={setIsSomeSelected}\r\n openPinned={openPinned} pinnedMessagesMemo={pinnedMessagesMemo} handleUnpinAll={handleUnpinAll}/>\r\n </Grid>\r\n </Grid>\r\n ) \r\n}\r\n\r\nexport default CentralBar","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 { actionRightIsOpen } 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(actionRightIsOpen(''))} 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 { useState,useMemo } 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 LibraryMusicIcon from '@mui/icons-material/LibraryMusic';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\r\nimport ImageIcon from '@mui/icons-material/Image';\r\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\r\nimport VideoLibraryIcon from '@mui/icons-material/VideoLibrary';\r\nimport Search from './Search'\r\nimport AlertInfo from \"../../../reusableComponents/AlertInfo\";\r\nimport { getMessagesMemo } from '../../../../redux/messages/selector'\r\nimport { getOpenPinned } from '../../../../redux/control/selector';\r\nimport { getPinnedMessagesMemo } from '../../../../redux/pinnedMessages/selector'\r\nimport { getChat } from '../../../../redux/chat/selector'\r\nimport { timeStampEU, timeStampFilter, firstLetter, slicedWord, handleSort,prodAwsS3 } from '../../../../helpers'\r\nimport { TMessages,TMessage } 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 cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n folderIcon: {\r\n margin: 'auto 0px',\r\n color: '#54b0fc',\r\n }\r\n})\r\n\r\ninterface ISearchList {\r\n chatDivRef: any | null,\r\n}\r\n\r\nconst SearchList= ({chatDivRef}:ISearchList) => {\r\n const classes = useStyles()\r\n const { sort } = useSelector(getChat)\r\n const openPinned = useSelector(getOpenPinned)\r\n const messagesMemo = useSelector(getMessagesMemo)\r\n const pinnedMessagesMemo = useSelector(getPinnedMessagesMemo)\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 const handleScrollToTheMessage = (_id: string) => {\r\n const childNodes = chatDivRef.current.childNodes[0].childNodes\r\n let toScrollNode = [...childNodes].find((el: any) => el.id === _id)\r\n if (toScrollNode) {\r\n toScrollNode = [...toScrollNode.childNodes].slice(-1)[0]\r\n toScrollNode.style.backgroundColor = 'rgba(70, 70, 70, 0.4)'\r\n toScrollNode.style.boxShadow = '0px 0px 6px 0px #ffffff'\r\n toScrollNode.scrollIntoView({ behavior: 'smooth' })\r\n setTimeout(() => {\r\n toScrollNode.style.backgroundColor = 'unset'\r\n toScrollNode.style.boxShadow = 'unset'\r\n }, 2000)\r\n }\r\n }\r\n \r\n const filteredAndSorted: TMessages = useMemo(() => handleSort('createdAt', !openPinned ? messagesMemo : pinnedMessagesMemo, sort)\r\n .filter((el: TMessage) => {\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 } return undefined\r\n }),[messagesMemo,date,sort,value,openPinned,pinnedMessagesMemo]) \r\n \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={messagesMemo.length > 0 ?classes.list:undefined}>\r\n {messagesMemo.length > 0 ? filteredAndSorted.length > 0 ?\r\n <List sx={{ width: '100%' }}>\r\n {filteredAndSorted.map(({ name, lastName, avatarUrl, color, message, createdAt,_id,fullType,type }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id)}\r\n alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40, 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 {type === 'text'? message : fullType}\r\n </Typography>\r\n {timeStampEU(createdAt)}\r\n </>}\r\n />\r\n {type === 'text' &&<ContentCopyIcon className={classes.folderIcon} fontSize='large'/>}\r\n {type !== 'text'&&fullType.includes('audio') &&<LibraryMusicIcon className={classes.folderIcon} fontSize='large' />}\r\n {type !== 'text'&&fullType.includes('video') &&<VideoLibraryIcon className={classes.folderIcon} fontSize='large' />}\r\n {type !== 'text'&&fullType.includes('image') &&<ImageIcon className={classes.folderIcon} fontSize='large' />}\r\n {type !== 'text' && fullType.includes('application') && <InsertDriveFileIcon className={classes.folderIcon} fontSize='large' />}\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 { actionRightIsOpen } 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(actionRightIsOpen(''))} 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(actionRightIsOpen('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, prodAwsS3 } from '../../../../../helpers'\r\nimport transparentPic from '../../../../../img/transparentPic.png'\r\nimport { getChat } from '../../../../../redux/chat/selector'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'relative',\r\n },\r\n timeTitle: {\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 nameTitle: {\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 countryTitle: {\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: '13%',\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 credentialsTitle: {\r\n position:'absolute',\r\n color: '#ffffff',\r\n fontSize: 100,\r\n top: '30%',\r\n left: '38%',\r\n },\r\n credentialsLowTitle: {\r\n position:'absolute',\r\n color: '#ffffff',\r\n fontSize: 25,\r\n top: '90%',\r\n left: '9%',\r\n },\r\n})\r\n\r\nconst ProfilePicture = () => {\r\n const classes = useStyles()\r\n const { name, lastName, online, avatarsArr, createdAt, color, country } = useSelector(getChat)\r\n const isDefault = avatarsArr.length === 0 ? false: true\r\n return (\r\n <div className={classes.container}>\r\n <Carousel>\r\n {isDefault ?\r\n avatarsArr.map(({ avatarUrl, updatedAt }) => <div>\r\n <img alt='pic' src={`${prodAwsS3}/${avatarUrl}`}/>\r\n <p className=\"legend\">{timeStampEU(updatedAt)}</p>\r\n </div>):\r\n [\r\n <div>\r\n <img alt='transparentPic' src={transparentPic}\r\n style={{ background: `linear-gradient(to bottom, ${color}, ${color} 80%, #5d5d5d 100%)` }} />\r\n <p className=\"legend\">{timeStampEU(createdAt)}</p>\r\n </div>\r\n ]}\r\n </Carousel> \r\n <span className={classes.timeTitle}>{online === 'true' ? 'online' : `last seen ${timeStampEU(online)}`}</span>\r\n <span className={classes.nameTitle}>{`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}</span>\r\n <span className={classes.countryTitle}>{country}</span>\r\n {!isDefault&&<span className={classes.credentialsTitle}>{`${firstLetter(name)}${firstLetter(lastName)}`}</span>}\r\n {!isDefault&&<span className={classes.credentialsLowTitle}>{`${firstLetter(name)}${firstLetter(lastName)}`}</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 \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='Copy number' />\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 Avatar from '@mui/material/Avatar';\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,prodAwsS3,firstLetter } from '../../../../../../helpers'\r\nimport { TMessages } from '../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`,\r\n },\r\n folderIcon: {\r\n margin: 'auto 0px',\r\n color: '#54b0fc',\r\n },\r\n listItem: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IAudioList {\r\n openPinned: boolean,\r\n filteredAndSorted: TMessages,\r\n handleScrollToTheMessage: (_id:string) => void,\r\n}\r\n\r\nconst AudioList = ({ filteredAndSorted,handleScrollToTheMessage,openPinned }: IAudioList) => {\r\n const classes = useStyles()\r\n \r\n return filteredAndSorted.length > 0 ?(\r\n <List className={classes.container}>\r\n {filteredAndSorted.map(({ message, createdAt, fullType,_id,name,avatarUrl,lastName,color }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id)}\r\n alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40, marginRight:2 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n <LibraryMusicIcon className={classes.folderIcon} fontSize='large'/> \r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>\r\n ): <AlertInfo name={`You do not have ${openPinned&&'Pinned'} Audio yet!`}/> \r\n}\r\n\r\nexport default AudioList","\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useState,useRef } from 'react';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemIcon from '@mui/material/ListItemIcon';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport ZoomOutIcon from '@mui/icons-material/ZoomOut';\r\nimport ZoomInIcon from '@mui/icons-material/ZoomIn';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ImageListItem from '@mui/material/ImageListItem';\r\nimport DownloadForOfflineIcon from '@mui/icons-material/DownloadForOffline';\r\nimport { handleDownload, timeStampEU, prodAwsS3, firstLetter, slicedWord } 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 minHeight: '100vh',\r\n zIndex: 100,\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n boxSizing: 'border-box',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n overflow: 'auto',\r\n },\r\n topBar: {\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n height: '7vh',\r\n width: '100vw',\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n backgroundColor: 'rgba(65, 65, 65, 0.9)',\r\n zIndex: 10,\r\n padding: '0px 20px'\r\n },\r\n wrapperCredentials: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n }, \r\n wrapperIcons: {\r\n display: 'flex',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n }, \r\n magnifying : {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'scale(1.1)'\r\n }\r\n }, \r\n downloadIcon: {\r\n marginLeft:5,\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 iconClose: {\r\n marginLeft:5,\r\n cursor: 'pointer',\r\n color: '#e9e7e7',\r\n padding: 0,\r\n '&:hover': {\r\n color: '#ffffff',\r\n transform: 'rotate(180deg)',\r\n transition: 'all 250ms ease-out ',\r\n }\r\n }, \r\n wrapperImage: {\r\n borderRadius: 5,\r\n maxWidth:500,\r\n maxHeight: 750,\r\n display: 'flex',\r\n overflow: 'auto'\r\n },\r\n innerImage: {\r\n objectFit: 'cover',\r\n }, \r\n img: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n scale:0.98\r\n }\r\n },\r\n});\r\n\r\ninterface IMediaListItem {\r\n message: string,\r\n fullType: string,\r\n updatedAt: string,\r\n handleScrollToTheMessage: (_id: string) => void,\r\n id: string,\r\n name: string,\r\n lastName: string,\r\n avatarUrl: string,\r\n color: string,\r\n}\r\n\r\nconst MediaListItem = ({ message, fullType, updatedAt, handleScrollToTheMessage,\r\n id, name, lastName, avatarUrl,color }: IMediaListItem) => {\r\n const classes = useStyles();\r\n const url = `${prodAwsS3}/${message}`\r\n const [watch, setWatch] = useState<boolean>(false)\r\n const [scale, setScale] = useState<number>(1)\r\n const refView = useRef<null | any>(null)\r\n const handleIncreaseScale = () => {\r\n if (scale < 5) {\r\n refView.current.style.transform = `scale(${scale+0.25},${scale+0.25})`\r\n refView.current.style.transformOrigin = `${50 / scale + 0.25}px ${50 / scale + 0.25}px`\r\n setScale(scale+0.25)\r\n }\r\n }\r\n const handleDecreaseScale = () => {\r\n if (scale >= 0.5) {\r\n refView.current.style.transform = `scale(${scale-0.25},${scale-0.25})`\r\n refView.current.style.transformOrigin = `${50/scale-0.25}px ${50/scale-0.25}px`\r\n setScale(scale-0.25)\r\n }\r\n } \r\n const handleOpenWatch = () => !watch && setWatch(true)\r\n const handleCloseWatch = (e:any) => {\r\n const id = e.target.id\r\n if (id === 'overlay' || id === 'close') {\r\n setWatch(false)\r\n setScale(1)\r\n }\r\n } \r\n \r\n return (watch?\r\n <div id='overlay' onClick={(e) => {\r\n handleCloseWatch(e)\r\n handleScrollToTheMessage(id)\r\n }} className={classes.overlay}>\r\n <div className={classes.topBar}>\r\n <div className={classes.wrapperCredentials}>\r\n <ListItemIcon >\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${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 primaryTypographyProps={{ color: '#ffffff' }}\r\n secondary={timeStampEU(updatedAt)} secondaryTypographyProps={{ color: '#ffffff' }} />\r\n </div>\r\n <div className={classes.wrapperIcons}>\r\n <ZoomOutIcon onClick={handleDecreaseScale}\r\n className={classes.magnifying} fontSize='large' />\r\n <ZoomInIcon onClick={handleIncreaseScale}\r\n className={classes.magnifying} fontSize='large' />\r\n <DownloadForOfflineIcon onClick={() => handleDownload(url, fullType)}\r\n className={classes.downloadIcon} fontSize='large' />\r\n <CloseIcon id='close' onClick={handleCloseWatch}\r\n className={classes.iconClose} fontSize='large' />\r\n </div> \r\n </div>\r\n <div ref={refView} className={classes.wrapperImage}>\r\n <img className={classes.innerImage} 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\nimport { makeStyles } from '@material-ui/core'\r\n\r\nimport AlertInfo from '../../../../../reusableComponents/AlertInfo';\r\nimport { TMessages } from '../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`,\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IMediaList {\r\n openPinned: boolean,\r\n filteredAndSorted: TMessages,\r\n handleScrollToTheMessage: (_id:string) => void,\r\n}\r\n\r\nconst MediaList = ({ filteredAndSorted,handleScrollToTheMessage,openPinned }: IMediaList) => {\r\n const classes = useStyles()\r\n\r\n return filteredAndSorted.length > 0 ?(\r\n <ImageList className={classes.container}\r\n sx={{ width: '100%', height: 'auto', overflow: 'hidden' }} cols={3} rowHeight={164}>\r\n {filteredAndSorted.map(({message,createdAt,fullType,updatedAt,_id,name,lastName,avatarUrl,color}) => \r\n <MediaListItem key={createdAt} message={message} fullType={fullType}\r\n updatedAt={updatedAt} handleScrollToTheMessage={handleScrollToTheMessage} id={_id}\r\n name={name} lastName={lastName} avatarUrl={avatarUrl} color={color}/>)}\r\n </ImageList>\r\n ): <AlertInfo name={`You do not have ${openPinned&&'Pinned'} 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 Avatar from '@mui/material/Avatar';\r\nimport InsertDriveFileIcon from '@mui/icons-material/InsertDriveFile';\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,prodAwsS3,firstLetter } from '../../../../../../helpers'\r\nimport { TMessages } from '../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`,\r\n }, \r\n folderIcon: {\r\n margin: 'auto 0px',\r\n color: '#54b0fc',\r\n },\r\n listItem: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IFilesList {\r\n openPinned: boolean,\r\n filteredAndSorted: TMessages,\r\n handleScrollToTheMessage: (_id:string) => void,\r\n}\r\n\r\nconst FilesList = ({ filteredAndSorted,handleScrollToTheMessage,openPinned }: IFilesList) => {\r\n const classes = useStyles()\r\n \r\n return filteredAndSorted.length > 0 ?(\r\n <List className={classes.container}>\r\n {filteredAndSorted.map(({createdAt, fullType,_id,name,avatarUrl,lastName,color }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id)}\r\n alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40, marginRight:2 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n <InsertDriveFileIcon className={classes.folderIcon} fontSize='large' /> \r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>\r\n ): <AlertInfo name={`You do not have ${openPinned&&'Pinned'} 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 { makeStyles } from '@material-ui/core'\r\n\r\nimport AlertInfo from '../../../../../reusableComponents/AlertInfo';\r\nimport { timeStampEU,firstLetter,prodAwsS3 } from '../../../../../../helpers'\r\nimport { TMessages } from '../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`,\r\n }, \r\n listItem: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n folderIcon: {\r\n margin: 'auto 0px',\r\n color: '#54b0fc',\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface ITextList {\r\n openPinned: boolean,\r\n filteredAndSorted: TMessages,\r\n handleScrollToTheMessage: (_id:string) => void,\r\n}\r\n\r\nconst TextList = ({ filteredAndSorted,handleScrollToTheMessage,openPinned }: ITextList) => {\r\n const classes = useStyles()\r\n \r\n return filteredAndSorted.length > 0 ?(\r\n <List className={classes.container}>\r\n {filteredAndSorted.map(({ message, createdAt, lastName, name, color, avatarUrl,_id }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id)}\r\n alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${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 <ContentCopyIcon className={classes.folderIcon} fontSize='large' /> \r\n </ListItem>\r\n <Divider variant=\"inset\" />\r\n </div>)}\r\n </List>\r\n ): <AlertInfo name={`You do not have ${openPinned&&'Pinned'} 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 Avatar from '@mui/material/Avatar';\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,prodAwsS3,firstLetter } from '../../../../../../helpers'\r\nimport { TMessages } from '../../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n animationDuration: '0.2s',\r\n animationDirection: 'normal',\r\n animation: `$moveElement`,\r\n }, \r\n folderIcon: {\r\n margin: 'auto 0px',\r\n color: '#54b0fc',\r\n },\r\n listItem: {\r\n cursor:'pointer',\r\n '&:hover': {\r\n backgroundColor: '#f0f0f0',\r\n }\r\n },\r\n '@keyframes moveElement': {\r\n '0%': { left: '100%'},\r\n '100%': { left: '0%'},\r\n }, \r\n})\r\n\r\ninterface IVideoList {\r\n openPinned: boolean,\r\n filteredAndSorted: TMessages,\r\n handleScrollToTheMessage: (_id:string) => void,\r\n}\r\n\r\nconst VideoList = ({ filteredAndSorted,handleScrollToTheMessage,openPinned }: IVideoList) => {\r\n const classes = useStyles()\r\n\r\n return filteredAndSorted.length > 0 ?(\r\n <List className={classes.container}>\r\n {filteredAndSorted.map(({ message, createdAt, fullType,_id,name,avatarUrl,lastName,color }) =>\r\n <div key={createdAt}>\r\n <ListItem onClick={() => handleScrollToTheMessage(_id)}\r\n key={createdAt} alignItems=\"flex-start\" className={classes.listItem}>\r\n <ListItemAvatar>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 40, height: 40, marginRight:2 }}>\r\n {!avatarUrl&&`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar>\r\n <ListItemText\r\n primary={fullType}\r\n secondary={timeStampEU(createdAt)}\r\n />\r\n <VideoLibraryIcon className={classes.folderIcon} fontSize='large'/> \r\n </ListItem>\r\n <Divider variant=\"inset\"/>\r\n </div>)}\r\n </List>\r\n ): <AlertInfo name={`You do not have ${openPinned&&'Pinned'} Video yet!`}/> \r\n}\r\n\r\nexport default VideoList","import { useState,useEffect,useMemo } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { styled } from '@mui/material/styles';\r\nimport Tab from '@mui/material/Tab';\r\nimport Tabs from '@mui/material/Tabs';\r\nimport Box from '@mui/material/Box';\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 { getOpenPinned } from '../../../../../redux/control/selector';\r\nimport { getPinnedMessagesMemo } from '../../../../../redux/pinnedMessages/selector'; \r\nimport { getMessagesMemo } from '../../../../../redux/messages/selector'\r\nimport { handleSort,filterBy } from '../../../../../helpers';\r\nimport { getChat } from '../../../../../redux/chat/selector'\r\nimport { TMessages,TMessage } from '../../../../../typescript/redux/messages/types'\r\n\r\nconst useStyles = makeStyles({\r\ncontainer: {\r\n height: '7vh',\r\n display: \"flex\",\r\n alignContent: \"end\",\r\n alignItems: \"end\",\r\n width:'100%',\r\n borderBottom: 'solid 2px #dddddd',\r\n },\r\n})\r\n\r\ninterface StyledTabsProps {\r\n children?: React.ReactNode;\r\n value: number;\r\n onChange: (event: React.SyntheticEvent, newValue: number) => void;\r\n}\r\n\r\nconst StyledTabs = styled((props: StyledTabsProps) => (\r\n <Tabs\r\n {...props}\r\n TabIndicatorProps={{ children: <span className=\"MuiTabs-indicatorSpan\" /> }}\r\n />\r\n))({\r\n '& .MuiTabs-flexContainer': {\r\n display: \"flex\",\r\n width: '100%',\r\n padding:'0px 10px',\r\n justifyContent: \"space-between\"\r\n },\r\n '& .MuiTabs-indicator': {\r\n height: 0,\r\n backgroundColor: 'transparent',\r\n borderBottom: '3px solid #1976d2',\r\n borderLeft: '3px solid transparent',\r\n borderRight: '3px solid transparent',\r\n },\r\n});\r\n\r\nconst StyledTab = styled((props:{label: string}) => <Tab disableRipple {...props} />)(\r\n () => ({\r\n fontSize: '1rem',\r\n fontWeight: 550,\r\n textTransform: 'none',\r\n minWidth:'auto'\r\n }),\r\n);\r\n\r\ninterface IProfileLists {\r\n setDisabled: React.Dispatch<boolean>,\r\n chatDivRef: any | null,\r\n}\r\n\r\nconst ProfileLists = ({setDisabled,chatDivRef}:IProfileLists) => {\r\n const classes = useStyles()\r\n const { sort } = useSelector(getChat)\r\n const openPinned = useSelector(getOpenPinned)\r\n const messagesMemo = useSelector(getMessagesMemo)\r\n const pinnedMessagesMemo = useSelector(getPinnedMessagesMemo)\r\n const [isActive, setIsActive] = useState<number>(0)\r\n \r\n const handleIsActive = (_e:any,newValue: number): void => setIsActive(newValue)\r\n const handleScrollToTheMessage = (_id: string) => {\r\n const childNodes = chatDivRef.current.childNodes[0].childNodes\r\n let toScrollNode = [...childNodes].find((el: any) => el.id === _id)\r\n if (toScrollNode) {\r\n toScrollNode = [...toScrollNode.childNodes].slice(-1)[0]\r\n toScrollNode.style.backgroundColor = 'rgba(70, 70, 70, 0.4)'\r\n toScrollNode.style.boxShadow = '0px 0px 6px 0px #ffffff'\r\n toScrollNode.scrollIntoView({ behavior: 'smooth' })\r\n setTimeout(() => {\r\n toScrollNode.style.backgroundColor = 'unset'\r\n toScrollNode.style.boxShadow = 'unset'\r\n }, 2000)\r\n }\r\n }\r\n \r\n const filteredAndSorted: TMessages = useMemo(() => handleSort('createdAt', !openPinned ? messagesMemo : pinnedMessagesMemo, sort)\r\n .filter((el:TMessage) => filterBy[isActive].includes(el.type)),[isActive,messagesMemo,openPinned,pinnedMessagesMemo,sort])\r\n\r\n useEffect(() => {\r\n setDisabled(filteredAndSorted.length > 0?false:true)\r\n }, [filteredAndSorted, setDisabled])\r\n \r\n return (\r\n <>\r\n <Box className={classes.container}>\r\n <StyledTabs sx={{width:'100%'}} onChange={handleIsActive} value={isActive} aria-label=\"wrapped label tabs example\">\r\n <StyledTab label='Files'/>\r\n <StyledTab label='Media'/>\r\n <StyledTab label='Text'/>\r\n <StyledTab label='Audio'/>\r\n <StyledTab label='Video'/>\r\n </StyledTabs>\r\n </Box>\r\n {isActive === 0 && <FilesList filteredAndSorted={filteredAndSorted} handleScrollToTheMessage={handleScrollToTheMessage} openPinned={openPinned}/>} \r\n {isActive === 1 && <MediaList filteredAndSorted={filteredAndSorted} handleScrollToTheMessage={handleScrollToTheMessage} openPinned={openPinned}/>}\r\n {isActive === 2 && <TextList filteredAndSorted={filteredAndSorted} handleScrollToTheMessage={handleScrollToTheMessage} openPinned={openPinned}/>}\r\n {isActive === 3 && <AudioList filteredAndSorted={filteredAndSorted} handleScrollToTheMessage={handleScrollToTheMessage} openPinned={openPinned}/>}\r\n {isActive === 4 && <VideoList filteredAndSorted={filteredAndSorted} handleScrollToTheMessage={handleScrollToTheMessage} openPinned={openPinned}/>}\r\n </> \r\n )\r\n}\r\n\r\nexport default ProfileLists","import { makeStyles } from '@material-ui/core'\r\nimport { useState, useEffect } from 'react'\r\nimport { useSelector, useDispatch } from 'react-redux'\r\nimport ToolBar from './ToolBar'\r\nimport ProfilePicture from './ProfilePicture'\r\nimport ProfileMenu from './ProfileMenu'\r\nimport ProfileLists from './ProfileLists'\r\nimport { asyncGetContacts } from '../../../../redux/contacts/operations'\r\nimport { getLeftIsOpen } from '../../../../redux/control/selector'\r\nimport { refreshAppTime } from '../../../../helpers'\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\ninterface ICredentialsList {\r\n chatDivRef: any | null,\r\n}\r\n\r\nconst CredentialsList = ({chatDivRef}:ICredentialsList) => {\r\n const classes = useStyles()\r\n const dispatch = useDispatch()\r\n const leftIsOpen = useSelector(getLeftIsOpen)\r\n const [disabled, setDisabled] = useState<boolean>(false)\r\n\r\n useEffect(() => {\r\n const handleReset = () => leftIsOpen !== 'contacts'&&dispatch(asyncGetContacts())\r\n handleReset()\r\n const idInterval = setInterval(handleReset, refreshAppTime);\r\n return () => clearInterval(idInterval);\r\n }, [leftIsOpen, dispatch]);\r\n \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} chatDivRef={chatDivRef}/>\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 { actionRightIsOpen } 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(actionRightIsOpen('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,prodAwsS3 } 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 \r\n const handleNotifications = () => {\r\n setMute(!mute)\r\n !openBtn&&setOpenBtn(true)\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 return (\r\n <div className={classes.container} > \r\n <ListItemAvatar style={{marginBottom:10}}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 120, height: 120, marginRight: 2, fontSize:30}}>\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 { actionRightIsOpen } from '../../../../../redux/control/action'\r\nimport { removeContact } from '../../../../../api-data';\r\nimport { TContact } from '../../../../../typescript/redux/contacts/types';\r\nimport { slicedWord,firstLetter,prodAwsS3 } 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 \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(actionRightIsOpen('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?`${prodAwsS3}/${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\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 Grid from '@mui/material/Grid'\r\nimport SearchList from './SearchList'\r\nimport CredentialsList from './CredentialsList'\r\nimport EditBar from './EditBar'\r\nimport { TRightIsOpen } from '../../../typescript/redux/control/types'\r\n\r\ninterface IRightBar {\r\n rightIsOpen: TRightIsOpen,\r\n chatDivRef: any | null,\r\n}\r\n\r\nconst RightBar = ({ rightIsOpen, chatDivRef }: IRightBar) => {\r\n return (\r\n <Grid item lg={rightIsOpen ? 4 : 0}>\r\n {rightIsOpen === 'credentials' && <CredentialsList chatDivRef={chatDivRef} />}\r\n {rightIsOpen === 'search' && <SearchList chatDivRef={chatDivRef} />}\r\n {rightIsOpen === 'edit' && <EditBar/>}\r\n </Grid>\r\n )\r\n}\r\n\r\nexport default RightBar","import Stack from '@mui/material/Stack';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport SearchIcon from '@mui/icons-material/Search';\r\nimport PhoneIcon from '@mui/icons-material/Phone';\r\nimport { makeStyles, Typography } from '@material-ui/core'\r\nimport { useState,useEffect,useCallback,useRef } from 'react';\r\nimport { useSelector,useDispatch } from 'react-redux';\r\nimport ListItemText from '@mui/material/ListItemText';\r\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\r\nimport Avatar from '@mui/material/Avatar';\r\nimport MinimizeIcon from '@mui/icons-material/Minimize';\r\nimport CropLandscapeIcon from '@mui/icons-material/CropLandscape';\r\nimport CloseIcon from '@mui/icons-material/Close';\r\nimport ScreenShareIcon from '@mui/icons-material/ScreenShare';\r\nimport StopScreenShareIcon from '@mui/icons-material/StopScreenShare';\r\nimport VideocamIcon from '@mui/icons-material/Videocam';\r\nimport VideocamOffIcon from '@mui/icons-material/VideocamOff';\r\nimport MicIcon from '@mui/icons-material/Mic';\r\nimport MicOffIcon from '@mui/icons-material/MicOff';\r\nimport CallEndIcon from '@mui/icons-material/CallEnd';\r\n \r\nimport { getChat } from '../../../redux/chat/selector';\r\nimport { getAuthorizationState } from '../../../redux/authorization/selector'; \r\nimport { prodAwsS3, firstLetter, slicedWord } from '../../../helpers'\r\nimport { socketIdChat } from '../../../api-data';\r\n\r\nconst Peer = require('simple-peer')\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n position: 'absolute',\r\n left: 0,\r\n top: 0,\r\n width: '100vw',\r\n height:'100vh',\r\n overflow: 'hidden',\r\n zIndex:100,\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n alignContent: \"center\",\r\n backgroundColor: 'rgba(104, 105, 104, 0.6)',\r\n },\r\n shareScreenActive: {\r\n width: '30%',\r\n borderRadius: 7,\r\n margin: 'auto',\r\n border:'solid 2px #0084ff',\r\n },\r\n shareScreenDisabled: {\r\n width: 0,\r\n height:0,\r\n }, \r\n modalCall: {\r\n background: 'rgb(36, 36, 36)',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'start',\r\n alignItems: 'center',\r\n justifyItems:\"center\",\r\n width: '34vw',\r\n height:'90vh',\r\n borderRadius: 7,\r\n },\r\n rightIcons: {\r\n display: 'flex',\r\n justifyContent: 'end',\r\n alignContent: 'center',\r\n alignItems: 'center',\r\n width:'100%'\r\n },\r\n rightIconWrapper: {\r\n color: '#ffffff',\r\n cursor: 'pointer',\r\n padding:'3px 10px 3px 10px',\r\n '&:hover': {\r\n backgroundColor:'rgb(80, 80, 80)'\r\n }\r\n },\r\n rightIconWrapperClose: {\r\n color: '#ffffff',\r\n cursor: 'pointer',\r\n padding:'3px 10px 3px 10px',\r\n borderTopRightRadius:7,\r\n '&:hover': {\r\n backgroundColor:'#f02a2a'\r\n }\r\n },\r\n bottomWrapper: {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n padding: 5\r\n },\r\n bottomItem: {\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 width: 80,\r\n },\r\n bottomIcon: {\r\n cursor:'pointer',\r\n },\r\n bottomIconEndAccept: {\r\n cursor: 'pointer',\r\n '&:hover': {\r\n animation: `$shake 1s`,\r\n animationIterationCount:'infinite', \r\n }\r\n }, \r\n ringPulsate: {\r\n backgroundColor:\"rgb(80, 80, 80)\",\r\n borderRadius: '50%',\r\n height: 60,\r\n width: 60,\r\n position: 'absolute',\r\n left: 10,\r\n top: -8,\r\n animation: `$pulsate 1.5s ease-out`,\r\n animationIterationCount: 'infinite',\r\n opacity: 0,\r\n }, \r\n titleIconBottom: {\r\n color: '#ffffff',\r\n fontSize: 13,\r\n paddingTop:7\r\n },\r\n '@keyframes pulsate': {\r\n '0%': {transform: 'scale(1, 1)', opacity: 0},\r\n '50%': { opacity: 1},\r\n '100%': {transform: 'scale(1.2, 1.2)', opacity: 0},\r\n },\r\n '@keyframes shake': {\r\n '0%': { transform: 'rotate(0deg)'},\r\n '11%': { transform: 'rotate(10deg)'},\r\n '22%': { transform: 'rotate(20deg)'},\r\n '33%': { transform: 'rotate(30deg)'},\r\n '44%': { transform: 'rotate(20deg)'},\r\n '55%': { transform: 'rotate(10deg)'},\r\n '66%': { transform: 'rotate(0deg)'},\r\n '77%': { transform: 'rotate(-10deg)'},\r\n '88%': { transform: 'rotate(-20deg)'},\r\n '100%': { transform: 'rotate(-30deg)'},\r\n }, \r\n})\r\n\r\ninterface ICallBar {\r\n callStatus: string,\r\n setCallStatus: any,\r\n socket: any,\r\n myVideoRef :any,\r\n}\r\n\r\nconst CallBar = ({callStatus,setCallStatus,socket,myVideoRef}:ICallBar) => {\r\n const classes = useStyles()\r\n const { _id } = useSelector(getAuthorizationState)\r\n const chat = useSelector(getChat)\r\n const myAudioRef = useRef<any>(null);\r\n const userAudioRef = useRef<any>(null);\r\n const userVideoRef = useRef<any>(null);\r\n const connectionRef = useRef<any>(null);\r\n const [mySocket, setMySocket] = useState<string>('')\r\n const [companionSocket, setCompanionSocket] = useState<string>('')\r\n const [companionSignal, setCompanionSignal] = useState<string>('')\r\n const [name, setName] = useState<string>('')\r\n const [lastName, setLastName] = useState<string>('')\r\n const [avatarUrl, setAvatarUrl] = useState<string>('')\r\n const [color, setColor] = useState<string>('')\r\n const [number,setNumber] = useState<string>('')\r\n const handleLeaveCall = () => {\r\n connectionRef.current.destroy();\r\n setCallStatus('')\r\n };\r\n // requesting, waiting ,ringing, hanging up,line busy\r\n\r\n const handleStartCall = useCallback(async () => {\r\n const stream = await navigator.mediaDevices.getUserMedia({\r\n video: true,\r\n audio: true\r\n })\r\n const peer = new Peer({\r\n initiator: true,\r\n trickle: false, \r\n stream \r\n });\r\n peer.on(\"signal\", (data:any) => {\r\n socket.emit(\"callTo\", {\r\n to: chat.socketId,\r\n signalData: data,\r\n from: mySocket,\r\n userId: _id,\r\n companionId:chat.companionId\r\n })\r\n setCallStatus('ringing')\r\n });\r\n peer.on(\"stream\", (stream: any) => {\r\n console.log(stream,'user stream')\r\n });\r\n socket.on(\"acceptedCall\", ({ signal }: any) => {\r\n peer.signal(signal)\r\n setCallStatus('accepted')\r\n console.log(signal,'signal accepted from companion')\r\n });\r\n connectionRef.current = peer; \r\n },[chat.socketId,chat.companionId,_id,socket,setCallStatus,mySocket])\r\n\r\n const handleAnswerCall = useCallback(async () => {\r\n const stream = await navigator.mediaDevices.getUserMedia({\r\n video: true,\r\n audio: true\r\n })\r\n const peer = new Peer({\r\n initiator: false,\r\n trickle: false,\r\n stream,\r\n });\r\n peer.on(\"signal\", (data: any) => {\r\n socket.emit(\"answerCall\", { signal: data, to: companionSocket });\r\n });\r\n peer.on(\"stream\", (stream: any) => {\r\n userVideoRef.current.srcObject = stream;\r\n });\r\n peer.signal(companionSignal);\r\n connectionRef.current = peer;\r\n },[socket,companionSocket,companionSignal])\r\n\r\n useEffect(() => {\r\n socket.on(\"me\", (id: string) => {\r\n setMySocket(id)\r\n socketIdChat(id)\r\n })\r\n socket.on('incomeCall', (data: any) => {\r\n setCallStatus('is calling you')\r\n setName(data.name)\r\n setLastName(data.lastName)\r\n setAvatarUrl(data.avatarUrl)\r\n setColor(data.color)\r\n setNumber(data.number)\r\n setCompanionSocket(data.from)\r\n setCompanionSignal(data.signal)\r\n })\r\n },[socket,setCallStatus,setName,setLastName,setCompanionSocket,setCompanionSignal])\r\n\r\n useEffect(() => {\r\n if(callStatus === 'requesting') handleStartCall()\r\n }, [callStatus, handleStartCall])\r\n\r\n useEffect(() => {\r\n if (callStatus === '') {\r\n setName(chat.name)\r\n setLastName(chat.lastName)\r\n setAvatarUrl(chat.avatarUrl)\r\n setColor(chat.color)\r\n setNumber(chat.number)\r\n }\r\n }, [callStatus,chat]) \r\n\r\n return (\r\n <div className={classes.container} style={{top: callStatus?0:'-100%'}}>\r\n <div className={classes.modalCall}>\r\n <div className={classes.rightIcons} style={{marginBottom: true?0:40,}}>\r\n <div className={classes.rightIconWrapper}>\r\n <MinimizeIcon fontSize='small' />\r\n </div>\r\n <div className={classes.rightIconWrapper}>\r\n <CropLandscapeIcon fontSize='small' />\r\n </div>\r\n <div className={classes.rightIconWrapperClose} onClick={handleLeaveCall}>\r\n <CloseIcon fontSize='small' />\r\n </div>\r\n </div>\r\n {<ListItemAvatar style={{marginBottom:5}}>\r\n <Avatar alt={name} src={avatarUrl?`${prodAwsS3}/${avatarUrl}`:undefined}\r\n sx={{ background: color, width: 120, height: 120, marginRight: 2, fontSize:30,zIndex:0}}>\r\n {`${firstLetter(name)}${firstLetter(lastName)}`}\r\n </Avatar>\r\n </ListItemAvatar>}\r\n {<div style={{marginBottom:'auto'}}>\r\n <ListItemText primary={`${firstLetter(name)}${slicedWord(name, 15, 1)}\r\n ${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}\r\n primaryTypographyProps={{ color: '#dfdfdf', fontSize: 20, fontWeight: 500 }}/>\r\n <ListItemText primary={number} primaryTypographyProps={{ color: '#ffffff', fontSize: 15, fontWeight: 500,textAlign:\"center\" }}/>\r\n <ListItemText secondary={callStatus+'...'} secondaryTypographyProps={{ color: \"#dfdfdf\",textAlign: \"center\" }} />\r\n </div>}\r\n <video className={true ? classes.shareScreenActive : classes.shareScreenDisabled} ref={userVideoRef} playsInline autoPlay />\r\n <div className={classes.bottomWrapper}>\r\n {!true&&<div className={classes.bottomItem}>\r\n <Avatar className={classes.bottomIcon}\r\n sx={{backgroundColor: '#ffffff',color: 'rgb(36, 36, 36)', width: 44, height: 44,zIndex:0}}>\r\n <ScreenShareIcon fontSize=\"medium\" />\r\n </Avatar>\r\n <Typography variant=\"h6\" className={classes.titleIconBottom}>Screencast</Typography>\r\n </div>}\r\n <div className={classes.bottomItem}>\r\n <Avatar className={classes.bottomIcon} \r\n sx={{backgroundColor: true?'rgb(88, 88, 88)':'#ffffff',color: true?'#ffffff':'rgb(36, 36, 36)', width: 44, height: 44,zIndex:0}}>\r\n {true?<VideocamOffIcon fontSize=\"medium\" />:<VideocamIcon fontSize=\"medium\" />}\r\n </Avatar>\r\n <Typography variant=\"h6\" className={classes.titleIconBottom}>{true?'Stop Video':'Start Video'}</Typography>\r\n </div>\r\n <div className={classes.bottomItem}>\r\n <Avatar className={classes.bottomIconEndAccept} onClick={handleLeaveCall}\r\n sx={{backgroundColor: '#f02a2a',color: '#ffffff', width: 44, height: 44,zIndex:0}}>\r\n <CallEndIcon fontSize=\"medium\" />\r\n </Avatar>\r\n <Typography variant=\"h6\" className={classes.titleIconBottom}>\r\n {callStatus === 'is calling you' ? 'Decline' : 'End Call'}\r\n </Typography>\r\n </div>\r\n {callStatus === 'is calling you' &&\r\n <div className={classes.bottomItem} style={{position:\"relative\"}}>\r\n <div className={classes.ringPulsate}></div>\r\n <Avatar className={classes.bottomIconEndAccept} onClick={handleAnswerCall}\r\n sx={{ backgroundColor: '#21f519', color: '#ffffff', width: 44, height: 44, zIndex: 0 }}>\r\n <PhoneIcon fontSize=\"medium\" />\r\n </Avatar>\r\n <Typography variant=\"h6\" className={classes.titleIconBottom}>\r\n Accept\r\n </Typography>\r\n </div>} \r\n <div className={classes.bottomItem}>\r\n <Avatar className={classes.bottomIcon} \r\n sx={{backgroundColor: true?'rgb(88, 88, 88)':'#ffffff',color: true?'#ffffff':'rgb(36, 36, 36)', width: 44, height: 44,zIndex:0}}>\r\n {true?<MicIcon fontSize=\"medium\" />:<MicOffIcon fontSize=\"medium\" />}\r\n </Avatar>\r\n <Typography variant=\"h6\" className={classes.titleIconBottom}>{true?'Mute':'Unmute'}</Typography>\r\n </div>\r\n </div>\r\n </div>\r\n </div> \r\n )\r\n}\r\n\r\nexport default CallBar","export default __webpack_public_path__ + \"static/media/wallpaper.8f0d1af7.jpg\";","export default __webpack_public_path__ + \"static/media/wallpaperNight.63a4f24a.jpg\";","import Grid from '@mui/material/Grid'\r\nimport { makeStyles } from '@material-ui/core'\r\nimport { useSelector } from 'react-redux'\r\nimport { useState,useRef } from 'react'\r\nimport io from 'socket.io-client';\r\nimport Moveable from \"react-moveable\";\r\nimport { OnDrag } from \"react-moveable\";\r\n\r\nimport LeftBar from './LeftBar'\r\nimport CentralBar from './CentralBar'\r\nimport RightBar from './RightBar'\r\nimport CallBar from './CallBar';\r\nimport { getRightIsOpen } from '../../redux/control/selector'\r\nimport { getChatMemo } from '../../redux/chat/selector'\r\nimport { getNightMode } from '../../redux/authorization/selector'\r\nimport wallpaper from '../../img/wallpaper.jpg'\r\nimport wallpaperNight from '../../img/wallpaperNight.jpg'\r\nimport { prodSocketURL } from '../../helpers';\r\n\r\nconst socket = io(prodSocketURL)\r\n\r\nconst useStyles = makeStyles({\r\n container: {\r\n minHeight: '100vh',\r\n maxHeight: '100vh',\r\n },\r\n centralAndRight: {\r\n display:'flex'\r\n },\r\n myVideo: {\r\n width: 250,\r\n height: 'auto',\r\n cursor: 'pointer',\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n zIndex: 150,\r\n backgroundColor:'#28e217',\r\n }, \r\n})\r\n\r\nconst HomePage = () => {\r\n const classes = useStyles()\r\n const rightIsOpen = useSelector(getRightIsOpen)\r\n const myVideoRef = useRef<any | null>(null);\r\n const chatDivRef = useRef<any | null>(null)\r\n const nightMode = useSelector(getNightMode)\r\n const { companionId } = useSelector(getChatMemo)\r\n const [callStatus,setCallStatus] = useState<string>('')\r\n const backgroundImage = `url(${nightMode ? wallpaperNight : wallpaper})`\r\n const handleStartCall = () => setCallStatus('requesting')\r\n\r\nreturn (\r\n <Grid className={classes.container} container spacing={0} >\r\n <video className={classes.myVideo} ref={myVideoRef} playsInline autoPlay muted/>\r\n <Moveable\r\n target={myVideoRef.current}\r\n draggable={true}\r\n throttleDrag={0}\r\n hideDefaultLines={true}\r\n renderDirections={[]}\r\n rotationPosition=\"none\"\r\n origin={false}\r\n onDrag={({ target, transform }: OnDrag) =>\r\n target!.style.transform = transform }\r\n />\r\n <CallBar callStatus={callStatus} setCallStatus={setCallStatus} socket={socket} myVideoRef={myVideoRef}/>\r\n <LeftBar chatDivRef={chatDivRef} />\r\n {companionId ?\r\n <Grid item lg={9} className={classes.centralAndRight}>\r\n <CentralBar rightIsOpen={rightIsOpen} chatDivRef={chatDivRef}\r\n companionId={companionId} backgroundImage={backgroundImage}\r\n handleStartCall={handleStartCall}/>\r\n <RightBar rightIsOpen={rightIsOpen} chatDivRef={chatDivRef} />\r\n </Grid> :\r\n <Grid item lg={9} style={{backgroundImage}}/>}\r\n </Grid>\r\n )\r\n}\r\n\r\nexport default HomePage"],"sourceRoot":""}