| { | { | ||||
| "name": "web", | "name": "web", | ||||
| "version": "4.0.3", | |||||
| "version": "4.0.5", | |||||
| "lockfileVersion": 1, | "lockfileVersion": 1, | ||||
| "requires": true, | "requires": true, | ||||
| "dependencies": { | "dependencies": { |
| export const CategoryCardImage = styled.img` | export const CategoryCardImage = styled.img` | ||||
| width: 18px; | width: 18px; | ||||
| height: 18px; | height: 18px; | ||||
| filter: invert(58%) sepia(100%) saturate(431%) hue-rotate(355deg) brightness(104%) contrast(105%); | |||||
| margin-right: 9px; | margin-right: 9px; | ||||
| position: relative; | position: relative; | ||||
| top: 1px; | top: 1px; |
| </ButtonsContainer> | </ButtonsContainer> | ||||
| <ProfileInfoContainer> | <ProfileInfoContainer> | ||||
| {/* Profile Main Info */} | {/* Profile Main Info */} | ||||
| <ProfileMainInfo profile={props.profile} isAdmin bigProfileCard /> | |||||
| <ProfileMainInfo profile={props.profile} bigProfileCard isAdmin /> | |||||
| {/* Profile Contact */} | {/* Profile Contact */} | ||||
| <ProfileContact profile={props.profile} isAdmin /> | |||||
| <ProfileContact profile={props.profile} bigProfileCard isAdmin /> | |||||
| </ProfileInfoContainer> | </ProfileInfoContainer> | ||||
| <CheckButton | <CheckButton | ||||
| halfwidth={props.halfwidth} | halfwidth={props.halfwidth} |
| <BlockedIconContainer | <BlockedIconContainer | ||||
| aboveTitle={props.aboveTitle} | aboveTitle={props.aboveTitle} | ||||
| chatCard={props.chatCard} | chatCard={props.chatCard} | ||||
| > | > | ||||
| <BlockedIcon /> | |||||
| <BlockedIcon redText={props.redText} /> | |||||
| </BlockedIconContainer> | </BlockedIconContainer> | ||||
| )} | )} | ||||
| </BlockedContainer> | </BlockedContainer> |
| left: -2px; | left: -2px; | ||||
| } | } | ||||
| & path { | & path { | ||||
| stroke: white; | |||||
| stroke: ${(props) => | |||||
| props.redText ? selectedTheme.colors.blockedColor : "white"}; | |||||
| } | } | ||||
| `; | `; |
| ProfileInfoAndContactContainer, | ProfileInfoAndContactContainer, | ||||
| UnblockButton, | UnblockButton, | ||||
| UnblockIcon, | UnblockIcon, | ||||
| BlockedProfileContainer, | |||||
| } from "./ProfileCard.styled"; | } from "./ProfileCard.styled"; | ||||
| import PersonOutlineIcon from "@mui/icons-material/PersonOutline"; | import PersonOutlineIcon from "@mui/icons-material/PersonOutline"; | ||||
| import { useRouteMatch } from "react-router-dom"; | import { useRouteMatch } from "react-router-dom"; | ||||
| isMyProfile={isMyProfile} | isMyProfile={isMyProfile} | ||||
| blocked={!props.isAdmin && profile?._blocked} | blocked={!props.isAdmin && profile?._blocked} | ||||
| > | > | ||||
| {profile?._blocked && isMobile && props.isAdmin && ( | |||||
| <BlockedProfileContainer> | |||||
| <BlockedProfile hideIcon redText aboveTitle isAdmin /> | |||||
| </BlockedProfileContainer> | |||||
| )} | |||||
| <ButtonsContainer> | <ButtonsContainer> | ||||
| {profile?._blocked && !isMobile && <BlockedProfile />} | {profile?._blocked && !isMobile && <BlockedProfile />} | ||||
| {props.isAdmin && ( | {props.isAdmin && ( | ||||
| )} | )} | ||||
| </ButtonsContainer> | </ButtonsContainer> | ||||
| <ProfileInfoContainer> | <ProfileInfoContainer> | ||||
| <ProfileInfoAndContactContainer isAdmin={props.isAdmin}> | |||||
| <ProfileInfoAndContactContainer | |||||
| isAdmin={props.isAdmin} | |||||
| bigProfileCard={props.bigProfileCard} | |||||
| > | |||||
| {profile?._blocked && !props.isAdmin && isMobile && ( | {profile?._blocked && !props.isAdmin && isMobile && ( | ||||
| <BlockedProfile aboveTitle isAdmin={props.isAdmin} /> | <BlockedProfile aboveTitle isAdmin={props.isAdmin} /> | ||||
| )} | )} | ||||
| ProfileCard.propTypes = { | ProfileCard.propTypes = { | ||||
| children: PropTypes.node, | children: PropTypes.node, | ||||
| isAdmin: PropTypes.bool, | isAdmin: PropTypes.bool, | ||||
| bigProfileCard: PropTypes.bool, | |||||
| }; | }; | ||||
| export default ProfileCard; | export default ProfileCard; |
| } | } | ||||
| `; | `; | ||||
| export const BlockButton = styled(Box)` | export const BlockButton = styled(Box)` | ||||
| width: 40px; | width: 40px; | ||||
| height: 40px; | height: 40px; | ||||
| export const ProfileInfoAndContactContainer = styled(Box)` | export const ProfileInfoAndContactContainer = styled(Box)` | ||||
| display: flex; | display: flex; | ||||
| flex-direction: column; | flex-direction: column; | ||||
| margin-bottom: ${props => props.isAdmin && "36px"}; | |||||
| margin-bottom: ${(props) => props.isAdmin && "36px"}; | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| padding-bottom: 18px; | |||||
| ${props => props.isAdmin && 'gap: 18px;'} | |||||
| flex-direction: ${props => props.isAdmin ? "row" : "column"}; | |||||
| padding-bottom: ${(props) => (props.isAdmin ? "0" : "18px")}; | |||||
| margin-bottom: ${(props) => props.isAdmin && "0"}; | |||||
| ${(props) => props.bigProfileCard && "gap: 18px;"} | |||||
| flex-direction: ${(props) => (props.bigProfileCard ? "row" : "column")}; | |||||
| } | } | ||||
| `; | `; | ||||
| // justify-content: center; | // justify-content: center; | ||||
| // align-items: start; | // align-items: start; | ||||
| // `; | // `; | ||||
| export const BlockedProfileContainer = styled(Box)` | |||||
| @media (max-width: 600px) { | |||||
| position: absolute; | |||||
| top: 16px; | |||||
| left: 16px; | |||||
| } | |||||
| `; |
| return ( | return ( | ||||
| <ProfileContactContainer | <ProfileContactContainer | ||||
| container | container | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| direction={{ xs: "column", sm: "row" }} | direction={{ xs: "column", sm: "row" }} | ||||
| justifyContent={{ xs: "center", sm: "start" }} | justifyContent={{ xs: "center", sm: "start" }} | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| <LocationIcon isMyProfile={props.isMyProfile} /> | <LocationIcon isMyProfile={props.isMyProfile} /> | ||||
| <ContactItem | <ContactItem | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| variant="subtitle2" | variant="subtitle2" | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| <MailIcon isMyProfile={props.isMyProfile} /> | <MailIcon isMyProfile={props.isMyProfile} /> | ||||
| <ContactItem | <ContactItem | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| variant="subtitle2" | variant="subtitle2" | ||||
| <Stack direction="row"> | <Stack direction="row"> | ||||
| <GlobeIcon isMyProfile={props.isMyProfile} /> | <GlobeIcon isMyProfile={props.isMyProfile} /> | ||||
| <ContactItem | <ContactItem | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| variant="subtitle2" | variant="subtitle2" | ||||
| isMyProfile: PropTypes.bool, | isMyProfile: PropTypes.bool, | ||||
| children: PropTypes.node, | children: PropTypes.node, | ||||
| isAdmin: PropTypes.bool, | isAdmin: PropTypes.bool, | ||||
| bigProfileCard: PropTypes.bool, | |||||
| }; | }; | ||||
| export default ProfileContact; | export default ProfileContact; |
| } | } | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| ${(props) => props.isAdmin && `overflow: hidden;`} | ${(props) => props.isAdmin && `overflow: hidden;`} | ||||
| padding-top: ${(props) => props.isAdmin && "88px"}; | |||||
| padding-top: ${(props) => props.isAdmin && (props.bigProfileCard ? "88px" : "58px")}; | |||||
| padding-bottom: ${(props) => (props.isAdmin ? "1rem" : "0")}; | padding-bottom: ${(props) => (props.isAdmin ? "1rem" : "0")}; | ||||
| gap: 5px; | gap: 5px; | ||||
| width: ${props => props.isAdmin && 'calc(100vw - 198px)'}; | |||||
| width: ${props => props.bigProfileCard && 'calc(100vw - 198px)'}; | |||||
| } | } | ||||
| `; | `; | ||||
| export const LocationIcon = styled(Location)` | export const LocationIcon = styled(Location)` | ||||
| font-size: 14px; | font-size: 14px; | ||||
| bottom: 4px; | bottom: 4px; | ||||
| margin-right: 0; | margin-right: 0; | ||||
| ${props => props.isAdmin && css` | |||||
| ${props => props.bigProfileCard && css` | |||||
| width: calc(100vw - 218px); | width: calc(100vw - 218px); | ||||
| overflow-wrap: break-word; | overflow-wrap: break-word; | ||||
| `} | `} |
| } | } | ||||
| }; | }; | ||||
| return ( | return ( | ||||
| <ProfileMainInfoContainer isAdmin={props.isAdmin}> | |||||
| <ProfileMainInfoContainer | |||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | |||||
| > | |||||
| <AvatarImageContainer> | <AvatarImageContainer> | ||||
| <AvatarImage | <AvatarImage | ||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| )} | )} | ||||
| /> | /> | ||||
| </AvatarImageContainer> | </AvatarImageContainer> | ||||
| <ProfileMainInfoGrid> | |||||
| {props.profile?._blocked && props.isAdmin && ( | |||||
| <BlockedProfile hideIcon redText aboveTitle isAdmin /> | |||||
| )} | |||||
| <ProfileMainInfoGrid bigProfileCard={props.bigProfileCard}> | |||||
| {props.profile?._blocked && | |||||
| props.isAdmin && | |||||
| (!isMobile || (isMobile && props.bigProfileCard)) && ( | |||||
| <BlockedProfile hideIcon redText aboveTitle isAdmin /> | |||||
| )} | |||||
| <ProfileName | <ProfileName | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| isBlocked={props.isBlocked} | isBlocked={props.isBlocked} | ||||
| bigProfileCard: PropTypes.bool, | bigProfileCard: PropTypes.bool, | ||||
| isBlocked: PropTypes.bool, | isBlocked: PropTypes.bool, | ||||
| }; | }; | ||||
| ProfileMainInfo.defaultProps = { | |||||
| isAdmin: false, | |||||
| bigProfileCard: false, | |||||
| isBlocked: false, | |||||
| isMyProfile: false, | |||||
| }; | |||||
| export default ProfileMainInfo; | export default ProfileMainInfo; |
| align-items: start; | align-items: start; | ||||
| flex-direction: row; | flex-direction: row; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| flex-direction: ${(props) => (props.isAdmin ? `column-reverse` : `row`)}; | |||||
| flex-direction: ${(props) => | |||||
| props.bigProfileCard ? `column-reverse` : `row`}; | |||||
| gap: 18px; | gap: 18px; | ||||
| max-width: 108px; | max-width: 108px; | ||||
| ${(props) => | |||||
| props.isAdmin && | |||||
| !props.bigProfileCard && | |||||
| css` | |||||
| align-items: center; | |||||
| position: relative; | |||||
| top: 36px; | |||||
| max-width: none; | |||||
| `} | |||||
| } | } | ||||
| `; | `; | ||||
| export const AvatarImageContainer = styled(Grid)` | export const AvatarImageContainer = styled(Grid)` | ||||
| align-items: center; | align-items: center; | ||||
| `; | `; | ||||
| export const AvatarImage = styled.img` | export const AvatarImage = styled.img` | ||||
| /* border: 1px solid black; */ | |||||
| min-height: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | min-height: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| min-width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | min-width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| margin-left: 16px; | margin-left: 16px; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| margin-left: 0; | margin-left: 0; | ||||
| ${props => props.bigProfileCard && css` | |||||
| width: calc(100vw - 196px); | |||||
| `} | |||||
| } | } | ||||
| `; | `; | ||||
| export const ProfileName = styled(Typography)` | export const ProfileName = styled(Typography)` | ||||
| cursor: ${(props) => props.isAdmin && `pointer`}; | cursor: ${(props) => props.isAdmin && `pointer`}; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| font-size: 18px; | font-size: 18px; | ||||
| line-height: 24px; | |||||
| margin-bottom: 0; | margin-bottom: 0; | ||||
| ${props => props.isAdmin && css` | |||||
| max-width: calc(100vw - 200px); | |||||
| min-width: 0; | |||||
| white-space: nowrap; | |||||
| text-overflow: ellipsis; | |||||
| overflow: hidden; | |||||
| display: inline; | |||||
| `} | |||||
| ${(props) => | |||||
| props.bigProfileCard && | |||||
| css` | |||||
| max-width: calc(100vw - 200px); | |||||
| min-width: 0; | |||||
| text-overflow: ellipsis; | |||||
| overflow: hidden; | |||||
| white-space: nowrap; | |||||
| `} | |||||
| ${(props) => | |||||
| props.isAdmin && | |||||
| !props.bigProfileCard && | |||||
| css` | |||||
| max-width: calc(100vw - 200px); | |||||
| min-width: 0; | |||||
| text-overflow: ellipsis; | |||||
| overflow: hidden; | |||||
| display: -webkit-box; | |||||
| max-height: 48px; | |||||
| -webkit-line-clamp: 2; | |||||
| -webkit-box-orient: vertical; | |||||
| `} | |||||
| } | } | ||||
| `; | `; | ||||
| export const ProfilePIBContainer = styled(Grid)` | export const ProfilePIBContainer = styled(Grid)` |