index
int64 0
0
| repo_id
stringlengths 16
181
| file_path
stringlengths 28
270
| content
stringlengths 1
11.6M
| __index_level_0__
int64 0
10k
|
---|---|---|---|---|
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Modal/Styles.ts | import styled from 'styled-components';
import { mixin } from 'shared/utils/styles';
export const ScrollOverlay = styled.div`
z-index: 3000;
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
overflow-x: hidden;
overflow-y: auto;
`;
export const ClickableOverlay = styled.div`
min-height: 100%;
background: rgba(0, 0, 0, 0.4);
`;
export const StyledModal = styled.div<{ width: number; height: number }>`
position: relative;
width: ${props => props.width}px;
height: ${props => props.height}px;
left: 0;
right: 0;
top: 48px;
bottom: 16px;
margin: auto;
background: #262c49;
vertical-align: middle;
border-radius: 6px;
${mixin.boxShadowMedium}
`;
| 9,800 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Modal/index.tsx | import React, { useRef, useEffect, useState } from 'react';
import ReactDOM from 'react-dom';
import useOnOutsideClick from 'shared/hooks/onOutsideClick';
import useOnEscapeKeyDown from 'shared/hooks/onEscapeKeyDown';
import useWindowSize from 'shared/hooks/useWindowSize';
import styled from 'styled-components';
import { Cross } from 'shared/icons';
import { ScrollOverlay, ClickableOverlay, StyledModal } from './Styles';
const $root: HTMLElement = document.getElementById('root')!; // eslint-disable-line @typescript-eslint/no-non-null-assertion
type ModalProps = {
width: number;
onClose: () => void;
renderContent: () => JSX.Element;
};
function getAdjustedHeight(height: number) {
if (height >= 900) {
return height - 150;
}
if (height >= 800) {
return height - 125;
}
return height - 70;
}
const CloseIcon = styled(Cross)`
position: absolute;
top: 16px;
right: -32px;
cursor: pointer;
fill: ${props => props.theme.colors.text.primary};
&:hover {
fill: ${props => props.theme.colors.text.secondary};
}
`;
const InnerModal: React.FC<ModalProps> = ({ width, onClose: tellParentToClose, renderContent }) => {
const $modalRef = useRef<HTMLDivElement>(null);
const $clickableOverlayRef = useRef<HTMLDivElement>(null);
const [_width, height] = useWindowSize();
useOnOutsideClick($modalRef, true, tellParentToClose, $clickableOverlayRef);
useOnEscapeKeyDown(true, tellParentToClose);
return (
<ScrollOverlay>
<ClickableOverlay ref={$clickableOverlayRef}>
<StyledModal width={width} height={getAdjustedHeight(height)} ref={$modalRef}>
{renderContent()}
<CloseIcon onClick={() => tellParentToClose()} width={20} height={20} />
</StyledModal>
</ClickableOverlay>
</ScrollOverlay>
);
};
const Modal: React.FC<ModalProps> = ({ width, onClose: tellParentToClose, renderContent }) => {
return ReactDOM.createPortal(
<InnerModal width={width} onClose={tellParentToClose} renderContent={renderContent} />,
$root,
);
};
export default Modal;
| 9,801 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Navbar/Styles.ts | import styled, { css } from 'styled-components';
import { mixin } from 'shared/utils/styles';
export const Logo = styled.div``;
export const LogoTitle = styled.div`
position: absolute;
visibility: hidden;
opacity: 0;
font-size: 24px;
font-weight: 600;
transition: visibility, opacity, transform 0.25s ease;
color: #22ff00;
`;
export const ActionContainer = styled.div`
position: relative;
`;
export const ActionButtonTitle = styled.span`
position: relative;
visibility: hidden;
left: -5px;
opacity: 0;
font-weight: 600;
transition: left 0.1s ease 0s, visibility, opacity, transform 0.25s ease;
font-size: 18px;
color: #c2c6dc;
`;
export const IconWrapper = styled.div`
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.25s ease;
`;
export const ActionButtonContainer = styled.div`
padding: 0 12px;
position: relative;
& > a:first-child > div {
padding-top: 48px;
}
`;
export const ActionButtonWrapper = styled.div<{ active?: boolean }>`
${props =>
props.active &&
css`
background: ${props.theme.colors.primary};
box-shadow: 0 0 10px 1px ${mixin.rgba(props.theme.colors.primary, 0.7)};
`}
border-radius: 6px;
cursor: pointer;
padding: 24px 15px;
display: flex;
align-items: center;
&:hover ${ActionButtonTitle} {
transform: translateX(5px);
}
&:hover ${IconWrapper} {
transform: translateX(5px);
}
`;
export const LogoWrapper = styled.div`
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
position: relative;
width: 100%;
height: 80px;
color: rgb(222, 235, 255);
cursor: pointer;
transition: color 0.1s ease 0s, border 0.1s ease 0s;
border-bottom: 1px solid ${props => mixin.rgba(props.theme.colors.alternate, 0.65)};
`;
export const Container = styled.aside`
z-index: 100;
position: fixed;
top: 0px;
left: 0px;
overflow-x: hidden;
height: 100vh;
width: 80px;
transform: translateZ(0px);
background: #10163a;
transition: all 0.1s ease 0s;
border-right: 1px solid ${props => mixin.rgba(props.theme.colors.alternate, 0.65)};
&:hover {
width: 260px;
box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 50px 0px;
border-right: 1px solid ${props => mixin.rgba(props.theme.colors.alternate, 0)};
}
&:hover ${LogoTitle} {
bottom: -12px;
visibility: visible;
opacity: 1;
}
&:hover ${ActionButtonTitle} {
left: 15px;
visibility: visible;
opacity: 1;
}
&:hover ${LogoWrapper} {
border-bottom: 1px solid ${props => mixin.rgba(props.theme.colors.alternate, 0)};
}
`;
| 9,802 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Navbar/index.tsx | import React from 'react';
import { Taskcafe } from 'shared/icons';
import {
Container,
LogoWrapper,
IconWrapper,
Logo,
LogoTitle,
ActionContainer,
ActionButtonContainer,
ActionButtonWrapper,
ActionButtonTitle,
} from './Styles';
type ActionButtonProps = {
name: string;
active?: boolean;
};
export const ActionButton: React.FC<ActionButtonProps> = ({ name, active, children }) => {
return (
<ActionButtonWrapper active={active ?? false}>
<IconWrapper>{children}</IconWrapper>
<ActionButtonTitle>{name}</ActionButtonTitle>
</ActionButtonWrapper>
);
};
export const ButtonContainer: React.FC = ({ children }) => (
<ActionContainer>
<ActionButtonContainer>{children}</ActionButtonContainer>
</ActionContainer>
);
export const PrimaryLogo = () => {
return (
<LogoWrapper>
<Taskcafe width={42} height={42} />
<LogoTitle>Taskcafé</LogoTitle>
</LogoWrapper>
);
};
const Navbar: React.FC = ({ children }) => {
return <Container>{children}</Container>;
};
export default Navbar;
| 9,803 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/NewProject/index.tsx | import React, { useState } from 'react';
import styled from 'styled-components';
import { mixin } from 'shared/utils/styles';
import Select from 'react-select';
import { ArrowLeft, Cross } from 'shared/icons';
import theme from '../../../App/ThemeStyles';
function getBackgroundColor(isDisabled: boolean, isSelected: boolean, isFocused: boolean) {
if (isDisabled) {
return null;
}
if (isSelected) {
return mixin.darken(theme.colors.bg.secondary, 0.25);
}
if (isFocused) {
return mixin.darken(theme.colors.bg.secondary, 0.15);
}
return null;
}
const Overlay = styled.div`
z-index: 10000;
background: #262c49;
bottom: 0;
color: #fff;
left: 0;
position: fixed;
right: 0;
top: 0;
`;
const Content = styled.div`
display: flex;
flex-direction: column;
height: 100%;
`;
const Header = styled.div`
height: 64px;
padding: 0 24px;
align-items: center;
display: flex;
flex: 0 0 auto;
justify-content: space-between;
transition: box-shadow 250ms;
`;
const HeaderLeft = styled.div`
align-items: center;
display: flex;
cursor: pointer;
`;
const HeaderRight = styled.div`
cursor: pointer;
align-items: center;
display: flex;
`;
const Container = styled.div`
padding: 32px 0;
align-items: center;
display: flex;
flex-direction: column;
`;
const ContainerContent = styled.div`
width: 520px;
display: flex;
flex-direction: column;
`;
const Title = styled.h1`
font-size: 24px;
font-weight: 500;
color: #c2c6dc;
margin-bottom: 25px;
`;
const ProjectName = styled.input`
margin: 0 0 12px;
width: 100%;
box-sizing: border-box;
display: block;
line-height: 20px;
margin-bottom: 12px;
padding: 8px 12px;
background: #262c49;
outline: none;
color: #c2c6dc;
border-radius: 3px;
border-width: 1px;
border-style: solid;
border-color: transparent;
border-image: initial;
border-color: #414561;
font-size: 16px;
font-weight: 400;
&:focus {
background: ${(props) => mixin.darken(props.theme.colors.bg.secondary, 0.15)};
box-shadow: ${(props) => props.theme.colors.primary} 0px 0px 0px 1px;
}
`;
const ProjectNameLabel = styled.label`
color: #c2c6dc;
font-size: 12px;
margin-bottom: 4px;
`;
const ProjectInfo = styled.div`
display: flex;
`;
const ProjectField = styled.div`
display: flex;
flex-direction: column;
margin-right: 15px;
flex-grow: 1;
`;
const ProjectTeamField = styled.div`
display: flex;
flex-direction: column;
flex-grow: 1;
`;
const colourStyles = {
control: (styles: any, data: any) => {
return {
...styles,
backgroundColor: data.isMenuOpen ? mixin.darken(theme.colors.bg.secondary, 0.15) : theme.colors.bg.secondary,
boxShadow: data.menuIsOpen ? `${theme.colors.primary} 0px 0px 0px 1px` : 'none',
borderRadius: '3px',
borderWidth: '1px',
borderStyle: 'solid',
borderImage: 'initial',
borderColor: theme.colors.alternate,
':hover': {
boxShadow: `${theme.colors.primary} 0px 0px 0px 1px`,
borderRadius: '3px',
borderWidth: '1px',
borderStyle: 'solid',
borderImage: 'initial',
borderColor: theme.colors.alternate,
},
':active': {
boxShadow: `${theme.colors.primary} 0px 0px 0px 1px`,
borderRadius: '3px',
borderWidth: '1px',
borderStyle: 'solid',
borderImage: 'initial',
borderColor: `${theme.colors.primary}`,
},
};
},
menu: (styles: any) => {
return {
...styles,
backgroundColor: mixin.darken(theme.colors.bg.secondary, 0.15),
};
},
dropdownIndicator: (styles: any) => ({ ...styles, color: '#c2c6dc', ':hover': { color: '#c2c6dc' } }),
indicatorSeparator: (styles: any) => ({ ...styles, color: '#c2c6dc' }),
option: (styles: any, { data, isDisabled, isFocused, isSelected }: any) => {
return {
...styles,
backgroundColor: getBackgroundColor(isDisabled, isSelected, isFocused),
color: isDisabled ? '#ccc' : isSelected ? '#fff' : '#c2c6dc', // eslint-disable-line
cursor: isDisabled ? 'not-allowed' : 'default',
':active': {
...styles[':active'],
backgroundColor: !isDisabled && (isSelected ? mixin.darken(theme.colors.bg.secondary, 0.25) : '#fff'),
},
':hover': {
...styles[':hover'],
backgroundColor: !isDisabled && (isSelected ? theme.colors.primary : theme.colors.primary),
},
};
},
placeholder: (styles: any) => ({ ...styles, color: '#c2c6dc' }),
clearIndicator: (styles: any) => ({ ...styles, color: '#c2c6dc', ':hover': { color: '#c2c6dc' } }),
input: (styles: any) => ({
...styles,
color: '#fff',
}),
singleValue: (styles: any) => {
return {
...styles,
color: '#fff',
};
},
};
const CreateButton = styled.button`
outline: none;
border: none;
width: 100%;
line-height: 20px;
padding: 6px 12px;
background-color: none;
text-align: center;
color: #c2c6dc;
font-size: 14px;
cursor: pointer;
border-radius: 3px;
border-width: 1px;
border-style: solid;
border-color: transparent;
border-image: initial;
border-color: #414561;
&:hover {
color: #fff;
background: ${(props) => props.theme.colors.primary};
border-color: ${(props) => props.theme.colors.primary};
}
`;
type NewProjectProps = {
initialTeamID: string | null;
teams: Array<Team>;
onClose: () => void;
onCreateProject: (projectName: string, teamID: string | null) => void;
};
const NewProject: React.FC<NewProjectProps> = ({ initialTeamID, teams, onClose, onCreateProject }) => {
const [projectName, setProjectName] = useState('');
const [team, setTeam] = useState<null | string>(initialTeamID);
const options = [{ label: 'No team', value: 'no-team' }, ...teams.map((t) => ({ label: t.name, value: t.id }))];
return (
<Overlay>
<Content>
<Header>
<HeaderLeft
onClick={() => {
onClose();
}}
>
<ArrowLeft width={16} height={16} color="#c2c6dc" />
</HeaderLeft>
<HeaderRight
onClick={() => {
onClose();
}}
>
<Cross width={16} height={16} />
</HeaderRight>
</Header>
<Container>
<ContainerContent>
<Title>Add project details</Title>
<ProjectInfo>
<ProjectField>
<ProjectNameLabel>Project name</ProjectNameLabel>
<ProjectName
value={projectName}
onChange={(e: any) => {
setProjectName(e.currentTarget.value);
}}
/>
</ProjectField>
<ProjectTeamField>
<ProjectNameLabel>Team</ProjectNameLabel>
<Select
onChange={(e: any) => {
setTeam(e.value);
}}
value={options.find((d) => d.value === team)}
styles={colourStyles}
classNamePrefix="teamSelect"
options={options}
/>
</ProjectTeamField>
</ProjectInfo>
<CreateButton
onClick={() => {
if (projectName !== '') {
onCreateProject(projectName, team === 'no-team' ? null : team);
}
}}
>
Create project
</CreateButton>
</ContainerContent>
</Container>
</Content>
</Overlay>
);
};
export default NewProject;
| 9,804 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/NotifcationPopup/index.tsx | import React, { useRef, useState } from 'react';
import styled, { css } from 'styled-components';
import TimeAgo from 'react-timeago';
import { Link } from 'react-router-dom';
import { mixin } from 'shared/utils/styles';
import {
useNotificationMarkAllReadMutation,
useNotificationsQuery,
NotificationFilter,
ActionType,
useNotificationAddedSubscription,
useNotificationToggleReadMutation,
} from 'shared/generated/graphql';
import dayjs from 'dayjs';
import { Popup, usePopup } from 'shared/components/PopupMenu';
import { Bell, CheckCircleOutline, Circle, Ellipsis, UserCircle } from 'shared/icons';
import produce from 'immer';
import { useLocalStorage } from 'shared/hooks/useStateWithLocalStorage';
import localStorage from 'shared/utils/localStorage';
import useOnOutsideClick from 'shared/hooks/onOutsideClick';
function getFilterMessage(filter: NotificationFilter) {
switch (filter) {
case NotificationFilter.Unread:
return 'no unread';
case NotificationFilter.Assigned:
return 'no assigned';
case NotificationFilter.Mentioned:
return 'no mentioned';
default:
return 'no';
}
}
const ItemWrapper = styled.div`
cursor: pointer;
border-bottom: 1px solid #414561;
padding-left: 1rem;
padding-right: 1rem;
padding-top: 1rem;
padding-bottom: 1rem;
justify-content: space-between;
display: flex;
&:hover {
background: #10163a;
}
`;
const ItemWrapperContent = styled.div`
display: flex;
align-items: flex-start;
`;
const ItemIconContainer = styled.span`
position: relative;
display: inline-flex;
align-items: center;
`;
const ItemTextContainer = styled.div`
margin-left: 0.5rem;
margin-right: 0.5rem;
`;
const ItemTextTitle = styled.span`
font-weight: 500;
display: block;
color: ${(props) => props.theme.colors.primary};
font-size: 14px;
`;
const ItemTextDesc = styled.span`
font-size: 12px;
`;
const ItemTimeAgo = styled.span`
margin-top: 0.25rem;
white-space: nowrap;
font-size: 11px;
`;
type NotificationItemProps = {
title: string;
description: string;
createdAt: string;
};
export const NotificationItem: React.FC<NotificationItemProps> = ({ title, description, createdAt }) => {
return (
<ItemWrapper>
<ItemWrapperContent>
<ItemIconContainer />
<ItemTextContainer>
<ItemTextTitle>{title}</ItemTextTitle>
<ItemTextDesc>{description}</ItemTextDesc>
</ItemTextContainer>
</ItemWrapperContent>
<TimeAgo date={createdAt} component={ItemTimeAgo} />
</ItemWrapper>
);
};
const NotificationHeader = styled.div`
padding: 20px 28px;
text-align: center;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
background: ${(props) => props.theme.colors.primary};
`;
const NotificationHeaderTitle = styled.span`
font-size: 14px;
color: ${(props) => props.theme.colors.text.secondary};
`;
const EmptyMessage = styled.div`
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
height: 448px;
`;
const EmptyMessageLabel = styled.span`
margin-bottom: 80px;
`;
const Notifications = styled.div`
border-right: 1px solid rgba(0, 0, 0, 0.1);
border-left: 1px solid rgba(0, 0, 0, 0.1);
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-color: #414561;
height: 448px;
overflow-y: scroll;
user-select: none;
`;
const NotificationFooter = styled.div`
cursor: pointer;
padding: 0.5rem;
text-align: center;
color: ${(props) => props.theme.colors.primary};
&:hover {
background: ${(props) => props.theme.colors.bg.primary};
}
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
border-right: 1px solid rgba(0, 0, 0, 0.1);
border-left: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
border-color: #414561;
`;
const NotificationTabs = styled.div`
align-items: flex-end;
align-self: stretch;
display: flex;
flex: 1 0 auto;
justify-content: flex-start;
max-width: 100%;
padding-top: 4px;
border-right: 1px solid rgba(0, 0, 0, 0.1);
border-left: 1px solid rgba(0, 0, 0, 0.1);
border-color: #414561;
`;
const NotificationTab = styled.div<{ active: boolean }>`
font-size: 80%;
color: ${(props) => props.theme.colors.text.primary};
font-size: 15px;
cursor: pointer;
display: flex;
user-select: none;
justify-content: center;
line-height: normal;
min-width: 1px;
transition-duration: 0.2s;
transition-property: box-shadow, color;
white-space: nowrap;
flex: 0 1 auto;
padding: 12px 16px;
&:first-child {
margin-left: 12px;
}
&:hover {
box-shadow: inset 0 -2px ${(props) => props.theme.colors.text.secondary};
color: ${(props) => props.theme.colors.text.secondary};
}
&:not(:last-child) {
margin-right: 12px;
}
${(props) =>
props.active &&
css`
box-shadow: inset 0 -2px ${props.theme.colors.secondary};
color: ${props.theme.colors.secondary};
&:hover {
box-shadow: inset 0 -2px ${props.theme.colors.secondary};
color: ${props.theme.colors.secondary};
}
`}
`;
const NotificationLink = styled(Link)`
display: flex;
text-decoration: none;
padding: 16px 8px;
width: 100%;
`;
const NotificationControls = styled.div`
width: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
visibility: hidden;
padding: 4px;
`;
const NotificationButtons = styled.div`
display: flex;
align-self: flex-end;
align-items: center;
margin-top: auto;
margin-bottom: 6px;
`;
const NotificationButton = styled.div`
padding: 4px 15px;
cursor: pointer;
&:hover svg {
fill: rgb(216, 93, 216);
stroke: rgb(216, 93, 216);
}
`;
const NotificationWrapper = styled.li<{ read: boolean }>`
min-height: 80px;
display: flex;
font-size: 14px;
transition: background-color 0.1s ease-in-out;
margin: 2px 8px;
border-radius: 8px;
justify-content: space-between;
position: relative;
&:hover {
background: ${(props) => mixin.rgba(props.theme.colors.primary, 0.5)};
}
&:hover ${NotificationLink} {
color: #fff;
}
&:hover ${NotificationControls} {
visibility: visible;
}
${(props) =>
!props.read &&
css`
background: ${(props) => mixin.rgba(props.theme.colors.primary, 0.5)};
&:hover {
background: ${(props) => mixin.rgba(props.theme.colors.primary, 0.6)};
}
`}
`;
const NotificationContentFooter = styled.div`
margin-top: 10px;
display: flex;
align-items: center;
color: ${(props) => props.theme.colors.text.primary};
`;
const NotificationCausedBy = styled.div`
height: 48px;
width: 48px;
min-height: 48px;
min-width: 48px;
`;
const NotificationCausedByInitials = styled.div`
position: relative;
display: flex;
align-items: center;
text: #fff;
font-size: 18px;
justify-content: center;
border-radius: 50%;
flex-shrink: 0;
height: 100%;
width: 100%;
border: none;
background: #7367f0;
`;
const NotificationCausedByImage = styled.img`
position: relative;
display: flex;
border-radius: 50%;
flex-shrink: 0;
height: 100%;
width: 100%;
border: none;
background: #7367f0;
`;
const NotificationContent = styled.div`
display: flex;
overflow: hidden;
flex-direction: column;
margin-left: 16px;
`;
const NotificationContentHeader = styled.div`
font-weight: bold;
font-size: 14px;
color: #fff;
svg {
margin-left: 8px;
fill: rgb(216, 93, 216);
stroke: rgb(216, 93, 216);
}
`;
const NotificationBody = styled.div`
display: flex;
align-items: center;
color: #fff;
svg {
fill: rgb(216, 93, 216);
stroke: rgb(216, 93, 216);
}
`;
const NotificationPrefix = styled.span`
color: rgb(216, 93, 216);
margin: 0 4px;
`;
const NotificationSeparator = styled.span`
margin: 0 6px;
`;
type NotificationProps = {
causedBy?: { fullname: string; username: string; id: string } | null;
createdAt: string;
read: boolean;
data: Array<{ key: string; value: string }>;
actionType: ActionType;
onToggleRead: () => void;
};
const Notification: React.FC<NotificationProps> = ({ causedBy, createdAt, data, actionType, read, onToggleRead }) => {
const prefix: any = [];
const { hidePopup } = usePopup();
const dataMap = new Map<string, string>();
data.forEach((d) => dataMap.set(d.key, d.value));
let link = '#';
switch (actionType) {
case ActionType.TaskAssigned:
prefix.push(<UserCircle key="profile" width={14} height={16} />);
prefix.push(
<NotificationPrefix key="prefix">
<span style={{ fontWeight: 'bold' }}>{causedBy ? causedBy.fullname : 'Removed user'}</span>
</NotificationPrefix>,
);
prefix.push(<span key="content">assigned you to the task "e;{dataMap.get('TaskName')}"e;</span>);
link = `/p/${dataMap.get('ProjectID')}/board/c/${dataMap.get('TaskID')}`;
break;
case ActionType.DueDateReminder:
prefix.push(<Bell key="profile" width={14} height={16} />);
prefix.push(<NotificationPrefix key="prefix">{dataMap.get('TaskName')}</NotificationPrefix>);
const now = dayjs();
if (dayjs(dataMap.get('DueDate')).isBefore(dayjs())) {
prefix.push(
<span key="content">is due {dayjs.duration(now.diff(dayjs(dataMap.get('DueAt')))).humanize(true)}</span>,
);
} else {
prefix.push(
<span key="content">
has passed the due date {dayjs.duration(dayjs(dataMap.get('DueAt')).diff(now)).humanize(true)}
</span>,
);
}
link = `/p/${dataMap.get('ProjectID')}/board/c/${dataMap.get('TaskID')}`;
break;
default:
throw new Error('unknown action type');
}
return (
<NotificationWrapper read={read}>
<NotificationLink to={link} onClick={hidePopup}>
<NotificationCausedBy>
<NotificationCausedByInitials>
{causedBy
? causedBy.fullname
.split(' ')
.map((n) => n[0])
.join('.')
: 'RU'}
</NotificationCausedByInitials>
</NotificationCausedBy>
<NotificationContent>
<NotificationBody>{prefix}</NotificationBody>
<NotificationContentFooter>
<span>{dayjs.duration(dayjs(createdAt).diff(dayjs())).humanize(true)}</span>
<NotificationSeparator>•</NotificationSeparator>
<span>{dataMap.get('ProjectName')}</span>
</NotificationContentFooter>
</NotificationContent>
</NotificationLink>
<NotificationControls>
<NotificationButtons>
<NotificationButton onClick={() => onToggleRead()}>
{read ? <Circle width={18} height={18} /> : <CheckCircleOutline width={18} height={18} />}
</NotificationButton>
</NotificationButtons>
</NotificationControls>
</NotificationWrapper>
);
};
const PopupContent = styled.div`
display: flex;
flex-direction: column;
border-right: 1px solid rgba(0, 0, 0, 0.1);
border-left: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding-bottom: 10px;
border-color: #414561;
`;
const tabs = [
{ label: 'All', key: NotificationFilter.All },
{ label: 'Unread', key: NotificationFilter.Unread },
{ label: 'I was mentioned', key: NotificationFilter.Mentioned },
{ label: 'Assigned to me', key: NotificationFilter.Assigned },
];
type NotificationEntry = {
id: string;
read: boolean;
readAt?: string | undefined | null;
notification: {
id: string;
data: Array<{ key: string; value: string }>;
actionType: ActionType;
causedBy?: { id: string; username: string; fullname: string } | undefined | null;
createdAt: string;
};
};
type NotificationPopupProps = {
onToggleRead: () => void;
};
const NotificationHeaderMenu = styled.div`
position: absolute;
right: 16px;
top: 16px;
`;
const NotificationHeaderMenuIcon = styled.div`
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
position: relative;
svg {
fill: #fff;
stroke: #fff;
}
`;
const NotificationHeaderMenuContent = styled.div<{ show: boolean }>`
min-width: 130px;
position: absolute;
top: 16px;
background: #fff;
border-radius: 6px;
height: 50px;
visibility: ${(props) => (props.show ? 'visible' : 'hidden')};
border: 1px solid rgba(0, 0, 0, 0.1);
border-color: #414561;
background: #262c49;
padding: 6px;
display: flex;
flex-direction: column;
`;
const NotificationHeaderMenuButton = styled.div`
position: relative;
padding-left: 4px;
padding-right: 4px;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
cursor: pointer;
display: flex;
align-items: center;
font-size: 14px;
&:hover {
background: ${(props) => props.theme.colors.primary};
}
`;
const NotificationPopup: React.FC<NotificationPopupProps> = ({ onToggleRead }) => {
const [filter, setFilter] = useLocalStorage<NotificationFilter>(
localStorage.NOTIFICATIONS_FILTER,
NotificationFilter.Unread,
);
const [data, setData] = useState<{ nodes: Array<NotificationEntry>; hasNextPage: boolean; cursor: string }>({
nodes: [],
hasNextPage: false,
cursor: '',
});
const [toggleRead] = useNotificationToggleReadMutation({
onCompleted: (data) => {
setData((prev) => {
return produce(prev, (draft) => {
const idx = draft.nodes.findIndex((n) => n.id === data.notificationToggleRead.id);
if (idx !== -1) {
draft.nodes[idx].read = data.notificationToggleRead.read;
draft.nodes[idx].readAt = data.notificationToggleRead.readAt;
}
});
});
onToggleRead();
},
});
const { fetchMore } = useNotificationsQuery({
variables: { limit: 8, filter },
fetchPolicy: 'network-only',
onCompleted: (d) => {
setData((prev) => ({
hasNextPage: d.notified.pageInfo.hasNextPage,
cursor: d.notified.pageInfo.endCursor ?? '',
nodes: [...prev.nodes, ...d.notified.notified],
}));
},
});
useNotificationAddedSubscription({
onSubscriptionData: (d) => {
setData((n) => {
if (d.subscriptionData.data) {
return {
...n,
nodes: [d.subscriptionData.data.notificationAdded, ...n.nodes],
};
}
return n;
});
},
});
const [toggleAllRead] = useNotificationMarkAllReadMutation();
const [showHeaderMenu, setShowHeaderMenu] = useState(false);
const $menuContent = useRef<HTMLDivElement>(null);
useOnOutsideClick($menuContent, true, () => setShowHeaderMenu(false), null);
return (
<Popup title={null} tab={0} borders={false} padding={false}>
<PopupContent>
<NotificationHeader>
<NotificationHeaderTitle>Notifications</NotificationHeaderTitle>
<NotificationHeaderMenu>
<NotificationHeaderMenuIcon onClick={() => setShowHeaderMenu(true)}>
<Ellipsis size={18} color="#fff" vertical={false} />
<NotificationHeaderMenuContent ref={$menuContent} show={showHeaderMenu}>
<NotificationHeaderMenuButton
onClick={(e) => {
e.stopPropagation();
setShowHeaderMenu(() => false);
toggleAllRead().then(() => {
setData((prev) =>
produce(prev, (draftData) => {
draftData.nodes = draftData.nodes.map((node) => ({ ...node, read: true }));
}),
);
onToggleRead();
});
}}
>
Mark all as read
</NotificationHeaderMenuButton>
</NotificationHeaderMenuContent>
</NotificationHeaderMenuIcon>
</NotificationHeaderMenu>
</NotificationHeader>
<NotificationTabs>
{tabs.map((tab) => (
<NotificationTab
key={tab.key}
onClick={() => {
if (filter !== tab.key) {
setData({ cursor: '', hasNextPage: false, nodes: [] });
setFilter(tab.key);
}
}}
active={tab.key === filter}
>
{tab.label}
</NotificationTab>
))}
</NotificationTabs>
{data.nodes.length !== 0 ? (
<Notifications
onScroll={({ currentTarget }) => {
if (Math.ceil(currentTarget.scrollTop + currentTarget.clientHeight) >= currentTarget.scrollHeight) {
if (data.hasNextPage) {
console.log(`fetching more = ${data.cursor} - ${data.hasNextPage}`);
fetchMore({
variables: {
limit: 8,
filter,
cursor: data.cursor,
},
updateQuery: (prev, { fetchMoreResult }) => {
if (!fetchMoreResult) return prev;
setData((d) => ({
cursor: fetchMoreResult.notified.pageInfo.endCursor ?? '',
hasNextPage: fetchMoreResult.notified.pageInfo.hasNextPage,
nodes: [...d.nodes, ...fetchMoreResult.notified.notified],
}));
return {
...prev,
notified: {
...prev.notified,
pageInfo: {
...fetchMoreResult.notified.pageInfo,
},
notified: [...prev.notified.notified, ...fetchMoreResult.notified.notified],
},
};
},
});
}
}
}}
>
{data.nodes.map((n) => (
<Notification
key={n.id}
read={n.read}
actionType={n.notification.actionType}
data={n.notification.data}
createdAt={n.notification.createdAt}
causedBy={n.notification.causedBy}
onToggleRead={() =>
toggleRead({
variables: { notifiedID: n.id },
optimisticResponse: {
__typename: 'Mutation',
notificationToggleRead: {
__typename: 'Notified',
id: n.id,
read: !n.read,
readAt: new Date().toUTCString(),
},
},
}).then(() => {
onToggleRead();
})
}
/>
))}
</Notifications>
) : (
<EmptyMessage>
<EmptyMessageLabel>You have {getFilterMessage(filter)} notifications</EmptyMessageLabel>
</EmptyMessage>
)}
</PopupContent>
</Popup>
);
};
export default NotificationPopup;
| 9,805 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/PopupMenu/LabelEditor.tsx | import React, { useState, useEffect, useRef } from 'react';
import { Checkmark } from 'shared/icons';
import styled from 'styled-components';
import { SaveButton, DeleteButton, LabelBox, EditLabelForm, FieldLabel, FieldName } from './Styles';
const WhiteCheckmark = styled(Checkmark)`
fill: ${props => props.theme.colors.text.secondary};
`;
type Props = {
labelColors: Array<LabelColor>;
label: ProjectLabel | null;
onLabelEdit: (labelId: string | null, labelName: string, labelColor: LabelColor) => void;
onLabelDelete?: (labelId: string) => void;
};
const LabelManager = ({ labelColors, label, onLabelEdit, onLabelDelete }: Props) => {
const $fieldName = useRef<HTMLInputElement>(null);
const [currentLabel, setCurrentLabel] = useState(label ? label.name : '');
const [currentColor, setCurrentColor] = useState<LabelColor | null>(label ? label.labelColor : null);
useEffect(() => {
if ($fieldName.current) {
$fieldName.current.focus();
}
}, []);
return (
<EditLabelForm>
<FieldLabel>Name</FieldLabel>
<FieldName
ref={$fieldName}
id="labelName"
type="text"
name="name"
onChange={e => {
setCurrentLabel(e.currentTarget.value);
}}
value={currentLabel ?? ''}
/>
<FieldLabel>Select a color</FieldLabel>
<div>
{labelColors
.filter(l => l.name !== 'no_color')
.map((labelColor: LabelColor) => (
<LabelBox
key={labelColor.id}
color={labelColor.colorHex}
onClick={() => {
setCurrentColor(labelColor);
}}
>
{currentColor && labelColor.id === currentColor.id && <WhiteCheckmark width={12} height={12} />}
</LabelBox>
))}
</div>
<div>
<SaveButton
value="Save"
type="submit"
onClick={e => {
e.preventDefault();
if (currentColor) {
onLabelEdit(label ? label.id : null, currentLabel ?? '', currentColor);
}
}}
/>
{label && onLabelDelete && (
<DeleteButton
value="Delete"
type="submit"
onClick={e => {
e.preventDefault();
onLabelDelete(label.id);
}}
/>
)}
</div>
</EditLabelForm>
);
};
export default LabelManager;
| 9,806 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/PopupMenu/LabelManager.tsx | import React, { useState, useEffect, useRef } from 'react';
import { Pencil, Checkmark } from 'shared/icons';
import {
LabelSearch,
ActiveIcon,
Labels,
Label,
CardLabel,
Section,
SectionTitle,
LabelIcon,
CreateLabelButton,
} from './Styles';
type Props = {
labels?: Array<ProjectLabel>;
taskLabels?: Array<TaskLabel>;
onLabelToggle: (labelId: string) => void;
onLabelEdit: (labelId: string) => void;
onLabelCreate: () => void;
};
const LabelManager: React.FC<Props> = ({ labels, taskLabels, onLabelToggle, onLabelEdit, onLabelCreate }) => {
const [currentLabel, setCurrentLabel] = useState('');
const [currentSearch, setCurrentSearch] = useState('');
return (
<>
<LabelSearch
autoFocus
value={currentSearch}
variant="alternate"
width="100%"
onChange={e => setCurrentSearch(e.currentTarget.value)}
type="text"
placeholder="search labels..."
/>
<Section>
<SectionTitle>Labels</SectionTitle>
<Labels>
{labels &&
labels
.filter(
label =>
currentSearch === '' ||
(label.name && label.name.toLowerCase().startsWith(currentSearch.toLowerCase())),
)
.map(label => (
<Label key={label.id}>
<LabelIcon
onClick={() => {
onLabelEdit(label.id);
}}
>
<Pencil width={16} height={16} />
</LabelIcon>
<CardLabel
key={label.id}
color={label.labelColor.colorHex}
active={currentLabel === label.id}
onMouseEnter={() => {
setCurrentLabel(label.id);
}}
onClick={() => onLabelToggle(label.id)}
>
{label.name}
{taskLabels && taskLabels.find(t => t.projectLabel.id === label.id) && (
<ActiveIcon>
<Checkmark width={16} height={16} />
</ActiveIcon>
)}
</CardLabel>
</Label>
))}
</Labels>
<CreateLabelButton
onClick={() => {
onLabelCreate();
}}
>
Create a new label
</CreateLabelButton>
</Section>
</>
);
};
export default LabelManager;
| 9,807 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/PopupMenu/Styles.ts | import styled, { css } from 'styled-components';
import { mixin } from 'shared/utils/styles';
import ControlledInput from 'shared/components/ControlledInput';
import theme from 'App/ThemeStyles';
export const Container = styled.div<{
invertY: boolean;
invert: boolean;
targetPadding: string;
top: number;
left: number;
ref: any;
width: number | string;
}>`
left: ${props => props.left}px;
top: ${props => props.top}px;
display: block;
position: absolute;
width: ${props => props.width}px;
padding-top: ${props => props.targetPadding};
height: auto;
z-index: 40000;
${props =>
props.invert &&
css`
transform: translate(-100%);
`}
${props =>
props.invertY &&
css`
top: auto;
padding-top: 0;
padding-bottom: ${props.targetPadding};
bottom: ${props.top}px;
`}
`;
export const Wrapper = styled.div<{ padding: boolean; borders: boolean }>`
${props =>
props.padding &&
css`
padding: 5px;
padding-top: 8px;
`}
border-radius: 5px;
box-shadow: 0 5px 25px 0 rgba(0, 0, 0, 0.1);
position: relative;
margin: 0;
color: #c2c6dc;
background: #262c49;
${props =>
props.borders &&
css`
border: 1px solid rgba(0, 0, 0, 0.1);
border-color: #414561;
`}
`;
export const Header = styled.div`
height: 40px;
position: relative;
margin-bottom: 8px;
text-align: center;
`;
export const HeaderTitle = styled.span`
box-sizing: border-box;
color: #c2c6dc;
display: block;
border-bottom: 1px solid #414561;
margin: 0 12px;
overflow: hidden;
padding: 0 32px;
position: relative;
text-overflow: ellipsis;
white-space: nowrap;
z-index: 1;
height: 40px;
line-height: 18px;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
`;
export const Content = styled.div`
max-height: 632px;
overflow-y: auto;
overflow-x: hidden;
&::-webkit-scrollbar-track-piece {
background: ${props => props.theme.colors.bg.primary};
border-radius: 20px;
}
`;
export const LabelSearch = styled(ControlledInput)`
margin: 12px 12px 0 12px;
`;
export const Section = styled.div`
margin-top: 12px;
margin: 12px 12px 0 12px;
`;
export const SectionTitle = styled.h4`
color: #c2c6dc;
font-size: 12px;
font-weight: 500;
letter-spacing: 0.04em;
line-height: 16px;
margin-top: 16px;
text-transform: uppercase;
`;
export const Labels = styled.ul`
list-style: none;
margin: 0;
padding: 0;
margin-bottom: 8px;
`;
export const Label = styled.li`
padding-right: 36px;
position: relative;
`;
export const CardLabel = styled.span<{ active: boolean; color: string }>`
${props =>
props.active &&
css`
margin-left: 4px;
box-shadow: -8px 0 ${mixin.darken(props.color, 0.12)};
border-radius: 3px;
`}
cursor: pointer;
font-weight: 700;
margin: 0 0 4px;
min-height: 20px;
padding: 6px 12px;
position: relative;
transition: padding 85ms, margin 85ms, box-shadow 85ms;
background-color: ${props => props.color};
color: #fff;
display: block;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-height: 31px;
`;
export const CloseButton = styled.div`
padding: 18px 18px 14px 12px;
position: absolute;
top: 0;
right: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
z-index: 40;
cursor: pointer;
`;
export const LabelIcon = styled.div`
border-radius: 3px;
padding: 6px;
position: absolute;
top: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 16px;
line-height: 20px;
width: auto;
cursor: pointer;
&:hover {
background: ${props => props.theme.colors.primary};
}
`;
export const ActiveIcon = styled.div`
padding: 6px;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
right: 0;
opacity: 0.85;
font-size: 16px;
line-height: 20px;
width: 20px;
`;
export const EditLabelForm = styled.form`
display: flex;
flex-direction: column;
`;
export const FieldLabel = styled.label`
font-weight: 700;
color: #5e6c84;
font-size: 12px;
line-height: 16px;
margin-top: 12px;
margin-bottom: 4px;
display: block;
`;
export const FieldName = styled.input`
margin: 4px 0 12px;
width: 100%;
box-sizing: border-box;
display: block;
line-height: 20px;
margin-bottom: 12px;
padding: 8px 12px;
background: #262c49;
outline: none;
color: #c2c6dc;
border-radius: 3px;
border-width: 1px;
border-style: solid;
border-color: transparent;
border-image: initial;
border-color: #414561;
font-size: 12px;
font-weight: 400;
&:focus {
box-shadow: ${props => props.theme.colors.primary} 0px 0px 0px 1px;
background: ${mixin.darken(theme.colors.bg.secondary, 0.15)};
}
`;
export const LabelBox = styled.span<{ color: string }>`
float: left;
height: 32px;
margin: 0 8px 8px 0;
padding: 0;
width: 48px;
cursor: pointer;
background-color: ${props => props.color};
border-radius: 4px;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
&:hover {
opacity: 0.8;
}
`;
export const SaveButton = styled.input`
background: ${props => props.theme.colors.primary};
box-shadow: none;
border: none;
color: #fff;
cursor: pointer;
display: inline-block;
font-weight: 400;
line-height: 20px;
margin-right: 4px;
padding: 6px 12px;
text-align: center;
border-radius: 3px;
`;
export const DeleteButton = styled.input`
float: right;
outline: none;
border: none;
line-height: 20px;
padding: 6px 12px;
background-color: transparent;
text-align: center;
color: #c2c6dc;
font-weight: 400;
line-height: 20px;
cursor: pointer;
margin: 0 0 0 8px;
border-radius: 3px;
border-width: 1px;
border-style: solid;
border-color: transparent;
border-image: initial;
border-color: #414561;
&:hover {
color: #fff;
background: ${props => props.theme.colors.primary};
border-color: transparent;
}
`;
export const CreateLabelButton = styled.button`
outline: none;
border: none;
width: 100%;
border-radius: 3px;
line-height: 20px;
margin-bottom: 8px;
padding: 6px 12px;
background-color: none;
text-align: center;
color: #c2c6dc;
margin: 8px 4px 0 0;
font-size: 14px;
cursor: pointer;
&:hover {
background: ${props => props.theme.colors.primary};
}
`;
export const PreviousButton = styled.div`
padding: 18px 18px 14px 12px;
position: absolute;
top: 0;
left: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
z-index: 40;
cursor: pointer;
`;
export const ContainerDiamond = styled.div<{ borders: boolean; color: string; invert: boolean; invertY: boolean }>`
${props => (props.invert ? 'right: 10px; ' : 'left: 15px;')}
position: absolute;
width: 10px;
height: 10px;
display: block;
${props =>
props.invertY
? css`
bottom: 0;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
border-right: 1px solid rgba(0, 0, 0, 0.1);
`
: css`
top: 10px;
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-left: 1px solid rgba(0, 0, 0, 0.1);
`}
transform: rotate(45deg) translate(-7px);
z-index: 10;
background: ${props => props.color};
${props =>
props.borders &&
css`
border-color: #414561;
`}
`;
| 9,808 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/PopupMenu/index.tsx | import React, { useRef, createContext, RefObject, useState, useContext, useEffect } from 'react';
import { Cross, AngleLeft } from 'shared/icons';
import useOnOutsideClick from 'shared/hooks/onOutsideClick';
import { createPortal } from 'react-dom';
import NOOP from 'shared/utils/noop';
import produce from 'immer';
import theme from 'App/ThemeStyles';
import {
Container,
ContainerDiamond,
Header,
HeaderTitle,
Content,
CloseButton,
PreviousButton,
Wrapper,
} from './Styles';
function getPopupOptions(options?: PopupOptions) {
const popupOptions: PopupOptionsInternal = {
borders: true,
diamondColor: theme.colors.bg.secondary,
targetPadding: '10px',
showDiamond: true,
width: 316,
};
if (options) {
if (options.borders) {
popupOptions.borders = options.borders;
}
if (options.width) {
popupOptions.width = options.width;
}
if (options.targetPadding) {
popupOptions.targetPadding = options.targetPadding;
}
if (typeof options.showDiamond !== 'undefined' && options.showDiamond !== null) {
popupOptions.showDiamond = options.showDiamond;
}
if (options.diamondColor) {
popupOptions.diamondColor = options.diamondColor;
}
if (options.onClose) {
popupOptions.onClose = options.onClose;
}
}
return popupOptions;
}
type PopupContextState = {
show: (target: RefObject<HTMLElement>, content: JSX.Element, options?: PopupOptions) => void;
setTab: (newTab: number, options?: PopupOptions) => void;
getCurrentTab: () => number;
hide: () => void;
};
type PopupProps = {
title: string | null;
onClose?: () => void;
tab: number;
padding?: boolean;
borders?: boolean;
diamondColor?: string;
};
type PopupContainerProps = {
top: number;
left: number;
invert: boolean;
targetPadding: string;
invertY: boolean;
onClose: () => void;
width?: string | number;
};
const PopupContainer: React.FC<PopupContainerProps> = ({
width,
top,
left,
onClose,
children,
invert,
invertY,
targetPadding,
}) => {
const $containerRef = useRef<HTMLDivElement>(null);
const [currentTop, setCurrentTop] = useState(top);
useOnOutsideClick($containerRef, true, onClose, null);
return (
<Container
targetPadding={targetPadding}
width={width ?? 316}
left={left}
top={currentTop}
ref={$containerRef}
invert={invert}
invertY={invertY}
>
{children}
</Container>
);
};
PopupContainer.defaultProps = {
width: 316,
};
const PopupContext = createContext<PopupContextState>({
show: NOOP,
setTab: NOOP,
getCurrentTab: () => 0,
hide: NOOP,
});
export const usePopup = () => {
const ctx = useContext<PopupContextState>(PopupContext);
return { showPopup: ctx.show, setTab: ctx.setTab, getCurrentTab: ctx.getCurrentTab, hidePopup: ctx.hide };
};
type PopupState = {
isOpen: boolean;
left: number;
top: number;
invertY: boolean;
invert: boolean;
currentTab: number;
previousTab: number;
content: JSX.Element | null;
options: PopupOptionsInternal | null;
};
const { Provider, Consumer } = PopupContext;
const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
type PopupOptionsInternal = {
width: number;
borders: boolean;
targetPadding: string;
diamondColor: string;
showDiamond: boolean;
onClose?: () => void;
};
type PopupOptions = {
targetPadding?: string | null;
showDiamond?: boolean | null;
width?: number | null;
borders?: boolean | null;
diamondColor?: string | null;
onClose?: () => void;
};
const defaultState = {
isOpen: false,
left: 0,
top: 0,
invert: false,
invertY: false,
currentTab: 0,
previousTab: 0,
content: null,
options: null,
};
export const PopupProvider: React.FC = ({ children }) => {
const [currentState, setState] = useState<PopupState>(defaultState);
const show = (target: RefObject<HTMLElement>, content: JSX.Element, options?: PopupOptions) => {
if (target && target.current) {
const bounds = target.current.getBoundingClientRect();
let top = bounds.top + bounds.height;
let invertY = false;
if (window.innerHeight / 2 < top) {
top = window.innerHeight - bounds.top;
invertY = true;
}
const popupOptions = getPopupOptions(options);
if (bounds.left + 304 + 30 > window.innerWidth) {
setState({
isOpen: true,
left: bounds.left + bounds.width,
top,
invertY,
invert: true,
currentTab: 0,
previousTab: 0,
content,
options: popupOptions,
});
} else {
setState({
isOpen: true,
left: bounds.left,
top,
invert: false,
invertY,
currentTab: 0,
previousTab: 0,
content,
options: popupOptions,
});
}
}
};
const hide = () => {
setState({
isOpen: false,
left: 0,
top: 0,
invert: true,
invertY: false,
currentTab: 0,
previousTab: 0,
content: null,
options: null,
});
};
const portalTarget = canUseDOM ? document.body : null; // appease flow
const setTab = (newTab: number, options?: PopupOptions) => {
setState((prevState: PopupState) =>
produce(prevState, (draftState) => {
draftState.previousTab = currentState.currentTab;
draftState.currentTab = newTab;
if (options) {
draftState.options = getPopupOptions(options);
}
}),
);
};
const getCurrentTab = () => {
return currentState.currentTab;
};
return (
<Provider value={{ hide, show, setTab, getCurrentTab }}>
{portalTarget &&
currentState.isOpen &&
currentState.options &&
createPortal(
<PopupContainer
invertY={currentState.invertY}
invert={currentState.invert}
top={currentState.top}
targetPadding={currentState.options.targetPadding}
left={currentState.left}
onClose={() => {
if (currentState.options && currentState.options.onClose) {
currentState.options.onClose();
}
setState(defaultState);
}}
width={currentState.options.width}
>
{currentState.content}
{currentState.options.showDiamond && (
<ContainerDiamond
color={currentState.options.diamondColor}
borders={currentState.options.borders}
invertY={currentState.invertY}
invert={currentState.invert}
/>
)}
</PopupContainer>,
portalTarget,
)}
{children}
</Provider>
);
};
type Props = {
title: string | null;
top: number;
left: number;
onClose: () => void;
onPrevious?: () => void | null;
noHeader?: boolean | null;
width?: string | number;
};
const PopupMenu: React.FC<Props> = ({ width, title, top, left, onClose, noHeader, children, onPrevious }) => {
const $containerRef = useRef<HTMLDivElement>(null);
useOnOutsideClick($containerRef, true, onClose, null);
return (
<Container
targetPadding="10px"
invertY={false}
width={width ?? 316}
invert={false}
left={left}
top={top}
ref={$containerRef}
>
<Wrapper padding borders>
{onPrevious && (
<PreviousButton onClick={onPrevious}>
<AngleLeft size={16} color="#c2c6dc" />
</PreviousButton>
)}
{noHeader ? (
<CloseButton onClick={() => onClose()}>
<Cross width={16} height={16} />
</CloseButton>
) : (
<Header>
<HeaderTitle>{title}</HeaderTitle>
<CloseButton onClick={() => onClose()}>
<Cross width={16} height={16} />
</CloseButton>
</Header>
)}
<Content>{children}</Content>
</Wrapper>
</Container>
);
};
export const Popup: React.FC<PopupProps> = ({ borders = true, padding = true, title, onClose, tab, children }) => {
const { getCurrentTab, setTab } = usePopup();
if (getCurrentTab() !== tab) {
return null;
}
return (
<>
<Wrapper borders={borders} padding={padding}>
{tab > 0 && (
<PreviousButton
onClick={() => {
setTab(0);
}}
>
<AngleLeft size={16} color="#c2c6dc" />
</PreviousButton>
)}
{title && (
<Header>
<HeaderTitle>{title}</HeaderTitle>
</Header>
)}
{onClose && (
<CloseButton onClick={() => onClose()}>
<Cross width={16} height={16} />
</CloseButton>
)}
<Content>{children}</Content>
</Wrapper>
</>
);
};
export default PopupMenu;
| 9,809 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/ProfileIcon/index.tsx | import React, { useRef } from 'react';
import styled from 'styled-components';
export const Container = styled.div<{ size: number | string; bgColor: string | null; backgroundURL: string | null }>`
width: ${(props) => props.size}px;
height: ${(props) => props.size}px;
border-radius: 9999px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 700;
background: ${(props) => (props.backgroundURL ? `url(${props.backgroundURL})` : props.bgColor)};
background-position: center;
background-size: contain;
`;
type ProfileIconProps = {
user: TaskUser;
onProfileClick: ($target: React.RefObject<HTMLElement>, user: TaskUser) => void;
size: number | string;
};
const ProfileIcon: React.FC<ProfileIconProps> = ({ user, onProfileClick, size }) => {
let realSize = size;
if (size === null) {
realSize = 28;
}
const $profileRef = useRef<HTMLDivElement>(null);
return (
<Container
ref={$profileRef}
onClick={() => {
onProfileClick($profileRef, user);
}}
size={realSize}
backgroundURL={user.profileIcon.url ?? null}
bgColor={user.profileIcon.bgColor ?? null}
>
{(!user.profileIcon.url && user.profileIcon.initials) ?? ''}
</Container>
);
};
export default ProfileIcon;
| 9,810 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/ProjectGridItem/Styles.ts | import styled from 'styled-components';
import { mixin } from 'shared/utils/styles';
export const AddProjectLabel = styled.span`
padding-top: 4px;
font-size: 14px;
color: #c2c6dc;
`;
export const ProjectContent = styled.div`
display: flex;
flex-direction: column;
`;
export const ProjectTitle = styled.span`
font-size: 18px;
font-weight: 700;
transition: transform 0.25s ease;
`;
export const TeamTitle = styled.span`
margin-top: 5px;
font-size: 14px;
font-weight: normal;
color: #c2c6dc;
`;
export const ProjectWrapper = styled.div<{ color: string }>`
display: flex;
padding: 15px 25px; border-radius: 20px;
${mixin.boxShadowCard}
background: ${props => mixin.darken(props.color, 0.35)};
color: #fff;
cursor: pointer;
margin: 0 10px;
width: 240px;
height: 100px;
transition: transform 0.25s ease;
align-items: center;
justify-content: center;
&:hover {
transform: translateY(-5px);
}
`;
export const AddProjectWrapper = styled.div`
display: flex;
padding: 15px 25px;
border-radius: 20px;
${mixin.boxShadowCard}
border: 1px dashed;
border-color: #c2c6dc;
color: #fff;
cursor: pointer;
margin: 0 10px;
width: 240px;
flex-direction: column;
height: 100px;
transition: transform 0.25s ease;
align-items: center;
justify-content: center;
&:hover {
transform: translateY(-5px);
}
`;
| 9,811 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/ProjectGridItem/index.tsx | import React from 'react';
import { Plus } from 'shared/icons';
import { AddProjectWrapper, AddProjectLabel, ProjectWrapper, ProjectContent, ProjectTitle, TeamTitle } from './Styles';
type AddProjectItemProps = {
onAddProject: () => void;
};
export const AddProjectItem: React.FC<AddProjectItemProps> = ({ onAddProject }) => {
return (
<AddProjectWrapper
onClick={() => {
onAddProject();
}}
>
<Plus width={12} height={12} />
<AddProjectLabel>New Project</AddProjectLabel>
</AddProjectWrapper>
);
};
type Props = {
project: Project;
};
const ProjectsList = ({ project }: Props) => {
const color = project.color ?? '#c2c6dc';
return (
<ProjectWrapper color={color}>
<ProjectContent>
<ProjectTitle>{project.name}</ProjectTitle>
<TeamTitle>{project.teamTitle}</TeamTitle>
</ProjectContent>
</ProjectWrapper>
);
};
export default ProjectsList;
| 9,812 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/ProjectSettings/index.tsx | import React from 'react';
import styled from 'styled-components';
import Button from 'shared/components/Button';
export const ListActionsWrapper = styled.ul`
list-style-type: none;
margin: 0 12px;
padding: 0;
`;
export const ListActionItemWrapper = styled.li`
margin: 0;
padding: 0;
`;
export const ListActionItem = styled.span`
cursor: pointer;
display: block;
font-size: 14px;
color: #c2c6dc;
font-weight: 400;
padding: 6px 12px;
position: relative;
margin: 0 -12px;
text-decoration: none;
&:hover {
background: ${props => props.theme.colors.primary};
}
`;
export const ListSeparator = styled.hr`
background-color: #414561;
border: 0;
height: 1px;
margin: 8px 0;
padding: 0;
width: 100%;
`;
type Props = {
publicOn: null | string;
onDeleteProject: () => void;
onToggleProjectVisible: (visible: boolean) => void;
};
const ProjectSettings: React.FC<Props> = ({ publicOn, onDeleteProject, onToggleProjectVisible }) => {
return (
<>
<ListActionsWrapper>
<ListActionItemWrapper onClick={() => onToggleProjectVisible(publicOn === null)}>
<ListActionItem>{`Make ${publicOn === null ? 'public' : 'private'}`}</ListActionItem>
</ListActionItemWrapper>
<ListActionItemWrapper onClick={() => onDeleteProject()}>
<ListActionItem>Delete Project</ListActionItem>
</ListActionItemWrapper>
</ListActionsWrapper>
</>
);
};
type TeamSettingsProps = {
onDeleteTeam: () => void;
};
export const TeamSettings: React.FC<TeamSettingsProps> = ({ onDeleteTeam }) => {
return (
<>
<ListActionsWrapper>
<ListActionItemWrapper onClick={() => onDeleteTeam()}>
<ListActionItem>Delete Team</ListActionItem>
</ListActionItemWrapper>
</ListActionsWrapper>
</>
);
};
const ConfirmWrapper = styled.div``;
const ConfirmSubTitle = styled.h3`
font-size: 14px;
`;
const ConfirmDescription = styled.div`
margin: 0 12px;
font-size: 14px;
`;
const DeleteList = styled.ul`
margin-bottom: 12px;
`;
const DeleteListItem = styled.li`
padding: 6px 0;
list-style: disc;
margin-left: 16px;
`;
const ConfirmDeleteButton = styled(Button)`
width: 100%;
padding: 6px 12px;
`;
type DeleteConfirmProps = {
description: string;
deletedItems: Array<string>;
onConfirmDelete: () => void;
};
export const DELETE_INFO = {
DELETE_PROJECTS: {
description: 'Deleting the project will also delete the following:',
deletedItems: ['Task groups and tasks'],
},
DELETE_TEAMS: {
description: 'Deleting the team will also delete the following:',
deletedItems: ['Projects under the team', 'All task groups & tasks associated with the team projects'],
},
};
const DeleteConfirm: React.FC<DeleteConfirmProps> = ({ description, deletedItems, onConfirmDelete }) => {
return (
<ConfirmWrapper>
<ConfirmDescription>
{description}
<DeleteList>
{deletedItems.map(item => (
<DeleteListItem>{item}</DeleteListItem>
))}
</DeleteList>
</ConfirmDescription>
<ConfirmDeleteButton onClick={() => onConfirmDelete()} color="danger">
Delete
</ConfirmDeleteButton>
</ConfirmWrapper>
);
};
type PublicConfirmProps = {
onConfirm: () => void;
};
const PublicConfirm: React.FC<PublicConfirmProps> = ({ onConfirm }) => {
return (
<ConfirmWrapper>
<ConfirmDescription>Public projects can be accessed by anyone with a link to the project.</ConfirmDescription>
<ConfirmDeleteButton onClick={() => onConfirm()}>Make public</ConfirmDeleteButton>
</ConfirmWrapper>
);
};
export { DeleteConfirm, PublicConfirm };
export default ProjectSettings;
| 9,813 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/QuickCardEditor/Styles.ts | import styled, { keyframes, css } from 'styled-components';
export const Wrapper = styled.div<{ open: boolean }>`
background: rgba(0, 0, 0, 0.55);
bottom: 0;
color: #fff;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 100;
visibility: ${props => (props.open ? 'show' : 'hidden')};
`;
export const Container = styled.div<{ fixed: boolean; width: number; top: number; left: number }>`
position: absolute;
width: ${props => props.width}px;
top: ${props => props.top}px;
left: ${props => props.left}px;
${props =>
props.fixed &&
css`
top: auto;
bottom: ${props.top}px;
`}
`;
export const SaveButton = styled.button`
cursor: pointer;
background: ${props => props.theme.colors.primary};
box-shadow: none;
border: none;
color: #fff;
font-weight: 400;
line-height: 20px;
margin-top: 8px;
margin-right: 4px;
padding: 6px 24px;
text-align: center;
border-radius: 3px;
`;
export const FadeInAnimation = keyframes`
from { opacity: 0; transform: translateX(-20px); }
to { opacity: 1; transform: translateX(0); }
`;
export const EditorButtons = styled.div<{ fixed: boolean }>`
left: 100%;
position: absolute;
top: 0;
width: 240px;
z-index: 0;
animation: ${FadeInAnimation} 85ms ease-in 1;
${props =>
props.fixed &&
css`
top: auto;
bottom: 8px;
`}
`;
export const EditorButton = styled.div`
cursor: pointer;
background: rgba(0, 0, 0, 0.6);
border-radius: 3px;
clear: both;
color: #c2c6dc;
display: block;
float: left;
margin: 0 0 4px 8px;
padding: 6px 12px 6px 8px;
text-decoration: none;
transition: all 85ms ease-in;
&:hover {
transform: translateX(5px);
background: rgba(0, 0, 0, 1);
color: #fff;
}
`;
export const CloseButton = styled.div`
padding: 9px;
position: absolute;
right: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
opacity: 0.8;
z-index: 40;
cursor: pointer;
`;
| 9,814 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/QuickCardEditor/index.tsx | import React, { useRef, useState } from 'react';
import Cross from 'shared/icons/Cross';
import styled from 'styled-components';
import { Wrapper, Container, EditorButtons, SaveButton, EditorButton, CloseButton } from './Styles';
import Card from '../Card';
export const CardMembers = styled.div`
position: absolute;
right: 0;
bottom: 0;
`;
type Props = {
task: Task;
onCloseEditor: () => void;
onEditCard: (taskGroupID: string, taskID: string, cardName: string) => void;
onToggleComplete: (task: Task) => void;
onOpenLabelsPopup: ($targetRef: React.RefObject<HTMLElement>, task: Task) => void;
onOpenMembersPopup: ($targetRef: React.RefObject<HTMLElement>, task: Task) => void;
onOpenDueDatePopup: ($targetRef: React.RefObject<HTMLElement>, task: Task) => void;
onArchiveCard: (taskGroupID: string, taskID: string) => void;
onCardMemberClick?: OnCardMemberClick;
target: React.RefObject<HTMLElement>;
};
const QuickCardEditor = ({
task,
onCloseEditor,
onOpenLabelsPopup,
onOpenMembersPopup,
onOpenDueDatePopup,
onToggleComplete,
onCardMemberClick,
onArchiveCard,
onEditCard,
target: $target,
}: Props) => {
const [currentCardTitle, setCardTitle] = useState(task.name);
const $labelsRef: any = useRef();
const $dueDate: any = useRef();
const $membersRef: any = useRef();
const handleCloseEditor = (e: any) => {
e.stopPropagation();
onCloseEditor();
};
const height = 180;
const saveCardButtonBarHeight = 48;
let top = 0;
let left = 0;
let width = 272;
let fixed = false;
if ($target && $target.current) {
const pos = $target.current.getBoundingClientRect();
top = pos.top;
left = pos.left;
width = pos.width;
const isFixed = window.innerHeight / 2 < pos.top;
if (isFixed) {
top = window.innerHeight - pos.bottom - saveCardButtonBarHeight;
fixed = true;
}
}
return (
<Wrapper onClick={handleCloseEditor} open>
<CloseButton onClick={handleCloseEditor}>
<Cross width={16} height={16} />
</CloseButton>
<Container fixed={fixed} width={width} left={left} top={top}>
<Card
editable
onCardMemberClick={onCardMemberClick}
title={currentCardTitle}
onEditCard={(taskGroupID, taskID, name) => {
onEditCard(taskGroupID, taskID, name);
onCloseEditor();
}}
complete={task.complete ?? false}
members={task.assigned}
taskID={task.id}
taskGroupID={task.taskGroup.id}
labels={task.labels.map(l => l.projectLabel)}
/>
<SaveButton onClick={() => onEditCard(task.taskGroup.id, task.id, currentCardTitle)}>Save</SaveButton>
<EditorButtons fixed={fixed}>
<EditorButton
onClick={e => {
e.stopPropagation();
onToggleComplete(task);
}}
>
{task.complete ? 'Mark Incomplete' : 'Mark Complete'}
</EditorButton>
<EditorButton
ref={$membersRef}
onClick={e => {
e.stopPropagation();
onOpenMembersPopup($membersRef, task);
}}
>
Edit Assigned
</EditorButton>
<EditorButton
ref={$dueDate}
onClick={e => {
e.stopPropagation();
onOpenDueDatePopup($labelsRef, task);
}}
>
Edit Due Date
</EditorButton>
<EditorButton
ref={$labelsRef}
onClick={e => {
e.stopPropagation();
onOpenLabelsPopup($labelsRef, task);
}}
>
Edit Labels
</EditorButton>
<EditorButton
onClick={e => {
e.stopPropagation();
onArchiveCard(task.taskGroup.id, task.id);
onCloseEditor();
}}
>
Archive
</EditorButton>
</EditorButtons>
</Container>
</Wrapper>
);
};
export default QuickCardEditor;
| 9,815 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Register/Styles.ts | import styled from 'styled-components';
import Button from 'shared/components/Button';
import { mixin } from 'shared/utils/styles';
export const Wrapper = styled.div`
background: #eff2f7;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
`;
export const Column = styled.div`
width: 50%;
display: flex;
justify-content: center;
align-items: center;
`;
export const LoginFormWrapper = styled.div`
background: #10163a;
width: 100%;
`;
export const LoginFormContainer = styled.div`
min-height: 505px;
padding: 2rem;
`;
export const Title = styled.h1`
color: #ebeefd;
font-size: 18px;
margin-bottom: 14px;
`;
export const SubTitle = styled.h2`
color: #c2c6dc;
font-size: 14px;
margin-bottom: 14px;
`;
export const Form = styled.form`
display: flex;
flex-direction: column;
`;
export const FormLabel = styled.label`
color: #c2c6dc;
font-size: 12px;
position: relative;
margin-top: 14px;
`;
export const FormTextInput = styled.input`
width: 100%;
background: #262c49;
border: 1px solid rgba(0, 0, 0, 0.2);
margin-top: 4px;
padding: 0.7rem 1rem 0.7rem 3rem;
font-size: 1rem;
color: #c2c6dc;
border-radius: 5px;
`;
export const FormIcon = styled.div`
top: 30px;
left: 16px;
position: absolute;
`;
export const FormError = styled.span`
font-size: 0.875rem;
color: ${props => props.theme.colors.danger};
`;
export const LoginButton = styled(Button)``;
export const ActionButtons = styled.div`
margin-top: 17.5px;
display: flex;
justify-content: space-between;
`;
export const RegisterButton = styled(Button)``;
export const LogoTitle = styled.div`
font-size: 24px;
font-weight: 600;
margin-left: 12px;
transition: visibility, opacity, transform 0.25s ease;
color: #7367f0;
`;
export const LogoWrapper = styled.div`
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
position: relative;
width: 100%;
padding-bottom: 16px;
margin-bottom: 24px;
color: rgb(222, 235, 255);
border-bottom: 1px solid ${props => mixin.rgba(props.theme.colors.alternate, 0.65)};
`;
| 9,816 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Register/index.tsx | import React, { useState } from 'react';
import AccessAccount from 'shared/undraw/AccessAccount';
import { User, Lock, Taskcafe } from 'shared/icons';
import { useForm } from 'react-hook-form';
import {
Form,
LogoWrapper,
LogoTitle,
ActionButtons,
RegisterButton,
FormError,
FormIcon,
FormLabel,
FormTextInput,
Wrapper,
Column,
LoginFormWrapper,
LoginFormContainer,
Title,
SubTitle,
} from './Styles';
const EMAIL_PATTERN = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
const INITIALS_PATTERN = /[a-zA-Z]{2,3}/i;
const Register = ({ onSubmit, registered = false }: RegisterProps) => {
const [isComplete, setComplete] = useState(true);
const {
register,
handleSubmit,
formState: { errors },
setError,
} = useForm<RegisterFormData>();
const loginSubmit = (data: RegisterFormData) => {
setComplete(false);
onSubmit(data, setComplete, setError);
};
return (
<Wrapper>
<Column>
<AccessAccount width={275} height={250} />
</Column>
<Column>
<LoginFormWrapper>
<LoginFormContainer>
<LogoWrapper>
<Taskcafe width={42} height={42} />
<LogoTitle>Taskcafé</LogoTitle>
</LogoWrapper>
{registered ? (
<>
<Title>Thanks for registering</Title>
<SubTitle>Please check your inbox for a confirmation email.</SubTitle>
</>
) : (
<>
<Title>Register</Title>
<SubTitle>Please create your user</SubTitle>
<Form onSubmit={handleSubmit(loginSubmit)}>
<FormLabel htmlFor="fullname">
Full name
<FormTextInput type="text" {...register('fullname', { required: 'Full name is required' })} />
<FormIcon>
<User width={20} height={20} />
</FormIcon>
</FormLabel>
{errors.username && <FormError>{errors.username.message}</FormError>}
<FormLabel htmlFor="username">
Username
<FormTextInput type="text" {...register('username', { required: 'Username is required' })} />
<FormIcon>
<User width={20} height={20} />
</FormIcon>
</FormLabel>
{errors.username && <FormError>{errors.username.message}</FormError>}
<FormLabel htmlFor="email">
Email
<FormTextInput
type="text"
{...register('email', {
required: 'Email is required',
pattern: { value: EMAIL_PATTERN, message: 'Must be a valid email' },
})}
/>
<FormIcon>
<User width={20} height={20} />
</FormIcon>
</FormLabel>
{errors.email && <FormError>{errors.email.message}</FormError>}
<FormLabel htmlFor="initials">
Initials
<FormTextInput
type="text"
{...register('initials', {
required: 'Initials is required',
pattern: {
value: INITIALS_PATTERN,
message: 'Initials must be between 2 to 3 characters.',
},
})}
/>
<FormIcon>
<User width={20} height={20} />
</FormIcon>
</FormLabel>
{errors.initials && <FormError>{errors.initials.message}</FormError>}
<FormLabel htmlFor="password">
Password
<FormTextInput type="password" {...register('password', { required: 'Password is required' })} />
<FormIcon>
<Lock width={20} height={20} />
</FormIcon>
</FormLabel>
{errors.password && <FormError>{errors.password.message}</FormError>}
<FormLabel htmlFor="password_confirm">
Password (Confirm)
<FormTextInput
type="password"
{...register('password_confirm', { required: 'Password (confirm) is required' })}
/>
<FormIcon>
<Lock width={20} height={20} />
</FormIcon>
</FormLabel>
{errors.password_confirm && <FormError>{errors.password_confirm.message}</FormError>}
<ActionButtons>
<RegisterButton type="submit" disabled={!isComplete}>
Register
</RegisterButton>
</ActionButtons>
</Form>
</>
)}
</LoginFormContainer>
</LoginFormWrapper>
</Column>
</Wrapper>
);
};
export default Register;
| 9,817 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Select/index.tsx | import React from 'react';
import Select from 'react-select';
import styled from 'styled-components';
import { mixin } from 'shared/utils/styles';
import theme from 'App/ThemeStyles';
function getBackgroundColor(isDisabled: boolean, isSelected: boolean, isFocused: boolean) {
if (isDisabled) {
return null;
}
if (isSelected) {
return mixin.darken(theme.colors.bg.secondary, 0.25);
}
if (isFocused) {
return mixin.darken(theme.colors.bg.secondary, 0.15);
}
return null;
}
export const colourStyles = {
control: (styles: any, data: any) => {
return {
...styles,
backgroundColor: data.isMenuOpen ? mixin.darken(theme.colors.bg.secondary, 0.15) : theme.colors.bg.secondary,
boxShadow: data.menuIsOpen ? `${theme.colors.primary} 0px 0px 0px 1px` : 'none',
borderRadius: '3px',
borderWidth: '1px',
borderStyle: 'solid',
borderImage: 'initial',
borderColor: theme.colors.alternate,
':hover': {
boxShadow: `${theme.colors.primary} 0px 0px 0px 1px`,
borderRadius: '3px',
borderWidth: '1px',
borderStyle: 'solid',
borderImage: 'initial',
borderColor: theme.colors.alternate,
},
':active': {
boxShadow: `${theme.colors.primary} 0px 0px 0px 1px`,
borderRadius: '3px',
borderWidth: '1px',
borderStyle: 'solid',
borderImage: 'initial',
borderColor: `${theme.colors.primary}`,
},
};
},
menu: (styles: any) => {
return {
...styles,
backgroundColor: mixin.darken(theme.colors.bg.secondary, 0.15),
};
},
dropdownIndicator: (styles: any) => ({ ...styles, color: '#c2c6dc', ':hover': { color: '#c2c6dc' } }),
indicatorSeparator: (styles: any) => ({ ...styles, color: '#c2c6dc' }),
option: (styles: any, { data, isDisabled, isFocused, isSelected }: any) => {
return {
...styles,
backgroundColor: getBackgroundColor(isDisabled, isSelected, isFocused),
color: isDisabled ? '#ccc' : isSelected ? '#fff' : '#c2c6dc', // eslint-disable-line
cursor: isDisabled ? 'not-allowed' : 'default',
':active': {
...styles[':active'],
backgroundColor: !isDisabled && (isSelected ? mixin.darken(theme.colors.bg.secondary, 0.25) : '#fff'),
},
':hover': {
...styles[':hover'],
backgroundColor: !isDisabled && (isSelected ? theme.colors.primary : theme.colors.primary),
},
};
},
placeholder: (styles: any) => ({ ...styles, color: '#c2c6dc' }),
clearIndicator: (styles: any) => ({ ...styles, color: '#c2c6dc', ':hover': { color: '#c2c6dc' } }),
input: (styles: any) => ({
...styles,
color: '#fff',
}),
singleValue: (styles: any) => {
return {
...styles,
color: '#fff',
};
},
};
export const editorColourStyles = {
...colourStyles,
input: (styles: any) => ({
...styles,
color: '#000',
}),
singleValue: (styles: any) => {
return {
...styles,
color: '#000',
};
},
menu: (styles: any) => {
return {
...styles,
backgroundColor: '#fff',
};
},
indicatorsContainer: (styles: any) => {
return {
...styles,
display: 'none',
};
},
container: (styles: any) => {
return {
...styles,
display: 'flex',
flex: '1 1',
};
},
control: (styles: any, data: any) => {
return {
...styles,
flex: '1 1',
backgroundColor: 'transparent',
boxShadow: 'none',
borderRadius: '0',
minHeight: '35px',
border: '0',
':hover': {
boxShadow: 'none',
borderRadius: '0',
},
':active': {
boxShadow: 'none',
borderRadius: '0',
},
};
},
};
const InputLabel = styled.span<{ width: string }>`
width: ${props => props.width};
padding-left: 0.7rem;
color: ${props => props.theme.colors.primary};
left: 0;
top: 0;
transition: all 0.2s ease;
position: absolute;
border-radius: 5px;
overflow: hidden;
font-size: 0.85rem;
cursor: text;
font-size: 12px;
user-select: none;
pointer-events: none;
}
`;
const SelectContainer = styled.div`
position: relative;
padding-top: 24px;
`;
type SelectProps = {
label?: string;
onChange: (e: any) => void;
value: any;
options: Array<any>;
className?: string;
};
const SelectElement: React.FC<SelectProps> = ({ onChange, value, options, label, className }) => {
return (
<SelectContainer className={className}>
<Select
onChange={(e: any) => {
onChange(e);
}}
value={value}
styles={colourStyles}
classNamePrefix="teamSelect"
options={options}
/>
{label && <InputLabel width="100%">{label}</InputLabel>}
</SelectContainer>
);
};
export default SelectElement;
| 9,818 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Settings/index.tsx | import React, { useState, useRef } from 'react';
import styled from 'styled-components';
import { User } from 'shared/icons';
import Button from 'shared/components/Button';
import { useForm } from 'react-hook-form';
import ControlledInput from 'shared/components/ControlledInput';
const PasswordInput = styled(ControlledInput)`
margin-top: 30px;
margin-bottom: 0;
`;
const UserInfoInput = styled(ControlledInput)`
margin-top: 30px;
margin-bottom: 0;
`;
const FormError = styled.span`
font-size: 12px;
color: ${(props) => props.theme.colors.warning};
`;
const ProfileContainer = styled.div`
display: flex;
align-items: center;
margin-bottom: 2.2rem !important;
`;
const AvatarContainer = styled.div`
width: 70px;
height: 70px;
border-radius: 50%;
position: relative;
cursor: pointer;
display: inline-block;
margin: 5px;
margin-bottom: 1rem;
margin-right: 1rem;
`;
const AvatarMask = styled.div<{ background: string }>`
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
background: ${(props) => props.background};
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
`;
const AvatarImg = styled.img<{ src: string }>`
display: block;
width: 100%;
height: 100%;
`;
const ActionButtons = styled.div`
display: flex;
flex-wrap: wrap;
align-items: center;
`;
const UploadButton = styled(Button)`
margin-right: 1rem;
display: inline-block;
`;
const RemoveButton = styled(Button)`
display: inline-block;
`;
const ImgLabel = styled.p`
color: #c2c6dc;
margin-top: 0.5rem;
font-size: 12.25px;
width: 100%;
`;
const AvatarInitials = styled.span`
font-size: 32px;
color: #fff;
`;
type AvatarSettingsProps = {
onProfileAvatarChange: () => void;
onProfileAvatarRemove: () => void;
profile: ProfileIcon;
};
const AvatarSettings: React.FC<AvatarSettingsProps> = ({ profile, onProfileAvatarChange, onProfileAvatarRemove }) => {
return (
<ProfileContainer>
<AvatarContainer>
<AvatarMask
background={profile.url ? 'none' : profile.bgColor ?? 'none'}
onClick={() => onProfileAvatarChange()}
>
{profile.url ? (
<AvatarImg alt="" src={profile.url ?? ''} />
) : (
<AvatarInitials>{profile.initials}</AvatarInitials>
)}
</AvatarMask>
</AvatarContainer>
<ActionButtons>
<UploadButton onClick={() => onProfileAvatarChange()}>Upload photo</UploadButton>
<RemoveButton variant="outline" color="danger" onClick={() => onProfileAvatarRemove()}>
Remove
</RemoveButton>
<ImgLabel>Allowed JPG, GIF or PNG. Max size of 800kB</ImgLabel>
</ActionButtons>
</ProfileContainer>
);
};
const Container = styled.div`
padding: 2.2rem;
display: flex;
width: 100%;
position: relative;
`;
const TabNav = styled.div`
float: left;
width: 220px;
height: 100%;
display: block;
position: relative;
`;
const TabNavContent = styled.ul`
display: block;
width: auto;
border-bottom: 0 !important;
border-right: 1px solid rgba(0, 0, 0, 0.05);
`;
const TabNavItem = styled.li`
padding: 0.35rem 0.3rem;
display: block;
position: relative;
`;
const TabNavItemButton = styled.button<{ active: boolean }>`
cursor: pointer;
display: flex;
align-items: center;
padding-top: 10px !important;
padding-bottom: 10px !important;
padding-left: 12px !important;
padding-right: 8px !important;
width: 100%;
position: relative;
color: ${(props) => (props.active ? `${props.theme.colors.primary}` : '#c2c6dc')};
&:hover {
color: ${(props) => props.theme.colors.primary};
}
&:hover svg {
fill: ${(props) => props.theme.colors.primary};
}
`;
const TabNavItemSpan = styled.span`
text-align: left;
padding-left: 9px;
font-size: 14px;
`;
const TabNavLine = styled.span<{ top: number }>`
left: auto;
right: 0;
width: 2px;
height: 48px;
transform: scaleX(1);
top: ${(props) => props.top}px;
background: linear-gradient(
30deg,
${(props) => props.theme.colors.primary},
${(props) => props.theme.colors.primary}
);
box-shadow: 0 0 8px 0 ${(props) => props.theme.colors.primary};
display: block;
position: absolute;
transition: all 0.2s ease;
`;
const TabContentWrapper = styled.div`
margin-left: 1rem;
position: relative;
display: block;
overflow: hidden;
width: 100%;
`;
const TabContent = styled.div`
position: relative;
width: 100%;
display: block;
padding: 0;
padding: 1.5rem;
background-color: #10163a;
border-radius: 0.5rem;
`;
const TabContentInner = styled.div``;
const items = [{ name: 'General' }, { name: 'Change Password' }, { name: 'Info' }, { name: 'Notifications' }];
type NavItemProps = {
active: boolean;
name: string;
tab: number;
onClick: (tab: number, top: number) => void;
};
const NavItem: React.FC<NavItemProps> = ({ active, name, tab, onClick }) => {
const $item = useRef<HTMLLIElement>(null);
return (
<TabNavItem
key={name}
ref={$item}
onClick={() => {
if ($item && $item.current) {
const pos = $item.current.getBoundingClientRect();
onClick(tab, pos.top);
}
}}
>
<TabNavItemButton active={active}>
<User width={20} height={20} />
<TabNavItemSpan>{name}</TabNavItemSpan>
</TabNavItemButton>
</TabNavItem>
);
};
const SettingActions = styled.div`
display: flex;
align-items: center;
justify-content: flex-end;
margin-top: 12px;
`;
const SaveButton = styled(Button)`
margin-right: 1rem;
display: inline-block;
`;
type SettingsProps = {
onProfileAvatarChange: () => void;
onProfileAvatarRemove: () => void;
onChangeUserInfo: (data: UserInfoData, done: () => void) => void;
onResetPassword: (password: string, done: () => void) => void;
profile: TaskUser;
};
type TabProps = {
tab: number;
currentTab: number;
};
const Tab: React.FC<TabProps> = ({ tab, currentTab, children }) => {
if (tab !== currentTab) {
return null;
}
return <TabContent>{children}</TabContent>;
};
type ResetPasswordTabProps = {
onResetPassword: (password: string, done: () => void) => void;
};
const ResetPasswordTab: React.FC<ResetPasswordTabProps> = ({ onResetPassword }) => {
const [active, setActive] = useState(true);
const {
register,
handleSubmit,
formState: { errors },
setError,
reset,
} = useForm<{ password: string; passwordConfirm: string }>();
const done = () => {
reset();
setActive(true);
};
return (
<form
onSubmit={handleSubmit((data) => {
if (data.password !== data.passwordConfirm) {
setError('password', { message: 'Passwords must match!', type: 'error' });
setError('passwordConfirm', { message: 'Passwords must match!', type: 'error' });
} else {
onResetPassword(data.password, done);
}
})}
>
<PasswordInput width="100%" {...register('password', { required: 'Password is required' })} label="Password" />
{errors.password && <FormError>{errors.password.message}</FormError>}
<PasswordInput
width="100%"
{...register('passwordConfirm', { required: 'Password is required' })}
label="Password (confirm)"
/>
{errors.passwordConfirm && <FormError>{errors.passwordConfirm.message}</FormError>}
<SettingActions>
<SaveButton disabled={!active} type="submit">
Save Change
</SaveButton>
</SettingActions>
</form>
);
};
type UserInfoData = {
fullName: string;
bio: string;
initials: string;
email: string;
};
type UserInfoTabProps = {
profile: TaskUser;
onProfileAvatarChange: () => void;
onProfileAvatarRemove: () => void;
onChangeUserInfo: (data: UserInfoData, done: () => void) => void;
};
const EMAIL_PATTERN = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
const INITIALS_PATTERN = /^[a-zA-Z]{2,3}$/i;
const UserInfoTab: React.FC<UserInfoTabProps> = ({
profile,
onProfileAvatarRemove,
onProfileAvatarChange,
onChangeUserInfo,
}) => {
const [active, setActive] = useState(true);
const {
register,
handleSubmit,
formState: { errors },
} = useForm<UserInfoData>();
const done = () => {
setActive(true);
};
return (
<>
<AvatarSettings
onProfileAvatarRemove={onProfileAvatarRemove}
onProfileAvatarChange={onProfileAvatarChange}
profile={profile.profileIcon}
/>
<form
onSubmit={handleSubmit((data) => {
setActive(false);
onChangeUserInfo(data, done);
})}
>
<UserInfoInput
{...register('fullName', { required: 'Full name is required' })}
defaultValue={profile.fullName}
width="100%"
label="Name"
/>
{errors.fullName && <FormError>{errors.fullName.message}</FormError>}
<UserInfoInput
defaultValue={profile.profileIcon && profile.profileIcon.initials ? profile.profileIcon.initials : ''}
{...register('initials', {
required: 'Initials is required',
pattern: { value: INITIALS_PATTERN, message: 'Intials must be between two to four characters' },
})}
width="100%"
label="Initials "
/>
{errors.initials && <FormError>{errors.initials.message}</FormError>}
<UserInfoInput disabled defaultValue={profile.username ?? ''} width="100%" label="Username " />
<UserInfoInput
width="100%"
{...register('email', {
required: 'Email is required',
pattern: { value: EMAIL_PATTERN, message: 'Must be a valid email' },
})}
defaultValue={profile.email ?? ''}
label="Email"
/>
{errors.email && <FormError>{errors.email.message}</FormError>}
<UserInfoInput width="100%" {...register('bio')} defaultValue={profile.bio ?? ''} label="Bio" />
{errors.bio && <FormError>{errors.bio.message}</FormError>}
<SettingActions>
<SaveButton disabled={!active} type="submit">
Save Change
</SaveButton>
</SettingActions>
</form>
</>
);
};
const Settings: React.FC<SettingsProps> = ({
onProfileAvatarRemove,
onProfileAvatarChange,
onChangeUserInfo,
onResetPassword,
profile,
}) => {
const [currentTab, setTab] = useState(0);
const [currentTop, setTop] = useState(0);
const $tabNav = useRef<HTMLDivElement>(null);
return (
<Container>
<TabNav ref={$tabNav}>
<TabNavContent>
{items.map((item, idx) => (
<NavItem
key={item.name}
onClick={(tab, top) => {
if ($tabNav && $tabNav.current) {
const pos = $tabNav.current.getBoundingClientRect();
setTab(tab);
setTop(top - pos.top);
}
}}
name={item.name}
tab={idx}
active={idx === currentTab}
/>
))}
<TabNavLine top={currentTop} />
</TabNavContent>
</TabNav>
<TabContentWrapper>
<Tab tab={0} currentTab={currentTab}>
<UserInfoTab
onProfileAvatarChange={onProfileAvatarChange}
onProfileAvatarRemove={onProfileAvatarRemove}
profile={profile}
onChangeUserInfo={onChangeUserInfo}
/>
</Tab>
<Tab tab={1} currentTab={currentTab}>
<ResetPasswordTab onResetPassword={onResetPassword} />
</Tab>
</TabContentWrapper>
</Container>
);
};
export default Settings;
| 9,819 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Sidebar/Styles.ts | import styled from 'styled-components';
const Container = styled.div`
position: fixed;
z-index: 99;
top: 0px;
left: 80px;
height: 100vh;
width: 230px;
overflow-x: hidden;
overflow-y: auto;
padding: 0px 16px 24px;
background: rgb(244, 245, 247);
border-right: 1px solid rgb(223, 225, 230);
`;
export default Container;
| 9,820 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Sidebar/index.tsx | import React from 'react';
import Container from './Styles';
const Sidebar = () => {
return <Container />;
};
export default Sidebar;
| 9,821 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Tabs/index.tsx | import React from 'react';
import styled from 'styled-components';
const Tabs = () => {
return <span>HEllo!</span>;
};
export default Tabs;
| 9,822 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TaskAssignee/index.tsx | import React, { useRef } from 'react';
import styled, { css } from 'styled-components';
import { DoubleChevronUp, Crown } from 'shared/icons';
export const AdminIcon = styled(DoubleChevronUp)`
bottom: 0;
right: 1px;
position: absolute;
fill: #c377e0;
`;
export const OwnerIcon = styled(Crown)`
bottom: 0;
right: 1px;
position: absolute;
fill: #c8b928;
`;
const TaskDetailAssignee = styled.div`
cursor: pointer;
border-radius: 50%;
display: flex;
align-items: center;
position: relative;
`;
export const Wrapper = styled.div<{
size: number | string;
bgColor: string | null;
backgroundURL: string | null;
hasClick: boolean;
}>`
width: ${props => props.size}px;
height: ${props => props.size}px;
border-radius: 9999px;
display: flex;
align-items: center;
justify-content: center;
color: ${props => (props.backgroundURL ? props.theme.colors.text.primary : 'rgb(0,0,0)')};
background: ${props => (props.backgroundURL ? `url(${props.backgroundURL})` : props.bgColor)};
background-position: center;
background-size: contain;
font-size: 14px;
font-weight: 400;
${props =>
props.hasClick &&
css`
&:hover {
opacity: 0.8;
}
`}
`;
type TaskAssigneeProps = {
size: number | string;
showRoleIcons?: boolean;
member: TaskUser;
invited?: boolean;
onMemberProfile?: ($targetRef: React.RefObject<HTMLElement>, memberID: string) => void;
className?: string;
};
const TaskAssignee: React.FC<TaskAssigneeProps> = ({
showRoleIcons,
member,
invited,
onMemberProfile,
size,
className,
}) => {
const $memberRef = useRef<HTMLDivElement>(null);
let profileIcon: ProfileIcon = {
url: null,
bgColor: null,
initials: null,
};
if (member.profileIcon) {
profileIcon = member.profileIcon;
}
return (
<TaskDetailAssignee
className={className}
ref={$memberRef}
onClick={e => {
e.stopPropagation();
if (onMemberProfile) {
onMemberProfile($memberRef, member.id);
}
}}
key={member.id}
>
<Wrapper
hasClick={typeof onMemberProfile !== undefined}
backgroundURL={profileIcon.url ?? null}
bgColor={profileIcon.bgColor ?? null}
size={size}
>
{(!profileIcon.url && profileIcon.initials) ?? ''}
</Wrapper>
{showRoleIcons && member.role && member.role.code === 'admin' && <AdminIcon width={10} height={10} />}
{showRoleIcons && member.role && member.role.code === 'owner' && <OwnerIcon width={10} height={10} />}
</TaskDetailAssignee>
);
};
export default TaskAssignee;
| 9,823 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TaskDetails/ActivityMessage.tsx | import React from 'react';
import styled from 'styled-components';
import { TaskActivityData, ActivityType } from 'shared/generated/graphql';
import dayjs from 'dayjs';
type ActivityMessageProps = {
type: ActivityType;
data: Array<TaskActivityData>;
};
function getVariable(data: Array<TaskActivityData>, name: string) {
const target = data.find((d) => d.name === name);
return target ? target.value : null;
}
function getVariableBool(data: Array<TaskActivityData>, name: string, defaultValue = false) {
const target = data.find((d) => d.name === name);
return target ? target.value === 'true' : defaultValue;
}
function renderDate(timestamp: string | null, hasTime: boolean) {
if (timestamp) {
if (hasTime) {
return dayjs(timestamp).format('MMM D [at] h:mm A');
}
return dayjs(timestamp).format('MMM D');
}
return null;
}
const ActivityMessage: React.FC<ActivityMessageProps> = ({ type, data }) => {
let message = '';
switch (type) {
case ActivityType.TaskAdded:
message = `added this task to ${getVariable(data, 'TaskGroup')}`;
break;
case ActivityType.TaskMoved:
message = `moved this task from ${getVariable(data, 'PrevTaskGroup')} to ${getVariable(data, 'CurTaskGroup')}`;
break;
case ActivityType.TaskDueDateAdded:
message = `set this task to be due ${renderDate(
getVariable(data, 'DueDate'),
getVariableBool(data, 'HasTime', true),
)}`;
break;
case ActivityType.TaskDueDateRemoved:
message = `removed the due date from this task`;
break;
case ActivityType.TaskDueDateChanged:
message = `changed the due date of this task to ${renderDate(
getVariable(data, 'CurDueDate'),
getVariableBool(data, 'HasTime', true),
)}`;
break;
case ActivityType.TaskMarkedComplete:
message = `marked this task complete`;
break;
case ActivityType.TaskMarkedIncomplete:
message = `marked this task incomplete`;
break;
default:
message = '<unknown type>';
}
return <>{message}</>;
};
export default ActivityMessage;
| 9,824 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TaskDetails/CommentCreator.tsx | import React, { useRef, useState, useEffect } from 'react';
import { usePopup } from 'shared/components/PopupMenu';
import useOnOutsideClick from 'shared/hooks/onOutsideClick';
import { At, Paperclip, Smile } from 'shared/icons';
import { Picker, Emoji } from 'emoji-mart';
import Task from 'shared/icons/Task';
import {
CommentTextArea,
CommentEditorContainer,
CommentEditorActions,
CommentEditorActionIcon,
CommentEditorSaveButton,
CommentProfile,
CommentInnerWrapper,
} from './Styles';
type CommentCreatorProps = {
me?: TaskUser;
autoFocus?: boolean;
onMemberProfile?: ($targetRef: React.RefObject<HTMLElement>, memberID: string) => void;
message?: string | null;
onCreateComment: (message: string) => void;
onCancelEdit?: () => void;
disabled?: boolean;
};
const CommentCreator: React.FC<CommentCreatorProps> = ({
me,
disabled = false,
message,
onMemberProfile,
onCreateComment,
onCancelEdit,
autoFocus = false,
}) => {
const $commentWrapper = useRef<HTMLDivElement>(null);
const $comment = useRef<HTMLTextAreaElement>(null);
const $emoji = useRef<HTMLDivElement>(null);
const $emojiCart = useRef<HTMLDivElement>(null);
const [comment, setComment] = useState(message ?? '');
const [showCommentActions, setShowCommentActions] = useState(autoFocus);
const { showPopup, hidePopup } = usePopup();
useEffect(() => {
if (autoFocus && $comment && $comment.current) {
$comment.current.select();
}
}, []);
useOnOutsideClick(
[$commentWrapper, $emojiCart],
showCommentActions,
() => {
if (onCancelEdit) {
onCancelEdit();
}
setShowCommentActions(false);
},
null,
);
return (
<CommentInnerWrapper ref={$commentWrapper}>
{me && onMemberProfile && (
<CommentProfile
member={me}
size={32}
onMemberProfile={$target => {
onMemberProfile($target, me.id);
}}
/>
)}
<CommentEditorContainer>
<CommentTextArea
$showCommentActions={showCommentActions}
placeholder="Write a comment..."
ref={$comment}
disabled={disabled}
value={comment}
onChange={e => setComment(e.currentTarget.value)}
onFocus={() => {
setShowCommentActions(true);
}}
/>
<CommentEditorActions visible={showCommentActions}>
<CommentEditorActionIcon>
<Paperclip width={12} height={12} />
</CommentEditorActionIcon>
<CommentEditorActionIcon>
<At width={12} height={12} />
</CommentEditorActionIcon>
<CommentEditorActionIcon
ref={$emoji}
onClick={() => {
showPopup(
$emoji,
<div ref={$emojiCart}>
<Picker
onClick={emoji => {
if ($comment && $comment.current) {
const textToInsert = `${emoji.colons} `;
const cursorPosition = $comment.current.selectionStart;
const textBeforeCursorPosition = $comment.current.value.substring(0, cursorPosition);
const textAfterCursorPosition = $comment.current.value.substring(
cursorPosition,
$comment.current.value.length,
);
setComment(textBeforeCursorPosition + textToInsert + textAfterCursorPosition);
}
hidePopup();
}}
set="google"
/>
</div>,
);
}}
>
<Smile width={12} height={12} />
</CommentEditorActionIcon>
<CommentEditorActionIcon>
<Task width={12} height={12} />
</CommentEditorActionIcon>
<CommentEditorSaveButton
onClick={() => {
setShowCommentActions(false);
onCreateComment(comment);
setComment('');
}}
>
Save
</CommentEditorSaveButton>
</CommentEditorActions>
</CommentEditorContainer>
</CommentInnerWrapper>
);
};
export default CommentCreator;
| 9,825 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TaskDetails/Loading.tsx | import React, { useState, useRef } from 'react';
import {
Plus,
User,
Trash,
Paperclip,
Clone,
Share,
Tags,
Checkmark,
CheckSquareOutline,
At,
Smile,
} from 'shared/icons';
import { toArray } from 'react-emoji-render';
import { useCurrentUser } from 'App/context';
import DOMPurify from 'dompurify';
import TaskAssignee from 'shared/components/TaskAssignee';
import useOnOutsideClick from 'shared/hooks/onOutsideClick';
import { usePopup } from 'shared/components/PopupMenu';
import CommentCreator from 'shared/components/TaskDetails/CommentCreator';
import { AngleDown } from 'shared/icons/AngleDown';
import Editor from 'rich-markdown-editor';
import dark from 'shared/utils/editorTheme';
import styled from 'styled-components';
import ReactMarkdown from 'react-markdown';
import { Picker, Emoji } from 'emoji-mart';
import 'emoji-mart/css/emoji-mart.css';
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
import dayjs from 'dayjs';
import Task from 'shared/icons/Task';
import {
ActivityItemHeader,
ActivityItemTimestamp,
ActivityItem,
ActivityItemCommentAction,
ActivityItemCommentActions,
TaskDetailLabel,
CommentContainer,
ActivityItemCommentContainer,
MetaDetailContent,
TaskDetailsAddLabelIcon,
ActionButton,
AssignUserIcon,
AssignUserLabel,
AssignUsersButton,
AssignedUsersSection,
ViewRawButton,
DueDateTitle,
Container,
LeftSidebar,
SidebarSkeleton,
ContentContainer,
LeftSidebarContent,
LeftSidebarSection,
SidebarTitle,
SidebarButton,
SidebarButtonText,
MarkCompleteButton,
HeaderContainer,
HeaderLeft,
HeaderInnerContainer,
TaskDetailsTitleWrapper,
TaskDetailsTitle,
ExtraActionsSection,
HeaderRight,
HeaderActionIcon,
EditorContainer,
InnerContentContainer,
DescriptionContainer,
Labels,
ChecklistSection,
MemberList,
TaskMember,
TabBarSection,
TabBarItem,
ActivitySection,
TaskDetailsEditor,
ActivityItemHeaderUser,
ActivityItemHeaderTitle,
ActivityItemHeaderTitleName,
ActivityItemComment,
} from './Styles';
const TaskDetailsLoading: React.FC = () => {
const { user } = useCurrentUser();
return (
<Container>
<LeftSidebar>
<LeftSidebarContent>
<LeftSidebarSection>
<SidebarTitle>TASK GROUP</SidebarTitle>
<SidebarButton $loading>
<SidebarSkeleton />
</SidebarButton>
<DueDateTitle>DUE DATE</DueDateTitle>
<SidebarButton $loading>
<SidebarSkeleton />
</SidebarButton>
</LeftSidebarSection>
<AssignedUsersSection>
<DueDateTitle>MEMBERS</DueDateTitle>
<SidebarButton $loading>
<SidebarSkeleton />
</SidebarButton>
</AssignedUsersSection>
{user && (
<ExtraActionsSection>
<DueDateTitle>ACTIONS</DueDateTitle>
<ActionButton disabled icon={<Tags width={12} height={12} />}>
Labels
</ActionButton>
<ActionButton disabled icon={<CheckSquareOutline width={12} height={12} />}>
Checklist
</ActionButton>
<ActionButton disabled>Cover</ActionButton>
</ExtraActionsSection>
)}
</LeftSidebarContent>
</LeftSidebar>
<ContentContainer>
<HeaderContainer>
<HeaderInnerContainer>
<HeaderLeft>
<MarkCompleteButton disabled invert={false}>
<Checkmark width={8} height={8} />
<span>Mark complete</span>
</MarkCompleteButton>
</HeaderLeft>
{user && (
<HeaderRight>
<HeaderActionIcon>
<Paperclip width={16} height={16} />
</HeaderActionIcon>
<HeaderActionIcon>
<Clone width={16} height={16} />
</HeaderActionIcon>
<HeaderActionIcon>
<Share width={16} height={16} />
</HeaderActionIcon>
<HeaderActionIcon>
<Trash width={16} height={16} />
</HeaderActionIcon>
</HeaderRight>
)}
</HeaderInnerContainer>
<TaskDetailsTitleWrapper $loading>
<TaskDetailsTitle value="" disabled $loading />
</TaskDetailsTitleWrapper>
</HeaderContainer>
<InnerContentContainer>
<DescriptionContainer />
<TabBarSection>
<TabBarItem>Activity</TabBarItem>
</TabBarSection>
<ActivitySection />
</InnerContentContainer>
{user && (
<CommentContainer>
<CommentCreator disabled onCreateComment={() => null} onMemberProfile={() => null} />
</CommentContainer>
)}
</ContentContainer>
</Container>
);
};
export default TaskDetailsLoading;
| 9,826 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TaskDetails/Styles.ts | import styled, { css, keyframes } from 'styled-components';
import TextareaAutosize from 'react-autosize-textarea';
import { mixin } from 'shared/utils/styles';
import Button from 'shared/components/Button';
import TaskAssignee from 'shared/components/TaskAssignee';
import theme from 'App/ThemeStyles';
import { Checkmark } from 'shared/icons';
export const Container = styled.div`
display: flex;
height: 100%;
`;
export const LeftSidebar = styled.div`
display: flex;
flex-direction: column;
width: 300px;
background: #222740;
`;
export const MarkCompleteButton = styled.button<{ invert: boolean; disabled?: boolean }>`
padding: 4px 8px;
position: relative;
border: none;
cursor: pointer;
border-radius: ${(props) => props.theme.borderRadius.alternate};
display: flex;
align-items: center;
background: transparent;
& span {
margin-left: 4px;
}
${(props) =>
props.invert
? css`
background: ${props.theme.colors.success};
& svg {
fill: ${props.theme.colors.text.secondary};
}
& span {
color: ${props.theme.colors.text.secondary};
}
&:hover {
background: ${mixin.rgba(props.theme.colors.success, 0.8)};
}
`
: css`
background: none;
border: 1px solid ${props.theme.colors.text.secondary};
& svg {
fill: ${props.theme.colors.text.secondary};
}
& span {
color: ${props.theme.colors.text.secondary};
}
&:hover {
background: ${mixin.rgba(props.theme.colors.success, 0.08)};
border: 1px solid ${props.theme.colors.success};
}
&:hover svg {
fill: ${props.theme.colors.success};
}
&:hover span {
color: ${props.theme.colors.success};
}
`}
${(props) =>
props.invert &&
css`
opacity: 0.6;
`}
`;
export const LeftSidebarContent = styled.div`
padding-top: 32px;
display: flex;
flex-direction: column;
`;
export const LeftSidebarSection = styled.div`
display: flex;
flex-direction: column;
padding-left: 32px;
padding-right: 32px;
padding-bottom: 16px;
border-bottom: 1px solid #414561;
`;
export const SidebarTitle = styled.div`
font-size: 12px;
min-height: 24px;
margin-left: 8px;
color: ${(props) => mixin.rgba(props.theme.colors.text.primary, 0.75)};
padding-top: 4px;
letter-spacing: 0.5px;
text-transform: uppercase;
`;
export const defaultBaseColor = theme.colors.bg.primary;
export const defaultHighlightColor = mixin.lighten(theme.colors.bg.primary, 0.25);
export const skeletonKeyframes = keyframes`
0% {
background-position: -200px 0;
}
100% {
background-position: calc(200px + 100%) 0;
}
`;
export const SidebarButton = styled.div<{ $loading?: boolean }>`
font-size: 14px;
color: ${(props) => props.theme.colors.text.primary};
min-height: 32px;
width: 100%;
border-radius: 6px;
${(props) =>
props.$loading
? css`
background: ${props.theme.colors.bg.primary};
`
: css`
padding: 9px 8px 7px 8px;
cursor: pointer;
border-color: transparent;
border-width: 1px;
border-style: solid;
&:hover {
border-color: #414561;
}
`};
display: inline-block;
outline: 0;
`;
export const SidebarSkeleton = styled.div`
background-image: linear-gradient(90deg, ${defaultBaseColor}, ${defaultHighlightColor}, ${defaultBaseColor});
background-size: 200px 100%;
background-repeat: no-repeat;
border-radius: 6px;
padding: 1px;
animation: ${skeletonKeyframes} 1.2s ease-in-out infinite;
width: 100%;
height: 100%;
`;
export const SidebarButtonText = styled.span`
min-height: 16px;
flex: 1 1 auto;
display: flex;
justify-content: flex-start;
`;
export const ContentContainer = styled.div`
display: flex;
flex-direction: column;
flex: 1;
padding-top: 32px;
overflow: auto;
`;
export const HeaderContainer = styled.div`
flex: 0 0 auto;
padding: 0px 32px 0px 24px;
`;
export const HeaderInnerContainer = styled.div`
display: flex;
justify-content: space-between;
margin: 0 0 0 0;
padding: 0 0 0 4px;
`;
export const HeaderLeft = styled.div`
display: flex;
justify-content: flex-start;
`;
export const TaskDetailsTitleWrapper = styled.div<{ $loading?: boolean }>`
width: 100%;
margin: 8px 0 4px 0;
display: flex;
border-radius: 6px;
${(props) => props.$loading && `background: ${props.theme.colors.bg.primary};`}
`;
export const TaskDetailsTitle = styled(TextareaAutosize)<{ $loading?: boolean }>`
padding: 9px 8px 7px 8px;
border-color: transparent;
border-radius: 6px;
width: 100%;
color: #c2c6dc;
display: inline-block;
outline: 0;
font-size: 24px;
font-weight: 700;
background: none;
&:disabled {
opacity: 1;
}
${(props) =>
props.$loading
? css`
background-image: linear-gradient(90deg, ${defaultBaseColor}, ${defaultHighlightColor}, ${defaultBaseColor});
background-size: 200px 100%;
background-repeat: no-repeat;
animation: ${skeletonKeyframes} 1.2s ease-in-out infinite;
`
: css`
&:not(:disabled):hover {
border-color: #414561;
border-width: 1px;
border-style: solid;
}
&:focus {
border-color: ${props.theme.colors.primary};
}
`}
`;
export const DueDateTitle = styled.div`
font-size: 12px;
min-height: 24px;
margin-left: 8px;
color: ${(props) => mixin.rgba(props.theme.colors.text.primary, 0.75)};
padding-top: 8px;
letter-spacing: 0.5px;
text-transform: uppercase;
`;
export const AssignedUsersSection = styled.div`
padding-left: 32px;
padding-right: 32px;
padding-top: 24px;
padding-bottom: 24px;
border-bottom: 1px solid ${(props) => props.theme.colors.alternate};
display: flex;
flex-direction: column;
`;
export const AssignUserIcon = styled.div`
cursor: pointer;
height: 32px;
width: 32px;
position: relative;
border-radius: 50%;
border: 1px dashed #414561;
margin-right: 8px;
display: flex;
flex-shrink: 0;
justify-content: center;
align-items: center;
&:hover {
border: 1px solid ${(props) => mixin.rgba(props.theme.colors.text.secondary, 0.75)};
}
&:hover svg {
fill: ${(props) => mixin.rgba(props.theme.colors.text.secondary, 0.75)};
}
`;
export const AssignUsersButton = styled.div`
cursor: pointer;
display: inline-flex;
flex: 1 1 auto;
height: 40px;
padding: 4px 16px 4px 8px;
margin-left: -1px;
border-radius: 6px;
align-items: center;
border: 1px solid transparent;
&:hover {
border: 1px solid ${(props) => mixin.darken(props.theme.colors.alternate, 0.15)};
}
&:hover ${AssignUserIcon} {
border: 1px solid ${(props) => props.theme.colors.alternate};
}
`;
export const AssignUserLabel = styled.span`
flex: 1 1 auto;
line-height: 15px;
color: ${(props) => mixin.rgba(props.theme.colors.text.primary, 0.75)};
`;
export const ExtraActionsSection = styled.div`
padding-left: 32px;
padding-right: 32px;
padding-top: 24px;
display: flex;
flex-direction: column;
`;
export const ActionButtonsTitle = styled.h3`
color: ${(props) => props.theme.colors.text.primary};
font-size: 12px;
font-weight: 500;
letter-spacing: 0.04em;
`;
export const ActionButton = styled(Button)`
margin-top: 8px;
margin-left: -10px;
padding: 8px 16px;
background: ${(props) => mixin.rgba(props.theme.colors.bg.primary, 0.5)};
text-align: left;
transition: transform 0.2s ease;
& span {
position: unset;
justify-content: flex-start;
}
&:hover {
box-shadow: none;
transform: translateX(4px);
background: ${(props) => mixin.rgba(props.theme.colors.bg.primary, 0.75)};
}
`;
export const HeaderRight = styled.div`
display: flex;
justify-content: center;
align-items: center;
`;
export const HeaderActionIcon = styled.div`
padding: 4px 4px 4px 4px;
margin: 0 4px 0 4px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
svg {
fill: ${(props) => mixin.rgba(props.theme.colors.text.primary, 0.75)};
}
&:hover svg {
fill: ${(props) => mixin.rgba(props.theme.colors.primary, 0.75)});
}
`;
export const EditorContainer = styled.div`
margin-left: 32px;
margin-right: 32px;
padding: 9px 8px 7px 8px;
border-color: transparent;
border-radius: 6px;
border-width: 1px;
border-style: solid;
outline: 0;
background: none;
ul {
list-style-type: disc;
}
ul.checkbox_list input[type='checkbox'] {
border-radius: 6px;
border-width: 1px;
border-style: solid;
border-color: #414561;
}
`;
export const InnerContentContainer = styled.div`
overflow: auto;
position: relative;
`;
export const DescriptionContainer = styled.div`
position: relative;
display: flex;
flex-direction: column;
`;
export const DescriptionActionButton = styled(Button)`
padding: 8px 16px;
`;
export const Labels = styled.div`
display: flex;
padding-left: 9px;
margin: 0 0 8px 0;
`;
export const MetaDetail = styled.div`
display: block;
float: left;
margin: 0 16px 8px 0;
max-width: 100%;
`;
export const MetaDetailTitle = styled.h3`
color: ${(props) => props.theme.colors.text.primary};
font-size: 12px;
font-weight: 500;
letter-spacing: 0.04em;
margin-top: 16px;
text-transform: uppercase;
display: block;
line-height: 20px;
margin: 0 8px 4px 0;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
`;
export const MetaDetailContent = styled.div`
display: flex;
`;
export const TaskDetailsAddLabel = styled.div`
border-radius: 3px;
background: ${(props) => mixin.darken(props.theme.colors.bg.secondary, 0.15)};
cursor: pointer;
&:hover {
opacity: 0.8;
}
`;
export const TaskDetailsAddLabelIcon = styled.div`
float: left;
height: 32px;
width: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
background: ${(props) => mixin.darken(props.theme.colors.bg.secondary, 0.15)};
cursor: pointer;
&:hover {
opacity: 0.8;
}
`;
export const ChecklistSection = styled.div`
margin-top: 8px;
padding: 0 24px;
`;
export const TaskDetailLabel = styled.div<{ color: string }>`
&:hover {
opacity: 0.8;
}
background-color: ${(props) => props.color};
color: #fff;
cursor: pointer;
display: flex;
align-items: center;
border-radius: 3px;
box-sizing: border-box;
display: block;
float: left;
font-weight: 600;
height: 32px;
line-height: 32px;
margin: 0 4px 0 0;
min-width: 40px;
padding: 0 12px;
width: auto;
`;
export const MemberList = styled.div`
display: flex;
align-items: center;
padding: 4px 16px 4px 8px;
margin-left: -1px;
`;
export const TaskMember = styled(TaskAssignee)`
margin-right: 4px;
`;
export const ActionButtonIcon = styled.div``;
export const EditorActions = styled.div`
display: flex;
align-items: center;
margin-left: 32px;
margin-right: 32px;
padding: 9px 8px 7px 8px;
`;
export const CancelIcon = styled.div`
width: 32px;
height: 32p;
display: flex;
align-items: center;
justify-content: center;
margin-left: 4px;
`;
export const TabBarSection = styled.div`
margin-top: 2px;
padding-left: 23px;
display: flex;
justify-content: space-between;
text-transform: uppercase;
min-height: 35px;
border-bottom: 1px solid #414561;
`;
export const TabBarItem = styled.div`
box-shadow: inset 0 -2px ${(props) => props.theme.colors.primary};
padding: 12px 7px 14px 7px;
margin-bottom: -1px;
margin-right: 36px;
color: ${(props) => props.theme.colors.text.primary};
`;
export const TabBarButton = styled(Button)`
padding: 6px 12px;
`;
export const CommentContainer = styled.div`
flex: 0 0 auto;
margin-top: auto;
padding: 15px 26px;
background: #1f243e;
`;
export const CommentInnerWrapper = styled.div`
display: flex;
position: relative;
`;
export const CommentEditorContainer = styled.div`
flex: 1;
border-radius: 6px;
border: 1px solid #414561;
display: flex;
flex-direction: column;
background: #1f243e;
`;
export const CommentProfile = styled(TaskAssignee)`
margin-right: 8px;
position: relative;
top: 0;
padding-top: 3px;
align-items: normal;
`;
export const CommentTextArea = styled(TextareaAutosize)<{ $showCommentActions: boolean }>`
width: 100%;
line-height: 28px;
padding: 4px 6px;
border-radius: 6px;
color: ${(props) => props.theme.colors.text.primary};
background: #1f243e;
border: none;
transition: max-height 200ms, height 200ms, min-height 200ms;
min-height: 36px;
max-height: 36px;
${(props) =>
props.$showCommentActions
? css`
min-height: 80px;
max-height: none;
line-height: 20px;
`
: css`
height: 36px;
`}
`;
export const CommentEditorActions = styled.div<{ visible: boolean }>`
display: ${(props) => (props.visible ? 'flex' : 'none')};
align-items: center;
padding: 5px 5px 5px 9px;
border-top: 1px solid #414561;
`;
export const CommentEditorActionIcon = styled.div`
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
`;
export const CommentEditorSaveButton = styled(Button)`
margin-left: auto;
padding: 8px 16px;
`;
export const ActivitySection = styled.div`
overflow-x: hidden;
padding: 8px 26px;
display: flex;
flex-direction: column-reverse;
`;
export const ActivityItemCommentAction = styled.div`
display: none;
align-items: center;
justify-content: center;
cursor: pointer;
svg {
fill: ${(props) => props.theme.colors.text.primary} !important;
}
`;
export const ActivityItem = styled.div`
padding: 8px 0;
position: relative;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
display: flex;
&:hover ${ActivityItemCommentAction} {
display: flex;
}
`;
export const ActivityItemHeader = styled.div<{ editable?: boolean }>`
display: flex;
flex-direction: column;
padding-left: 8px;
${(props) => props.editable && 'width: 100%;'}
`;
export const ActivityItemHeaderUser = styled(TaskAssignee)`
align-items: start;
`;
export const ActivityItemHeaderTitle = styled.div`
display: flex;
align-items: center;
color: ${(props) => props.theme.colors.text.primary};
padding-bottom: 2px;
`;
export const ActivityItemHeaderTitleName = styled.span`
font-weight: 500;
padding-right: 3px;
`;
export const ActivityItemTimestamp = styled.span<{ margin: number }>`
font-size: 12px;
color: ${(props) => mixin.rgba(props.theme.colors.text.primary, 0.65)};
margin-left: ${(props) => props.margin}px;
`;
export const ActivityItemDetails = styled.div`
margin-left: 32px;
`;
export const ActivityItemCommentContainer = styled.div``;
export const ActivityItemComment = styled.div<{ editable: boolean }>`
display: inline-flex;
flex-direction: column;
border-radius: 3px;
${mixin.boxShadowCard}
position: relative;
color: ${(props) => props.theme.colors.text.primary};
padding: 8px 12px;
margin: 4px 0;
background-color: ${(props) => mixin.darken(props.theme.colors.alternate, 0.1)};
${(props) => props.editable && 'width: 100%;'}
& span {
display: inline-flex;
align-items: center;
}
& ul {
list-style-type: disc;
margin: 8px 0;
}
& ul > li {
margin: 8px 8px 8px 24px;
margin-inline-start: 24px;
margin-inline-end: 8px;
}
& ul > li ul > li {
list-style: circle;
}
`;
export const ActivityItemCommentActions = styled.div`
display: flex;
align-items: center;
position: absolute;
top: 8px;
right: 0;
`;
export const ActivityItemLog = styled.span`
margin-left: 2px;
color: ${(props) => props.theme.colors.text.primary};
`;
export const ViewRawButton = styled.button`
border-radius: 3px;
padding: 8px 12px;
display: flex;
position: absolute;
right: 4px;
bottom: -24px;
cursor: pointer;
color: ${(props) => mixin.rgba(props.theme.colors.text.primary, 0.25)};
&:hover {
color: ${(props) => props.theme.colors.text.primary};
}
`;
export const TaskDetailsEditor = styled(TextareaAutosize)`
min-height: 108px;
color: #c2c6dc;
background: #262c49;
border-radius: 3px;
line-height: 20px;
margin-left: 32px;
margin-right: 32px;
padding: 9px 8px 7px 8px;
outline: none;
border: none;
`;
export const WatchedCheckmark = styled(Checkmark)`
position: absolute;
right: 16px;
`;
| 9,827 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TaskDetails/index.tsx | import React, { useState, useRef } from 'react';
import { useCurrentUser } from 'App/context';
import {
Plus,
User,
Trash,
Paperclip,
Clone,
Share,
Tags,
Checkmark,
CheckSquareOutline,
At,
Smile,
Eye,
} from 'shared/icons';
import { toArray } from 'react-emoji-render';
import DOMPurify from 'dompurify';
import TaskAssignee from 'shared/components/TaskAssignee';
import useOnOutsideClick from 'shared/hooks/onOutsideClick';
import { usePopup } from 'shared/components/PopupMenu';
import CommentCreator from 'shared/components/TaskDetails/CommentCreator';
import { AngleDown } from 'shared/icons/AngleDown';
import Editor from 'rich-markdown-editor';
import dark from 'shared/utils/editorTheme';
import styled from 'styled-components';
import ReactMarkdown from 'react-markdown';
import { Picker, Emoji } from 'emoji-mart';
import 'emoji-mart/css/emoji-mart.css';
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
import dayjs from 'dayjs';
import Task from 'shared/icons/Task';
import {
ActivityItemHeader,
ActivityItemTimestamp,
ActivityItem,
ActivityItemCommentAction,
ActivityItemCommentActions,
TaskDetailLabel,
CommentContainer,
ActivityItemCommentContainer,
MetaDetailContent,
TaskDetailsAddLabelIcon,
ActionButton,
AssignUserIcon,
AssignUserLabel,
AssignUsersButton,
AssignedUsersSection,
ViewRawButton,
DueDateTitle,
Container,
LeftSidebar,
ContentContainer,
LeftSidebarContent,
LeftSidebarSection,
SidebarTitle,
SidebarButton,
SidebarButtonText,
MarkCompleteButton,
HeaderContainer,
HeaderLeft,
HeaderInnerContainer,
TaskDetailsTitleWrapper,
TaskDetailsTitle,
ExtraActionsSection,
HeaderRight,
HeaderActionIcon,
EditorContainer,
InnerContentContainer,
DescriptionContainer,
Labels,
ChecklistSection,
MemberList,
TaskMember,
TabBarSection,
TabBarItem,
ActivitySection,
TaskDetailsEditor,
ActivityItemHeaderUser,
ActivityItemHeaderTitle,
ActivityItemHeaderTitleName,
ActivityItemComment,
TabBarButton,
WatchedCheckmark,
} from './Styles';
import Checklist, { ChecklistItem, ChecklistItems } from '../Checklist';
import onDragEnd from './onDragEnd';
import plugin from './remark';
import ActivityMessage from './ActivityMessage';
const parseEmojis = (value: string) => {
const emojisArray = toArray(value);
// toArray outputs React elements for emojis and strings for other
const newValue = emojisArray.reduce((previous: any, current: any) => {
if (typeof current === 'string') {
return previous + current;
}
return previous + current.props.children;
}, '');
return newValue;
};
type StreamCommentProps = {
comment?: TaskComment | null;
onUpdateComment: (message: string) => void;
onExtraActions: (commentID: string, $target: React.RefObject<HTMLElement>) => void;
onCancelCommentEdit: () => void;
editable: boolean;
};
const StreamComment: React.FC<StreamCommentProps> = ({
comment,
onExtraActions,
editable,
onUpdateComment,
onCancelCommentEdit,
}) => {
const $actions = useRef<HTMLDivElement>(null);
if (comment) {
return (
<ActivityItem>
<ActivityItemHeaderUser size={32} member={comment.createdBy} />
<ActivityItemHeader editable={editable}>
<ActivityItemHeaderTitle>
<ActivityItemHeaderTitleName>{comment.createdBy.fullName}</ActivityItemHeaderTitleName>
<ActivityItemTimestamp margin={8}>
{dayjs(comment.createdAt).format('MMM D [at] h:mm A')}
{comment.updatedAt && ' (edited)'}
</ActivityItemTimestamp>
</ActivityItemHeaderTitle>
<ActivityItemCommentContainer>
<ActivityItemComment editable={editable}>
{editable ? (
<CommentCreator
message={comment.message}
autoFocus
onCancelEdit={onCancelCommentEdit}
onCreateComment={onUpdateComment}
/>
) : (
<ReactMarkdown skipHtml plugins={[plugin]}>
{DOMPurify.sanitize(comment.message, { FORBID_TAGS: ['style', 'img'] })}
</ReactMarkdown>
)}
</ActivityItemComment>
<ActivityItemCommentActions>
<ActivityItemCommentAction
ref={$actions}
onClick={() => {
onExtraActions(comment.id, $actions);
}}
>
<AngleDown width={18} height={18} />
</ActivityItemCommentAction>
</ActivityItemCommentActions>
</ActivityItemCommentContainer>
</ActivityItemHeader>
</ActivityItem>
);
}
return null;
};
type StreamActivityProps = {
activity?: TaskActivity | null;
};
const StreamActivity: React.FC<StreamActivityProps> = ({ activity }) => {
if (activity) {
return (
<ActivityItem>
<ActivityItemHeaderUser
size={32}
member={{
id: activity.causedBy.id,
fullName: activity.causedBy.fullName,
profileIcon: activity.causedBy.profileIcon
? activity.causedBy.profileIcon
: {
url: null,
initials: activity.causedBy.fullName.charAt(0),
bgColor: '#fff',
},
}}
/>
<ActivityItemHeader>
<ActivityItemHeaderTitle>
<ActivityItemHeaderTitleName>{activity.causedBy.fullName}</ActivityItemHeaderTitleName>
<ActivityMessage type={activity.type} data={activity.data} />
</ActivityItemHeaderTitle>
<ActivityItemTimestamp margin={0}>
{dayjs(activity.createdAt).format('MMM D [at] h:mm A')}
</ActivityItemTimestamp>
</ActivityItemHeader>
</ActivityItem>
);
}
return null;
};
const ChecklistContainer = styled.div``;
type TaskLabelProps = {
label: TaskLabel;
onClick: ($target: React.RefObject<HTMLElement>) => void;
};
const TaskLabelItem: React.FC<TaskLabelProps> = ({ label, onClick }) => {
const $label = useRef<HTMLDivElement>(null);
return (
<TaskDetailLabel
onClick={() => {
onClick($label);
}}
ref={$label}
color={label.projectLabel.labelColor.colorHex}
>
{label.projectLabel.name}
</TaskDetailLabel>
);
};
type DetailsEditorProps = {
description: string;
onTaskDescriptionChange: (newDescription: string) => void;
onCancel: () => void;
};
type TaskDetailsProps = {
task: Task;
me?: TaskUser | null;
onTaskNameChange: (task: Task, newName: string) => void;
onTaskDescriptionChange: (task: Task, newDescription: string) => void;
onDeleteTask: (task: Task) => void;
onAddItem: (checklistID: string, name: string, position: number) => void;
onDeleteItem: (checklistID: string, itemID: string) => void;
onChangeItemName: (itemID: string, itemName: string) => void;
onToggleTaskComplete: (task: Task) => void;
onToggleChecklistItem: (itemID: string, complete: boolean) => void;
onOpenAddMemberPopup: (task: Task, $targetRef: React.RefObject<HTMLElement>) => void;
onOpenAddLabelPopup: (task: Task, $targetRef: React.RefObject<HTMLElement>) => void;
onToggleTaskWatch: (task: Task, watched: boolean) => void;
onOpenDueDatePopop: (task: Task, $targetRef: React.RefObject<HTMLElement>) => void;
onOpenAddChecklistPopup: (task: Task, $targetRef: React.RefObject<HTMLElement>) => void;
onCreateComment: (task: Task, message: string) => void;
onCommentShowActions: (commentID: string, $targetRef: React.RefObject<HTMLElement>) => void;
onMemberProfile: ($targetRef: React.RefObject<HTMLElement>, memberID: string) => void;
onCancelCommentEdit: () => void;
onUpdateComment: (commentID: string, message: string) => void;
onChangeChecklistName: (checklistID: string, name: string) => void;
editableComment?: string | null;
onDeleteChecklist: ($target: React.RefObject<HTMLElement>, checklistID: string) => void;
onCloseModal: () => void;
onChecklistDrop: (checklist: TaskChecklist) => void;
onChecklistItemDrop: (prevChecklistID: string, checklistID: string, checklistItem: TaskChecklistItem) => void;
};
const TaskDetails: React.FC<TaskDetailsProps> = ({
me,
onCancelCommentEdit,
task,
editableComment = null,
onDeleteChecklist,
onToggleTaskWatch,
onTaskNameChange,
onCommentShowActions,
onOpenAddChecklistPopup,
onChangeChecklistName,
onCreateComment,
onChecklistDrop,
onChecklistItemDrop,
onToggleTaskComplete,
onTaskDescriptionChange,
onChangeItemName,
onDeleteItem,
onDeleteTask,
onCloseModal,
onUpdateComment,
onOpenAddMemberPopup,
onOpenAddLabelPopup,
onOpenDueDatePopop,
onAddItem,
onToggleChecklistItem,
onMemberProfile,
}) => {
const { user } = useCurrentUser();
const [taskName, setTaskName] = useState(task.name);
const [editTaskDescription, setEditTaskDescription] = useState(() => {
if (task.description) {
if (task.description.trim() === '' || task.description.trim() === '\\') {
return true;
}
return false;
}
return true;
});
const [saveTimeout, setSaveTimeout] = useState<any>(null);
const [showRaw, setShowRaw] = useState(false);
const taskDescriptionRef = useRef(task.description ?? '');
const $noMemberBtn = useRef<HTMLDivElement>(null);
const $addMemberBtn = useRef<HTMLDivElement>(null);
const $dueDateBtn = useRef<HTMLDivElement>(null);
const $detailsTitle = useRef<HTMLTextAreaElement>(null);
const activityStream: Array<{ id: string; data: { time: string; type: 'comment' | 'activity' } }> = [];
if (task.activity) {
task.activity.forEach((activity) => {
activityStream.push({
id: activity.id,
data: {
time: activity.createdAt,
type: 'activity',
},
});
});
}
if (task.comments) {
task.comments.forEach((comment) => {
activityStream.push({
id: comment.id,
data: {
time: comment.createdAt,
type: 'comment',
},
});
});
}
activityStream.sort((a, b) => (dayjs(a.data.time).isAfter(dayjs(b.data.time)) ? 1 : -1));
const saveDescription = () => {
onTaskDescriptionChange(task, taskDescriptionRef.current);
};
return (
<Container>
<LeftSidebar>
<LeftSidebarContent>
<LeftSidebarSection>
<SidebarTitle>TASK GROUP</SidebarTitle>
<SidebarButton>
<SidebarButtonText>{task.taskGroup.name}</SidebarButtonText>
</SidebarButton>
<DueDateTitle>DUE DATE</DueDateTitle>
<SidebarButton
ref={$dueDateBtn}
onClick={() => {
if (user) {
onOpenDueDatePopop(task, $dueDateBtn);
}
}}
>
{task.dueDate.at ? (
<SidebarButtonText>
{dayjs(task.dueDate.at).format(task.hasTime ? 'MMM D [at] h:mm A' : 'MMMM D')}
</SidebarButtonText>
) : (
<SidebarButtonText>No due date</SidebarButtonText>
)}
</SidebarButton>
</LeftSidebarSection>
<AssignedUsersSection>
<DueDateTitle>MEMBERS</DueDateTitle>
{task.assigned && task.assigned.length !== 0 ? (
<MemberList>
{task.assigned.map((m) => (
<TaskMember
key={m.id}
member={m}
size={32}
onMemberProfile={($target) => {
if (user) {
onMemberProfile($target, m.id);
}
}}
/>
))}
<AssignUserIcon
ref={$addMemberBtn}
onClick={() => {
if (user) {
onOpenAddMemberPopup(task, $addMemberBtn);
}
}}
>
<Plus width={16} height={16} />
</AssignUserIcon>
</MemberList>
) : (
<AssignUsersButton
ref={$noMemberBtn}
onClick={() => {
if (user) {
onOpenAddMemberPopup(task, $noMemberBtn);
}
}}
>
<AssignUserIcon>
<User width={16} height={16} />
</AssignUserIcon>
<AssignUserLabel>No members</AssignUserLabel>
</AssignUsersButton>
)}
</AssignedUsersSection>
{user && (
<ExtraActionsSection>
<DueDateTitle>ACTIONS</DueDateTitle>
<ActionButton
onClick={($target) => {
onOpenAddLabelPopup(task, $target);
}}
icon={<Tags width={12} height={12} />}
>
Labels
</ActionButton>
<ActionButton
onClick={($target) => {
onOpenAddChecklistPopup(task, $target);
}}
icon={<CheckSquareOutline width={12} height={12} />}
>
Checklist
</ActionButton>
<ActionButton>Cover</ActionButton>
<ActionButton
onClick={() => {
onToggleTaskWatch(task, !task.watched);
}}
icon={<Eye width={12} height={12} />}
>
Watch {task.watched && <WatchedCheckmark width={18} height={18} />}
</ActionButton>
</ExtraActionsSection>
)}
</LeftSidebarContent>
</LeftSidebar>
<ContentContainer>
<HeaderContainer>
<HeaderInnerContainer>
<HeaderLeft>
<MarkCompleteButton
disabled={user === null}
invert={task.complete ?? false}
onClick={() => {
if (user) {
onToggleTaskComplete(task);
}
}}
>
<Checkmark width={8} height={8} />
<span>{task.complete ? 'Completed' : 'Mark complete'}</span>
</MarkCompleteButton>
</HeaderLeft>
{user && (
<HeaderRight>
<HeaderActionIcon>
<Paperclip width={16} height={16} />
</HeaderActionIcon>
<HeaderActionIcon>
<Clone width={16} height={16} />
</HeaderActionIcon>
<HeaderActionIcon>
<Share width={16} height={16} />
</HeaderActionIcon>
<HeaderActionIcon onClick={() => onDeleteTask(task)}>
<Trash width={16} height={16} />
</HeaderActionIcon>
</HeaderRight>
)}
</HeaderInnerContainer>
<TaskDetailsTitleWrapper>
<TaskDetailsTitle
value={taskName}
ref={$detailsTitle}
disabled={user === null}
onKeyDown={(e) => {
if (e.keyCode === 13) {
e.preventDefault();
if ($detailsTitle && $detailsTitle.current) {
$detailsTitle.current.blur();
}
}
}}
onChange={(e) => {
setTaskName(e.currentTarget.value);
}}
onBlur={() => {
if (taskName !== task.name) {
onTaskNameChange(task, taskName);
}
}}
/>
</TaskDetailsTitleWrapper>
<Labels>
{task.labels.length !== 0 && (
<MetaDetailContent>
{task.labels.map((label) => {
return (
<TaskLabelItem
key={label.projectLabel.id}
label={label}
onClick={($target) => {
onOpenAddLabelPopup(task, $target);
}}
/>
);
})}
<TaskDetailsAddLabelIcon>
<Plus width={12} height={12} />
</TaskDetailsAddLabelIcon>
</MetaDetailContent>
)}
</Labels>
</HeaderContainer>
<InnerContentContainer>
<DescriptionContainer>
{showRaw ? (
<TaskDetailsEditor value={taskDescriptionRef.current} />
) : (
<EditorContainer
onClick={(e) => {
if (!editTaskDescription) {
setEditTaskDescription(true);
}
}}
>
<Editor
defaultValue={task.description ?? ''}
readOnly={user === null || !editTaskDescription}
theme={dark}
autoFocus
onChange={(value) => {
setSaveTimeout(() => {
clearTimeout(saveTimeout);
return setTimeout(saveDescription, 2000);
});
const text = value();
taskDescriptionRef.current = text;
}}
/>
</EditorContainer>
)}
<ViewRawButton onClick={() => setShowRaw(!showRaw)}>{showRaw ? 'Show editor' : 'Show raw'}</ViewRawButton>
</DescriptionContainer>
<ChecklistSection>
<DragDropContext onDragEnd={(result) => onDragEnd(result, task, onChecklistDrop, onChecklistItemDrop)}>
<Droppable direction="vertical" type="checklist" droppableId="root">
{(dropProvided) => (
<ChecklistContainer {...dropProvided.droppableProps} ref={dropProvided.innerRef}>
{task.checklists &&
task.checklists
.slice()
.sort((a, b) => a.position - b.position)
.map((checklist, idx) => (
<Draggable key={checklist.id} draggableId={checklist.id} index={idx}>
{(provided) => (
<Checklist
ref={provided.innerRef}
wrapperProps={provided.draggableProps}
handleProps={provided.dragHandleProps}
key={checklist.id}
name={checklist.name}
checklistID={checklist.id}
items={checklist.items}
onDeleteChecklist={onDeleteChecklist}
onChangeName={(newName) => onChangeChecklistName(checklist.id, newName)}
onToggleItem={onToggleChecklistItem}
onDeleteItem={onDeleteItem}
onAddItem={(n) => {
if (task.checklists) {
let position = 65535;
const [lastItem] = checklist.items
.sort((a, b) => a.position - b.position)
.slice(-1);
if (lastItem) {
position = lastItem.position * 2 + 1;
}
onAddItem(checklist.id, n, position);
}
}}
onChangeItemName={onChangeItemName}
>
<Droppable direction="vertical" type="checklistItem" droppableId={checklist.id}>
{(checklistDrop) => (
<>
<ChecklistItems ref={checklistDrop.innerRef} {...checklistDrop.droppableProps}>
{checklist.items
.slice()
.sort((a, b) => a.position - b.position)
.map((item, itemIdx) => (
<Draggable key={item.id} draggableId={item.id} index={itemIdx}>
{(itemDrop) => (
<ChecklistItem
key={item.id}
itemID={item.id}
checklistID={item.taskChecklistID}
ref={itemDrop.innerRef}
wrapperProps={itemDrop.draggableProps}
handleProps={itemDrop.dragHandleProps}
name={item.name}
complete={item.complete}
onDeleteItem={onDeleteItem}
onChangeName={onChangeItemName}
onToggleItem={(itemID, complete) => {
onToggleChecklistItem(item.id, complete);
}}
/>
)}
</Draggable>
))}
</ChecklistItems>
{checklistDrop.placeholder}
</>
)}
</Droppable>
</Checklist>
)}
</Draggable>
))}
{dropProvided.placeholder}
</ChecklistContainer>
)}
</Droppable>
</DragDropContext>
</ChecklistSection>
<TabBarSection>
<TabBarItem>Activity</TabBarItem>
</TabBarSection>
<ActivitySection>
{activityStream.map((stream) =>
stream.data.type === 'comment' ? (
<StreamComment
key={stream.id}
onExtraActions={onCommentShowActions}
onCancelCommentEdit={onCancelCommentEdit}
onUpdateComment={(message) => onUpdateComment(stream.id, message)}
editable={stream.id === editableComment}
comment={task.comments && task.comments.find((comment) => comment.id === stream.id)}
/>
) : (
<StreamActivity
key={stream.id}
activity={task.activity && task.activity.find((activity) => activity.id === stream.id)}
/>
),
)}
</ActivitySection>
</InnerContentContainer>
{me && (
<CommentContainer>
<CommentCreator
me={me}
onCreateComment={(message) => onCreateComment(task, message)}
onMemberProfile={onMemberProfile}
/>
</CommentContainer>
)}
</ContentContainer>
</Container>
);
};
export default TaskDetails;
| 9,828 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TaskDetails/onDragEnd.ts | import {
getSortedDraggables,
isPositionChanged,
getNewDraggablePosition,
getAfterDropDraggableList,
} from 'shared/utils/draggables';
import { DropResult } from 'react-beautiful-dnd';
type OnChecklistDropFn = (checklist: TaskChecklist) => void;
type OnChecklistItemDropFn = (prevChecklistID: string, checklistID: string, checklistItem: TaskChecklistItem) => void;
const onDragEnd = (
{ draggableId, source, destination, type }: DropResult,
task: Task,
onChecklistDrop: OnChecklistDropFn,
onChecklistItemDrop: OnChecklistItemDropFn,
) => {
if (typeof destination === 'undefined') return;
if (!isPositionChanged(source, destination)) return;
const isChecklist = type === 'checklist';
const isSameChecklist = destination.droppableId === source.droppableId;
let droppedDraggable: DraggableElement | null = null;
let beforeDropDraggables: Array<DraggableElement> | null = null;
if (!task.checklists) return;
if (isChecklist) {
const droppedGroup = task.checklists.find(taskGroup => taskGroup.id === draggableId);
if (droppedGroup) {
droppedDraggable = {
id: draggableId,
position: droppedGroup.position,
};
beforeDropDraggables = getSortedDraggables(
task.checklists.map(checklist => {
return { id: checklist.id, position: checklist.position };
}),
);
if (droppedDraggable === null || beforeDropDraggables === null) {
throw new Error('before drop draggables is null');
}
const afterDropDraggables = getAfterDropDraggableList(
beforeDropDraggables,
droppedDraggable,
isChecklist,
isSameChecklist,
destination,
);
const newPosition = getNewDraggablePosition(afterDropDraggables, destination.index);
onChecklistDrop({ ...droppedGroup, position: newPosition });
} else {
throw new Error('task group can not be found');
}
} else {
const targetChecklist = task.checklists.findIndex(
checklist => checklist.items.findIndex(item => item.id === draggableId) !== -1,
);
const droppedChecklistItem = task.checklists[targetChecklist].items.find(item => item.id === draggableId);
if (droppedChecklistItem) {
droppedDraggable = {
id: draggableId,
position: droppedChecklistItem.position,
};
beforeDropDraggables = getSortedDraggables(
task.checklists[targetChecklist].items.map(item => {
return { id: item.id, position: item.position };
}),
);
if (droppedDraggable === null || beforeDropDraggables === null) {
throw new Error('before drop draggables is null');
}
const afterDropDraggables = getAfterDropDraggableList(
beforeDropDraggables,
droppedDraggable,
isChecklist,
isSameChecklist,
destination,
);
const newPosition = getNewDraggablePosition(afterDropDraggables, destination.index);
const newItem = {
...droppedChecklistItem,
position: newPosition,
};
onChecklistItemDrop(droppedChecklistItem.taskChecklistID, destination.droppableId, newItem);
}
}
};
export default onDragEnd;
| 9,829 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TaskDetails/remark.js | import { visit } from 'unist-util-visit';
import emoji from 'node-emoji';
import { emoticon } from 'emoticon';
import { Emoji } from 'emoji-mart';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
const RE_EMOJI = /:\+1:|:-1:|:[\w-]+:/g;
const RE_SHORT = /[$@|*'",;.=:\-)([\]\\/<>038BOopPsSdDxXzZ]{2,5}/g;
const DEFAULT_SETTINGS = {
padSpaceAfter: false,
emoticon: false,
};
function plugin(options) {
const settings = { ...DEFAULT_SETTINGS, ...options };
const pad = !!settings.padSpaceAfter;
const emoticonEnable = !!settings.emoticon;
function getEmojiByShortCode(match) {
// find emoji by shortcode - full match or with-out last char as it could be from text e.g. :-),
const iconFull = emoticon.find((e) => e.emoticons.includes(match)); // full match
const iconPart = emoticon.find((e) => e.emoticons.includes(match.slice(0, -1))); // second search pattern
const trimmedChar = iconPart ? match.slice(-1) : '';
const addPad = pad ? ' ' : '';
const icon = iconFull ? iconFull.emoji + addPad : iconPart && iconPart.emoji + addPad + trimmedChar;
return icon || match;
}
function getEmoji(match) {
const got = emoji.get(match);
if (pad && got !== match) {
return `${got} `;
}
return ReactDOMServer.renderToStaticMarkup(<Emoji set="google" emoji={match} size={16} />);
}
function transformer(tree) {
visit(tree, 'paragraph', function (node) {
// node.value = node.value.replace(RE_EMOJI, getEmoji);
// jnode.type = 'html';
// jnode.tagName = 'div';
// jnode.value = '';
for (let nodeIdx = 0; nodeIdx < node.children.length; nodeIdx++) {
if (node.children[nodeIdx].type === 'text') {
node.children[nodeIdx].type = 'html';
node.children[nodeIdx].tagName = 'div';
node.children[nodeIdx].value = node.children[nodeIdx].value.replace(RE_EMOJI, getEmoji);
}
}
if (emoticonEnable) {
// node.value = node.value.replace(RE_SHORT, getEmojiByShortCode);
}
});
}
return transformer;
}
export default plugin;
| 9,830 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/Textarea/index.tsx | import styled from 'styled-components/macro';
import TextareaAutosize from 'react-autosize-textarea';
const Textarea = styled(TextareaAutosize)`
border: none;
resize: none;
overflow: hidden;
overflow-wrap: break-word;
background: transparent;
border-radius: 3px;
box-shadow: none;
margin: -4px 0;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
flex-direction: column;
text-align: start;
color: #c2c6dc;
font-weight: 600;
font-size: 20px;
padding: 3px 10px 3px 8px;
&:focus {
box-shadow: ${props => props.theme.colors.primary} 0px 0px 0px 1px;
}
`;
export default Textarea;
| 9,831 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TopNavbar/LoggedOut.tsx | import React, { useRef, useState, useEffect } from 'react';
import { Home, Star, Bell, AngleDown, BarChart, CheckCircle, ListUnordered } from 'shared/icons';
import { Link } from 'react-router-dom';
import { RoleCode } from 'shared/generated/graphql';
import * as S from './Styles';
export type MenuItem = {
name: string;
link: string;
};
type NavBarProps = {
menuType?: Array<MenuItem> | null;
name: string | null;
match: string;
};
const NavBar: React.FC<NavBarProps> = ({ menuType, name, match }) => {
return (
<S.NavbarWrapper>
<S.NavbarHeader>
<S.ProjectActions>
<S.ProjectSwitch>
<S.ProjectSwitchInner>
<S.TaskcafeLogo innerColor="#9f46e4" outerColor="#000" width={32} height={32} />
</S.ProjectSwitchInner>
</S.ProjectSwitch>
<S.ProjectInfo>
<S.ProjectMeta>{name && <S.ProjectName>{name}</S.ProjectName>}</S.ProjectMeta>
{name && (
<S.ProjectTabs>
{menuType &&
menuType.map((menu, idx) => {
return (
<S.ProjectTab
key={menu.name}
to={menu.link}
exact
onClick={() => {
// TODO
}}
>
{menu.name}
</S.ProjectTab>
);
})}
</S.ProjectTabs>
)}
</S.ProjectInfo>
</S.ProjectActions>
<S.LogoContainer to="/">
<S.TaskcafeTitle>Taskcafé</S.TaskcafeTitle>
</S.LogoContainer>
<S.GlobalActions>
<Link
to={{
pathname: '/login',
state: { redirect: match },
}}
>
<S.SignIn>Sign In</S.SignIn>
</Link>
</S.GlobalActions>
</S.NavbarHeader>
</S.NavbarWrapper>
);
};
export default NavBar;
| 9,832 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TopNavbar/Styles.ts | import styled, { css } from 'styled-components';
import { mixin } from 'shared/utils/styles';
import Button from 'shared/components/Button';
import { Taskcafe } from 'shared/icons';
import { NavLink, Link } from 'react-router-dom';
import TaskAssignee from 'shared/components/TaskAssignee';
export const ProjectMember = styled(TaskAssignee)<{ zIndex: number }>`
z-index: ${(props) => props.zIndex};
position: relative;
box-shadow: 0 0 0 2px ${(props) => props.theme.colors.bg.primary},
inset 0 0 0 1px ${(props) => mixin.rgba(props.theme.colors.bg.primary, 0.07)};
`;
export const NavbarWrapper = styled.div`
width: 100%;
`;
export const ProjectMembers = styled.div`
display: flex;
align-items: center;
`;
export const NavbarHeader = styled.header`
height: 80px;
padding: 0 1.75rem;
display: flex;
align-items: center;
justify-content: space-between;
background: ${(props) => props.theme.colors.bg.primary};
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
border-bottom: 1px solid ${(props) => mixin.rgba(props.theme.colors.alternate, 0.65)};
`;
export const Breadcrumbs = styled.div`
color: rgb(94, 108, 132);
font-size: 15px;
`;
export const BreadcrumpSeparator = styled.span`
position: relative;
top: 2px;
font-size: 18px;
margin: 0px 10px;
`;
export const ProjectInfo = styled.div`
display: flex;
flex-direction: column;
flex: 1;
`;
export const ProjectSwitchInner = styled.div`
border-radius: 12px;
height: 48px;
width: 48px;
box-shadow: inset 0 -2px rgba(0, 0, 0, 0.05);
align-items: center;
background: #cbd4db;
display: flex;
flex: 0 0 auto;
flex-direction: column;
justify-content: center;
background-color: ${(props) => props.theme.colors.primary};
`;
export const ProjectSwitch = styled.div`
align-self: center;
position: relative;
margin-right: 16px;
cursor: pointer;
&::after {
border-radius: 12px;
bottom: 0;
content: '';
left: 0;
pointer-events: none;
position: absolute;
right: 0;
top: 0;
}
&:hover::after {
background-color: rgba(0, 0, 0, 0.05);
}
`;
export const ProjectActions = styled.div`
flex: 1;
align-items: flex-start;
display: flex;
min-width: 1px;
`;
export const GlobalActions = styled.div`
display: flex;
align-items: center;
`;
export const ProfileContainer = styled.div`
display: flex;
align-items: center;
`;
export const ProfileNameWrapper = styled.div`
text-align: right;
line-height: 1.25;
`;
export const NavbarLink = styled(Link)`
margin-right: 20px;
cursor: pointer;
`;
export const NotificationCount = styled.div`
position: absolute;
top: -6px;
right: -6px;
background: #7367f0;
border-radius: 50%;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
border: 3px solid rgb(16, 22, 58);
color: #fff;
font-size: 14px;
`;
export const IconContainerWrapper = styled.div<{ disabled?: boolean }>`
margin-right: 20px;
position: relative;
cursor: pointer;
${(props) =>
props.disabled &&
css`
opacity: 0.5;
cursor: default;
pointer-events: none;
`}
`;
export const ProfileNamePrimary = styled.div`
color: #c2c6dc;
font-weight: 600;
`;
export const ProfileNameSecondary = styled.small`
color: #c2c6dc;
`;
export const ProfileIcon = styled.div<{
bgColor: string | null;
backgroundURL: string | null;
}>`
width: 40px;
height: 40px;
border-radius: 9999px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 700;
background: ${(props) => (props.backgroundURL ? `url(${props.backgroundURL})` : props.bgColor)};
background-position: center;
background-size: contain;
`;
export const ProjectMeta = styled.div<{ nameOnly?: boolean }>`
display: flex;
${(props) => !props.nameOnly && 'padding-top: 9px;'}
margin-left: -6px;
align-items: center;
max-width: 100%;
min-height: 51px;
`;
export const ProjectTabs = styled.div`
align-items: flex-end;
align-self: stretch;
display: flex;
flex: 1 0 auto;
justify-content: flex-start;
max-width: 100%;
`;
export const ProjectTab = styled(NavLink)`
font-size: 80%;
color: ${(props) => props.theme.colors.text.primary};
font-size: 15px;
cursor: pointer;
display: flex;
line-height: normal;
min-width: 1px;
transition-duration: 0.2s;
transition-property: box-shadow, color;
white-space: nowrap;
flex: 0 1 auto;
padding-bottom: 12px;
&:not(:last-child) {
margin-right: 20px;
}
&:hover {
box-shadow: inset 0 -2px ${(props) => props.theme.colors.text.secondary};
color: ${(props) => props.theme.colors.text.secondary};
}
&.active {
box-shadow: inset 0 -2px ${(props) => props.theme.colors.secondary};
color: ${(props) => props.theme.colors.secondary};
}
&.active:hover {
box-shadow: inset 0 -2px ${(props) => props.theme.colors.secondary};
color: ${(props) => props.theme.colors.secondary};
}
`;
export const ProjectName = styled.h1`
color: ${(props) => props.theme.colors.text.primary};
font-weight: 600;
font-size: 20px;
padding: 3px 10px 3px 8px;
margin: -4px 0;
`;
export const ProjectNameWrapper = styled.div`
position: relative;
`;
export const ProjectNameSpan = styled.div`
padding: 3px 10px 3px 8px;
font-weight: 600;
font-size: 20px;
`;
export const ProjectNameTextarea = styled.input`
position: absolute;
width: 100%;
left: 0;
top: 0;
border: none;
resize: none;
overflow: hidden;
overflow-wrap: break-word;
background: transparent;
border-radius: 3px;
box-shadow: none;
margin: 0;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
flex-direction: column;
text-align: start;
color: #c2c6dc;
font-weight: 600;
font-size: 20px;
padding: 3px 10px 3px 8px;
&:focus {
box-shadow: ${(props) => props.theme.colors.primary} 0px 0px 0px 1px;
}
`;
export const ProjectSwitcher = styled.button`
font-size: 20px;
outline: none;
border: none;
width: 100px;
border-radius: 3px;
line-height: 20px;
padding: 6px 4px;
background-color: none;
text-align: center;
color: #c2c6dc;
cursor: pointer;
&:hover {
background: ${(props) => props.theme.colors.primary};
}
`;
export const Separator = styled.div`
color: #c2c6dc;
font-size: 20px;
padding-left: 4px;
padding-right: 4px;
`;
export const ProjectSettingsButton = styled.button`
outline: none;
border: none;
border-radius: 3px;
line-height: 20px;
width: 28px;
height: 28px;
background-color: none;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
&:hover {
background: ${(props) => props.theme.colors.primary};
}
`;
export const InviteButton = styled(Button)`
margin: 0 0 0 8px;
padding: 6px 12px;
`;
export const ProjectFinder = styled(Button)`
margin-right: 20px;
padding: 6px 12px;
`;
export const SignUp = styled(Button)`
margin-right: 8px;
padding: 6px 12px;
`;
export const SignIn = styled(Button)`
margin-right: 20px;
padding: 6px 12px;
`;
export const NavSeparator = styled.div`
width: 1px;
background: ${(props) => props.theme.colors.border};
height: 34px;
margin: 0 20px;
`;
export const LogoContainer = styled(Link)`
display: block;
left: 50%;
right: 50%;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
`;
export const TaskcafeTitle = styled.h2`
margin-left: 5px;
color: ${(props) => props.theme.colors.text.primary};
font-size: 20px;
`;
export const TaskcafeLogo = styled(Taskcafe)`
fill: ${(props) => props.theme.colors.text.primary};
stroke: ${(props) => props.theme.colors.text.primary};
`;
| 9,833 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/components/TopNavbar/index.tsx | import React, { useRef, useState, useEffect } from 'react';
import { Home, Star, Bell, AngleDown, BarChart, CheckCircle, ListUnordered } from 'shared/icons';
import styled from 'styled-components';
import ProfileIcon from 'shared/components/ProfileIcon';
import { usePopup } from 'shared/components/PopupMenu';
import { RoleCode } from 'shared/generated/graphql';
import NOOP from 'shared/utils/noop';
import { useHistory } from 'react-router';
import {
ProjectInfo,
NavbarLink,
TaskcafeLogo,
TaskcafeTitle,
ProjectFinder,
LogoContainer,
NavSeparator,
IconContainerWrapper,
ProjectSwitch,
ProjectNameWrapper,
ProjectNameSpan,
ProjectNameTextarea,
InviteButton,
GlobalActions,
ProjectActions,
ProjectMeta,
ProjectName,
ProjectTabs,
ProjectTab,
NavbarWrapper,
NavbarHeader,
ProjectSettingsButton,
ProfileContainer,
ProfileNameWrapper,
ProfileNamePrimary,
ProfileNameSecondary,
ProjectMember,
ProjectMembers,
ProjectSwitchInner,
NotificationCount,
} from './Styles';
type IconContainerProps = {
disabled?: boolean;
onClick?: ($target: React.RefObject<HTMLElement>) => void;
};
const IconContainer: React.FC<IconContainerProps> = ({ onClick, disabled = false, children }) => {
const $container = useRef<HTMLDivElement>(null);
return (
<IconContainerWrapper
ref={$container}
disabled={disabled}
onClick={() => {
if (onClick) {
onClick($container);
}
}}
>
{children}
</IconContainerWrapper>
);
};
const HomeDashboard = styled(Home)``;
type ProjectHeadingProps = {
onFavorite?: () => void;
name: string;
canEditProjectName: boolean;
onSaveProjectName?: (projectName: string) => void;
onOpenSettings: ($target: React.RefObject<HTMLElement>) => void;
};
const ProjectHeading: React.FC<ProjectHeadingProps> = ({
onFavorite,
name: initialProjectName,
onSaveProjectName,
canEditProjectName,
onOpenSettings,
}) => {
const [isEditProjectName, setEditProjectName] = useState(false);
const [projectName, setProjectName] = useState(initialProjectName);
const $projectName = useRef<HTMLInputElement>(null);
useEffect(() => {
if (isEditProjectName && $projectName && $projectName.current) {
$projectName.current.focus();
$projectName.current.select();
}
}, [isEditProjectName]);
useEffect(() => {
setProjectName(initialProjectName);
}, [initialProjectName]);
const onProjectNameChange = (event: React.FormEvent<HTMLInputElement>): void => {
setProjectName(event.currentTarget.value);
};
const onProjectNameBlur = () => {
if (onSaveProjectName) {
onSaveProjectName(projectName);
}
setEditProjectName(false);
};
const onProjectNameKeyDown = (e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
e.preventDefault();
if ($projectName && $projectName.current) {
$projectName.current.blur();
}
}
};
const $settings = useRef<HTMLButtonElement>(null);
return (
<>
{isEditProjectName ? (
<ProjectNameWrapper>
<ProjectNameSpan>{projectName}</ProjectNameSpan>
<ProjectNameTextarea
ref={$projectName}
onChange={onProjectNameChange}
onKeyDown={onProjectNameKeyDown}
onBlur={onProjectNameBlur}
spellCheck={false}
value={projectName}
/>
</ProjectNameWrapper>
) : (
<ProjectName
onClick={() => {
if (canEditProjectName) {
setEditProjectName(true);
}
}}
>
{projectName}
</ProjectName>
)}
<ProjectSettingsButton
onClick={() => {
onOpenSettings($settings);
}}
ref={$settings}
>
<AngleDown color="#c2c6dc" />
</ProjectSettingsButton>
{onFavorite && (
<ProjectSettingsButton onClick={() => onFavorite()}>
<Star filled width={16} height={16} color="#c2c6dc" />
</ProjectSettingsButton>
)}
</>
);
};
export type MenuItem = {
name: string;
link: string;
};
type MenuTypes = {
[key: string]: Array<string>;
};
export const MENU_TYPES: MenuTypes = {
PROJECT_MENU: ['Board', 'Timeline', 'Calender'],
TEAM_MENU: ['Projects', 'Members', 'Settings'],
};
type NavBarProps = {
menuType?: Array<MenuItem> | null;
name: string | null;
currentTab?: number;
onSetTab?: (tab: number) => void;
onOpenProjectFinder: ($target: React.RefObject<HTMLElement>) => void;
onChangeProjectOwner?: (userID: string) => void;
onChangeRole?: (userID: string, roleCode: RoleCode) => void;
onFavorite?: () => void;
onProfileClick: ($target: React.RefObject<HTMLElement>) => void;
onSaveName?: (name: string) => void;
onNotificationClick: ($target: React.RefObject<HTMLElement>) => void;
canEditProjectName?: boolean;
canInviteUser?: boolean;
onInviteUser?: ($target: React.RefObject<HTMLElement>) => void;
onDashboardClick: () => void;
user: TaskUser | null;
onOpenSettings: ($target: React.RefObject<HTMLElement>) => void;
projectMembers?: Array<TaskUser> | null;
projectInvitedMembers?: Array<InvitedUser> | null;
hasUnread: boolean;
onRemoveFromBoard?: (userID: string) => void;
onMemberProfile?: ($targetRef: React.RefObject<HTMLElement>, memberID: string) => void;
onInvitedMemberProfile?: ($targetRef: React.RefObject<HTMLElement>, email: string) => void;
onMyTasksClick: () => void;
};
const NavBar: React.FC<NavBarProps> = ({
menuType,
canInviteUser = false,
onInviteUser,
onChangeProjectOwner,
currentTab,
onMemberProfile,
onInvitedMemberProfile,
canEditProjectName = false,
onOpenProjectFinder,
onFavorite,
onSetTab,
hasUnread,
projectInvitedMembers,
onChangeRole,
name,
onRemoveFromBoard,
onSaveName,
onProfileClick,
onNotificationClick,
onDashboardClick,
onMyTasksClick,
user,
projectMembers,
onOpenSettings,
}) => {
const handleProfileClick = ($target: React.RefObject<HTMLElement>) => {
if ($target && $target.current) {
onProfileClick($target);
}
};
const history = useHistory();
const { showPopup } = usePopup();
const $finder = useRef<HTMLDivElement>(null);
return (
<NavbarWrapper>
<NavbarHeader>
<ProjectActions>
<ProjectSwitch ref={$finder} onClick={(e) => onOpenProjectFinder($finder)}>
<ProjectSwitchInner>
<TaskcafeLogo innerColor="#9f46e4" outerColor="#000" width={32} height={32} />
</ProjectSwitchInner>
</ProjectSwitch>
<ProjectInfo>
<ProjectMeta>
{name && (
<ProjectHeading
onFavorite={onFavorite}
onOpenSettings={onOpenSettings}
name={name}
canEditProjectName={canEditProjectName}
onSaveProjectName={onSaveName}
/>
)}
</ProjectMeta>
{name && (
<ProjectTabs>
{menuType &&
menuType.map((menu, idx) => {
return (
<ProjectTab
key={menu.name}
to={menu.link}
exact
onClick={() => {
// TODO
}}
>
{menu.name}
</ProjectTab>
);
})}
</ProjectTabs>
)}
</ProjectInfo>
</ProjectActions>
<LogoContainer to="/">
<TaskcafeTitle>Taskcafé</TaskcafeTitle>
</LogoContainer>
<GlobalActions>
{projectMembers && projectInvitedMembers && onMemberProfile && onInvitedMemberProfile && (
<>
<ProjectMembers>
{projectMembers.map((member, idx) => (
<ProjectMember
showRoleIcons
zIndex={projectMembers.length - idx + projectInvitedMembers.length}
key={member.id}
size={28}
member={member}
onMemberProfile={onMemberProfile}
/>
))}
{projectInvitedMembers.map((member, idx) => (
<ProjectMember
showRoleIcons
zIndex={projectInvitedMembers.length - idx}
key={member.email}
size={28}
invited
member={{
id: member.email,
fullName: member.email,
profileIcon: {
url: null,
initials: member.email.charAt(0),
bgColor: '#fff',
},
}}
onMemberProfile={onInvitedMemberProfile}
/>
))}
{canInviteUser && (
<InviteButton
onClick={($target) => {
if (onInviteUser) {
onInviteUser($target);
}
}}
variant="outline"
>
Invite
</InviteButton>
)}
</ProjectMembers>
<NavSeparator />
</>
)}
<ProjectFinder onClick={onOpenProjectFinder} variant="gradient">
Projects
</ProjectFinder>
<NavbarLink to="">
<HomeDashboard width={20} height={20} />
</NavbarLink>
<NavbarLink to="/tasks">
<CheckCircle width={20} height={20} />
</NavbarLink>
<IconContainer disabled onClick={NOOP}>
<ListUnordered width={20} height={20} />
</IconContainer>
<IconContainer onClick={onNotificationClick}>
<Bell width={20} height={20} />
{hasUnread && <NotificationCount />}
</IconContainer>
<IconContainer disabled onClick={NOOP}>
<BarChart width={20} height={20} />
</IconContainer>
{user && (
<IconContainer>
<ProfileIcon user={user} size={30} onProfileClick={handleProfileClick} />
</IconContainer>
)}
</GlobalActions>
</NavbarHeader>
</NavbarWrapper>
);
};
export default NavBar;
| 9,834 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/constants/keyCodes.ts | const KeyCodes = {
TAB: 9,
ENTER: 13,
ESCAPE: 27,
SPACE: 32,
ARROW_LEFT: 37,
ARROW_UP: 38,
ARROW_RIGHT: 39,
ARROW_DOWN: 40,
M: 77,
};
export default KeyCodes;
| 9,835 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/constants/labelColors.ts | const LabelColors = {
GREEN: '#61bd4f',
YELLOW: '#f2d600',
ORANGE: '#ff9f1a',
RED: '#eb5a46',
PURPLE: '#c377e0',
BLUE: '#0079bf',
SKY: '#00c2e0',
LIME: '#51e898',
PINK: '#ff78cb',
BLACK: '#344563',
};
export const DarkLabelColors = {
RED: '#e8384f',
ORANGE: '#fd612c',
YELLOW_ORANGE: '#fd9a00',
YELLOW: '#eec300',
YELLOW_GREEN: '#a4cf30',
GREEN: '#62d26f',
BLUE_GREEN: '#37c5ab',
AQUA: '#20aaea',
BLUE: '#4186e0',
INDIGO: '#7a6ff0',
PURPLE: '#aa62e3',
MAGENTA: '#e362e3',
HOT_PINK: '#ea4e9d',
PINK: '#fc91ad',
COOL_GRAY: '#8da3a6',
};
export default LabelColors;
| 9,836 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/constants/menuTypes.ts | const MenuTypes = {
LABEL_MANAGER: 1,
LABEL_EDITOR: 2,
LIST_ACTIONS: 3,
};
export default MenuTypes;
| 9,837 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/generated/graphql.tsx | import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
const defaultOptions = {}
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string;
String: string;
Boolean: boolean;
Int: number;
Float: number;
Time: any;
UUID: string;
Upload: any;
};
export enum ActionLevel {
Org = 'ORG',
Team = 'TEAM',
Project = 'PROJECT'
}
export enum ActionType {
TeamAdded = 'TEAM_ADDED',
TeamRemoved = 'TEAM_REMOVED',
ProjectAdded = 'PROJECT_ADDED',
ProjectRemoved = 'PROJECT_REMOVED',
ProjectArchived = 'PROJECT_ARCHIVED',
DueDateAdded = 'DUE_DATE_ADDED',
DueDateRemoved = 'DUE_DATE_REMOVED',
DueDateChanged = 'DUE_DATE_CHANGED',
DueDateReminder = 'DUE_DATE_REMINDER',
TaskAssigned = 'TASK_ASSIGNED',
TaskMoved = 'TASK_MOVED',
TaskArchived = 'TASK_ARCHIVED',
TaskAttachmentUploaded = 'TASK_ATTACHMENT_UPLOADED',
CommentMentioned = 'COMMENT_MENTIONED',
CommentOther = 'COMMENT_OTHER'
}
export enum ActivityType {
TaskAdded = 'TASK_ADDED',
TaskMoved = 'TASK_MOVED',
TaskMarkedComplete = 'TASK_MARKED_COMPLETE',
TaskMarkedIncomplete = 'TASK_MARKED_INCOMPLETE',
TaskDueDateChanged = 'TASK_DUE_DATE_CHANGED',
TaskDueDateAdded = 'TASK_DUE_DATE_ADDED',
TaskDueDateRemoved = 'TASK_DUE_DATE_REMOVED',
TaskChecklistChanged = 'TASK_CHECKLIST_CHANGED',
TaskChecklistAdded = 'TASK_CHECKLIST_ADDED',
TaskChecklistRemoved = 'TASK_CHECKLIST_REMOVED'
}
export type AddTaskLabelInput = {
taskID: Scalars['UUID'];
projectLabelID: Scalars['UUID'];
};
export type AssignTaskInput = {
taskID: Scalars['UUID'];
userID: Scalars['UUID'];
};
export type CausedBy = {
__typename?: 'CausedBy';
id: Scalars['ID'];
fullName: Scalars['String'];
profileIcon?: Maybe<ProfileIcon>;
};
export type ChecklistBadge = {
__typename?: 'ChecklistBadge';
complete: Scalars['Int'];
total: Scalars['Int'];
};
export type CommentsBadge = {
__typename?: 'CommentsBadge';
total: Scalars['Int'];
unread: Scalars['Boolean'];
};
export type CreateTaskChecklist = {
taskID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
};
export type CreateTaskChecklistItem = {
taskChecklistID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
};
export type CreateTaskComment = {
taskID: Scalars['UUID'];
message: Scalars['String'];
};
export type CreateTaskCommentPayload = {
__typename?: 'CreateTaskCommentPayload';
taskID: Scalars['UUID'];
comment: TaskComment;
};
export type CreateTaskDueDateNotification = {
taskID: Scalars['UUID'];
period: Scalars['Int'];
duration: DueDateNotificationDuration;
};
export type CreateTaskDueDateNotificationsResult = {
__typename?: 'CreateTaskDueDateNotificationsResult';
notifications: Array<DueDateNotification>;
};
export type CreateTeamMember = {
userID: Scalars['UUID'];
teamID: Scalars['UUID'];
};
export type CreateTeamMemberPayload = {
__typename?: 'CreateTeamMemberPayload';
team: Team;
teamMember: Member;
};
export type CreatedBy = {
__typename?: 'CreatedBy';
id: Scalars['ID'];
fullName: Scalars['String'];
profileIcon: ProfileIcon;
};
export type DeleteInvitedProjectMember = {
projectID: Scalars['UUID'];
email: Scalars['String'];
};
export type DeleteInvitedProjectMemberPayload = {
__typename?: 'DeleteInvitedProjectMemberPayload';
invitedMember: InvitedMember;
};
export type DeleteInvitedUserAccount = {
invitedUserID: Scalars['UUID'];
};
export type DeleteInvitedUserAccountPayload = {
__typename?: 'DeleteInvitedUserAccountPayload';
invitedUser: InvitedUserAccount;
};
export type DeleteProject = {
projectID: Scalars['UUID'];
};
export type DeleteProjectLabel = {
projectLabelID: Scalars['UUID'];
};
export type DeleteProjectMember = {
projectID: Scalars['UUID'];
userID: Scalars['UUID'];
};
export type DeleteProjectMemberPayload = {
__typename?: 'DeleteProjectMemberPayload';
ok: Scalars['Boolean'];
member: Member;
projectID: Scalars['UUID'];
};
export type DeleteProjectPayload = {
__typename?: 'DeleteProjectPayload';
ok: Scalars['Boolean'];
project: Project;
};
export type DeleteTaskChecklist = {
taskChecklistID: Scalars['UUID'];
};
export type DeleteTaskChecklistItem = {
taskChecklistItemID: Scalars['UUID'];
};
export type DeleteTaskChecklistItemPayload = {
__typename?: 'DeleteTaskChecklistItemPayload';
ok: Scalars['Boolean'];
taskChecklistItem: TaskChecklistItem;
};
export type DeleteTaskChecklistPayload = {
__typename?: 'DeleteTaskChecklistPayload';
ok: Scalars['Boolean'];
taskChecklist: TaskChecklist;
};
export type DeleteTaskComment = {
commentID: Scalars['UUID'];
};
export type DeleteTaskCommentPayload = {
__typename?: 'DeleteTaskCommentPayload';
taskID: Scalars['UUID'];
commentID: Scalars['UUID'];
};
export type DeleteTaskDueDateNotification = {
id: Scalars['UUID'];
};
export type DeleteTaskDueDateNotificationsResult = {
__typename?: 'DeleteTaskDueDateNotificationsResult';
notifications: Array<Scalars['UUID']>;
};
export type DeleteTaskGroupInput = {
taskGroupID: Scalars['UUID'];
};
export type DeleteTaskGroupPayload = {
__typename?: 'DeleteTaskGroupPayload';
ok: Scalars['Boolean'];
affectedRows: Scalars['Int'];
taskGroup: TaskGroup;
};
export type DeleteTaskGroupTasks = {
taskGroupID: Scalars['UUID'];
};
export type DeleteTaskGroupTasksPayload = {
__typename?: 'DeleteTaskGroupTasksPayload';
taskGroupID: Scalars['UUID'];
tasks: Array<Scalars['UUID']>;
};
export type DeleteTaskInput = {
taskID: Scalars['UUID'];
};
export type DeleteTaskPayload = {
__typename?: 'DeleteTaskPayload';
taskID: Scalars['UUID'];
};
export type DeleteTeam = {
teamID: Scalars['UUID'];
};
export type DeleteTeamMember = {
teamID: Scalars['UUID'];
userID: Scalars['UUID'];
newOwnerID?: Maybe<Scalars['UUID']>;
};
export type DeleteTeamMemberPayload = {
__typename?: 'DeleteTeamMemberPayload';
teamID: Scalars['UUID'];
userID: Scalars['UUID'];
affectedProjects: Array<Project>;
};
export type DeleteTeamPayload = {
__typename?: 'DeleteTeamPayload';
ok: Scalars['Boolean'];
team: Team;
projects: Array<Project>;
};
export type DeleteUserAccount = {
userID: Scalars['UUID'];
newOwnerID?: Maybe<Scalars['UUID']>;
};
export type DeleteUserAccountPayload = {
__typename?: 'DeleteUserAccountPayload';
ok: Scalars['Boolean'];
userAccount: UserAccount;
};
export type DueDate = {
__typename?: 'DueDate';
at?: Maybe<Scalars['Time']>;
notifications: Array<DueDateNotification>;
};
export type DueDateNotification = {
__typename?: 'DueDateNotification';
id: Scalars['ID'];
period: Scalars['Int'];
duration: DueDateNotificationDuration;
};
export enum DueDateNotificationDuration {
Minute = 'MINUTE',
Hour = 'HOUR',
Day = 'DAY',
Week = 'WEEK'
}
export type DuplicateTaskGroup = {
projectID: Scalars['UUID'];
taskGroupID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
};
export type DuplicateTaskGroupPayload = {
__typename?: 'DuplicateTaskGroupPayload';
taskGroup: TaskGroup;
};
export type FindProject = {
projectID?: Maybe<Scalars['UUID']>;
projectShortID?: Maybe<Scalars['String']>;
};
export type FindTask = {
taskID?: Maybe<Scalars['UUID']>;
taskShortID?: Maybe<Scalars['String']>;
};
export type FindTeam = {
teamID: Scalars['UUID'];
};
export type FindUser = {
userID: Scalars['UUID'];
};
export type HasUnreadNotificationsResult = {
__typename?: 'HasUnreadNotificationsResult';
unread: Scalars['Boolean'];
};
export type InviteProjectMembers = {
projectID: Scalars['UUID'];
members: Array<MemberInvite>;
};
export type InviteProjectMembersPayload = {
__typename?: 'InviteProjectMembersPayload';
ok: Scalars['Boolean'];
projectID: Scalars['UUID'];
members: Array<Member>;
invitedMembers: Array<InvitedMember>;
};
export type InvitedMember = {
__typename?: 'InvitedMember';
email: Scalars['String'];
invitedOn: Scalars['Time'];
};
export type InvitedUserAccount = {
__typename?: 'InvitedUserAccount';
id: Scalars['ID'];
email: Scalars['String'];
invitedOn: Scalars['Time'];
member: MemberList;
};
export type LabelColor = {
__typename?: 'LabelColor';
id: Scalars['ID'];
name: Scalars['String'];
position: Scalars['Float'];
colorHex: Scalars['String'];
};
export type LogoutUser = {
userID: Scalars['UUID'];
};
export type MePayload = {
__typename?: 'MePayload';
user: UserAccount;
organization?: Maybe<RoleCode>;
teamRoles: Array<TeamRole>;
projectRoles: Array<ProjectRole>;
};
export type Member = {
__typename?: 'Member';
id: Scalars['ID'];
role: Role;
fullName: Scalars['String'];
username: Scalars['String'];
profileIcon: ProfileIcon;
owned: OwnedList;
member: MemberList;
};
export type MemberInvite = {
userID?: Maybe<Scalars['UUID']>;
email?: Maybe<Scalars['String']>;
};
export type MemberList = {
__typename?: 'MemberList';
teams: Array<Team>;
projects: Array<Project>;
};
export type MemberSearchFilter = {
searchFilter: Scalars['String'];
projectID?: Maybe<Scalars['UUID']>;
};
export type MemberSearchResult = {
__typename?: 'MemberSearchResult';
similarity: Scalars['Int'];
id: Scalars['String'];
user?: Maybe<UserAccount>;
status: ShareStatus;
};
export type Mutation = {
__typename?: 'Mutation';
addTaskLabel: Task;
assignTask: Task;
clearProfileAvatar: UserAccount;
createProject: Project;
createProjectLabel: ProjectLabel;
createTask: Task;
createTaskChecklist: TaskChecklist;
createTaskChecklistItem: TaskChecklistItem;
createTaskComment: CreateTaskCommentPayload;
createTaskDueDateNotifications: CreateTaskDueDateNotificationsResult;
createTaskGroup: TaskGroup;
createTeam: Team;
createTeamMember: CreateTeamMemberPayload;
createUserAccount: UserAccount;
deleteInvitedProjectMember: DeleteInvitedProjectMemberPayload;
deleteInvitedUserAccount: DeleteInvitedUserAccountPayload;
deleteProject: DeleteProjectPayload;
deleteProjectLabel: ProjectLabel;
deleteProjectMember: DeleteProjectMemberPayload;
deleteTask: DeleteTaskPayload;
deleteTaskChecklist: DeleteTaskChecklistPayload;
deleteTaskChecklistItem: DeleteTaskChecklistItemPayload;
deleteTaskComment: DeleteTaskCommentPayload;
deleteTaskDueDateNotifications: DeleteTaskDueDateNotificationsResult;
deleteTaskGroup: DeleteTaskGroupPayload;
deleteTaskGroupTasks: DeleteTaskGroupTasksPayload;
deleteTeam: DeleteTeamPayload;
deleteTeamMember: DeleteTeamMemberPayload;
deleteUserAccount: DeleteUserAccountPayload;
duplicateTaskGroup: DuplicateTaskGroupPayload;
inviteProjectMembers: InviteProjectMembersPayload;
logoutUser: Scalars['Boolean'];
notificationMarkAllRead: NotificationMarkAllAsReadResult;
notificationToggleRead: Notified;
removeTaskLabel: Task;
setTaskChecklistItemComplete: TaskChecklistItem;
setTaskComplete: Task;
sortTaskGroup: SortTaskGroupPayload;
toggleProjectVisibility: ToggleProjectVisibilityPayload;
toggleTaskLabel: ToggleTaskLabelPayload;
toggleTaskWatch: Task;
unassignTask: Task;
updateProjectLabel: ProjectLabel;
updateProjectLabelColor: ProjectLabel;
updateProjectLabelName: ProjectLabel;
updateProjectMemberRole: UpdateProjectMemberRolePayload;
updateProjectName: Project;
updateTaskChecklistItemLocation: UpdateTaskChecklistItemLocationPayload;
updateTaskChecklistItemName: TaskChecklistItem;
updateTaskChecklistLocation: UpdateTaskChecklistLocationPayload;
updateTaskChecklistName: TaskChecklist;
updateTaskComment: UpdateTaskCommentPayload;
updateTaskDescription: Task;
updateTaskDueDate: Task;
updateTaskDueDateNotifications: UpdateTaskDueDateNotificationsResult;
updateTaskGroupLocation: TaskGroup;
updateTaskGroupName: TaskGroup;
updateTaskLocation: UpdateTaskLocationPayload;
updateTaskName: Task;
updateTeamMemberRole: UpdateTeamMemberRolePayload;
updateUserInfo: UpdateUserInfoPayload;
updateUserPassword: UpdateUserPasswordPayload;
updateUserRole: UpdateUserRolePayload;
};
export type MutationAddTaskLabelArgs = {
input?: Maybe<AddTaskLabelInput>;
};
export type MutationAssignTaskArgs = {
input?: Maybe<AssignTaskInput>;
};
export type MutationCreateProjectArgs = {
input: NewProject;
};
export type MutationCreateProjectLabelArgs = {
input: NewProjectLabel;
};
export type MutationCreateTaskArgs = {
input: NewTask;
};
export type MutationCreateTaskChecklistArgs = {
input: CreateTaskChecklist;
};
export type MutationCreateTaskChecklistItemArgs = {
input: CreateTaskChecklistItem;
};
export type MutationCreateTaskCommentArgs = {
input?: Maybe<CreateTaskComment>;
};
export type MutationCreateTaskDueDateNotificationsArgs = {
input: Array<CreateTaskDueDateNotification>;
};
export type MutationCreateTaskGroupArgs = {
input: NewTaskGroup;
};
export type MutationCreateTeamArgs = {
input: NewTeam;
};
export type MutationCreateTeamMemberArgs = {
input: CreateTeamMember;
};
export type MutationCreateUserAccountArgs = {
input: NewUserAccount;
};
export type MutationDeleteInvitedProjectMemberArgs = {
input: DeleteInvitedProjectMember;
};
export type MutationDeleteInvitedUserAccountArgs = {
input: DeleteInvitedUserAccount;
};
export type MutationDeleteProjectArgs = {
input: DeleteProject;
};
export type MutationDeleteProjectLabelArgs = {
input: DeleteProjectLabel;
};
export type MutationDeleteProjectMemberArgs = {
input: DeleteProjectMember;
};
export type MutationDeleteTaskArgs = {
input: DeleteTaskInput;
};
export type MutationDeleteTaskChecklistArgs = {
input: DeleteTaskChecklist;
};
export type MutationDeleteTaskChecklistItemArgs = {
input: DeleteTaskChecklistItem;
};
export type MutationDeleteTaskCommentArgs = {
input?: Maybe<DeleteTaskComment>;
};
export type MutationDeleteTaskDueDateNotificationsArgs = {
input: Array<DeleteTaskDueDateNotification>;
};
export type MutationDeleteTaskGroupArgs = {
input: DeleteTaskGroupInput;
};
export type MutationDeleteTaskGroupTasksArgs = {
input: DeleteTaskGroupTasks;
};
export type MutationDeleteTeamArgs = {
input: DeleteTeam;
};
export type MutationDeleteTeamMemberArgs = {
input: DeleteTeamMember;
};
export type MutationDeleteUserAccountArgs = {
input: DeleteUserAccount;
};
export type MutationDuplicateTaskGroupArgs = {
input: DuplicateTaskGroup;
};
export type MutationInviteProjectMembersArgs = {
input: InviteProjectMembers;
};
export type MutationLogoutUserArgs = {
input: LogoutUser;
};
export type MutationNotificationToggleReadArgs = {
input: NotificationToggleReadInput;
};
export type MutationRemoveTaskLabelArgs = {
input?: Maybe<RemoveTaskLabelInput>;
};
export type MutationSetTaskChecklistItemCompleteArgs = {
input: SetTaskChecklistItemComplete;
};
export type MutationSetTaskCompleteArgs = {
input: SetTaskComplete;
};
export type MutationSortTaskGroupArgs = {
input: SortTaskGroup;
};
export type MutationToggleProjectVisibilityArgs = {
input: ToggleProjectVisibility;
};
export type MutationToggleTaskLabelArgs = {
input: ToggleTaskLabelInput;
};
export type MutationToggleTaskWatchArgs = {
input: ToggleTaskWatch;
};
export type MutationUnassignTaskArgs = {
input?: Maybe<UnassignTaskInput>;
};
export type MutationUpdateProjectLabelArgs = {
input: UpdateProjectLabel;
};
export type MutationUpdateProjectLabelColorArgs = {
input: UpdateProjectLabelColor;
};
export type MutationUpdateProjectLabelNameArgs = {
input: UpdateProjectLabelName;
};
export type MutationUpdateProjectMemberRoleArgs = {
input: UpdateProjectMemberRole;
};
export type MutationUpdateProjectNameArgs = {
input?: Maybe<UpdateProjectName>;
};
export type MutationUpdateTaskChecklistItemLocationArgs = {
input: UpdateTaskChecklistItemLocation;
};
export type MutationUpdateTaskChecklistItemNameArgs = {
input: UpdateTaskChecklistItemName;
};
export type MutationUpdateTaskChecklistLocationArgs = {
input: UpdateTaskChecklistLocation;
};
export type MutationUpdateTaskChecklistNameArgs = {
input: UpdateTaskChecklistName;
};
export type MutationUpdateTaskCommentArgs = {
input?: Maybe<UpdateTaskComment>;
};
export type MutationUpdateTaskDescriptionArgs = {
input: UpdateTaskDescriptionInput;
};
export type MutationUpdateTaskDueDateArgs = {
input: UpdateTaskDueDate;
};
export type MutationUpdateTaskDueDateNotificationsArgs = {
input: Array<UpdateTaskDueDateNotification>;
};
export type MutationUpdateTaskGroupLocationArgs = {
input: NewTaskGroupLocation;
};
export type MutationUpdateTaskGroupNameArgs = {
input: UpdateTaskGroupName;
};
export type MutationUpdateTaskLocationArgs = {
input: NewTaskLocation;
};
export type MutationUpdateTaskNameArgs = {
input: UpdateTaskName;
};
export type MutationUpdateTeamMemberRoleArgs = {
input: UpdateTeamMemberRole;
};
export type MutationUpdateUserInfoArgs = {
input: UpdateUserInfo;
};
export type MutationUpdateUserPasswordArgs = {
input: UpdateUserPassword;
};
export type MutationUpdateUserRoleArgs = {
input: UpdateUserRole;
};
export type MyTasks = {
status: MyTasksStatus;
sort: MyTasksSort;
};
export type MyTasksPayload = {
__typename?: 'MyTasksPayload';
tasks: Array<Task>;
projects: Array<ProjectTaskMapping>;
};
export enum MyTasksSort {
None = 'NONE',
Project = 'PROJECT',
DueDate = 'DUE_DATE'
}
export enum MyTasksStatus {
All = 'ALL',
Incomplete = 'INCOMPLETE',
CompleteAll = 'COMPLETE_ALL',
CompleteToday = 'COMPLETE_TODAY',
CompleteYesterday = 'COMPLETE_YESTERDAY',
CompleteOneWeek = 'COMPLETE_ONE_WEEK',
CompleteTwoWeek = 'COMPLETE_TWO_WEEK',
CompleteThreeWeek = 'COMPLETE_THREE_WEEK'
}
export type NewProject = {
teamID?: Maybe<Scalars['UUID']>;
name: Scalars['String'];
};
export type NewProjectLabel = {
projectID: Scalars['UUID'];
labelColorID: Scalars['UUID'];
name?: Maybe<Scalars['String']>;
};
export type NewTask = {
taskGroupID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
assigned?: Maybe<Array<Scalars['UUID']>>;
};
export type NewTaskGroup = {
projectID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
};
export type NewTaskGroupLocation = {
taskGroupID: Scalars['UUID'];
position: Scalars['Float'];
};
export type NewTaskLocation = {
taskID: Scalars['UUID'];
taskGroupID: Scalars['UUID'];
position: Scalars['Float'];
};
export type NewTeam = {
name: Scalars['String'];
organizationID: Scalars['UUID'];
};
export type NewUserAccount = {
username: Scalars['String'];
email: Scalars['String'];
fullName: Scalars['String'];
initials: Scalars['String'];
password: Scalars['String'];
roleCode: Scalars['String'];
};
export type Notification = {
__typename?: 'Notification';
id: Scalars['ID'];
actionType: ActionType;
causedBy?: Maybe<NotificationCausedBy>;
data: Array<NotificationData>;
createdAt: Scalars['Time'];
};
export type NotificationCausedBy = {
__typename?: 'NotificationCausedBy';
fullname: Scalars['String'];
username: Scalars['String'];
id: Scalars['ID'];
};
export type NotificationData = {
__typename?: 'NotificationData';
key: Scalars['String'];
value: Scalars['String'];
};
export enum NotificationFilter {
All = 'ALL',
Unread = 'UNREAD',
Assigned = 'ASSIGNED',
Mentioned = 'MENTIONED'
}
export type NotificationMarkAllAsReadResult = {
__typename?: 'NotificationMarkAllAsReadResult';
success: Scalars['Boolean'];
};
export type NotificationToggleReadInput = {
notifiedID: Scalars['UUID'];
};
export type Notified = {
__typename?: 'Notified';
id: Scalars['ID'];
notification: Notification;
read: Scalars['Boolean'];
readAt?: Maybe<Scalars['Time']>;
};
export type NotifiedInput = {
limit: Scalars['Int'];
cursor?: Maybe<Scalars['String']>;
filter: NotificationFilter;
};
export type NotifiedResult = {
__typename?: 'NotifiedResult';
totalCount: Scalars['Int'];
notified: Array<Notified>;
pageInfo: PageInfo;
};
export enum ObjectType {
Org = 'ORG',
Team = 'TEAM',
Project = 'PROJECT',
Task = 'TASK',
TaskGroup = 'TASK_GROUP',
TaskChecklist = 'TASK_CHECKLIST',
TaskChecklistItem = 'TASK_CHECKLIST_ITEM'
}
export type Organization = {
__typename?: 'Organization';
id: Scalars['ID'];
name: Scalars['String'];
};
export type OwnedList = {
__typename?: 'OwnedList';
teams: Array<Team>;
projects: Array<Project>;
};
export type OwnersList = {
__typename?: 'OwnersList';
projects: Array<Scalars['UUID']>;
teams: Array<Scalars['UUID']>;
};
export type PageInfo = {
__typename?: 'PageInfo';
endCursor?: Maybe<Scalars['String']>;
hasNextPage: Scalars['Boolean'];
};
export type ProfileIcon = {
__typename?: 'ProfileIcon';
url?: Maybe<Scalars['String']>;
initials?: Maybe<Scalars['String']>;
bgColor?: Maybe<Scalars['String']>;
};
export type Project = {
__typename?: 'Project';
id: Scalars['ID'];
shortId: Scalars['String'];
createdAt: Scalars['Time'];
name: Scalars['String'];
team?: Maybe<Team>;
taskGroups: Array<TaskGroup>;
members: Array<Member>;
invitedMembers: Array<InvitedMember>;
publicOn?: Maybe<Scalars['Time']>;
permission: ProjectPermission;
labels: Array<ProjectLabel>;
};
export type ProjectLabel = {
__typename?: 'ProjectLabel';
id: Scalars['ID'];
createdDate: Scalars['Time'];
labelColor: LabelColor;
name?: Maybe<Scalars['String']>;
};
export type ProjectPermission = {
__typename?: 'ProjectPermission';
team: RoleCode;
project: RoleCode;
org: RoleCode;
};
export type ProjectRole = {
__typename?: 'ProjectRole';
projectID: Scalars['UUID'];
roleCode: RoleCode;
};
export type ProjectTaskMapping = {
__typename?: 'ProjectTaskMapping';
projectID: Scalars['UUID'];
taskID: Scalars['UUID'];
};
export type ProjectsFilter = {
teamID?: Maybe<Scalars['UUID']>;
};
export type Query = {
__typename?: 'Query';
findProject: Project;
findTask: Task;
findTeam: Team;
findUser: UserAccount;
hasUnreadNotifications: HasUnreadNotificationsResult;
invitedUsers: Array<InvitedUserAccount>;
labelColors: Array<LabelColor>;
me?: Maybe<MePayload>;
myTasks: MyTasksPayload;
notifications: Array<Notified>;
notified: NotifiedResult;
organizations: Array<Organization>;
projects: Array<Project>;
searchMembers: Array<MemberSearchResult>;
taskGroups: Array<TaskGroup>;
teams: Array<Team>;
users: Array<UserAccount>;
};
export type QueryFindProjectArgs = {
input: FindProject;
};
export type QueryFindTaskArgs = {
input: FindTask;
};
export type QueryFindTeamArgs = {
input: FindTeam;
};
export type QueryFindUserArgs = {
input: FindUser;
};
export type QueryMyTasksArgs = {
input: MyTasks;
};
export type QueryNotifiedArgs = {
input: NotifiedInput;
};
export type QueryProjectsArgs = {
input?: Maybe<ProjectsFilter>;
};
export type QuerySearchMembersArgs = {
input: MemberSearchFilter;
};
export type RemoveTaskLabelInput = {
taskID: Scalars['UUID'];
taskLabelID: Scalars['UUID'];
};
export type Role = {
__typename?: 'Role';
code: Scalars['String'];
name: Scalars['String'];
};
export enum RoleCode {
Owner = 'owner',
Admin = 'admin',
Member = 'member',
Observer = 'observer'
}
export enum RoleLevel {
Admin = 'ADMIN',
Member = 'MEMBER'
}
export type SetTaskChecklistItemComplete = {
taskChecklistItemID: Scalars['UUID'];
complete: Scalars['Boolean'];
};
export type SetTaskComplete = {
taskID: Scalars['UUID'];
complete: Scalars['Boolean'];
};
export enum ShareStatus {
Invited = 'INVITED',
Joined = 'JOINED'
}
export type SortTaskGroup = {
taskGroupID: Scalars['UUID'];
tasks: Array<TaskPositionUpdate>;
};
export type SortTaskGroupPayload = {
__typename?: 'SortTaskGroupPayload';
taskGroupID: Scalars['UUID'];
tasks: Array<Task>;
};
export type Subscription = {
__typename?: 'Subscription';
notificationAdded: Notified;
};
export type Task = {
__typename?: 'Task';
id: Scalars['ID'];
shortId: Scalars['String'];
taskGroup: TaskGroup;
createdAt: Scalars['Time'];
name: Scalars['String'];
position: Scalars['Float'];
description?: Maybe<Scalars['String']>;
watched: Scalars['Boolean'];
dueDate: DueDate;
hasTime: Scalars['Boolean'];
complete: Scalars['Boolean'];
completedAt?: Maybe<Scalars['Time']>;
assigned: Array<Member>;
labels: Array<TaskLabel>;
checklists: Array<TaskChecklist>;
badges: TaskBadges;
activity: Array<TaskActivity>;
comments: Array<TaskComment>;
};
export type TaskActivity = {
__typename?: 'TaskActivity';
id: Scalars['ID'];
type: ActivityType;
data: Array<TaskActivityData>;
causedBy: CausedBy;
createdAt: Scalars['Time'];
};
export type TaskActivityData = {
__typename?: 'TaskActivityData';
name: Scalars['String'];
value: Scalars['String'];
};
export type TaskBadges = {
__typename?: 'TaskBadges';
checklist?: Maybe<ChecklistBadge>;
comments?: Maybe<CommentsBadge>;
};
export type TaskChecklist = {
__typename?: 'TaskChecklist';
id: Scalars['ID'];
name: Scalars['String'];
position: Scalars['Float'];
items: Array<TaskChecklistItem>;
};
export type TaskChecklistItem = {
__typename?: 'TaskChecklistItem';
id: Scalars['ID'];
name: Scalars['String'];
taskChecklistID: Scalars['UUID'];
complete: Scalars['Boolean'];
position: Scalars['Float'];
dueDate: Scalars['Time'];
};
export type TaskComment = {
__typename?: 'TaskComment';
id: Scalars['ID'];
createdAt: Scalars['Time'];
updatedAt?: Maybe<Scalars['Time']>;
message: Scalars['String'];
createdBy: CreatedBy;
pinned: Scalars['Boolean'];
};
export type TaskGroup = {
__typename?: 'TaskGroup';
id: Scalars['ID'];
projectID: Scalars['String'];
createdAt: Scalars['Time'];
name: Scalars['String'];
position: Scalars['Float'];
tasks: Array<Task>;
};
export type TaskLabel = {
__typename?: 'TaskLabel';
id: Scalars['ID'];
projectLabel: ProjectLabel;
assignedDate: Scalars['Time'];
};
export type TaskPositionUpdate = {
taskID: Scalars['UUID'];
position: Scalars['Float'];
};
export type Team = {
__typename?: 'Team';
id: Scalars['ID'];
createdAt: Scalars['Time'];
name: Scalars['String'];
permission: TeamPermission;
members: Array<Member>;
};
export type TeamPermission = {
__typename?: 'TeamPermission';
team: RoleCode;
org: RoleCode;
};
export type TeamRole = {
__typename?: 'TeamRole';
teamID: Scalars['UUID'];
roleCode: RoleCode;
};
export type ToggleProjectVisibility = {
projectID: Scalars['UUID'];
isPublic: Scalars['Boolean'];
};
export type ToggleProjectVisibilityPayload = {
__typename?: 'ToggleProjectVisibilityPayload';
project: Project;
};
export type ToggleTaskLabelInput = {
taskID: Scalars['UUID'];
projectLabelID: Scalars['UUID'];
};
export type ToggleTaskLabelPayload = {
__typename?: 'ToggleTaskLabelPayload';
active: Scalars['Boolean'];
task: Task;
};
export type ToggleTaskWatch = {
taskID: Scalars['UUID'];
};
export type UnassignTaskInput = {
taskID: Scalars['UUID'];
userID: Scalars['UUID'];
};
export type UpdateProjectLabel = {
projectLabelID: Scalars['UUID'];
labelColorID: Scalars['UUID'];
name: Scalars['String'];
};
export type UpdateProjectLabelColor = {
projectLabelID: Scalars['UUID'];
labelColorID: Scalars['UUID'];
};
export type UpdateProjectLabelName = {
projectLabelID: Scalars['UUID'];
name: Scalars['String'];
};
export type UpdateProjectMemberRole = {
projectID: Scalars['UUID'];
userID: Scalars['UUID'];
roleCode: RoleCode;
};
export type UpdateProjectMemberRolePayload = {
__typename?: 'UpdateProjectMemberRolePayload';
ok: Scalars['Boolean'];
member: Member;
};
export type UpdateProjectName = {
projectID: Scalars['UUID'];
name: Scalars['String'];
};
export type UpdateTaskChecklistItemLocation = {
taskChecklistID: Scalars['UUID'];
taskChecklistItemID: Scalars['UUID'];
position: Scalars['Float'];
};
export type UpdateTaskChecklistItemLocationPayload = {
__typename?: 'UpdateTaskChecklistItemLocationPayload';
taskChecklistID: Scalars['UUID'];
prevChecklistID: Scalars['UUID'];
checklistItem: TaskChecklistItem;
};
export type UpdateTaskChecklistItemName = {
taskChecklistItemID: Scalars['UUID'];
name: Scalars['String'];
};
export type UpdateTaskChecklistLocation = {
taskChecklistID: Scalars['UUID'];
position: Scalars['Float'];
};
export type UpdateTaskChecklistLocationPayload = {
__typename?: 'UpdateTaskChecklistLocationPayload';
checklist: TaskChecklist;
};
export type UpdateTaskChecklistName = {
taskChecklistID: Scalars['UUID'];
name: Scalars['String'];
};
export type UpdateTaskComment = {
commentID: Scalars['UUID'];
message: Scalars['String'];
};
export type UpdateTaskCommentPayload = {
__typename?: 'UpdateTaskCommentPayload';
taskID: Scalars['UUID'];
comment: TaskComment;
};
export type UpdateTaskDescriptionInput = {
taskID: Scalars['UUID'];
description: Scalars['String'];
};
export type UpdateTaskDueDate = {
taskID: Scalars['UUID'];
hasTime: Scalars['Boolean'];
dueDate?: Maybe<Scalars['Time']>;
};
export type UpdateTaskDueDateNotification = {
id: Scalars['UUID'];
period: Scalars['Int'];
duration: DueDateNotificationDuration;
};
export type UpdateTaskDueDateNotificationsResult = {
__typename?: 'UpdateTaskDueDateNotificationsResult';
notifications: Array<DueDateNotification>;
};
export type UpdateTaskGroupName = {
taskGroupID: Scalars['UUID'];
name: Scalars['String'];
};
export type UpdateTaskLocationPayload = {
__typename?: 'UpdateTaskLocationPayload';
previousTaskGroupID: Scalars['UUID'];
task: Task;
};
export type UpdateTaskName = {
taskID: Scalars['UUID'];
name: Scalars['String'];
};
export type UpdateTeamMemberRole = {
teamID: Scalars['UUID'];
userID: Scalars['UUID'];
roleCode: RoleCode;
};
export type UpdateTeamMemberRolePayload = {
__typename?: 'UpdateTeamMemberRolePayload';
ok: Scalars['Boolean'];
teamID: Scalars['UUID'];
member: Member;
};
export type UpdateUserInfo = {
name: Scalars['String'];
initials: Scalars['String'];
email: Scalars['String'];
bio: Scalars['String'];
};
export type UpdateUserInfoPayload = {
__typename?: 'UpdateUserInfoPayload';
user: UserAccount;
};
export type UpdateUserPassword = {
userID: Scalars['UUID'];
password: Scalars['String'];
};
export type UpdateUserPasswordPayload = {
__typename?: 'UpdateUserPasswordPayload';
ok: Scalars['Boolean'];
user: UserAccount;
};
export type UpdateUserRole = {
userID: Scalars['UUID'];
roleCode: RoleCode;
};
export type UpdateUserRolePayload = {
__typename?: 'UpdateUserRolePayload';
user: UserAccount;
};
export type UserAccount = {
__typename?: 'UserAccount';
id: Scalars['ID'];
email: Scalars['String'];
createdAt: Scalars['Time'];
fullName: Scalars['String'];
initials: Scalars['String'];
bio: Scalars['String'];
role: Role;
username: Scalars['String'];
profileIcon: ProfileIcon;
owned: OwnedList;
member: MemberList;
};
export type AssignTaskMutationVariables = Exact<{
taskID: Scalars['UUID'];
userID: Scalars['UUID'];
}>;
export type AssignTaskMutation = (
{ __typename?: 'Mutation' }
& { assignTask: (
{ __typename?: 'Task' }
& Pick<Task, 'id'>
& { assigned: Array<(
{ __typename?: 'Member' }
& Pick<Member, 'id' | 'fullName'>
)> }
) }
);
export type ClearProfileAvatarMutationVariables = Exact<{ [key: string]: never; }>;
export type ClearProfileAvatarMutation = (
{ __typename?: 'Mutation' }
& { clearProfileAvatar: (
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'fullName'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'initials' | 'bgColor' | 'url'>
) }
) }
);
export type CreateProjectMutationVariables = Exact<{
teamID?: Maybe<Scalars['UUID']>;
name: Scalars['String'];
}>;
export type CreateProjectMutation = (
{ __typename?: 'Mutation' }
& { createProject: (
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'shortId' | 'name'>
& { team?: Maybe<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)> }
) }
);
export type CreateProjectLabelMutationVariables = Exact<{
projectID: Scalars['UUID'];
labelColorID: Scalars['UUID'];
name: Scalars['String'];
}>;
export type CreateProjectLabelMutation = (
{ __typename?: 'Mutation' }
& { createProjectLabel: (
{ __typename?: 'ProjectLabel' }
& Pick<ProjectLabel, 'id' | 'createdDate' | 'name'>
& { labelColor: (
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'colorHex' | 'name' | 'position'>
) }
) }
);
export type CreateTaskGroupMutationVariables = Exact<{
projectID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
}>;
export type CreateTaskGroupMutation = (
{ __typename?: 'Mutation' }
& { createTaskGroup: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id' | 'name' | 'position'>
) }
);
export type DeleteProjectLabelMutationVariables = Exact<{
projectLabelID: Scalars['UUID'];
}>;
export type DeleteProjectLabelMutation = (
{ __typename?: 'Mutation' }
& { deleteProjectLabel: (
{ __typename?: 'ProjectLabel' }
& Pick<ProjectLabel, 'id'>
) }
);
export type DeleteTaskMutationVariables = Exact<{
taskID: Scalars['UUID'];
}>;
export type DeleteTaskMutation = (
{ __typename?: 'Mutation' }
& { deleteTask: (
{ __typename?: 'DeleteTaskPayload' }
& Pick<DeleteTaskPayload, 'taskID'>
) }
);
export type DeleteTaskGroupMutationVariables = Exact<{
taskGroupID: Scalars['UUID'];
}>;
export type DeleteTaskGroupMutation = (
{ __typename?: 'Mutation' }
& { deleteTaskGroup: (
{ __typename?: 'DeleteTaskGroupPayload' }
& Pick<DeleteTaskGroupPayload, 'ok' | 'affectedRows'>
& { taskGroup: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id'>
& { tasks: Array<(
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'name'>
)> }
) }
) }
);
export type FindProjectQueryVariables = Exact<{
projectID: Scalars['String'];
}>;
export type FindProjectQuery = (
{ __typename?: 'Query' }
& { findProject: (
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name' | 'publicOn'>
& { team?: Maybe<(
{ __typename?: 'Team' }
& Pick<Team, 'id'>
)>, members: Array<(
{ __typename?: 'Member' }
& Pick<Member, 'id' | 'fullName' | 'username'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
), profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
) }
)>, invitedMembers: Array<(
{ __typename?: 'InvitedMember' }
& Pick<InvitedMember, 'email' | 'invitedOn'>
)>, labels: Array<(
{ __typename?: 'ProjectLabel' }
& Pick<ProjectLabel, 'id' | 'createdDate' | 'name'>
& { labelColor: (
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'name' | 'colorHex' | 'position'>
) }
)>, taskGroups: Array<(
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id' | 'name' | 'position'>
& { tasks: Array<(
{ __typename?: 'Task' }
& TaskFieldsFragment
)> }
)> }
), labelColors: Array<(
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'position' | 'colorHex' | 'name'>
)>, users: Array<(
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'email' | 'fullName' | 'username'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
), profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
), owned: (
{ __typename?: 'OwnedList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
), member: (
{ __typename?: 'MemberList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
) }
)> }
);
export type FindTaskQueryVariables = Exact<{
taskID: Scalars['String'];
}>;
export type FindTaskQuery = (
{ __typename?: 'Query' }
& { findTask: (
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'shortId' | 'name' | 'watched' | 'description' | 'position' | 'complete' | 'hasTime'>
& { dueDate: (
{ __typename?: 'DueDate' }
& Pick<DueDate, 'at'>
& { notifications: Array<(
{ __typename?: 'DueDateNotification' }
& Pick<DueDateNotification, 'id' | 'period' | 'duration'>
)> }
), taskGroup: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id' | 'name'>
), comments: Array<(
{ __typename?: 'TaskComment' }
& Pick<TaskComment, 'id' | 'pinned' | 'message' | 'createdAt' | 'updatedAt'>
& { createdBy: (
{ __typename?: 'CreatedBy' }
& Pick<CreatedBy, 'id' | 'fullName'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'initials' | 'bgColor' | 'url'>
) }
) }
)>, activity: Array<(
{ __typename?: 'TaskActivity' }
& Pick<TaskActivity, 'id' | 'type' | 'createdAt'>
& { causedBy: (
{ __typename?: 'CausedBy' }
& Pick<CausedBy, 'id' | 'fullName'>
& { profileIcon?: Maybe<(
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'initials' | 'bgColor' | 'url'>
)> }
), data: Array<(
{ __typename?: 'TaskActivityData' }
& Pick<TaskActivityData, 'name' | 'value'>
)> }
)>, badges: (
{ __typename?: 'TaskBadges' }
& { checklist?: Maybe<(
{ __typename?: 'ChecklistBadge' }
& Pick<ChecklistBadge, 'total' | 'complete'>
)> }
), checklists: Array<(
{ __typename?: 'TaskChecklist' }
& Pick<TaskChecklist, 'id' | 'name' | 'position'>
& { items: Array<(
{ __typename?: 'TaskChecklistItem' }
& Pick<TaskChecklistItem, 'id' | 'name' | 'taskChecklistID' | 'complete' | 'position'>
)> }
)>, labels: Array<(
{ __typename?: 'TaskLabel' }
& Pick<TaskLabel, 'id' | 'assignedDate'>
& { projectLabel: (
{ __typename?: 'ProjectLabel' }
& Pick<ProjectLabel, 'id' | 'name' | 'createdDate'>
& { labelColor: (
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'colorHex' | 'position' | 'name'>
) }
) }
)>, assigned: Array<(
{ __typename?: 'Member' }
& Pick<Member, 'id' | 'fullName'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
) }
)> }
), me?: Maybe<(
{ __typename?: 'MePayload' }
& { user: (
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'fullName'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'initials' | 'bgColor' | 'url'>
) }
) }
)> }
);
export type TaskFieldsFragment = (
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'shortId' | 'name' | 'description' | 'hasTime' | 'complete' | 'watched' | 'completedAt' | 'position'>
& { dueDate: (
{ __typename?: 'DueDate' }
& Pick<DueDate, 'at'>
), badges: (
{ __typename?: 'TaskBadges' }
& { checklist?: Maybe<(
{ __typename?: 'ChecklistBadge' }
& Pick<ChecklistBadge, 'complete' | 'total'>
)>, comments?: Maybe<(
{ __typename?: 'CommentsBadge' }
& Pick<CommentsBadge, 'unread' | 'total'>
)> }
), taskGroup: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id' | 'name' | 'position'>
), labels: Array<(
{ __typename?: 'TaskLabel' }
& Pick<TaskLabel, 'id' | 'assignedDate'>
& { projectLabel: (
{ __typename?: 'ProjectLabel' }
& Pick<ProjectLabel, 'id' | 'name' | 'createdDate'>
& { labelColor: (
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'colorHex' | 'position' | 'name'>
) }
) }
)>, assigned: Array<(
{ __typename?: 'Member' }
& Pick<Member, 'id' | 'fullName'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
) }
)> }
);
export type GetProjectsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetProjectsQuery = (
{ __typename?: 'Query' }
& { organizations: Array<(
{ __typename?: 'Organization' }
& Pick<Organization, 'id' | 'name'>
)>, teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name' | 'createdAt'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'shortId' | 'name'>
& { team?: Maybe<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)> }
)> }
);
export type LabelsQueryVariables = Exact<{
projectID: Scalars['UUID'];
}>;
export type LabelsQuery = (
{ __typename?: 'Query' }
& { findProject: (
{ __typename?: 'Project' }
& { labels: Array<(
{ __typename?: 'ProjectLabel' }
& Pick<ProjectLabel, 'id' | 'createdDate' | 'name'>
& { labelColor: (
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'name' | 'colorHex' | 'position'>
) }
)> }
), labelColors: Array<(
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'position' | 'colorHex' | 'name'>
)> }
);
export type MeQueryVariables = Exact<{ [key: string]: never; }>;
export type MeQuery = (
{ __typename?: 'Query' }
& { me?: Maybe<(
{ __typename?: 'MePayload' }
& { user: (
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'fullName' | 'username' | 'email' | 'bio'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'initials' | 'bgColor' | 'url'>
) }
), teamRoles: Array<(
{ __typename?: 'TeamRole' }
& Pick<TeamRole, 'teamID' | 'roleCode'>
)>, projectRoles: Array<(
{ __typename?: 'ProjectRole' }
& Pick<ProjectRole, 'projectID' | 'roleCode'>
)> }
)> }
);
export type MyTasksQueryVariables = Exact<{
status: MyTasksStatus;
sort: MyTasksSort;
}>;
export type MyTasksQuery = (
{ __typename?: 'Query' }
& { projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)>, myTasks: (
{ __typename?: 'MyTasksPayload' }
& { tasks: Array<(
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'shortId' | 'name' | 'hasTime' | 'complete' | 'completedAt'>
& { taskGroup: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id' | 'name'>
), dueDate: (
{ __typename?: 'DueDate' }
& Pick<DueDate, 'at'>
) }
)>, projects: Array<(
{ __typename?: 'ProjectTaskMapping' }
& Pick<ProjectTaskMapping, 'projectID' | 'taskID'>
)> }
) }
);
export type NotificationToggleReadMutationVariables = Exact<{
notifiedID: Scalars['UUID'];
}>;
export type NotificationToggleReadMutation = (
{ __typename?: 'Mutation' }
& { notificationToggleRead: (
{ __typename?: 'Notified' }
& Pick<Notified, 'id' | 'read' | 'readAt'>
) }
);
export type NotificationsQueryVariables = Exact<{
limit: Scalars['Int'];
cursor?: Maybe<Scalars['String']>;
filter: NotificationFilter;
}>;
export type NotificationsQuery = (
{ __typename?: 'Query' }
& { notified: (
{ __typename?: 'NotifiedResult' }
& Pick<NotifiedResult, 'totalCount'>
& { pageInfo: (
{ __typename?: 'PageInfo' }
& Pick<PageInfo, 'endCursor' | 'hasNextPage'>
), notified: Array<(
{ __typename?: 'Notified' }
& Pick<Notified, 'id' | 'read' | 'readAt'>
& { notification: (
{ __typename?: 'Notification' }
& Pick<Notification, 'id' | 'actionType' | 'createdAt'>
& { data: Array<(
{ __typename?: 'NotificationData' }
& Pick<NotificationData, 'key' | 'value'>
)>, causedBy?: Maybe<(
{ __typename?: 'NotificationCausedBy' }
& Pick<NotificationCausedBy, 'username' | 'fullname' | 'id'>
)> }
) }
)> }
) }
);
export type NotificationMarkAllReadMutationVariables = Exact<{ [key: string]: never; }>;
export type NotificationMarkAllReadMutation = (
{ __typename?: 'Mutation' }
& { notificationMarkAllRead: (
{ __typename?: 'NotificationMarkAllAsReadResult' }
& Pick<NotificationMarkAllAsReadResult, 'success'>
) }
);
export type NotificationAddedSubscriptionVariables = Exact<{ [key: string]: never; }>;
export type NotificationAddedSubscription = (
{ __typename?: 'Subscription' }
& { notificationAdded: (
{ __typename?: 'Notified' }
& Pick<Notified, 'id' | 'read' | 'readAt'>
& { notification: (
{ __typename?: 'Notification' }
& Pick<Notification, 'id' | 'actionType' | 'createdAt'>
& { data: Array<(
{ __typename?: 'NotificationData' }
& Pick<NotificationData, 'key' | 'value'>
)>, causedBy?: Maybe<(
{ __typename?: 'NotificationCausedBy' }
& Pick<NotificationCausedBy, 'username' | 'fullname' | 'id'>
)> }
) }
) }
);
export type DeleteProjectMutationVariables = Exact<{
projectID: Scalars['UUID'];
}>;
export type DeleteProjectMutation = (
{ __typename?: 'Mutation' }
& { deleteProject: (
{ __typename?: 'DeleteProjectPayload' }
& Pick<DeleteProjectPayload, 'ok'>
& { project: (
{ __typename?: 'Project' }
& Pick<Project, 'id'>
) }
) }
);
export type DeleteInvitedProjectMemberMutationVariables = Exact<{
projectID: Scalars['UUID'];
email: Scalars['String'];
}>;
export type DeleteInvitedProjectMemberMutation = (
{ __typename?: 'Mutation' }
& { deleteInvitedProjectMember: (
{ __typename?: 'DeleteInvitedProjectMemberPayload' }
& { invitedMember: (
{ __typename?: 'InvitedMember' }
& Pick<InvitedMember, 'email'>
) }
) }
);
export type DeleteProjectMemberMutationVariables = Exact<{
projectID: Scalars['UUID'];
userID: Scalars['UUID'];
}>;
export type DeleteProjectMemberMutation = (
{ __typename?: 'Mutation' }
& { deleteProjectMember: (
{ __typename?: 'DeleteProjectMemberPayload' }
& Pick<DeleteProjectMemberPayload, 'ok' | 'projectID'>
& { member: (
{ __typename?: 'Member' }
& Pick<Member, 'id'>
) }
) }
);
export type InviteProjectMembersMutationVariables = Exact<{
projectID: Scalars['UUID'];
members: Array<MemberInvite> | MemberInvite;
}>;
export type InviteProjectMembersMutation = (
{ __typename?: 'Mutation' }
& { inviteProjectMembers: (
{ __typename?: 'InviteProjectMembersPayload' }
& Pick<InviteProjectMembersPayload, 'ok'>
& { invitedMembers: Array<(
{ __typename?: 'InvitedMember' }
& Pick<InvitedMember, 'email' | 'invitedOn'>
)>, members: Array<(
{ __typename?: 'Member' }
& Pick<Member, 'id' | 'fullName' | 'username'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
), role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
) }
)> }
) }
);
export type UpdateProjectMemberRoleMutationVariables = Exact<{
projectID: Scalars['UUID'];
userID: Scalars['UUID'];
roleCode: RoleCode;
}>;
export type UpdateProjectMemberRoleMutation = (
{ __typename?: 'Mutation' }
& { updateProjectMemberRole: (
{ __typename?: 'UpdateProjectMemberRolePayload' }
& Pick<UpdateProjectMemberRolePayload, 'ok'>
& { member: (
{ __typename?: 'Member' }
& Pick<Member, 'id'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
) }
) }
) }
);
export type CreateTaskMutationVariables = Exact<{
taskGroupID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
assigned?: Maybe<Array<Scalars['UUID']> | Scalars['UUID']>;
}>;
export type CreateTaskMutation = (
{ __typename?: 'Mutation' }
& { createTask: (
{ __typename?: 'Task' }
& TaskFieldsFragment
) }
);
export type CreateTaskChecklistMutationVariables = Exact<{
taskID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
}>;
export type CreateTaskChecklistMutation = (
{ __typename?: 'Mutation' }
& { createTaskChecklist: (
{ __typename?: 'TaskChecklist' }
& Pick<TaskChecklist, 'id' | 'name' | 'position'>
& { items: Array<(
{ __typename?: 'TaskChecklistItem' }
& Pick<TaskChecklistItem, 'id' | 'name' | 'taskChecklistID' | 'complete' | 'position'>
)> }
) }
);
export type CreateTaskChecklistItemMutationVariables = Exact<{
taskChecklistID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
}>;
export type CreateTaskChecklistItemMutation = (
{ __typename?: 'Mutation' }
& { createTaskChecklistItem: (
{ __typename?: 'TaskChecklistItem' }
& Pick<TaskChecklistItem, 'id' | 'name' | 'taskChecklistID' | 'position' | 'complete'>
) }
);
export type CreateTaskCommentMutationVariables = Exact<{
taskID: Scalars['UUID'];
message: Scalars['String'];
}>;
export type CreateTaskCommentMutation = (
{ __typename?: 'Mutation' }
& { createTaskComment: (
{ __typename?: 'CreateTaskCommentPayload' }
& Pick<CreateTaskCommentPayload, 'taskID'>
& { comment: (
{ __typename?: 'TaskComment' }
& Pick<TaskComment, 'id' | 'message' | 'pinned' | 'createdAt' | 'updatedAt'>
& { createdBy: (
{ __typename?: 'CreatedBy' }
& Pick<CreatedBy, 'id' | 'fullName'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'initials' | 'bgColor' | 'url'>
) }
) }
) }
) }
);
export type DeleteTaskChecklistMutationVariables = Exact<{
taskChecklistID: Scalars['UUID'];
}>;
export type DeleteTaskChecklistMutation = (
{ __typename?: 'Mutation' }
& { deleteTaskChecklist: (
{ __typename?: 'DeleteTaskChecklistPayload' }
& Pick<DeleteTaskChecklistPayload, 'ok'>
& { taskChecklist: (
{ __typename?: 'TaskChecklist' }
& Pick<TaskChecklist, 'id'>
) }
) }
);
export type DeleteTaskChecklistItemMutationVariables = Exact<{
taskChecklistItemID: Scalars['UUID'];
}>;
export type DeleteTaskChecklistItemMutation = (
{ __typename?: 'Mutation' }
& { deleteTaskChecklistItem: (
{ __typename?: 'DeleteTaskChecklistItemPayload' }
& Pick<DeleteTaskChecklistItemPayload, 'ok'>
& { taskChecklistItem: (
{ __typename?: 'TaskChecklistItem' }
& Pick<TaskChecklistItem, 'id' | 'taskChecklistID'>
) }
) }
);
export type DeleteTaskCommentMutationVariables = Exact<{
commentID: Scalars['UUID'];
}>;
export type DeleteTaskCommentMutation = (
{ __typename?: 'Mutation' }
& { deleteTaskComment: (
{ __typename?: 'DeleteTaskCommentPayload' }
& Pick<DeleteTaskCommentPayload, 'commentID'>
) }
);
export type SetTaskChecklistItemCompleteMutationVariables = Exact<{
taskChecklistItemID: Scalars['UUID'];
complete: Scalars['Boolean'];
}>;
export type SetTaskChecklistItemCompleteMutation = (
{ __typename?: 'Mutation' }
& { setTaskChecklistItemComplete: (
{ __typename?: 'TaskChecklistItem' }
& Pick<TaskChecklistItem, 'id' | 'complete'>
) }
);
export type SetTaskCompleteMutationVariables = Exact<{
taskID: Scalars['UUID'];
complete: Scalars['Boolean'];
}>;
export type SetTaskCompleteMutation = (
{ __typename?: 'Mutation' }
& { setTaskComplete: (
{ __typename?: 'Task' }
& TaskFieldsFragment
) }
);
export type ToggleTaskWatchMutationVariables = Exact<{
taskID: Scalars['UUID'];
}>;
export type ToggleTaskWatchMutation = (
{ __typename?: 'Mutation' }
& { toggleTaskWatch: (
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'watched'>
) }
);
export type UpdateTaskChecklistItemLocationMutationVariables = Exact<{
taskChecklistID: Scalars['UUID'];
taskChecklistItemID: Scalars['UUID'];
position: Scalars['Float'];
}>;
export type UpdateTaskChecklistItemLocationMutation = (
{ __typename?: 'Mutation' }
& { updateTaskChecklistItemLocation: (
{ __typename?: 'UpdateTaskChecklistItemLocationPayload' }
& Pick<UpdateTaskChecklistItemLocationPayload, 'taskChecklistID' | 'prevChecklistID'>
& { checklistItem: (
{ __typename?: 'TaskChecklistItem' }
& Pick<TaskChecklistItem, 'id' | 'taskChecklistID' | 'position'>
) }
) }
);
export type UpdateTaskChecklistItemNameMutationVariables = Exact<{
taskChecklistItemID: Scalars['UUID'];
name: Scalars['String'];
}>;
export type UpdateTaskChecklistItemNameMutation = (
{ __typename?: 'Mutation' }
& { updateTaskChecklistItemName: (
{ __typename?: 'TaskChecklistItem' }
& Pick<TaskChecklistItem, 'id' | 'name'>
) }
);
export type UpdateTaskChecklistLocationMutationVariables = Exact<{
taskChecklistID: Scalars['UUID'];
position: Scalars['Float'];
}>;
export type UpdateTaskChecklistLocationMutation = (
{ __typename?: 'Mutation' }
& { updateTaskChecklistLocation: (
{ __typename?: 'UpdateTaskChecklistLocationPayload' }
& { checklist: (
{ __typename?: 'TaskChecklist' }
& Pick<TaskChecklist, 'id' | 'position'>
) }
) }
);
export type UpdateTaskChecklistNameMutationVariables = Exact<{
taskChecklistID: Scalars['UUID'];
name: Scalars['String'];
}>;
export type UpdateTaskChecklistNameMutation = (
{ __typename?: 'Mutation' }
& { updateTaskChecklistName: (
{ __typename?: 'TaskChecklist' }
& Pick<TaskChecklist, 'id' | 'name' | 'position'>
& { items: Array<(
{ __typename?: 'TaskChecklistItem' }
& Pick<TaskChecklistItem, 'id' | 'name' | 'taskChecklistID' | 'complete' | 'position'>
)> }
) }
);
export type UpdateTaskCommentMutationVariables = Exact<{
commentID: Scalars['UUID'];
message: Scalars['String'];
}>;
export type UpdateTaskCommentMutation = (
{ __typename?: 'Mutation' }
& { updateTaskComment: (
{ __typename?: 'UpdateTaskCommentPayload' }
& { comment: (
{ __typename?: 'TaskComment' }
& Pick<TaskComment, 'id' | 'updatedAt' | 'message'>
) }
) }
);
export type DeleteTaskGroupTasksMutationVariables = Exact<{
taskGroupID: Scalars['UUID'];
}>;
export type DeleteTaskGroupTasksMutation = (
{ __typename?: 'Mutation' }
& { deleteTaskGroupTasks: (
{ __typename?: 'DeleteTaskGroupTasksPayload' }
& Pick<DeleteTaskGroupTasksPayload, 'tasks' | 'taskGroupID'>
) }
);
export type DuplicateTaskGroupMutationVariables = Exact<{
taskGroupID: Scalars['UUID'];
name: Scalars['String'];
position: Scalars['Float'];
projectID: Scalars['UUID'];
}>;
export type DuplicateTaskGroupMutation = (
{ __typename?: 'Mutation' }
& { duplicateTaskGroup: (
{ __typename?: 'DuplicateTaskGroupPayload' }
& { taskGroup: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id' | 'name' | 'position'>
& { tasks: Array<(
{ __typename?: 'Task' }
& TaskFieldsFragment
)> }
) }
) }
);
export type SortTaskGroupMutationVariables = Exact<{
tasks: Array<TaskPositionUpdate> | TaskPositionUpdate;
taskGroupID: Scalars['UUID'];
}>;
export type SortTaskGroupMutation = (
{ __typename?: 'Mutation' }
& { sortTaskGroup: (
{ __typename?: 'SortTaskGroupPayload' }
& Pick<SortTaskGroupPayload, 'taskGroupID'>
& { tasks: Array<(
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'position'>
)> }
) }
);
export type UpdateTaskGroupNameMutationVariables = Exact<{
taskGroupID: Scalars['UUID'];
name: Scalars['String'];
}>;
export type UpdateTaskGroupNameMutation = (
{ __typename?: 'Mutation' }
& { updateTaskGroupName: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id' | 'name'>
) }
);
export type CreateTeamMutationVariables = Exact<{
name: Scalars['String'];
organizationID: Scalars['UUID'];
}>;
export type CreateTeamMutation = (
{ __typename?: 'Mutation' }
& { createTeam: (
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'createdAt' | 'name'>
) }
);
export type CreateTeamMemberMutationVariables = Exact<{
userID: Scalars['UUID'];
teamID: Scalars['UUID'];
}>;
export type CreateTeamMemberMutation = (
{ __typename?: 'Mutation' }
& { createTeamMember: (
{ __typename?: 'CreateTeamMemberPayload' }
& { team: (
{ __typename?: 'Team' }
& Pick<Team, 'id'>
), teamMember: (
{ __typename?: 'Member' }
& Pick<Member, 'id' | 'username' | 'fullName'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
), profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
) }
) }
) }
);
export type DeleteTeamMutationVariables = Exact<{
teamID: Scalars['UUID'];
}>;
export type DeleteTeamMutation = (
{ __typename?: 'Mutation' }
& { deleteTeam: (
{ __typename?: 'DeleteTeamPayload' }
& Pick<DeleteTeamPayload, 'ok'>
& { team: (
{ __typename?: 'Team' }
& Pick<Team, 'id'>
) }
) }
);
export type DeleteTeamMemberMutationVariables = Exact<{
teamID: Scalars['UUID'];
userID: Scalars['UUID'];
newOwnerID?: Maybe<Scalars['UUID']>;
}>;
export type DeleteTeamMemberMutation = (
{ __typename?: 'Mutation' }
& { deleteTeamMember: (
{ __typename?: 'DeleteTeamMemberPayload' }
& Pick<DeleteTeamMemberPayload, 'teamID' | 'userID'>
) }
);
export type GetTeamQueryVariables = Exact<{
teamID: Scalars['UUID'];
}>;
export type GetTeamQuery = (
{ __typename?: 'Query' }
& { findTeam: (
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'createdAt' | 'name'>
& { members: Array<(
{ __typename?: 'Member' }
& Pick<Member, 'id' | 'fullName' | 'username'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
), profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
), owned: (
{ __typename?: 'OwnedList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
), member: (
{ __typename?: 'MemberList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
) }
)> }
), projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
& { team?: Maybe<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)> }
)>, users: Array<(
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'email' | 'fullName' | 'username'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
), profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
), owned: (
{ __typename?: 'OwnedList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
), member: (
{ __typename?: 'MemberList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
) }
)> }
);
export type UpdateTeamMemberRoleMutationVariables = Exact<{
teamID: Scalars['UUID'];
userID: Scalars['UUID'];
roleCode: RoleCode;
}>;
export type UpdateTeamMemberRoleMutation = (
{ __typename?: 'Mutation' }
& { updateTeamMemberRole: (
{ __typename?: 'UpdateTeamMemberRolePayload' }
& Pick<UpdateTeamMemberRolePayload, 'teamID'>
& { member: (
{ __typename?: 'Member' }
& Pick<Member, 'id'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
) }
) }
) }
);
export type ToggleProjectVisibilityMutationVariables = Exact<{
projectID: Scalars['UUID'];
isPublic: Scalars['Boolean'];
}>;
export type ToggleProjectVisibilityMutation = (
{ __typename?: 'Mutation' }
& { toggleProjectVisibility: (
{ __typename?: 'ToggleProjectVisibilityPayload' }
& { project: (
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'publicOn'>
) }
) }
);
export type ToggleTaskLabelMutationVariables = Exact<{
taskID: Scalars['UUID'];
projectLabelID: Scalars['UUID'];
}>;
export type ToggleTaskLabelMutation = (
{ __typename?: 'Mutation' }
& { toggleTaskLabel: (
{ __typename?: 'ToggleTaskLabelPayload' }
& Pick<ToggleTaskLabelPayload, 'active'>
& { task: (
{ __typename?: 'Task' }
& Pick<Task, 'id'>
& { labels: Array<(
{ __typename?: 'TaskLabel' }
& Pick<TaskLabel, 'id' | 'assignedDate'>
& { projectLabel: (
{ __typename?: 'ProjectLabel' }
& Pick<ProjectLabel, 'id' | 'createdDate' | 'name'>
& { labelColor: (
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'colorHex' | 'name' | 'position'>
) }
) }
)> }
) }
) }
);
export type TopNavbarQueryVariables = Exact<{ [key: string]: never; }>;
export type TopNavbarQuery = (
{ __typename?: 'Query' }
& { notifications: Array<(
{ __typename?: 'Notified' }
& Pick<Notified, 'id' | 'read' | 'readAt'>
& { notification: (
{ __typename?: 'Notification' }
& Pick<Notification, 'id' | 'actionType' | 'createdAt'>
& { causedBy?: Maybe<(
{ __typename?: 'NotificationCausedBy' }
& Pick<NotificationCausedBy, 'username' | 'fullname' | 'id'>
)> }
) }
)>, me?: Maybe<(
{ __typename?: 'MePayload' }
& { user: (
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'fullName'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'initials' | 'bgColor' | 'url'>
) }
), teamRoles: Array<(
{ __typename?: 'TeamRole' }
& Pick<TeamRole, 'teamID' | 'roleCode'>
)>, projectRoles: Array<(
{ __typename?: 'ProjectRole' }
& Pick<ProjectRole, 'projectID' | 'roleCode'>
)> }
)> }
);
export type UnassignTaskMutationVariables = Exact<{
taskID: Scalars['UUID'];
userID: Scalars['UUID'];
}>;
export type UnassignTaskMutation = (
{ __typename?: 'Mutation' }
& { unassignTask: (
{ __typename?: 'Task' }
& Pick<Task, 'id'>
& { assigned: Array<(
{ __typename?: 'Member' }
& Pick<Member, 'id' | 'fullName'>
)> }
) }
);
export type HasUnreadNotificationsQueryVariables = Exact<{ [key: string]: never; }>;
export type HasUnreadNotificationsQuery = (
{ __typename?: 'Query' }
& { hasUnreadNotifications: (
{ __typename?: 'HasUnreadNotificationsResult' }
& Pick<HasUnreadNotificationsResult, 'unread'>
) }
);
export type UpdateProjectLabelMutationVariables = Exact<{
projectLabelID: Scalars['UUID'];
labelColorID: Scalars['UUID'];
name: Scalars['String'];
}>;
export type UpdateProjectLabelMutation = (
{ __typename?: 'Mutation' }
& { updateProjectLabel: (
{ __typename?: 'ProjectLabel' }
& Pick<ProjectLabel, 'id' | 'createdDate' | 'name'>
& { labelColor: (
{ __typename?: 'LabelColor' }
& Pick<LabelColor, 'id' | 'colorHex' | 'name' | 'position'>
) }
) }
);
export type UpdateProjectNameMutationVariables = Exact<{
projectID: Scalars['UUID'];
name: Scalars['String'];
}>;
export type UpdateProjectNameMutation = (
{ __typename?: 'Mutation' }
& { updateProjectName: (
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
) }
);
export type UpdateTaskDescriptionMutationVariables = Exact<{
taskID: Scalars['UUID'];
description: Scalars['String'];
}>;
export type UpdateTaskDescriptionMutation = (
{ __typename?: 'Mutation' }
& { updateTaskDescription: (
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'description'>
) }
);
export type UpdateTaskDueDateMutationVariables = Exact<{
taskID: Scalars['UUID'];
dueDate?: Maybe<Scalars['Time']>;
hasTime: Scalars['Boolean'];
createNotifications: Array<CreateTaskDueDateNotification> | CreateTaskDueDateNotification;
updateNotifications: Array<UpdateTaskDueDateNotification> | UpdateTaskDueDateNotification;
deleteNotifications: Array<DeleteTaskDueDateNotification> | DeleteTaskDueDateNotification;
}>;
export type UpdateTaskDueDateMutation = (
{ __typename?: 'Mutation' }
& { updateTaskDueDate: (
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'hasTime'>
& { dueDate: (
{ __typename?: 'DueDate' }
& Pick<DueDate, 'at'>
) }
), createTaskDueDateNotifications: (
{ __typename?: 'CreateTaskDueDateNotificationsResult' }
& { notifications: Array<(
{ __typename?: 'DueDateNotification' }
& Pick<DueDateNotification, 'id' | 'period' | 'duration'>
)> }
), updateTaskDueDateNotifications: (
{ __typename?: 'UpdateTaskDueDateNotificationsResult' }
& { notifications: Array<(
{ __typename?: 'DueDateNotification' }
& Pick<DueDateNotification, 'id' | 'period' | 'duration'>
)> }
), deleteTaskDueDateNotifications: (
{ __typename?: 'DeleteTaskDueDateNotificationsResult' }
& Pick<DeleteTaskDueDateNotificationsResult, 'notifications'>
) }
);
export type UpdateTaskGroupLocationMutationVariables = Exact<{
taskGroupID: Scalars['UUID'];
position: Scalars['Float'];
}>;
export type UpdateTaskGroupLocationMutation = (
{ __typename?: 'Mutation' }
& { updateTaskGroupLocation: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id' | 'position'>
) }
);
export type UpdateTaskLocationMutationVariables = Exact<{
taskID: Scalars['UUID'];
taskGroupID: Scalars['UUID'];
position: Scalars['Float'];
}>;
export type UpdateTaskLocationMutation = (
{ __typename?: 'Mutation' }
& { updateTaskLocation: (
{ __typename?: 'UpdateTaskLocationPayload' }
& Pick<UpdateTaskLocationPayload, 'previousTaskGroupID'>
& { task: (
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'createdAt' | 'name' | 'position'>
& { taskGroup: (
{ __typename?: 'TaskGroup' }
& Pick<TaskGroup, 'id'>
) }
) }
) }
);
export type UpdateTaskNameMutationVariables = Exact<{
taskID: Scalars['UUID'];
name: Scalars['String'];
}>;
export type UpdateTaskNameMutation = (
{ __typename?: 'Mutation' }
& { updateTaskName: (
{ __typename?: 'Task' }
& Pick<Task, 'id' | 'name' | 'position'>
) }
);
export type CreateUserAccountMutationVariables = Exact<{
username: Scalars['String'];
roleCode: Scalars['String'];
email: Scalars['String'];
fullName: Scalars['String'];
initials: Scalars['String'];
password: Scalars['String'];
}>;
export type CreateUserAccountMutation = (
{ __typename?: 'Mutation' }
& { createUserAccount: (
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'email' | 'fullName' | 'initials' | 'username' | 'bio'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
), role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
), owned: (
{ __typename?: 'OwnedList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
), member: (
{ __typename?: 'MemberList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
) }
) }
);
export type DeleteInvitedUserAccountMutationVariables = Exact<{
invitedUserID: Scalars['UUID'];
}>;
export type DeleteInvitedUserAccountMutation = (
{ __typename?: 'Mutation' }
& { deleteInvitedUserAccount: (
{ __typename?: 'DeleteInvitedUserAccountPayload' }
& { invitedUser: (
{ __typename?: 'InvitedUserAccount' }
& Pick<InvitedUserAccount, 'id'>
) }
) }
);
export type DeleteUserAccountMutationVariables = Exact<{
userID: Scalars['UUID'];
newOwnerID?: Maybe<Scalars['UUID']>;
}>;
export type DeleteUserAccountMutation = (
{ __typename?: 'Mutation' }
& { deleteUserAccount: (
{ __typename?: 'DeleteUserAccountPayload' }
& Pick<DeleteUserAccountPayload, 'ok'>
& { userAccount: (
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id'>
) }
) }
);
export type UpdateUserInfoMutationVariables = Exact<{
name: Scalars['String'];
initials: Scalars['String'];
email: Scalars['String'];
bio: Scalars['String'];
}>;
export type UpdateUserInfoMutation = (
{ __typename?: 'Mutation' }
& { updateUserInfo: (
{ __typename?: 'UpdateUserInfoPayload' }
& { user: (
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'email' | 'fullName' | 'bio'>
& { profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'initials'>
) }
) }
) }
);
export type UpdateUserPasswordMutationVariables = Exact<{
userID: Scalars['UUID'];
password: Scalars['String'];
}>;
export type UpdateUserPasswordMutation = (
{ __typename?: 'Mutation' }
& { updateUserPassword: (
{ __typename?: 'UpdateUserPasswordPayload' }
& Pick<UpdateUserPasswordPayload, 'ok'>
) }
);
export type UpdateUserRoleMutationVariables = Exact<{
userID: Scalars['UUID'];
roleCode: RoleCode;
}>;
export type UpdateUserRoleMutation = (
{ __typename?: 'Mutation' }
& { updateUserRole: (
{ __typename?: 'UpdateUserRolePayload' }
& { user: (
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
) }
) }
) }
);
export type UsersQueryVariables = Exact<{ [key: string]: never; }>;
export type UsersQuery = (
{ __typename?: 'Query' }
& { invitedUsers: Array<(
{ __typename?: 'InvitedUserAccount' }
& Pick<InvitedUserAccount, 'id' | 'email' | 'invitedOn'>
)>, users: Array<(
{ __typename?: 'UserAccount' }
& Pick<UserAccount, 'id' | 'email' | 'fullName' | 'username'>
& { role: (
{ __typename?: 'Role' }
& Pick<Role, 'code' | 'name'>
), profileIcon: (
{ __typename?: 'ProfileIcon' }
& Pick<ProfileIcon, 'url' | 'initials' | 'bgColor'>
), owned: (
{ __typename?: 'OwnedList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
), member: (
{ __typename?: 'MemberList' }
& { teams: Array<(
{ __typename?: 'Team' }
& Pick<Team, 'id' | 'name'>
)>, projects: Array<(
{ __typename?: 'Project' }
& Pick<Project, 'id' | 'name'>
)> }
) }
)> }
);
export const TaskFieldsFragmentDoc = gql`
fragment TaskFields on Task {
id
shortId
name
description
dueDate {
at
}
hasTime
complete
watched
completedAt
position
badges {
checklist {
complete
total
}
comments {
unread
total
}
}
taskGroup {
id
name
position
}
labels {
id
assignedDate
projectLabel {
id
name
createdDate
labelColor {
id
colorHex
position
name
}
}
}
assigned {
id
fullName
profileIcon {
url
initials
bgColor
}
}
}
`;
export const AssignTaskDocument = gql`
mutation assignTask($taskID: UUID!, $userID: UUID!) {
assignTask(input: {taskID: $taskID, userID: $userID}) {
id
assigned {
id
fullName
}
}
}
`;
export type AssignTaskMutationFn = Apollo.MutationFunction<AssignTaskMutation, AssignTaskMutationVariables>;
/**
* __useAssignTaskMutation__
*
* To run a mutation, you first call `useAssignTaskMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useAssignTaskMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [assignTaskMutation, { data, loading, error }] = useAssignTaskMutation({
* variables: {
* taskID: // value for 'taskID'
* userID: // value for 'userID'
* },
* });
*/
export function useAssignTaskMutation(baseOptions?: Apollo.MutationHookOptions<AssignTaskMutation, AssignTaskMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<AssignTaskMutation, AssignTaskMutationVariables>(AssignTaskDocument, options);
}
export type AssignTaskMutationHookResult = ReturnType<typeof useAssignTaskMutation>;
export type AssignTaskMutationResult = Apollo.MutationResult<AssignTaskMutation>;
export type AssignTaskMutationOptions = Apollo.BaseMutationOptions<AssignTaskMutation, AssignTaskMutationVariables>;
export const ClearProfileAvatarDocument = gql`
mutation clearProfileAvatar {
clearProfileAvatar {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}
`;
export type ClearProfileAvatarMutationFn = Apollo.MutationFunction<ClearProfileAvatarMutation, ClearProfileAvatarMutationVariables>;
/**
* __useClearProfileAvatarMutation__
*
* To run a mutation, you first call `useClearProfileAvatarMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useClearProfileAvatarMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [clearProfileAvatarMutation, { data, loading, error }] = useClearProfileAvatarMutation({
* variables: {
* },
* });
*/
export function useClearProfileAvatarMutation(baseOptions?: Apollo.MutationHookOptions<ClearProfileAvatarMutation, ClearProfileAvatarMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<ClearProfileAvatarMutation, ClearProfileAvatarMutationVariables>(ClearProfileAvatarDocument, options);
}
export type ClearProfileAvatarMutationHookResult = ReturnType<typeof useClearProfileAvatarMutation>;
export type ClearProfileAvatarMutationResult = Apollo.MutationResult<ClearProfileAvatarMutation>;
export type ClearProfileAvatarMutationOptions = Apollo.BaseMutationOptions<ClearProfileAvatarMutation, ClearProfileAvatarMutationVariables>;
export const CreateProjectDocument = gql`
mutation createProject($teamID: UUID, $name: String!) {
createProject(input: {teamID: $teamID, name: $name}) {
id
shortId
name
team {
id
name
}
}
}
`;
export type CreateProjectMutationFn = Apollo.MutationFunction<CreateProjectMutation, CreateProjectMutationVariables>;
/**
* __useCreateProjectMutation__
*
* To run a mutation, you first call `useCreateProjectMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateProjectMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createProjectMutation, { data, loading, error }] = useCreateProjectMutation({
* variables: {
* teamID: // value for 'teamID'
* name: // value for 'name'
* },
* });
*/
export function useCreateProjectMutation(baseOptions?: Apollo.MutationHookOptions<CreateProjectMutation, CreateProjectMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateProjectMutation, CreateProjectMutationVariables>(CreateProjectDocument, options);
}
export type CreateProjectMutationHookResult = ReturnType<typeof useCreateProjectMutation>;
export type CreateProjectMutationResult = Apollo.MutationResult<CreateProjectMutation>;
export type CreateProjectMutationOptions = Apollo.BaseMutationOptions<CreateProjectMutation, CreateProjectMutationVariables>;
export const CreateProjectLabelDocument = gql`
mutation createProjectLabel($projectID: UUID!, $labelColorID: UUID!, $name: String!) {
createProjectLabel(
input: {projectID: $projectID, labelColorID: $labelColorID, name: $name}
) {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}
`;
export type CreateProjectLabelMutationFn = Apollo.MutationFunction<CreateProjectLabelMutation, CreateProjectLabelMutationVariables>;
/**
* __useCreateProjectLabelMutation__
*
* To run a mutation, you first call `useCreateProjectLabelMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateProjectLabelMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createProjectLabelMutation, { data, loading, error }] = useCreateProjectLabelMutation({
* variables: {
* projectID: // value for 'projectID'
* labelColorID: // value for 'labelColorID'
* name: // value for 'name'
* },
* });
*/
export function useCreateProjectLabelMutation(baseOptions?: Apollo.MutationHookOptions<CreateProjectLabelMutation, CreateProjectLabelMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateProjectLabelMutation, CreateProjectLabelMutationVariables>(CreateProjectLabelDocument, options);
}
export type CreateProjectLabelMutationHookResult = ReturnType<typeof useCreateProjectLabelMutation>;
export type CreateProjectLabelMutationResult = Apollo.MutationResult<CreateProjectLabelMutation>;
export type CreateProjectLabelMutationOptions = Apollo.BaseMutationOptions<CreateProjectLabelMutation, CreateProjectLabelMutationVariables>;
export const CreateTaskGroupDocument = gql`
mutation createTaskGroup($projectID: UUID!, $name: String!, $position: Float!) {
createTaskGroup(
input: {projectID: $projectID, name: $name, position: $position}
) {
id
name
position
}
}
`;
export type CreateTaskGroupMutationFn = Apollo.MutationFunction<CreateTaskGroupMutation, CreateTaskGroupMutationVariables>;
/**
* __useCreateTaskGroupMutation__
*
* To run a mutation, you first call `useCreateTaskGroupMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateTaskGroupMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createTaskGroupMutation, { data, loading, error }] = useCreateTaskGroupMutation({
* variables: {
* projectID: // value for 'projectID'
* name: // value for 'name'
* position: // value for 'position'
* },
* });
*/
export function useCreateTaskGroupMutation(baseOptions?: Apollo.MutationHookOptions<CreateTaskGroupMutation, CreateTaskGroupMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateTaskGroupMutation, CreateTaskGroupMutationVariables>(CreateTaskGroupDocument, options);
}
export type CreateTaskGroupMutationHookResult = ReturnType<typeof useCreateTaskGroupMutation>;
export type CreateTaskGroupMutationResult = Apollo.MutationResult<CreateTaskGroupMutation>;
export type CreateTaskGroupMutationOptions = Apollo.BaseMutationOptions<CreateTaskGroupMutation, CreateTaskGroupMutationVariables>;
export const DeleteProjectLabelDocument = gql`
mutation deleteProjectLabel($projectLabelID: UUID!) {
deleteProjectLabel(input: {projectLabelID: $projectLabelID}) {
id
}
}
`;
export type DeleteProjectLabelMutationFn = Apollo.MutationFunction<DeleteProjectLabelMutation, DeleteProjectLabelMutationVariables>;
/**
* __useDeleteProjectLabelMutation__
*
* To run a mutation, you first call `useDeleteProjectLabelMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteProjectLabelMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteProjectLabelMutation, { data, loading, error }] = useDeleteProjectLabelMutation({
* variables: {
* projectLabelID: // value for 'projectLabelID'
* },
* });
*/
export function useDeleteProjectLabelMutation(baseOptions?: Apollo.MutationHookOptions<DeleteProjectLabelMutation, DeleteProjectLabelMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteProjectLabelMutation, DeleteProjectLabelMutationVariables>(DeleteProjectLabelDocument, options);
}
export type DeleteProjectLabelMutationHookResult = ReturnType<typeof useDeleteProjectLabelMutation>;
export type DeleteProjectLabelMutationResult = Apollo.MutationResult<DeleteProjectLabelMutation>;
export type DeleteProjectLabelMutationOptions = Apollo.BaseMutationOptions<DeleteProjectLabelMutation, DeleteProjectLabelMutationVariables>;
export const DeleteTaskDocument = gql`
mutation deleteTask($taskID: UUID!) {
deleteTask(input: {taskID: $taskID}) {
taskID
}
}
`;
export type DeleteTaskMutationFn = Apollo.MutationFunction<DeleteTaskMutation, DeleteTaskMutationVariables>;
/**
* __useDeleteTaskMutation__
*
* To run a mutation, you first call `useDeleteTaskMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteTaskMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteTaskMutation, { data, loading, error }] = useDeleteTaskMutation({
* variables: {
* taskID: // value for 'taskID'
* },
* });
*/
export function useDeleteTaskMutation(baseOptions?: Apollo.MutationHookOptions<DeleteTaskMutation, DeleteTaskMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteTaskMutation, DeleteTaskMutationVariables>(DeleteTaskDocument, options);
}
export type DeleteTaskMutationHookResult = ReturnType<typeof useDeleteTaskMutation>;
export type DeleteTaskMutationResult = Apollo.MutationResult<DeleteTaskMutation>;
export type DeleteTaskMutationOptions = Apollo.BaseMutationOptions<DeleteTaskMutation, DeleteTaskMutationVariables>;
export const DeleteTaskGroupDocument = gql`
mutation deleteTaskGroup($taskGroupID: UUID!) {
deleteTaskGroup(input: {taskGroupID: $taskGroupID}) {
ok
affectedRows
taskGroup {
id
tasks {
id
name
}
}
}
}
`;
export type DeleteTaskGroupMutationFn = Apollo.MutationFunction<DeleteTaskGroupMutation, DeleteTaskGroupMutationVariables>;
/**
* __useDeleteTaskGroupMutation__
*
* To run a mutation, you first call `useDeleteTaskGroupMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteTaskGroupMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteTaskGroupMutation, { data, loading, error }] = useDeleteTaskGroupMutation({
* variables: {
* taskGroupID: // value for 'taskGroupID'
* },
* });
*/
export function useDeleteTaskGroupMutation(baseOptions?: Apollo.MutationHookOptions<DeleteTaskGroupMutation, DeleteTaskGroupMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteTaskGroupMutation, DeleteTaskGroupMutationVariables>(DeleteTaskGroupDocument, options);
}
export type DeleteTaskGroupMutationHookResult = ReturnType<typeof useDeleteTaskGroupMutation>;
export type DeleteTaskGroupMutationResult = Apollo.MutationResult<DeleteTaskGroupMutation>;
export type DeleteTaskGroupMutationOptions = Apollo.BaseMutationOptions<DeleteTaskGroupMutation, DeleteTaskGroupMutationVariables>;
export const FindProjectDocument = gql`
query findProject($projectID: String!) {
findProject(input: {projectShortID: $projectID}) {
id
name
publicOn
team {
id
}
members {
id
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
invitedMembers {
email
invitedOn
}
labels {
id
createdDate
name
labelColor {
id
name
colorHex
position
}
}
taskGroups {
id
name
position
tasks {
...TaskFields
}
}
}
labelColors {
id
position
colorHex
name
}
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
}
${TaskFieldsFragmentDoc}`;
/**
* __useFindProjectQuery__
*
* To run a query within a React component, call `useFindProjectQuery` and pass it any options that fit your needs.
* When your component renders, `useFindProjectQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useFindProjectQuery({
* variables: {
* projectID: // value for 'projectID'
* },
* });
*/
export function useFindProjectQuery(baseOptions: Apollo.QueryHookOptions<FindProjectQuery, FindProjectQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<FindProjectQuery, FindProjectQueryVariables>(FindProjectDocument, options);
}
export function useFindProjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FindProjectQuery, FindProjectQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<FindProjectQuery, FindProjectQueryVariables>(FindProjectDocument, options);
}
export type FindProjectQueryHookResult = ReturnType<typeof useFindProjectQuery>;
export type FindProjectLazyQueryHookResult = ReturnType<typeof useFindProjectLazyQuery>;
export type FindProjectQueryResult = Apollo.QueryResult<FindProjectQuery, FindProjectQueryVariables>;
export const FindTaskDocument = gql`
query findTask($taskID: String!) {
findTask(input: {taskShortID: $taskID}) {
id
shortId
name
watched
description
dueDate {
at
notifications {
id
period
duration
}
}
position
complete
hasTime
taskGroup {
id
name
}
comments {
id
pinned
message
createdAt
updatedAt
createdBy {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}
activity {
id
type
causedBy {
id
fullName
profileIcon {
initials
bgColor
url
}
}
createdAt
data {
name
value
}
}
badges {
checklist {
total
complete
}
}
checklists {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
labels {
id
assignedDate
projectLabel {
id
name
createdDate
labelColor {
id
colorHex
position
name
}
}
}
assigned {
id
fullName
profileIcon {
url
initials
bgColor
}
}
}
me {
user {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}
}
`;
/**
* __useFindTaskQuery__
*
* To run a query within a React component, call `useFindTaskQuery` and pass it any options that fit your needs.
* When your component renders, `useFindTaskQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useFindTaskQuery({
* variables: {
* taskID: // value for 'taskID'
* },
* });
*/
export function useFindTaskQuery(baseOptions: Apollo.QueryHookOptions<FindTaskQuery, FindTaskQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<FindTaskQuery, FindTaskQueryVariables>(FindTaskDocument, options);
}
export function useFindTaskLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FindTaskQuery, FindTaskQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<FindTaskQuery, FindTaskQueryVariables>(FindTaskDocument, options);
}
export type FindTaskQueryHookResult = ReturnType<typeof useFindTaskQuery>;
export type FindTaskLazyQueryHookResult = ReturnType<typeof useFindTaskLazyQuery>;
export type FindTaskQueryResult = Apollo.QueryResult<FindTaskQuery, FindTaskQueryVariables>;
export const GetProjectsDocument = gql`
query getProjects {
organizations {
id
name
}
teams {
id
name
createdAt
}
projects {
id
shortId
name
team {
id
name
}
}
}
`;
/**
* __useGetProjectsQuery__
*
* To run a query within a React component, call `useGetProjectsQuery` and pass it any options that fit your needs.
* When your component renders, `useGetProjectsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useGetProjectsQuery({
* variables: {
* },
* });
*/
export function useGetProjectsQuery(baseOptions?: Apollo.QueryHookOptions<GetProjectsQuery, GetProjectsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<GetProjectsQuery, GetProjectsQueryVariables>(GetProjectsDocument, options);
}
export function useGetProjectsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetProjectsQuery, GetProjectsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<GetProjectsQuery, GetProjectsQueryVariables>(GetProjectsDocument, options);
}
export type GetProjectsQueryHookResult = ReturnType<typeof useGetProjectsQuery>;
export type GetProjectsLazyQueryHookResult = ReturnType<typeof useGetProjectsLazyQuery>;
export type GetProjectsQueryResult = Apollo.QueryResult<GetProjectsQuery, GetProjectsQueryVariables>;
export const LabelsDocument = gql`
query labels($projectID: UUID!) {
findProject(input: {projectID: $projectID}) {
labels {
id
createdDate
name
labelColor {
id
name
colorHex
position
}
}
}
labelColors {
id
position
colorHex
name
}
}
`;
/**
* __useLabelsQuery__
*
* To run a query within a React component, call `useLabelsQuery` and pass it any options that fit your needs.
* When your component renders, `useLabelsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useLabelsQuery({
* variables: {
* projectID: // value for 'projectID'
* },
* });
*/
export function useLabelsQuery(baseOptions: Apollo.QueryHookOptions<LabelsQuery, LabelsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<LabelsQuery, LabelsQueryVariables>(LabelsDocument, options);
}
export function useLabelsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<LabelsQuery, LabelsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<LabelsQuery, LabelsQueryVariables>(LabelsDocument, options);
}
export type LabelsQueryHookResult = ReturnType<typeof useLabelsQuery>;
export type LabelsLazyQueryHookResult = ReturnType<typeof useLabelsLazyQuery>;
export type LabelsQueryResult = Apollo.QueryResult<LabelsQuery, LabelsQueryVariables>;
export const MeDocument = gql`
query me {
me {
user {
id
fullName
username
email
bio
profileIcon {
initials
bgColor
url
}
}
teamRoles {
teamID
roleCode
}
projectRoles {
projectID
roleCode
}
}
}
`;
/**
* __useMeQuery__
*
* To run a query within a React component, call `useMeQuery` and pass it any options that fit your needs.
* When your component renders, `useMeQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useMeQuery({
* variables: {
* },
* });
*/
export function useMeQuery(baseOptions?: Apollo.QueryHookOptions<MeQuery, MeQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<MeQuery, MeQueryVariables>(MeDocument, options);
}
export function useMeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<MeQuery, MeQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<MeQuery, MeQueryVariables>(MeDocument, options);
}
export type MeQueryHookResult = ReturnType<typeof useMeQuery>;
export type MeLazyQueryHookResult = ReturnType<typeof useMeLazyQuery>;
export type MeQueryResult = Apollo.QueryResult<MeQuery, MeQueryVariables>;
export const MyTasksDocument = gql`
query myTasks($status: MyTasksStatus!, $sort: MyTasksSort!) {
projects {
id
name
}
myTasks(input: {status: $status, sort: $sort}) {
tasks {
id
shortId
taskGroup {
id
name
}
name
dueDate {
at
}
hasTime
complete
completedAt
}
projects {
projectID
taskID
}
}
}
`;
/**
* __useMyTasksQuery__
*
* To run a query within a React component, call `useMyTasksQuery` and pass it any options that fit your needs.
* When your component renders, `useMyTasksQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useMyTasksQuery({
* variables: {
* status: // value for 'status'
* sort: // value for 'sort'
* },
* });
*/
export function useMyTasksQuery(baseOptions: Apollo.QueryHookOptions<MyTasksQuery, MyTasksQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<MyTasksQuery, MyTasksQueryVariables>(MyTasksDocument, options);
}
export function useMyTasksLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<MyTasksQuery, MyTasksQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<MyTasksQuery, MyTasksQueryVariables>(MyTasksDocument, options);
}
export type MyTasksQueryHookResult = ReturnType<typeof useMyTasksQuery>;
export type MyTasksLazyQueryHookResult = ReturnType<typeof useMyTasksLazyQuery>;
export type MyTasksQueryResult = Apollo.QueryResult<MyTasksQuery, MyTasksQueryVariables>;
export const NotificationToggleReadDocument = gql`
mutation notificationToggleRead($notifiedID: UUID!) {
notificationToggleRead(input: {notifiedID: $notifiedID}) {
id
read
readAt
}
}
`;
export type NotificationToggleReadMutationFn = Apollo.MutationFunction<NotificationToggleReadMutation, NotificationToggleReadMutationVariables>;
/**
* __useNotificationToggleReadMutation__
*
* To run a mutation, you first call `useNotificationToggleReadMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useNotificationToggleReadMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [notificationToggleReadMutation, { data, loading, error }] = useNotificationToggleReadMutation({
* variables: {
* notifiedID: // value for 'notifiedID'
* },
* });
*/
export function useNotificationToggleReadMutation(baseOptions?: Apollo.MutationHookOptions<NotificationToggleReadMutation, NotificationToggleReadMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<NotificationToggleReadMutation, NotificationToggleReadMutationVariables>(NotificationToggleReadDocument, options);
}
export type NotificationToggleReadMutationHookResult = ReturnType<typeof useNotificationToggleReadMutation>;
export type NotificationToggleReadMutationResult = Apollo.MutationResult<NotificationToggleReadMutation>;
export type NotificationToggleReadMutationOptions = Apollo.BaseMutationOptions<NotificationToggleReadMutation, NotificationToggleReadMutationVariables>;
export const NotificationsDocument = gql`
query notifications($limit: Int!, $cursor: String, $filter: NotificationFilter!) {
notified(input: {limit: $limit, cursor: $cursor, filter: $filter}) {
totalCount
pageInfo {
endCursor
hasNextPage
}
notified {
id
read
readAt
notification {
id
actionType
data {
key
value
}
causedBy {
username
fullname
id
}
createdAt
}
}
}
}
`;
/**
* __useNotificationsQuery__
*
* To run a query within a React component, call `useNotificationsQuery` and pass it any options that fit your needs.
* When your component renders, `useNotificationsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useNotificationsQuery({
* variables: {
* limit: // value for 'limit'
* cursor: // value for 'cursor'
* filter: // value for 'filter'
* },
* });
*/
export function useNotificationsQuery(baseOptions: Apollo.QueryHookOptions<NotificationsQuery, NotificationsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<NotificationsQuery, NotificationsQueryVariables>(NotificationsDocument, options);
}
export function useNotificationsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<NotificationsQuery, NotificationsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<NotificationsQuery, NotificationsQueryVariables>(NotificationsDocument, options);
}
export type NotificationsQueryHookResult = ReturnType<typeof useNotificationsQuery>;
export type NotificationsLazyQueryHookResult = ReturnType<typeof useNotificationsLazyQuery>;
export type NotificationsQueryResult = Apollo.QueryResult<NotificationsQuery, NotificationsQueryVariables>;
export const NotificationMarkAllReadDocument = gql`
mutation notificationMarkAllRead {
notificationMarkAllRead {
success
}
}
`;
export type NotificationMarkAllReadMutationFn = Apollo.MutationFunction<NotificationMarkAllReadMutation, NotificationMarkAllReadMutationVariables>;
/**
* __useNotificationMarkAllReadMutation__
*
* To run a mutation, you first call `useNotificationMarkAllReadMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useNotificationMarkAllReadMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [notificationMarkAllReadMutation, { data, loading, error }] = useNotificationMarkAllReadMutation({
* variables: {
* },
* });
*/
export function useNotificationMarkAllReadMutation(baseOptions?: Apollo.MutationHookOptions<NotificationMarkAllReadMutation, NotificationMarkAllReadMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<NotificationMarkAllReadMutation, NotificationMarkAllReadMutationVariables>(NotificationMarkAllReadDocument, options);
}
export type NotificationMarkAllReadMutationHookResult = ReturnType<typeof useNotificationMarkAllReadMutation>;
export type NotificationMarkAllReadMutationResult = Apollo.MutationResult<NotificationMarkAllReadMutation>;
export type NotificationMarkAllReadMutationOptions = Apollo.BaseMutationOptions<NotificationMarkAllReadMutation, NotificationMarkAllReadMutationVariables>;
export const NotificationAddedDocument = gql`
subscription notificationAdded {
notificationAdded {
id
read
readAt
notification {
id
actionType
data {
key
value
}
causedBy {
username
fullname
id
}
createdAt
}
}
}
`;
/**
* __useNotificationAddedSubscription__
*
* To run a query within a React component, call `useNotificationAddedSubscription` and pass it any options that fit your needs.
* When your component renders, `useNotificationAddedSubscription` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useNotificationAddedSubscription({
* variables: {
* },
* });
*/
export function useNotificationAddedSubscription(baseOptions?: Apollo.SubscriptionHookOptions<NotificationAddedSubscription, NotificationAddedSubscriptionVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useSubscription<NotificationAddedSubscription, NotificationAddedSubscriptionVariables>(NotificationAddedDocument, options);
}
export type NotificationAddedSubscriptionHookResult = ReturnType<typeof useNotificationAddedSubscription>;
export type NotificationAddedSubscriptionResult = Apollo.SubscriptionResult<NotificationAddedSubscription>;
export const DeleteProjectDocument = gql`
mutation deleteProject($projectID: UUID!) {
deleteProject(input: {projectID: $projectID}) {
ok
project {
id
}
}
}
`;
export type DeleteProjectMutationFn = Apollo.MutationFunction<DeleteProjectMutation, DeleteProjectMutationVariables>;
/**
* __useDeleteProjectMutation__
*
* To run a mutation, you first call `useDeleteProjectMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteProjectMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteProjectMutation, { data, loading, error }] = useDeleteProjectMutation({
* variables: {
* projectID: // value for 'projectID'
* },
* });
*/
export function useDeleteProjectMutation(baseOptions?: Apollo.MutationHookOptions<DeleteProjectMutation, DeleteProjectMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteProjectMutation, DeleteProjectMutationVariables>(DeleteProjectDocument, options);
}
export type DeleteProjectMutationHookResult = ReturnType<typeof useDeleteProjectMutation>;
export type DeleteProjectMutationResult = Apollo.MutationResult<DeleteProjectMutation>;
export type DeleteProjectMutationOptions = Apollo.BaseMutationOptions<DeleteProjectMutation, DeleteProjectMutationVariables>;
export const DeleteInvitedProjectMemberDocument = gql`
mutation deleteInvitedProjectMember($projectID: UUID!, $email: String!) {
deleteInvitedProjectMember(input: {projectID: $projectID, email: $email}) {
invitedMember {
email
}
}
}
`;
export type DeleteInvitedProjectMemberMutationFn = Apollo.MutationFunction<DeleteInvitedProjectMemberMutation, DeleteInvitedProjectMemberMutationVariables>;
/**
* __useDeleteInvitedProjectMemberMutation__
*
* To run a mutation, you first call `useDeleteInvitedProjectMemberMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteInvitedProjectMemberMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteInvitedProjectMemberMutation, { data, loading, error }] = useDeleteInvitedProjectMemberMutation({
* variables: {
* projectID: // value for 'projectID'
* email: // value for 'email'
* },
* });
*/
export function useDeleteInvitedProjectMemberMutation(baseOptions?: Apollo.MutationHookOptions<DeleteInvitedProjectMemberMutation, DeleteInvitedProjectMemberMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteInvitedProjectMemberMutation, DeleteInvitedProjectMemberMutationVariables>(DeleteInvitedProjectMemberDocument, options);
}
export type DeleteInvitedProjectMemberMutationHookResult = ReturnType<typeof useDeleteInvitedProjectMemberMutation>;
export type DeleteInvitedProjectMemberMutationResult = Apollo.MutationResult<DeleteInvitedProjectMemberMutation>;
export type DeleteInvitedProjectMemberMutationOptions = Apollo.BaseMutationOptions<DeleteInvitedProjectMemberMutation, DeleteInvitedProjectMemberMutationVariables>;
export const DeleteProjectMemberDocument = gql`
mutation deleteProjectMember($projectID: UUID!, $userID: UUID!) {
deleteProjectMember(input: {projectID: $projectID, userID: $userID}) {
ok
member {
id
}
projectID
}
}
`;
export type DeleteProjectMemberMutationFn = Apollo.MutationFunction<DeleteProjectMemberMutation, DeleteProjectMemberMutationVariables>;
/**
* __useDeleteProjectMemberMutation__
*
* To run a mutation, you first call `useDeleteProjectMemberMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteProjectMemberMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteProjectMemberMutation, { data, loading, error }] = useDeleteProjectMemberMutation({
* variables: {
* projectID: // value for 'projectID'
* userID: // value for 'userID'
* },
* });
*/
export function useDeleteProjectMemberMutation(baseOptions?: Apollo.MutationHookOptions<DeleteProjectMemberMutation, DeleteProjectMemberMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteProjectMemberMutation, DeleteProjectMemberMutationVariables>(DeleteProjectMemberDocument, options);
}
export type DeleteProjectMemberMutationHookResult = ReturnType<typeof useDeleteProjectMemberMutation>;
export type DeleteProjectMemberMutationResult = Apollo.MutationResult<DeleteProjectMemberMutation>;
export type DeleteProjectMemberMutationOptions = Apollo.BaseMutationOptions<DeleteProjectMemberMutation, DeleteProjectMemberMutationVariables>;
export const InviteProjectMembersDocument = gql`
mutation inviteProjectMembers($projectID: UUID!, $members: [MemberInvite!]!) {
inviteProjectMembers(input: {projectID: $projectID, members: $members}) {
ok
invitedMembers {
email
invitedOn
}
members {
id
fullName
profileIcon {
url
initials
bgColor
}
username
role {
code
name
}
}
}
}
`;
export type InviteProjectMembersMutationFn = Apollo.MutationFunction<InviteProjectMembersMutation, InviteProjectMembersMutationVariables>;
/**
* __useInviteProjectMembersMutation__
*
* To run a mutation, you first call `useInviteProjectMembersMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useInviteProjectMembersMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [inviteProjectMembersMutation, { data, loading, error }] = useInviteProjectMembersMutation({
* variables: {
* projectID: // value for 'projectID'
* members: // value for 'members'
* },
* });
*/
export function useInviteProjectMembersMutation(baseOptions?: Apollo.MutationHookOptions<InviteProjectMembersMutation, InviteProjectMembersMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<InviteProjectMembersMutation, InviteProjectMembersMutationVariables>(InviteProjectMembersDocument, options);
}
export type InviteProjectMembersMutationHookResult = ReturnType<typeof useInviteProjectMembersMutation>;
export type InviteProjectMembersMutationResult = Apollo.MutationResult<InviteProjectMembersMutation>;
export type InviteProjectMembersMutationOptions = Apollo.BaseMutationOptions<InviteProjectMembersMutation, InviteProjectMembersMutationVariables>;
export const UpdateProjectMemberRoleDocument = gql`
mutation updateProjectMemberRole($projectID: UUID!, $userID: UUID!, $roleCode: RoleCode!) {
updateProjectMemberRole(
input: {projectID: $projectID, userID: $userID, roleCode: $roleCode}
) {
ok
member {
id
role {
code
name
}
}
}
}
`;
export type UpdateProjectMemberRoleMutationFn = Apollo.MutationFunction<UpdateProjectMemberRoleMutation, UpdateProjectMemberRoleMutationVariables>;
/**
* __useUpdateProjectMemberRoleMutation__
*
* To run a mutation, you first call `useUpdateProjectMemberRoleMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateProjectMemberRoleMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateProjectMemberRoleMutation, { data, loading, error }] = useUpdateProjectMemberRoleMutation({
* variables: {
* projectID: // value for 'projectID'
* userID: // value for 'userID'
* roleCode: // value for 'roleCode'
* },
* });
*/
export function useUpdateProjectMemberRoleMutation(baseOptions?: Apollo.MutationHookOptions<UpdateProjectMemberRoleMutation, UpdateProjectMemberRoleMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateProjectMemberRoleMutation, UpdateProjectMemberRoleMutationVariables>(UpdateProjectMemberRoleDocument, options);
}
export type UpdateProjectMemberRoleMutationHookResult = ReturnType<typeof useUpdateProjectMemberRoleMutation>;
export type UpdateProjectMemberRoleMutationResult = Apollo.MutationResult<UpdateProjectMemberRoleMutation>;
export type UpdateProjectMemberRoleMutationOptions = Apollo.BaseMutationOptions<UpdateProjectMemberRoleMutation, UpdateProjectMemberRoleMutationVariables>;
export const CreateTaskDocument = gql`
mutation createTask($taskGroupID: UUID!, $name: String!, $position: Float!, $assigned: [UUID!]) {
createTask(
input: {taskGroupID: $taskGroupID, name: $name, position: $position, assigned: $assigned}
) {
...TaskFields
}
}
${TaskFieldsFragmentDoc}`;
export type CreateTaskMutationFn = Apollo.MutationFunction<CreateTaskMutation, CreateTaskMutationVariables>;
/**
* __useCreateTaskMutation__
*
* To run a mutation, you first call `useCreateTaskMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateTaskMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createTaskMutation, { data, loading, error }] = useCreateTaskMutation({
* variables: {
* taskGroupID: // value for 'taskGroupID'
* name: // value for 'name'
* position: // value for 'position'
* assigned: // value for 'assigned'
* },
* });
*/
export function useCreateTaskMutation(baseOptions?: Apollo.MutationHookOptions<CreateTaskMutation, CreateTaskMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateTaskMutation, CreateTaskMutationVariables>(CreateTaskDocument, options);
}
export type CreateTaskMutationHookResult = ReturnType<typeof useCreateTaskMutation>;
export type CreateTaskMutationResult = Apollo.MutationResult<CreateTaskMutation>;
export type CreateTaskMutationOptions = Apollo.BaseMutationOptions<CreateTaskMutation, CreateTaskMutationVariables>;
export const CreateTaskChecklistDocument = gql`
mutation createTaskChecklist($taskID: UUID!, $name: String!, $position: Float!) {
createTaskChecklist(input: {taskID: $taskID, name: $name, position: $position}) {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
}
`;
export type CreateTaskChecklistMutationFn = Apollo.MutationFunction<CreateTaskChecklistMutation, CreateTaskChecklistMutationVariables>;
/**
* __useCreateTaskChecklistMutation__
*
* To run a mutation, you first call `useCreateTaskChecklistMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateTaskChecklistMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createTaskChecklistMutation, { data, loading, error }] = useCreateTaskChecklistMutation({
* variables: {
* taskID: // value for 'taskID'
* name: // value for 'name'
* position: // value for 'position'
* },
* });
*/
export function useCreateTaskChecklistMutation(baseOptions?: Apollo.MutationHookOptions<CreateTaskChecklistMutation, CreateTaskChecklistMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateTaskChecklistMutation, CreateTaskChecklistMutationVariables>(CreateTaskChecklistDocument, options);
}
export type CreateTaskChecklistMutationHookResult = ReturnType<typeof useCreateTaskChecklistMutation>;
export type CreateTaskChecklistMutationResult = Apollo.MutationResult<CreateTaskChecklistMutation>;
export type CreateTaskChecklistMutationOptions = Apollo.BaseMutationOptions<CreateTaskChecklistMutation, CreateTaskChecklistMutationVariables>;
export const CreateTaskChecklistItemDocument = gql`
mutation createTaskChecklistItem($taskChecklistID: UUID!, $name: String!, $position: Float!) {
createTaskChecklistItem(
input: {taskChecklistID: $taskChecklistID, name: $name, position: $position}
) {
id
name
taskChecklistID
position
complete
}
}
`;
export type CreateTaskChecklistItemMutationFn = Apollo.MutationFunction<CreateTaskChecklistItemMutation, CreateTaskChecklistItemMutationVariables>;
/**
* __useCreateTaskChecklistItemMutation__
*
* To run a mutation, you first call `useCreateTaskChecklistItemMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateTaskChecklistItemMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createTaskChecklistItemMutation, { data, loading, error }] = useCreateTaskChecklistItemMutation({
* variables: {
* taskChecklistID: // value for 'taskChecklistID'
* name: // value for 'name'
* position: // value for 'position'
* },
* });
*/
export function useCreateTaskChecklistItemMutation(baseOptions?: Apollo.MutationHookOptions<CreateTaskChecklistItemMutation, CreateTaskChecklistItemMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateTaskChecklistItemMutation, CreateTaskChecklistItemMutationVariables>(CreateTaskChecklistItemDocument, options);
}
export type CreateTaskChecklistItemMutationHookResult = ReturnType<typeof useCreateTaskChecklistItemMutation>;
export type CreateTaskChecklistItemMutationResult = Apollo.MutationResult<CreateTaskChecklistItemMutation>;
export type CreateTaskChecklistItemMutationOptions = Apollo.BaseMutationOptions<CreateTaskChecklistItemMutation, CreateTaskChecklistItemMutationVariables>;
export const CreateTaskCommentDocument = gql`
mutation createTaskComment($taskID: UUID!, $message: String!) {
createTaskComment(input: {taskID: $taskID, message: $message}) {
taskID
comment {
id
message
pinned
createdAt
updatedAt
createdBy {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}
}
}
`;
export type CreateTaskCommentMutationFn = Apollo.MutationFunction<CreateTaskCommentMutation, CreateTaskCommentMutationVariables>;
/**
* __useCreateTaskCommentMutation__
*
* To run a mutation, you first call `useCreateTaskCommentMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateTaskCommentMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createTaskCommentMutation, { data, loading, error }] = useCreateTaskCommentMutation({
* variables: {
* taskID: // value for 'taskID'
* message: // value for 'message'
* },
* });
*/
export function useCreateTaskCommentMutation(baseOptions?: Apollo.MutationHookOptions<CreateTaskCommentMutation, CreateTaskCommentMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateTaskCommentMutation, CreateTaskCommentMutationVariables>(CreateTaskCommentDocument, options);
}
export type CreateTaskCommentMutationHookResult = ReturnType<typeof useCreateTaskCommentMutation>;
export type CreateTaskCommentMutationResult = Apollo.MutationResult<CreateTaskCommentMutation>;
export type CreateTaskCommentMutationOptions = Apollo.BaseMutationOptions<CreateTaskCommentMutation, CreateTaskCommentMutationVariables>;
export const DeleteTaskChecklistDocument = gql`
mutation deleteTaskChecklist($taskChecklistID: UUID!) {
deleteTaskChecklist(input: {taskChecklistID: $taskChecklistID}) {
ok
taskChecklist {
id
}
}
}
`;
export type DeleteTaskChecklistMutationFn = Apollo.MutationFunction<DeleteTaskChecklistMutation, DeleteTaskChecklistMutationVariables>;
/**
* __useDeleteTaskChecklistMutation__
*
* To run a mutation, you first call `useDeleteTaskChecklistMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteTaskChecklistMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteTaskChecklistMutation, { data, loading, error }] = useDeleteTaskChecklistMutation({
* variables: {
* taskChecklistID: // value for 'taskChecklistID'
* },
* });
*/
export function useDeleteTaskChecklistMutation(baseOptions?: Apollo.MutationHookOptions<DeleteTaskChecklistMutation, DeleteTaskChecklistMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteTaskChecklistMutation, DeleteTaskChecklistMutationVariables>(DeleteTaskChecklistDocument, options);
}
export type DeleteTaskChecklistMutationHookResult = ReturnType<typeof useDeleteTaskChecklistMutation>;
export type DeleteTaskChecklistMutationResult = Apollo.MutationResult<DeleteTaskChecklistMutation>;
export type DeleteTaskChecklistMutationOptions = Apollo.BaseMutationOptions<DeleteTaskChecklistMutation, DeleteTaskChecklistMutationVariables>;
export const DeleteTaskChecklistItemDocument = gql`
mutation deleteTaskChecklistItem($taskChecklistItemID: UUID!) {
deleteTaskChecklistItem(input: {taskChecklistItemID: $taskChecklistItemID}) {
ok
taskChecklistItem {
id
taskChecklistID
}
}
}
`;
export type DeleteTaskChecklistItemMutationFn = Apollo.MutationFunction<DeleteTaskChecklistItemMutation, DeleteTaskChecklistItemMutationVariables>;
/**
* __useDeleteTaskChecklistItemMutation__
*
* To run a mutation, you first call `useDeleteTaskChecklistItemMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteTaskChecklistItemMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteTaskChecklistItemMutation, { data, loading, error }] = useDeleteTaskChecklistItemMutation({
* variables: {
* taskChecklistItemID: // value for 'taskChecklistItemID'
* },
* });
*/
export function useDeleteTaskChecklistItemMutation(baseOptions?: Apollo.MutationHookOptions<DeleteTaskChecklistItemMutation, DeleteTaskChecklistItemMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteTaskChecklistItemMutation, DeleteTaskChecklistItemMutationVariables>(DeleteTaskChecklistItemDocument, options);
}
export type DeleteTaskChecklistItemMutationHookResult = ReturnType<typeof useDeleteTaskChecklistItemMutation>;
export type DeleteTaskChecklistItemMutationResult = Apollo.MutationResult<DeleteTaskChecklistItemMutation>;
export type DeleteTaskChecklistItemMutationOptions = Apollo.BaseMutationOptions<DeleteTaskChecklistItemMutation, DeleteTaskChecklistItemMutationVariables>;
export const DeleteTaskCommentDocument = gql`
mutation deleteTaskComment($commentID: UUID!) {
deleteTaskComment(input: {commentID: $commentID}) {
commentID
}
}
`;
export type DeleteTaskCommentMutationFn = Apollo.MutationFunction<DeleteTaskCommentMutation, DeleteTaskCommentMutationVariables>;
/**
* __useDeleteTaskCommentMutation__
*
* To run a mutation, you first call `useDeleteTaskCommentMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteTaskCommentMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteTaskCommentMutation, { data, loading, error }] = useDeleteTaskCommentMutation({
* variables: {
* commentID: // value for 'commentID'
* },
* });
*/
export function useDeleteTaskCommentMutation(baseOptions?: Apollo.MutationHookOptions<DeleteTaskCommentMutation, DeleteTaskCommentMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteTaskCommentMutation, DeleteTaskCommentMutationVariables>(DeleteTaskCommentDocument, options);
}
export type DeleteTaskCommentMutationHookResult = ReturnType<typeof useDeleteTaskCommentMutation>;
export type DeleteTaskCommentMutationResult = Apollo.MutationResult<DeleteTaskCommentMutation>;
export type DeleteTaskCommentMutationOptions = Apollo.BaseMutationOptions<DeleteTaskCommentMutation, DeleteTaskCommentMutationVariables>;
export const SetTaskChecklistItemCompleteDocument = gql`
mutation setTaskChecklistItemComplete($taskChecklistItemID: UUID!, $complete: Boolean!) {
setTaskChecklistItemComplete(
input: {taskChecklistItemID: $taskChecklistItemID, complete: $complete}
) {
id
complete
}
}
`;
export type SetTaskChecklistItemCompleteMutationFn = Apollo.MutationFunction<SetTaskChecklistItemCompleteMutation, SetTaskChecklistItemCompleteMutationVariables>;
/**
* __useSetTaskChecklistItemCompleteMutation__
*
* To run a mutation, you first call `useSetTaskChecklistItemCompleteMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useSetTaskChecklistItemCompleteMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [setTaskChecklistItemCompleteMutation, { data, loading, error }] = useSetTaskChecklistItemCompleteMutation({
* variables: {
* taskChecklistItemID: // value for 'taskChecklistItemID'
* complete: // value for 'complete'
* },
* });
*/
export function useSetTaskChecklistItemCompleteMutation(baseOptions?: Apollo.MutationHookOptions<SetTaskChecklistItemCompleteMutation, SetTaskChecklistItemCompleteMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<SetTaskChecklistItemCompleteMutation, SetTaskChecklistItemCompleteMutationVariables>(SetTaskChecklistItemCompleteDocument, options);
}
export type SetTaskChecklistItemCompleteMutationHookResult = ReturnType<typeof useSetTaskChecklistItemCompleteMutation>;
export type SetTaskChecklistItemCompleteMutationResult = Apollo.MutationResult<SetTaskChecklistItemCompleteMutation>;
export type SetTaskChecklistItemCompleteMutationOptions = Apollo.BaseMutationOptions<SetTaskChecklistItemCompleteMutation, SetTaskChecklistItemCompleteMutationVariables>;
export const SetTaskCompleteDocument = gql`
mutation setTaskComplete($taskID: UUID!, $complete: Boolean!) {
setTaskComplete(input: {taskID: $taskID, complete: $complete}) {
...TaskFields
}
}
${TaskFieldsFragmentDoc}`;
export type SetTaskCompleteMutationFn = Apollo.MutationFunction<SetTaskCompleteMutation, SetTaskCompleteMutationVariables>;
/**
* __useSetTaskCompleteMutation__
*
* To run a mutation, you first call `useSetTaskCompleteMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useSetTaskCompleteMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [setTaskCompleteMutation, { data, loading, error }] = useSetTaskCompleteMutation({
* variables: {
* taskID: // value for 'taskID'
* complete: // value for 'complete'
* },
* });
*/
export function useSetTaskCompleteMutation(baseOptions?: Apollo.MutationHookOptions<SetTaskCompleteMutation, SetTaskCompleteMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<SetTaskCompleteMutation, SetTaskCompleteMutationVariables>(SetTaskCompleteDocument, options);
}
export type SetTaskCompleteMutationHookResult = ReturnType<typeof useSetTaskCompleteMutation>;
export type SetTaskCompleteMutationResult = Apollo.MutationResult<SetTaskCompleteMutation>;
export type SetTaskCompleteMutationOptions = Apollo.BaseMutationOptions<SetTaskCompleteMutation, SetTaskCompleteMutationVariables>;
export const ToggleTaskWatchDocument = gql`
mutation toggleTaskWatch($taskID: UUID!) {
toggleTaskWatch(input: {taskID: $taskID}) {
id
watched
}
}
`;
export type ToggleTaskWatchMutationFn = Apollo.MutationFunction<ToggleTaskWatchMutation, ToggleTaskWatchMutationVariables>;
/**
* __useToggleTaskWatchMutation__
*
* To run a mutation, you first call `useToggleTaskWatchMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useToggleTaskWatchMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [toggleTaskWatchMutation, { data, loading, error }] = useToggleTaskWatchMutation({
* variables: {
* taskID: // value for 'taskID'
* },
* });
*/
export function useToggleTaskWatchMutation(baseOptions?: Apollo.MutationHookOptions<ToggleTaskWatchMutation, ToggleTaskWatchMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<ToggleTaskWatchMutation, ToggleTaskWatchMutationVariables>(ToggleTaskWatchDocument, options);
}
export type ToggleTaskWatchMutationHookResult = ReturnType<typeof useToggleTaskWatchMutation>;
export type ToggleTaskWatchMutationResult = Apollo.MutationResult<ToggleTaskWatchMutation>;
export type ToggleTaskWatchMutationOptions = Apollo.BaseMutationOptions<ToggleTaskWatchMutation, ToggleTaskWatchMutationVariables>;
export const UpdateTaskChecklistItemLocationDocument = gql`
mutation updateTaskChecklistItemLocation($taskChecklistID: UUID!, $taskChecklistItemID: UUID!, $position: Float!) {
updateTaskChecklistItemLocation(
input: {taskChecklistID: $taskChecklistID, taskChecklistItemID: $taskChecklistItemID, position: $position}
) {
taskChecklistID
prevChecklistID
checklistItem {
id
taskChecklistID
position
}
}
}
`;
export type UpdateTaskChecklistItemLocationMutationFn = Apollo.MutationFunction<UpdateTaskChecklistItemLocationMutation, UpdateTaskChecklistItemLocationMutationVariables>;
/**
* __useUpdateTaskChecklistItemLocationMutation__
*
* To run a mutation, you first call `useUpdateTaskChecklistItemLocationMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskChecklistItemLocationMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskChecklistItemLocationMutation, { data, loading, error }] = useUpdateTaskChecklistItemLocationMutation({
* variables: {
* taskChecklistID: // value for 'taskChecklistID'
* taskChecklistItemID: // value for 'taskChecklistItemID'
* position: // value for 'position'
* },
* });
*/
export function useUpdateTaskChecklistItemLocationMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskChecklistItemLocationMutation, UpdateTaskChecklistItemLocationMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskChecklistItemLocationMutation, UpdateTaskChecklistItemLocationMutationVariables>(UpdateTaskChecklistItemLocationDocument, options);
}
export type UpdateTaskChecklistItemLocationMutationHookResult = ReturnType<typeof useUpdateTaskChecklistItemLocationMutation>;
export type UpdateTaskChecklistItemLocationMutationResult = Apollo.MutationResult<UpdateTaskChecklistItemLocationMutation>;
export type UpdateTaskChecklistItemLocationMutationOptions = Apollo.BaseMutationOptions<UpdateTaskChecklistItemLocationMutation, UpdateTaskChecklistItemLocationMutationVariables>;
export const UpdateTaskChecklistItemNameDocument = gql`
mutation updateTaskChecklistItemName($taskChecklistItemID: UUID!, $name: String!) {
updateTaskChecklistItemName(
input: {taskChecklistItemID: $taskChecklistItemID, name: $name}
) {
id
name
}
}
`;
export type UpdateTaskChecklistItemNameMutationFn = Apollo.MutationFunction<UpdateTaskChecklistItemNameMutation, UpdateTaskChecklistItemNameMutationVariables>;
/**
* __useUpdateTaskChecklistItemNameMutation__
*
* To run a mutation, you first call `useUpdateTaskChecklistItemNameMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskChecklistItemNameMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskChecklistItemNameMutation, { data, loading, error }] = useUpdateTaskChecklistItemNameMutation({
* variables: {
* taskChecklistItemID: // value for 'taskChecklistItemID'
* name: // value for 'name'
* },
* });
*/
export function useUpdateTaskChecklistItemNameMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskChecklistItemNameMutation, UpdateTaskChecklistItemNameMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskChecklistItemNameMutation, UpdateTaskChecklistItemNameMutationVariables>(UpdateTaskChecklistItemNameDocument, options);
}
export type UpdateTaskChecklistItemNameMutationHookResult = ReturnType<typeof useUpdateTaskChecklistItemNameMutation>;
export type UpdateTaskChecklistItemNameMutationResult = Apollo.MutationResult<UpdateTaskChecklistItemNameMutation>;
export type UpdateTaskChecklistItemNameMutationOptions = Apollo.BaseMutationOptions<UpdateTaskChecklistItemNameMutation, UpdateTaskChecklistItemNameMutationVariables>;
export const UpdateTaskChecklistLocationDocument = gql`
mutation updateTaskChecklistLocation($taskChecklistID: UUID!, $position: Float!) {
updateTaskChecklistLocation(
input: {taskChecklistID: $taskChecklistID, position: $position}
) {
checklist {
id
position
}
}
}
`;
export type UpdateTaskChecklistLocationMutationFn = Apollo.MutationFunction<UpdateTaskChecklistLocationMutation, UpdateTaskChecklistLocationMutationVariables>;
/**
* __useUpdateTaskChecklistLocationMutation__
*
* To run a mutation, you first call `useUpdateTaskChecklistLocationMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskChecklistLocationMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskChecklistLocationMutation, { data, loading, error }] = useUpdateTaskChecklistLocationMutation({
* variables: {
* taskChecklistID: // value for 'taskChecklistID'
* position: // value for 'position'
* },
* });
*/
export function useUpdateTaskChecklistLocationMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskChecklistLocationMutation, UpdateTaskChecklistLocationMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskChecklistLocationMutation, UpdateTaskChecklistLocationMutationVariables>(UpdateTaskChecklistLocationDocument, options);
}
export type UpdateTaskChecklistLocationMutationHookResult = ReturnType<typeof useUpdateTaskChecklistLocationMutation>;
export type UpdateTaskChecklistLocationMutationResult = Apollo.MutationResult<UpdateTaskChecklistLocationMutation>;
export type UpdateTaskChecklistLocationMutationOptions = Apollo.BaseMutationOptions<UpdateTaskChecklistLocationMutation, UpdateTaskChecklistLocationMutationVariables>;
export const UpdateTaskChecklistNameDocument = gql`
mutation updateTaskChecklistName($taskChecklistID: UUID!, $name: String!) {
updateTaskChecklistName(input: {taskChecklistID: $taskChecklistID, name: $name}) {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
}
`;
export type UpdateTaskChecklistNameMutationFn = Apollo.MutationFunction<UpdateTaskChecklistNameMutation, UpdateTaskChecklistNameMutationVariables>;
/**
* __useUpdateTaskChecklistNameMutation__
*
* To run a mutation, you first call `useUpdateTaskChecklistNameMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskChecklistNameMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskChecklistNameMutation, { data, loading, error }] = useUpdateTaskChecklistNameMutation({
* variables: {
* taskChecklistID: // value for 'taskChecklistID'
* name: // value for 'name'
* },
* });
*/
export function useUpdateTaskChecklistNameMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskChecklistNameMutation, UpdateTaskChecklistNameMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskChecklistNameMutation, UpdateTaskChecklistNameMutationVariables>(UpdateTaskChecklistNameDocument, options);
}
export type UpdateTaskChecklistNameMutationHookResult = ReturnType<typeof useUpdateTaskChecklistNameMutation>;
export type UpdateTaskChecklistNameMutationResult = Apollo.MutationResult<UpdateTaskChecklistNameMutation>;
export type UpdateTaskChecklistNameMutationOptions = Apollo.BaseMutationOptions<UpdateTaskChecklistNameMutation, UpdateTaskChecklistNameMutationVariables>;
export const UpdateTaskCommentDocument = gql`
mutation updateTaskComment($commentID: UUID!, $message: String!) {
updateTaskComment(input: {commentID: $commentID, message: $message}) {
comment {
id
updatedAt
message
}
}
}
`;
export type UpdateTaskCommentMutationFn = Apollo.MutationFunction<UpdateTaskCommentMutation, UpdateTaskCommentMutationVariables>;
/**
* __useUpdateTaskCommentMutation__
*
* To run a mutation, you first call `useUpdateTaskCommentMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskCommentMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskCommentMutation, { data, loading, error }] = useUpdateTaskCommentMutation({
* variables: {
* commentID: // value for 'commentID'
* message: // value for 'message'
* },
* });
*/
export function useUpdateTaskCommentMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskCommentMutation, UpdateTaskCommentMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskCommentMutation, UpdateTaskCommentMutationVariables>(UpdateTaskCommentDocument, options);
}
export type UpdateTaskCommentMutationHookResult = ReturnType<typeof useUpdateTaskCommentMutation>;
export type UpdateTaskCommentMutationResult = Apollo.MutationResult<UpdateTaskCommentMutation>;
export type UpdateTaskCommentMutationOptions = Apollo.BaseMutationOptions<UpdateTaskCommentMutation, UpdateTaskCommentMutationVariables>;
export const DeleteTaskGroupTasksDocument = gql`
mutation deleteTaskGroupTasks($taskGroupID: UUID!) {
deleteTaskGroupTasks(input: {taskGroupID: $taskGroupID}) {
tasks
taskGroupID
}
}
`;
export type DeleteTaskGroupTasksMutationFn = Apollo.MutationFunction<DeleteTaskGroupTasksMutation, DeleteTaskGroupTasksMutationVariables>;
/**
* __useDeleteTaskGroupTasksMutation__
*
* To run a mutation, you first call `useDeleteTaskGroupTasksMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteTaskGroupTasksMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteTaskGroupTasksMutation, { data, loading, error }] = useDeleteTaskGroupTasksMutation({
* variables: {
* taskGroupID: // value for 'taskGroupID'
* },
* });
*/
export function useDeleteTaskGroupTasksMutation(baseOptions?: Apollo.MutationHookOptions<DeleteTaskGroupTasksMutation, DeleteTaskGroupTasksMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteTaskGroupTasksMutation, DeleteTaskGroupTasksMutationVariables>(DeleteTaskGroupTasksDocument, options);
}
export type DeleteTaskGroupTasksMutationHookResult = ReturnType<typeof useDeleteTaskGroupTasksMutation>;
export type DeleteTaskGroupTasksMutationResult = Apollo.MutationResult<DeleteTaskGroupTasksMutation>;
export type DeleteTaskGroupTasksMutationOptions = Apollo.BaseMutationOptions<DeleteTaskGroupTasksMutation, DeleteTaskGroupTasksMutationVariables>;
export const DuplicateTaskGroupDocument = gql`
mutation duplicateTaskGroup($taskGroupID: UUID!, $name: String!, $position: Float!, $projectID: UUID!) {
duplicateTaskGroup(
input: {projectID: $projectID, taskGroupID: $taskGroupID, name: $name, position: $position}
) {
taskGroup {
id
name
position
tasks {
...TaskFields
}
}
}
}
${TaskFieldsFragmentDoc}`;
export type DuplicateTaskGroupMutationFn = Apollo.MutationFunction<DuplicateTaskGroupMutation, DuplicateTaskGroupMutationVariables>;
/**
* __useDuplicateTaskGroupMutation__
*
* To run a mutation, you first call `useDuplicateTaskGroupMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDuplicateTaskGroupMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [duplicateTaskGroupMutation, { data, loading, error }] = useDuplicateTaskGroupMutation({
* variables: {
* taskGroupID: // value for 'taskGroupID'
* name: // value for 'name'
* position: // value for 'position'
* projectID: // value for 'projectID'
* },
* });
*/
export function useDuplicateTaskGroupMutation(baseOptions?: Apollo.MutationHookOptions<DuplicateTaskGroupMutation, DuplicateTaskGroupMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DuplicateTaskGroupMutation, DuplicateTaskGroupMutationVariables>(DuplicateTaskGroupDocument, options);
}
export type DuplicateTaskGroupMutationHookResult = ReturnType<typeof useDuplicateTaskGroupMutation>;
export type DuplicateTaskGroupMutationResult = Apollo.MutationResult<DuplicateTaskGroupMutation>;
export type DuplicateTaskGroupMutationOptions = Apollo.BaseMutationOptions<DuplicateTaskGroupMutation, DuplicateTaskGroupMutationVariables>;
export const SortTaskGroupDocument = gql`
mutation sortTaskGroup($tasks: [TaskPositionUpdate!]!, $taskGroupID: UUID!) {
sortTaskGroup(input: {taskGroupID: $taskGroupID, tasks: $tasks}) {
taskGroupID
tasks {
id
position
}
}
}
`;
export type SortTaskGroupMutationFn = Apollo.MutationFunction<SortTaskGroupMutation, SortTaskGroupMutationVariables>;
/**
* __useSortTaskGroupMutation__
*
* To run a mutation, you first call `useSortTaskGroupMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useSortTaskGroupMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [sortTaskGroupMutation, { data, loading, error }] = useSortTaskGroupMutation({
* variables: {
* tasks: // value for 'tasks'
* taskGroupID: // value for 'taskGroupID'
* },
* });
*/
export function useSortTaskGroupMutation(baseOptions?: Apollo.MutationHookOptions<SortTaskGroupMutation, SortTaskGroupMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<SortTaskGroupMutation, SortTaskGroupMutationVariables>(SortTaskGroupDocument, options);
}
export type SortTaskGroupMutationHookResult = ReturnType<typeof useSortTaskGroupMutation>;
export type SortTaskGroupMutationResult = Apollo.MutationResult<SortTaskGroupMutation>;
export type SortTaskGroupMutationOptions = Apollo.BaseMutationOptions<SortTaskGroupMutation, SortTaskGroupMutationVariables>;
export const UpdateTaskGroupNameDocument = gql`
mutation updateTaskGroupName($taskGroupID: UUID!, $name: String!) {
updateTaskGroupName(input: {taskGroupID: $taskGroupID, name: $name}) {
id
name
}
}
`;
export type UpdateTaskGroupNameMutationFn = Apollo.MutationFunction<UpdateTaskGroupNameMutation, UpdateTaskGroupNameMutationVariables>;
/**
* __useUpdateTaskGroupNameMutation__
*
* To run a mutation, you first call `useUpdateTaskGroupNameMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskGroupNameMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskGroupNameMutation, { data, loading, error }] = useUpdateTaskGroupNameMutation({
* variables: {
* taskGroupID: // value for 'taskGroupID'
* name: // value for 'name'
* },
* });
*/
export function useUpdateTaskGroupNameMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskGroupNameMutation, UpdateTaskGroupNameMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskGroupNameMutation, UpdateTaskGroupNameMutationVariables>(UpdateTaskGroupNameDocument, options);
}
export type UpdateTaskGroupNameMutationHookResult = ReturnType<typeof useUpdateTaskGroupNameMutation>;
export type UpdateTaskGroupNameMutationResult = Apollo.MutationResult<UpdateTaskGroupNameMutation>;
export type UpdateTaskGroupNameMutationOptions = Apollo.BaseMutationOptions<UpdateTaskGroupNameMutation, UpdateTaskGroupNameMutationVariables>;
export const CreateTeamDocument = gql`
mutation createTeam($name: String!, $organizationID: UUID!) {
createTeam(input: {name: $name, organizationID: $organizationID}) {
id
createdAt
name
}
}
`;
export type CreateTeamMutationFn = Apollo.MutationFunction<CreateTeamMutation, CreateTeamMutationVariables>;
/**
* __useCreateTeamMutation__
*
* To run a mutation, you first call `useCreateTeamMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateTeamMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createTeamMutation, { data, loading, error }] = useCreateTeamMutation({
* variables: {
* name: // value for 'name'
* organizationID: // value for 'organizationID'
* },
* });
*/
export function useCreateTeamMutation(baseOptions?: Apollo.MutationHookOptions<CreateTeamMutation, CreateTeamMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateTeamMutation, CreateTeamMutationVariables>(CreateTeamDocument, options);
}
export type CreateTeamMutationHookResult = ReturnType<typeof useCreateTeamMutation>;
export type CreateTeamMutationResult = Apollo.MutationResult<CreateTeamMutation>;
export type CreateTeamMutationOptions = Apollo.BaseMutationOptions<CreateTeamMutation, CreateTeamMutationVariables>;
export const CreateTeamMemberDocument = gql`
mutation createTeamMember($userID: UUID!, $teamID: UUID!) {
createTeamMember(input: {userID: $userID, teamID: $teamID}) {
team {
id
}
teamMember {
id
username
fullName
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
}
}
`;
export type CreateTeamMemberMutationFn = Apollo.MutationFunction<CreateTeamMemberMutation, CreateTeamMemberMutationVariables>;
/**
* __useCreateTeamMemberMutation__
*
* To run a mutation, you first call `useCreateTeamMemberMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateTeamMemberMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createTeamMemberMutation, { data, loading, error }] = useCreateTeamMemberMutation({
* variables: {
* userID: // value for 'userID'
* teamID: // value for 'teamID'
* },
* });
*/
export function useCreateTeamMemberMutation(baseOptions?: Apollo.MutationHookOptions<CreateTeamMemberMutation, CreateTeamMemberMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateTeamMemberMutation, CreateTeamMemberMutationVariables>(CreateTeamMemberDocument, options);
}
export type CreateTeamMemberMutationHookResult = ReturnType<typeof useCreateTeamMemberMutation>;
export type CreateTeamMemberMutationResult = Apollo.MutationResult<CreateTeamMemberMutation>;
export type CreateTeamMemberMutationOptions = Apollo.BaseMutationOptions<CreateTeamMemberMutation, CreateTeamMemberMutationVariables>;
export const DeleteTeamDocument = gql`
mutation deleteTeam($teamID: UUID!) {
deleteTeam(input: {teamID: $teamID}) {
ok
team {
id
}
}
}
`;
export type DeleteTeamMutationFn = Apollo.MutationFunction<DeleteTeamMutation, DeleteTeamMutationVariables>;
/**
* __useDeleteTeamMutation__
*
* To run a mutation, you first call `useDeleteTeamMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteTeamMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteTeamMutation, { data, loading, error }] = useDeleteTeamMutation({
* variables: {
* teamID: // value for 'teamID'
* },
* });
*/
export function useDeleteTeamMutation(baseOptions?: Apollo.MutationHookOptions<DeleteTeamMutation, DeleteTeamMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteTeamMutation, DeleteTeamMutationVariables>(DeleteTeamDocument, options);
}
export type DeleteTeamMutationHookResult = ReturnType<typeof useDeleteTeamMutation>;
export type DeleteTeamMutationResult = Apollo.MutationResult<DeleteTeamMutation>;
export type DeleteTeamMutationOptions = Apollo.BaseMutationOptions<DeleteTeamMutation, DeleteTeamMutationVariables>;
export const DeleteTeamMemberDocument = gql`
mutation deleteTeamMember($teamID: UUID!, $userID: UUID!, $newOwnerID: UUID) {
deleteTeamMember(
input: {teamID: $teamID, userID: $userID, newOwnerID: $newOwnerID}
) {
teamID
userID
}
}
`;
export type DeleteTeamMemberMutationFn = Apollo.MutationFunction<DeleteTeamMemberMutation, DeleteTeamMemberMutationVariables>;
/**
* __useDeleteTeamMemberMutation__
*
* To run a mutation, you first call `useDeleteTeamMemberMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteTeamMemberMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteTeamMemberMutation, { data, loading, error }] = useDeleteTeamMemberMutation({
* variables: {
* teamID: // value for 'teamID'
* userID: // value for 'userID'
* newOwnerID: // value for 'newOwnerID'
* },
* });
*/
export function useDeleteTeamMemberMutation(baseOptions?: Apollo.MutationHookOptions<DeleteTeamMemberMutation, DeleteTeamMemberMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteTeamMemberMutation, DeleteTeamMemberMutationVariables>(DeleteTeamMemberDocument, options);
}
export type DeleteTeamMemberMutationHookResult = ReturnType<typeof useDeleteTeamMemberMutation>;
export type DeleteTeamMemberMutationResult = Apollo.MutationResult<DeleteTeamMemberMutation>;
export type DeleteTeamMemberMutationOptions = Apollo.BaseMutationOptions<DeleteTeamMemberMutation, DeleteTeamMemberMutationVariables>;
export const GetTeamDocument = gql`
query getTeam($teamID: UUID!) {
findTeam(input: {teamID: $teamID}) {
id
createdAt
name
members {
id
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
}
projects(input: {teamID: $teamID}) {
id
name
team {
id
name
}
}
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
}
`;
/**
* __useGetTeamQuery__
*
* To run a query within a React component, call `useGetTeamQuery` and pass it any options that fit your needs.
* When your component renders, `useGetTeamQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useGetTeamQuery({
* variables: {
* teamID: // value for 'teamID'
* },
* });
*/
export function useGetTeamQuery(baseOptions: Apollo.QueryHookOptions<GetTeamQuery, GetTeamQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<GetTeamQuery, GetTeamQueryVariables>(GetTeamDocument, options);
}
export function useGetTeamLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetTeamQuery, GetTeamQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<GetTeamQuery, GetTeamQueryVariables>(GetTeamDocument, options);
}
export type GetTeamQueryHookResult = ReturnType<typeof useGetTeamQuery>;
export type GetTeamLazyQueryHookResult = ReturnType<typeof useGetTeamLazyQuery>;
export type GetTeamQueryResult = Apollo.QueryResult<GetTeamQuery, GetTeamQueryVariables>;
export const UpdateTeamMemberRoleDocument = gql`
mutation updateTeamMemberRole($teamID: UUID!, $userID: UUID!, $roleCode: RoleCode!) {
updateTeamMemberRole(
input: {teamID: $teamID, userID: $userID, roleCode: $roleCode}
) {
member {
id
role {
code
name
}
}
teamID
}
}
`;
export type UpdateTeamMemberRoleMutationFn = Apollo.MutationFunction<UpdateTeamMemberRoleMutation, UpdateTeamMemberRoleMutationVariables>;
/**
* __useUpdateTeamMemberRoleMutation__
*
* To run a mutation, you first call `useUpdateTeamMemberRoleMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTeamMemberRoleMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTeamMemberRoleMutation, { data, loading, error }] = useUpdateTeamMemberRoleMutation({
* variables: {
* teamID: // value for 'teamID'
* userID: // value for 'userID'
* roleCode: // value for 'roleCode'
* },
* });
*/
export function useUpdateTeamMemberRoleMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTeamMemberRoleMutation, UpdateTeamMemberRoleMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTeamMemberRoleMutation, UpdateTeamMemberRoleMutationVariables>(UpdateTeamMemberRoleDocument, options);
}
export type UpdateTeamMemberRoleMutationHookResult = ReturnType<typeof useUpdateTeamMemberRoleMutation>;
export type UpdateTeamMemberRoleMutationResult = Apollo.MutationResult<UpdateTeamMemberRoleMutation>;
export type UpdateTeamMemberRoleMutationOptions = Apollo.BaseMutationOptions<UpdateTeamMemberRoleMutation, UpdateTeamMemberRoleMutationVariables>;
export const ToggleProjectVisibilityDocument = gql`
mutation toggleProjectVisibility($projectID: UUID!, $isPublic: Boolean!) {
toggleProjectVisibility(input: {projectID: $projectID, isPublic: $isPublic}) {
project {
id
publicOn
}
}
}
`;
export type ToggleProjectVisibilityMutationFn = Apollo.MutationFunction<ToggleProjectVisibilityMutation, ToggleProjectVisibilityMutationVariables>;
/**
* __useToggleProjectVisibilityMutation__
*
* To run a mutation, you first call `useToggleProjectVisibilityMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useToggleProjectVisibilityMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [toggleProjectVisibilityMutation, { data, loading, error }] = useToggleProjectVisibilityMutation({
* variables: {
* projectID: // value for 'projectID'
* isPublic: // value for 'isPublic'
* },
* });
*/
export function useToggleProjectVisibilityMutation(baseOptions?: Apollo.MutationHookOptions<ToggleProjectVisibilityMutation, ToggleProjectVisibilityMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<ToggleProjectVisibilityMutation, ToggleProjectVisibilityMutationVariables>(ToggleProjectVisibilityDocument, options);
}
export type ToggleProjectVisibilityMutationHookResult = ReturnType<typeof useToggleProjectVisibilityMutation>;
export type ToggleProjectVisibilityMutationResult = Apollo.MutationResult<ToggleProjectVisibilityMutation>;
export type ToggleProjectVisibilityMutationOptions = Apollo.BaseMutationOptions<ToggleProjectVisibilityMutation, ToggleProjectVisibilityMutationVariables>;
export const ToggleTaskLabelDocument = gql`
mutation toggleTaskLabel($taskID: UUID!, $projectLabelID: UUID!) {
toggleTaskLabel(input: {taskID: $taskID, projectLabelID: $projectLabelID}) {
active
task {
id
labels {
id
assignedDate
projectLabel {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}
}
}
}
`;
export type ToggleTaskLabelMutationFn = Apollo.MutationFunction<ToggleTaskLabelMutation, ToggleTaskLabelMutationVariables>;
/**
* __useToggleTaskLabelMutation__
*
* To run a mutation, you first call `useToggleTaskLabelMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useToggleTaskLabelMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [toggleTaskLabelMutation, { data, loading, error }] = useToggleTaskLabelMutation({
* variables: {
* taskID: // value for 'taskID'
* projectLabelID: // value for 'projectLabelID'
* },
* });
*/
export function useToggleTaskLabelMutation(baseOptions?: Apollo.MutationHookOptions<ToggleTaskLabelMutation, ToggleTaskLabelMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<ToggleTaskLabelMutation, ToggleTaskLabelMutationVariables>(ToggleTaskLabelDocument, options);
}
export type ToggleTaskLabelMutationHookResult = ReturnType<typeof useToggleTaskLabelMutation>;
export type ToggleTaskLabelMutationResult = Apollo.MutationResult<ToggleTaskLabelMutation>;
export type ToggleTaskLabelMutationOptions = Apollo.BaseMutationOptions<ToggleTaskLabelMutation, ToggleTaskLabelMutationVariables>;
export const TopNavbarDocument = gql`
query topNavbar {
notifications {
id
read
readAt
notification {
id
actionType
causedBy {
username
fullname
id
}
createdAt
}
}
me {
user {
id
fullName
profileIcon {
initials
bgColor
url
}
}
teamRoles {
teamID
roleCode
}
projectRoles {
projectID
roleCode
}
}
}
`;
/**
* __useTopNavbarQuery__
*
* To run a query within a React component, call `useTopNavbarQuery` and pass it any options that fit your needs.
* When your component renders, `useTopNavbarQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useTopNavbarQuery({
* variables: {
* },
* });
*/
export function useTopNavbarQuery(baseOptions?: Apollo.QueryHookOptions<TopNavbarQuery, TopNavbarQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<TopNavbarQuery, TopNavbarQueryVariables>(TopNavbarDocument, options);
}
export function useTopNavbarLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<TopNavbarQuery, TopNavbarQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<TopNavbarQuery, TopNavbarQueryVariables>(TopNavbarDocument, options);
}
export type TopNavbarQueryHookResult = ReturnType<typeof useTopNavbarQuery>;
export type TopNavbarLazyQueryHookResult = ReturnType<typeof useTopNavbarLazyQuery>;
export type TopNavbarQueryResult = Apollo.QueryResult<TopNavbarQuery, TopNavbarQueryVariables>;
export const UnassignTaskDocument = gql`
mutation unassignTask($taskID: UUID!, $userID: UUID!) {
unassignTask(input: {taskID: $taskID, userID: $userID}) {
assigned {
id
fullName
}
id
}
}
`;
export type UnassignTaskMutationFn = Apollo.MutationFunction<UnassignTaskMutation, UnassignTaskMutationVariables>;
/**
* __useUnassignTaskMutation__
*
* To run a mutation, you first call `useUnassignTaskMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUnassignTaskMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [unassignTaskMutation, { data, loading, error }] = useUnassignTaskMutation({
* variables: {
* taskID: // value for 'taskID'
* userID: // value for 'userID'
* },
* });
*/
export function useUnassignTaskMutation(baseOptions?: Apollo.MutationHookOptions<UnassignTaskMutation, UnassignTaskMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UnassignTaskMutation, UnassignTaskMutationVariables>(UnassignTaskDocument, options);
}
export type UnassignTaskMutationHookResult = ReturnType<typeof useUnassignTaskMutation>;
export type UnassignTaskMutationResult = Apollo.MutationResult<UnassignTaskMutation>;
export type UnassignTaskMutationOptions = Apollo.BaseMutationOptions<UnassignTaskMutation, UnassignTaskMutationVariables>;
export const HasUnreadNotificationsDocument = gql`
query hasUnreadNotifications {
hasUnreadNotifications {
unread
}
}
`;
/**
* __useHasUnreadNotificationsQuery__
*
* To run a query within a React component, call `useHasUnreadNotificationsQuery` and pass it any options that fit your needs.
* When your component renders, `useHasUnreadNotificationsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useHasUnreadNotificationsQuery({
* variables: {
* },
* });
*/
export function useHasUnreadNotificationsQuery(baseOptions?: Apollo.QueryHookOptions<HasUnreadNotificationsQuery, HasUnreadNotificationsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<HasUnreadNotificationsQuery, HasUnreadNotificationsQueryVariables>(HasUnreadNotificationsDocument, options);
}
export function useHasUnreadNotificationsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<HasUnreadNotificationsQuery, HasUnreadNotificationsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<HasUnreadNotificationsQuery, HasUnreadNotificationsQueryVariables>(HasUnreadNotificationsDocument, options);
}
export type HasUnreadNotificationsQueryHookResult = ReturnType<typeof useHasUnreadNotificationsQuery>;
export type HasUnreadNotificationsLazyQueryHookResult = ReturnType<typeof useHasUnreadNotificationsLazyQuery>;
export type HasUnreadNotificationsQueryResult = Apollo.QueryResult<HasUnreadNotificationsQuery, HasUnreadNotificationsQueryVariables>;
export const UpdateProjectLabelDocument = gql`
mutation updateProjectLabel($projectLabelID: UUID!, $labelColorID: UUID!, $name: String!) {
updateProjectLabel(
input: {projectLabelID: $projectLabelID, labelColorID: $labelColorID, name: $name}
) {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}
`;
export type UpdateProjectLabelMutationFn = Apollo.MutationFunction<UpdateProjectLabelMutation, UpdateProjectLabelMutationVariables>;
/**
* __useUpdateProjectLabelMutation__
*
* To run a mutation, you first call `useUpdateProjectLabelMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateProjectLabelMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateProjectLabelMutation, { data, loading, error }] = useUpdateProjectLabelMutation({
* variables: {
* projectLabelID: // value for 'projectLabelID'
* labelColorID: // value for 'labelColorID'
* name: // value for 'name'
* },
* });
*/
export function useUpdateProjectLabelMutation(baseOptions?: Apollo.MutationHookOptions<UpdateProjectLabelMutation, UpdateProjectLabelMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateProjectLabelMutation, UpdateProjectLabelMutationVariables>(UpdateProjectLabelDocument, options);
}
export type UpdateProjectLabelMutationHookResult = ReturnType<typeof useUpdateProjectLabelMutation>;
export type UpdateProjectLabelMutationResult = Apollo.MutationResult<UpdateProjectLabelMutation>;
export type UpdateProjectLabelMutationOptions = Apollo.BaseMutationOptions<UpdateProjectLabelMutation, UpdateProjectLabelMutationVariables>;
export const UpdateProjectNameDocument = gql`
mutation updateProjectName($projectID: UUID!, $name: String!) {
updateProjectName(input: {projectID: $projectID, name: $name}) {
id
name
}
}
`;
export type UpdateProjectNameMutationFn = Apollo.MutationFunction<UpdateProjectNameMutation, UpdateProjectNameMutationVariables>;
/**
* __useUpdateProjectNameMutation__
*
* To run a mutation, you first call `useUpdateProjectNameMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateProjectNameMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateProjectNameMutation, { data, loading, error }] = useUpdateProjectNameMutation({
* variables: {
* projectID: // value for 'projectID'
* name: // value for 'name'
* },
* });
*/
export function useUpdateProjectNameMutation(baseOptions?: Apollo.MutationHookOptions<UpdateProjectNameMutation, UpdateProjectNameMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateProjectNameMutation, UpdateProjectNameMutationVariables>(UpdateProjectNameDocument, options);
}
export type UpdateProjectNameMutationHookResult = ReturnType<typeof useUpdateProjectNameMutation>;
export type UpdateProjectNameMutationResult = Apollo.MutationResult<UpdateProjectNameMutation>;
export type UpdateProjectNameMutationOptions = Apollo.BaseMutationOptions<UpdateProjectNameMutation, UpdateProjectNameMutationVariables>;
export const UpdateTaskDescriptionDocument = gql`
mutation updateTaskDescription($taskID: UUID!, $description: String!) {
updateTaskDescription(input: {taskID: $taskID, description: $description}) {
id
description
}
}
`;
export type UpdateTaskDescriptionMutationFn = Apollo.MutationFunction<UpdateTaskDescriptionMutation, UpdateTaskDescriptionMutationVariables>;
/**
* __useUpdateTaskDescriptionMutation__
*
* To run a mutation, you first call `useUpdateTaskDescriptionMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskDescriptionMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskDescriptionMutation, { data, loading, error }] = useUpdateTaskDescriptionMutation({
* variables: {
* taskID: // value for 'taskID'
* description: // value for 'description'
* },
* });
*/
export function useUpdateTaskDescriptionMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskDescriptionMutation, UpdateTaskDescriptionMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskDescriptionMutation, UpdateTaskDescriptionMutationVariables>(UpdateTaskDescriptionDocument, options);
}
export type UpdateTaskDescriptionMutationHookResult = ReturnType<typeof useUpdateTaskDescriptionMutation>;
export type UpdateTaskDescriptionMutationResult = Apollo.MutationResult<UpdateTaskDescriptionMutation>;
export type UpdateTaskDescriptionMutationOptions = Apollo.BaseMutationOptions<UpdateTaskDescriptionMutation, UpdateTaskDescriptionMutationVariables>;
export const UpdateTaskDueDateDocument = gql`
mutation updateTaskDueDate($taskID: UUID!, $dueDate: Time, $hasTime: Boolean!, $createNotifications: [CreateTaskDueDateNotification!]!, $updateNotifications: [UpdateTaskDueDateNotification!]!, $deleteNotifications: [DeleteTaskDueDateNotification!]!) {
updateTaskDueDate(
input: {taskID: $taskID, dueDate: $dueDate, hasTime: $hasTime}
) {
id
dueDate {
at
}
hasTime
}
createTaskDueDateNotifications(input: $createNotifications) {
notifications {
id
period
duration
}
}
updateTaskDueDateNotifications(input: $updateNotifications) {
notifications {
id
period
duration
}
}
deleteTaskDueDateNotifications(input: $deleteNotifications) {
notifications
}
}
`;
export type UpdateTaskDueDateMutationFn = Apollo.MutationFunction<UpdateTaskDueDateMutation, UpdateTaskDueDateMutationVariables>;
/**
* __useUpdateTaskDueDateMutation__
*
* To run a mutation, you first call `useUpdateTaskDueDateMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskDueDateMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskDueDateMutation, { data, loading, error }] = useUpdateTaskDueDateMutation({
* variables: {
* taskID: // value for 'taskID'
* dueDate: // value for 'dueDate'
* hasTime: // value for 'hasTime'
* createNotifications: // value for 'createNotifications'
* updateNotifications: // value for 'updateNotifications'
* deleteNotifications: // value for 'deleteNotifications'
* },
* });
*/
export function useUpdateTaskDueDateMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskDueDateMutation, UpdateTaskDueDateMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskDueDateMutation, UpdateTaskDueDateMutationVariables>(UpdateTaskDueDateDocument, options);
}
export type UpdateTaskDueDateMutationHookResult = ReturnType<typeof useUpdateTaskDueDateMutation>;
export type UpdateTaskDueDateMutationResult = Apollo.MutationResult<UpdateTaskDueDateMutation>;
export type UpdateTaskDueDateMutationOptions = Apollo.BaseMutationOptions<UpdateTaskDueDateMutation, UpdateTaskDueDateMutationVariables>;
export const UpdateTaskGroupLocationDocument = gql`
mutation updateTaskGroupLocation($taskGroupID: UUID!, $position: Float!) {
updateTaskGroupLocation(input: {taskGroupID: $taskGroupID, position: $position}) {
id
position
}
}
`;
export type UpdateTaskGroupLocationMutationFn = Apollo.MutationFunction<UpdateTaskGroupLocationMutation, UpdateTaskGroupLocationMutationVariables>;
/**
* __useUpdateTaskGroupLocationMutation__
*
* To run a mutation, you first call `useUpdateTaskGroupLocationMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskGroupLocationMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskGroupLocationMutation, { data, loading, error }] = useUpdateTaskGroupLocationMutation({
* variables: {
* taskGroupID: // value for 'taskGroupID'
* position: // value for 'position'
* },
* });
*/
export function useUpdateTaskGroupLocationMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskGroupLocationMutation, UpdateTaskGroupLocationMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskGroupLocationMutation, UpdateTaskGroupLocationMutationVariables>(UpdateTaskGroupLocationDocument, options);
}
export type UpdateTaskGroupLocationMutationHookResult = ReturnType<typeof useUpdateTaskGroupLocationMutation>;
export type UpdateTaskGroupLocationMutationResult = Apollo.MutationResult<UpdateTaskGroupLocationMutation>;
export type UpdateTaskGroupLocationMutationOptions = Apollo.BaseMutationOptions<UpdateTaskGroupLocationMutation, UpdateTaskGroupLocationMutationVariables>;
export const UpdateTaskLocationDocument = gql`
mutation updateTaskLocation($taskID: UUID!, $taskGroupID: UUID!, $position: Float!) {
updateTaskLocation(
input: {taskID: $taskID, taskGroupID: $taskGroupID, position: $position}
) {
previousTaskGroupID
task {
id
createdAt
name
position
taskGroup {
id
}
}
}
}
`;
export type UpdateTaskLocationMutationFn = Apollo.MutationFunction<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>;
/**
* __useUpdateTaskLocationMutation__
*
* To run a mutation, you first call `useUpdateTaskLocationMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskLocationMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskLocationMutation, { data, loading, error }] = useUpdateTaskLocationMutation({
* variables: {
* taskID: // value for 'taskID'
* taskGroupID: // value for 'taskGroupID'
* position: // value for 'position'
* },
* });
*/
export function useUpdateTaskLocationMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>(UpdateTaskLocationDocument, options);
}
export type UpdateTaskLocationMutationHookResult = ReturnType<typeof useUpdateTaskLocationMutation>;
export type UpdateTaskLocationMutationResult = Apollo.MutationResult<UpdateTaskLocationMutation>;
export type UpdateTaskLocationMutationOptions = Apollo.BaseMutationOptions<UpdateTaskLocationMutation, UpdateTaskLocationMutationVariables>;
export const UpdateTaskNameDocument = gql`
mutation updateTaskName($taskID: UUID!, $name: String!) {
updateTaskName(input: {taskID: $taskID, name: $name}) {
id
name
position
}
}
`;
export type UpdateTaskNameMutationFn = Apollo.MutationFunction<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>;
/**
* __useUpdateTaskNameMutation__
*
* To run a mutation, you first call `useUpdateTaskNameMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateTaskNameMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateTaskNameMutation, { data, loading, error }] = useUpdateTaskNameMutation({
* variables: {
* taskID: // value for 'taskID'
* name: // value for 'name'
* },
* });
*/
export function useUpdateTaskNameMutation(baseOptions?: Apollo.MutationHookOptions<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>(UpdateTaskNameDocument, options);
}
export type UpdateTaskNameMutationHookResult = ReturnType<typeof useUpdateTaskNameMutation>;
export type UpdateTaskNameMutationResult = Apollo.MutationResult<UpdateTaskNameMutation>;
export type UpdateTaskNameMutationOptions = Apollo.BaseMutationOptions<UpdateTaskNameMutation, UpdateTaskNameMutationVariables>;
export const CreateUserAccountDocument = gql`
mutation createUserAccount($username: String!, $roleCode: String!, $email: String!, $fullName: String!, $initials: String!, $password: String!) {
createUserAccount(
input: {roleCode: $roleCode, username: $username, email: $email, fullName: $fullName, initials: $initials, password: $password}
) {
id
email
fullName
initials
username
bio
profileIcon {
url
initials
bgColor
}
role {
code
name
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
}
`;
export type CreateUserAccountMutationFn = Apollo.MutationFunction<CreateUserAccountMutation, CreateUserAccountMutationVariables>;
/**
* __useCreateUserAccountMutation__
*
* To run a mutation, you first call `useCreateUserAccountMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateUserAccountMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [createUserAccountMutation, { data, loading, error }] = useCreateUserAccountMutation({
* variables: {
* username: // value for 'username'
* roleCode: // value for 'roleCode'
* email: // value for 'email'
* fullName: // value for 'fullName'
* initials: // value for 'initials'
* password: // value for 'password'
* },
* });
*/
export function useCreateUserAccountMutation(baseOptions?: Apollo.MutationHookOptions<CreateUserAccountMutation, CreateUserAccountMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateUserAccountMutation, CreateUserAccountMutationVariables>(CreateUserAccountDocument, options);
}
export type CreateUserAccountMutationHookResult = ReturnType<typeof useCreateUserAccountMutation>;
export type CreateUserAccountMutationResult = Apollo.MutationResult<CreateUserAccountMutation>;
export type CreateUserAccountMutationOptions = Apollo.BaseMutationOptions<CreateUserAccountMutation, CreateUserAccountMutationVariables>;
export const DeleteInvitedUserAccountDocument = gql`
mutation deleteInvitedUserAccount($invitedUserID: UUID!) {
deleteInvitedUserAccount(input: {invitedUserID: $invitedUserID}) {
invitedUser {
id
}
}
}
`;
export type DeleteInvitedUserAccountMutationFn = Apollo.MutationFunction<DeleteInvitedUserAccountMutation, DeleteInvitedUserAccountMutationVariables>;
/**
* __useDeleteInvitedUserAccountMutation__
*
* To run a mutation, you first call `useDeleteInvitedUserAccountMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteInvitedUserAccountMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteInvitedUserAccountMutation, { data, loading, error }] = useDeleteInvitedUserAccountMutation({
* variables: {
* invitedUserID: // value for 'invitedUserID'
* },
* });
*/
export function useDeleteInvitedUserAccountMutation(baseOptions?: Apollo.MutationHookOptions<DeleteInvitedUserAccountMutation, DeleteInvitedUserAccountMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteInvitedUserAccountMutation, DeleteInvitedUserAccountMutationVariables>(DeleteInvitedUserAccountDocument, options);
}
export type DeleteInvitedUserAccountMutationHookResult = ReturnType<typeof useDeleteInvitedUserAccountMutation>;
export type DeleteInvitedUserAccountMutationResult = Apollo.MutationResult<DeleteInvitedUserAccountMutation>;
export type DeleteInvitedUserAccountMutationOptions = Apollo.BaseMutationOptions<DeleteInvitedUserAccountMutation, DeleteInvitedUserAccountMutationVariables>;
export const DeleteUserAccountDocument = gql`
mutation deleteUserAccount($userID: UUID!, $newOwnerID: UUID) {
deleteUserAccount(input: {userID: $userID, newOwnerID: $newOwnerID}) {
ok
userAccount {
id
}
}
}
`;
export type DeleteUserAccountMutationFn = Apollo.MutationFunction<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>;
/**
* __useDeleteUserAccountMutation__
*
* To run a mutation, you first call `useDeleteUserAccountMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteUserAccountMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [deleteUserAccountMutation, { data, loading, error }] = useDeleteUserAccountMutation({
* variables: {
* userID: // value for 'userID'
* newOwnerID: // value for 'newOwnerID'
* },
* });
*/
export function useDeleteUserAccountMutation(baseOptions?: Apollo.MutationHookOptions<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>(DeleteUserAccountDocument, options);
}
export type DeleteUserAccountMutationHookResult = ReturnType<typeof useDeleteUserAccountMutation>;
export type DeleteUserAccountMutationResult = Apollo.MutationResult<DeleteUserAccountMutation>;
export type DeleteUserAccountMutationOptions = Apollo.BaseMutationOptions<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>;
export const UpdateUserInfoDocument = gql`
mutation updateUserInfo($name: String!, $initials: String!, $email: String!, $bio: String!) {
updateUserInfo(
input: {name: $name, initials: $initials, email: $email, bio: $bio}
) {
user {
id
email
fullName
bio
profileIcon {
initials
}
}
}
}
`;
export type UpdateUserInfoMutationFn = Apollo.MutationFunction<UpdateUserInfoMutation, UpdateUserInfoMutationVariables>;
/**
* __useUpdateUserInfoMutation__
*
* To run a mutation, you first call `useUpdateUserInfoMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateUserInfoMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateUserInfoMutation, { data, loading, error }] = useUpdateUserInfoMutation({
* variables: {
* name: // value for 'name'
* initials: // value for 'initials'
* email: // value for 'email'
* bio: // value for 'bio'
* },
* });
*/
export function useUpdateUserInfoMutation(baseOptions?: Apollo.MutationHookOptions<UpdateUserInfoMutation, UpdateUserInfoMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateUserInfoMutation, UpdateUserInfoMutationVariables>(UpdateUserInfoDocument, options);
}
export type UpdateUserInfoMutationHookResult = ReturnType<typeof useUpdateUserInfoMutation>;
export type UpdateUserInfoMutationResult = Apollo.MutationResult<UpdateUserInfoMutation>;
export type UpdateUserInfoMutationOptions = Apollo.BaseMutationOptions<UpdateUserInfoMutation, UpdateUserInfoMutationVariables>;
export const UpdateUserPasswordDocument = gql`
mutation updateUserPassword($userID: UUID!, $password: String!) {
updateUserPassword(input: {userID: $userID, password: $password}) {
ok
}
}
`;
export type UpdateUserPasswordMutationFn = Apollo.MutationFunction<UpdateUserPasswordMutation, UpdateUserPasswordMutationVariables>;
/**
* __useUpdateUserPasswordMutation__
*
* To run a mutation, you first call `useUpdateUserPasswordMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateUserPasswordMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateUserPasswordMutation, { data, loading, error }] = useUpdateUserPasswordMutation({
* variables: {
* userID: // value for 'userID'
* password: // value for 'password'
* },
* });
*/
export function useUpdateUserPasswordMutation(baseOptions?: Apollo.MutationHookOptions<UpdateUserPasswordMutation, UpdateUserPasswordMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateUserPasswordMutation, UpdateUserPasswordMutationVariables>(UpdateUserPasswordDocument, options);
}
export type UpdateUserPasswordMutationHookResult = ReturnType<typeof useUpdateUserPasswordMutation>;
export type UpdateUserPasswordMutationResult = Apollo.MutationResult<UpdateUserPasswordMutation>;
export type UpdateUserPasswordMutationOptions = Apollo.BaseMutationOptions<UpdateUserPasswordMutation, UpdateUserPasswordMutationVariables>;
export const UpdateUserRoleDocument = gql`
mutation updateUserRole($userID: UUID!, $roleCode: RoleCode!) {
updateUserRole(input: {userID: $userID, roleCode: $roleCode}) {
user {
id
role {
code
name
}
}
}
}
`;
export type UpdateUserRoleMutationFn = Apollo.MutationFunction<UpdateUserRoleMutation, UpdateUserRoleMutationVariables>;
/**
* __useUpdateUserRoleMutation__
*
* To run a mutation, you first call `useUpdateUserRoleMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateUserRoleMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateUserRoleMutation, { data, loading, error }] = useUpdateUserRoleMutation({
* variables: {
* userID: // value for 'userID'
* roleCode: // value for 'roleCode'
* },
* });
*/
export function useUpdateUserRoleMutation(baseOptions?: Apollo.MutationHookOptions<UpdateUserRoleMutation, UpdateUserRoleMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<UpdateUserRoleMutation, UpdateUserRoleMutationVariables>(UpdateUserRoleDocument, options);
}
export type UpdateUserRoleMutationHookResult = ReturnType<typeof useUpdateUserRoleMutation>;
export type UpdateUserRoleMutationResult = Apollo.MutationResult<UpdateUserRoleMutation>;
export type UpdateUserRoleMutationOptions = Apollo.BaseMutationOptions<UpdateUserRoleMutation, UpdateUserRoleMutationVariables>;
export const UsersDocument = gql`
query users {
invitedUsers {
id
email
invitedOn
}
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
}
`;
/**
* __useUsersQuery__
*
* To run a query within a React component, call `useUsersQuery` and pass it any options that fit your needs.
* When your component renders, `useUsersQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useUsersQuery({
* variables: {
* },
* });
*/
export function useUsersQuery(baseOptions?: Apollo.QueryHookOptions<UsersQuery, UsersQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<UsersQuery, UsersQueryVariables>(UsersDocument, options);
}
export function useUsersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<UsersQuery, UsersQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<UsersQuery, UsersQueryVariables>(UsersDocument, options);
}
export type UsersQueryHookResult = ReturnType<typeof useUsersQuery>;
export type UsersLazyQueryHookResult = ReturnType<typeof useUsersLazyQuery>;
export type UsersQueryResult = Apollo.QueryResult<UsersQuery, UsersQueryVariables>; | 9,838 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/assignTask.graphqls | mutation assignTask($taskID: UUID!, $userID: UUID!) {
assignTask(input: {taskID: $taskID, userID: $userID}) {
id
assigned {
id
fullName
}
}
}
| 9,839 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/clearAvatarProfile.graphqls | mutation clearProfileAvatar {
clearProfileAvatar {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}
| 9,840 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/createProject.graphqls | mutation createProject($teamID: UUID, $name: String!) {
createProject(input: {teamID: $teamID, name: $name}) {
id
shortId
name
team {
id
name
}
}
}
| 9,841 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/createProjectLabel.graphqls | mutation createProjectLabel($projectID: UUID!, $labelColorID: UUID!, $name: String!) {
createProjectLabel(input:{projectID:$projectID, labelColorID: $labelColorID, name: $name}) {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}
| 9,842 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/createTaskGroup.graphqls | mutation createTaskGroup( $projectID: UUID!, $name: String!, $position: Float! ) {
createTaskGroup(
input: { projectID: $projectID, name: $name, position: $position }
) {
id
name
position
}
}
| 9,843 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/deleteProjectLabel.graphqls | mutation deleteProjectLabel($projectLabelID: UUID!) {
deleteProjectLabel(input: { projectLabelID:$projectLabelID }) {
id
}
}
| 9,844 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/deleteTask.graphqls | mutation deleteTask($taskID: UUID!) {
deleteTask(input: { taskID: $taskID }) {
taskID
}
}
| 9,845 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/deleteTaskGroup.graphqls | mutation deleteTaskGroup($taskGroupID: UUID!) {
deleteTaskGroup(input: { taskGroupID: $taskGroupID }) {
ok
affectedRows
taskGroup {
id
tasks {
id
name
}
}
}
}
| 9,846 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/findProject.ts | import gql from 'graphql-tag';
import TASK_FRAGMENT from './fragments/task';
const FIND_PROJECT_QUERY = gql`
query findProject($projectID: String!) {
findProject(input: { projectShortID: $projectID }) {
id
name
publicOn
team {
id
}
members {
id
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
invitedMembers {
email
invitedOn
}
labels {
id
createdDate
name
labelColor {
id
name
colorHex
position
}
}
taskGroups {
id
name
position
tasks {
...TaskFields
}
}
}
labelColors {
id
position
colorHex
name
}
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
${TASK_FRAGMENT}
}
`;
| 9,847 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/findTask.graphqls | query findTask($taskID: String!) {
findTask(input: {taskShortID: $taskID}) {
id
shortId
name
watched
description
dueDate {
at
notifications {
id
period
duration
}
}
position
complete
hasTime
taskGroup {
id
name
}
comments {
id
pinned
message
createdAt
updatedAt
createdBy {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}
activity {
id
type
causedBy {
id
fullName
profileIcon {
initials
bgColor
url
}
}
createdAt
data {
name
value
}
}
badges {
checklist {
total
complete
}
}
checklists {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
labels {
id
assignedDate
projectLabel {
id
name
createdDate
labelColor {
id
colorHex
position
name
}
}
}
assigned {
id
fullName
profileIcon {
url
initials
bgColor
}
}
}
me {
user {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}
}
| 9,848 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/getProjects.graphqls | query getProjects {
organizations {
id
name
}
teams {
id
name
createdAt
}
projects {
id
shortId
name
team {
id
name
}
}
}
| 9,849 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/labels.ts | import gql from 'graphql-tag';
import TASK_FRAGMENT from './fragments/task';
const FIND_PROJECT_QUERY = gql`
query labels($projectID: UUID!) {
findProject(input: { projectID: $projectID }) {
labels {
id
createdDate
name
labelColor {
id
name
colorHex
position
}
}
}
labelColors {
id
position
colorHex
name
}
}
`;
| 9,850 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/me.graphqls | query me {
me {
user {
id
fullName
username
email
bio
profileIcon {
initials
bgColor
url
}
}
teamRoles {
teamID
roleCode
}
projectRoles {
projectID
roleCode
}
}
}
| 9,851 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/myTasks.graphqls | query myTasks($status: MyTasksStatus!, $sort: MyTasksSort!) {
projects {
id
name
}
myTasks(input: { status: $status, sort: $sort }) {
tasks {
id
shortId
taskGroup {
id
name
}
name
dueDate {
at
}
hasTime
complete
completedAt
}
projects {
projectID
taskID
}
}
}
| 9,852 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/notificationToggleRead.ts | import gql from 'graphql-tag';
const CREATE_TASK_MUTATION = gql`
mutation notificationToggleRead($notifiedID: UUID!) {
notificationToggleRead(input: { notifiedID: $notifiedID }) {
id
read
readAt
}
}
`;
export default CREATE_TASK_MUTATION;
| 9,853 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/notifications.ts | import gql from 'graphql-tag';
export const TOP_NAVBAR_QUERY = gql`
query notifications($limit: Int!, $cursor: String, $filter: NotificationFilter!) {
notified(input: { limit: $limit, cursor: $cursor, filter: $filter }) {
totalCount
pageInfo {
endCursor
hasNextPage
}
notified {
id
read
readAt
notification {
id
actionType
data {
key
value
}
causedBy {
username
fullname
id
}
createdAt
}
}
}
}
`;
export default TOP_NAVBAR_QUERY;
| 9,854 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/notifictionMarkAllRead.ts | import gql from 'graphql-tag';
const CREATE_TASK_MUTATION = gql`
mutation notificationMarkAllRead {
notificationMarkAllRead {
success
}
}
`;
export default CREATE_TASK_MUTATION;
| 9,855 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/onNotificationAdded.ts | import gql from 'graphql-tag';
import TASK_FRAGMENT from './fragments/task';
const FIND_PROJECT_QUERY = gql`
subscription notificationAdded {
notificationAdded {
id
read
readAt
notification {
id
actionType
data {
key
value
}
causedBy {
username
fullname
id
}
createdAt
}
}
}
`;
| 9,856 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/toggleProjectVisibility.ts | import gql from 'graphql-tag';
export const DELETE_PROJECT_MUTATION = gql`
mutation toggleProjectVisibility($projectID: UUID!, $isPublic: Boolean!) {
toggleProjectVisibility(input: { projectID: $projectID, isPublic: $isPublic }) {
project {
id
publicOn
}
}
}
`;
export default DELETE_PROJECT_MUTATION;
| 9,857 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/toggleTaskLabel.graphqls | mutation toggleTaskLabel($taskID: UUID!, $projectLabelID: UUID!) {
toggleTaskLabel(
input: {
taskID: $taskID,
projectLabelID: $projectLabelID
}
) {
active
task {
id
labels {
id
assignedDate
projectLabel {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}
}
}
}
| 9,858 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/topNavbar.ts | import gql from 'graphql-tag';
export const TOP_NAVBAR_QUERY = gql`
query topNavbar {
notifications {
id
read
readAt
notification {
id
actionType
causedBy {
username
fullname
id
}
createdAt
}
}
me {
user {
id
fullName
profileIcon {
initials
bgColor
url
}
}
teamRoles {
teamID
roleCode
}
projectRoles {
projectID
roleCode
}
}
}
`;
export default TOP_NAVBAR_QUERY;
| 9,859 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/unassignTask.graphqls | mutation unassignTask($taskID: UUID!, $userID: UUID!) {
unassignTask(input: {taskID: $taskID, userID: $userID}) {
assigned {
id
fullName
}
id
}
}
| 9,860 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/unreadNotifications.ts | import gql from 'graphql-tag';
export const TOP_NAVBAR_QUERY = gql`
query hasUnreadNotifications {
hasUnreadNotifications {
unread
}
}
`;
export default TOP_NAVBAR_QUERY;
| 9,861 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/updateProjectLabel.graphqls | mutation updateProjectLabel($projectLabelID: UUID!, $labelColorID: UUID!, $name: String!) {
updateProjectLabel(input:{projectLabelID:$projectLabelID, labelColorID: $labelColorID, name: $name}) {
id
createdDate
labelColor {
id
colorHex
name
position
}
name
}
}
| 9,862 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/updateProjectName.graphqls | mutation updateProjectName($projectID: UUID!, $name: String!) {
updateProjectName(input: {projectID: $projectID, name: $name}) {
id
name
}
}
| 9,863 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/updateTaskDescription.graphqls | mutation updateTaskDescription($taskID: UUID!, $description: String!) {
updateTaskDescription(input: {taskID: $taskID, description: $description}) {
id
description
}
}
| 9,864 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/updateTaskDueDate.graphqls | mutation updateTaskDueDate($taskID: UUID!, $dueDate: Time, $hasTime: Boolean!,
$createNotifications: [CreateTaskDueDateNotification!]!,
$updateNotifications: [UpdateTaskDueDateNotification!]!
$deleteNotifications: [DeleteTaskDueDateNotification!]!
) {
updateTaskDueDate (
input: {
taskID: $taskID
dueDate: $dueDate
hasTime: $hasTime
}
) {
id
dueDate {
at
}
hasTime
}
createTaskDueDateNotifications(input: $createNotifications) {
notifications {
id
period
duration
}
}
updateTaskDueDateNotifications(input: $updateNotifications) {
notifications {
id
period
duration
}
}
deleteTaskDueDateNotifications(input: $deleteNotifications) {
notifications
}
}
| 9,865 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/updateTaskGroupLocation.graphqls | mutation updateTaskGroupLocation($taskGroupID: UUID!, $position: Float!) {
updateTaskGroupLocation(input:{taskGroupID:$taskGroupID, position: $position}) {
id
position
}
}
| 9,866 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/updateTaskLocation.graphqls | mutation updateTaskLocation($taskID: UUID!, $taskGroupID: UUID!, $position: Float!) {
updateTaskLocation(input: { taskID: $taskID, taskGroupID: $taskGroupID, position: $position }) {
previousTaskGroupID
task {
id
createdAt
name
position
taskGroup {
id
}
}
}
}
| 9,867 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/updateTaskName.graphqls | mutation updateTaskName($taskID: UUID!, $name: String!) {
updateTaskName(input: { taskID: $taskID, name: $name }) {
id
name
position
}
}
| 9,868 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/users.graphqls | query users {
invitedUsers {
id
email
invitedOn
}
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
}
| 9,869 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/fragments/task.ts | import gql from 'graphql-tag';
const TASK_FRAGMENT = gql`
fragment TaskFields on Task {
id
shortId
name
description
dueDate {
at
}
hasTime
complete
watched
completedAt
position
badges {
checklist {
complete
total
}
comments {
unread
total
}
}
taskGroup {
id
name
position
}
labels {
id
assignedDate
projectLabel {
id
name
createdDate
labelColor {
id
colorHex
position
name
}
}
}
assigned {
id
fullName
profileIcon {
url
initials
bgColor
}
}
}
`;
export default TASK_FRAGMENT;
| 9,870 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/project/deleteProject.ts | import gql from 'graphql-tag';
export const DELETE_PROJECT_MUTATION = gql`
mutation deleteProject($projectID: UUID!) {
deleteProject(input: { projectID: $projectID }) {
ok
project {
id
}
}
}
`;
export default DELETE_PROJECT_MUTATION;
| 9,871 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/project/deleteProjectInvitedMember.ts | import gql from 'graphql-tag';
export const DELETE_PROJECT_INVITED_MEMBER_MUTATION = gql`
mutation deleteInvitedProjectMember($projectID: UUID!, $email: String!) {
deleteInvitedProjectMember(input: { projectID: $projectID, email: $email }) {
invitedMember {
email
}
}
}
`;
export default DELETE_PROJECT_INVITED_MEMBER_MUTATION;
| 9,872 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/project/deleteProjectMember.ts | import gql from 'graphql-tag';
export const DELETE_PROJECT_MEMBER_MUTATION = gql`
mutation deleteProjectMember($projectID: UUID!, $userID: UUID!) {
deleteProjectMember(input: { projectID: $projectID, userID: $userID }) {
ok
member {
id
}
projectID
}
}
`;
export default DELETE_PROJECT_MEMBER_MUTATION;
| 9,873 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/project/inviteProjectMembers.ts | import gql from 'graphql-tag';
export const INVITE_PROJECT_MEMBERS_MUTATION = gql`
mutation inviteProjectMembers($projectID: UUID!, $members: [MemberInvite!]!) {
inviteProjectMembers(input: { projectID: $projectID, members: $members }) {
ok
invitedMembers {
email
invitedOn
}
members {
id
fullName
profileIcon {
url
initials
bgColor
}
username
role {
code
name
}
}
}
}
`;
export default INVITE_PROJECT_MEMBERS_MUTATION;
| 9,874 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/project/updateProjectMemberRole.ts | import gql from 'graphql-tag';
export const UPDATE_PROJECT_MEMBER_ROLE_MUTATION = gql`
mutation updateProjectMemberRole($projectID: UUID!, $userID: UUID!, $roleCode: RoleCode!) {
updateProjectMemberRole(input: { projectID: $projectID, userID: $userID, roleCode: $roleCode }) {
ok
member {
id
role {
code
name
}
}
}
}
`;
export default UPDATE_PROJECT_MEMBER_ROLE_MUTATION;
| 9,875 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/createTask.ts | import gql from 'graphql-tag';
import TASK_FRAGMENT from '../fragments/task';
const CREATE_TASK_MUTATION = gql`
mutation createTask($taskGroupID: UUID!, $name: String!, $position: Float!, $assigned: [UUID!]) {
createTask(input: { taskGroupID: $taskGroupID, name: $name, position: $position, assigned: $assigned }) {
...TaskFields
}
}
${TASK_FRAGMENT}
`;
export default CREATE_TASK_MUTATION;
| 9,876 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/createTaskChecklist.ts | import gql from 'graphql-tag';
const CREATE_TASK_CHECKLIST_MUTATION = gql`
mutation createTaskChecklist($taskID: UUID!, $name: String!, $position: Float!) {
createTaskChecklist(input: { taskID: $taskID, name: $name, position: $position }) {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
}
`;
export default CREATE_TASK_CHECKLIST_MUTATION;
| 9,877 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/createTaskChecklistItem.ts | import gql from 'graphql-tag';
const CREATE_TASK_CHECKLIST_ITEM = gql`
mutation createTaskChecklistItem($taskChecklistID: UUID!, $name: String!, $position: Float!) {
createTaskChecklistItem(input: { taskChecklistID: $taskChecklistID, name: $name, position: $position }) {
id
name
taskChecklistID
position
complete
}
}
`;
| 9,878 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/createTaskComment.ts | import gql from 'graphql-tag';
const CREATE_TASK_MUTATION = gql`
mutation createTaskComment($taskID: UUID!, $message: String!) {
createTaskComment(input: { taskID: $taskID, message: $message }) {
taskID
comment {
id
message
pinned
createdAt
updatedAt
createdBy {
id
fullName
profileIcon {
initials
bgColor
url
}
}
}
}
}
`;
export default CREATE_TASK_MUTATION;
| 9,879 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/deleteTaskChecklist.ts | import gql from 'graphql-tag';
const DELETE_TASK_CHECKLIST_MUTATION = gql`
mutation deleteTaskChecklist($taskChecklistID: UUID!) {
deleteTaskChecklist(input: { taskChecklistID: $taskChecklistID }) {
ok
taskChecklist {
id
}
}
}
`;
export default DELETE_TASK_CHECKLIST_MUTATION;
| 9,880 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/deleteTaskChecklistItem.ts | import gql from 'graphql-tag';
const DELETE_TASK_CHECKLIST_ITEM = gql`
mutation deleteTaskChecklistItem($taskChecklistItemID: UUID!) {
deleteTaskChecklistItem(input: { taskChecklistItemID: $taskChecklistItemID }) {
ok
taskChecklistItem {
id
taskChecklistID
}
}
}
`;
| 9,881 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/deleteTaskComment.ts | import gql from 'graphql-tag';
const CREATE_TASK_MUTATION = gql`
mutation deleteTaskComment($commentID: UUID!) {
deleteTaskComment(input: { commentID: $commentID }) {
commentID
}
}
`;
export default CREATE_TASK_MUTATION;
| 9,882 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/setTaskChecklistItemComplete.ts | import gql from 'graphql-tag';
const SET_TASK_CHECKLIST_ITEM_COMPLETE = gql`
mutation setTaskChecklistItemComplete($taskChecklistItemID: UUID!, $complete: Boolean!) {
setTaskChecklistItemComplete(input: { taskChecklistItemID: $taskChecklistItemID, complete: $complete }) {
id
complete
}
}
`;
| 9,883 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/setTaskComplete.ts | import gql from 'graphql-tag';
import TASK_FRAGMENT from '../fragments/task';
const UPDATE_TASK_GROUP_NAME_MUTATION = gql`
mutation setTaskComplete($taskID: UUID!, $complete: Boolean!) {
setTaskComplete(input: { taskID: $taskID, complete: $complete }) {
...TaskFields
}
${TASK_FRAGMENT}
}
`;
| 9,884 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/toggleTaskWatcher.ts | import gql from 'graphql-tag';
const CREATE_TASK_MUTATION = gql`
mutation toggleTaskWatch($taskID: UUID!) {
toggleTaskWatch(input: { taskID: $taskID }) {
id
watched
}
}
`;
export default CREATE_TASK_MUTATION;
| 9,885 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/updateTaskChecklistItemLocation.ts | import gql from 'graphql-tag';
const UPDATE_TASK_CHECKLIST_ITEM_LOCATION_MUTATION = gql`
mutation updateTaskChecklistItemLocation($taskChecklistID: UUID!, $taskChecklistItemID: UUID!, $position: Float!) {
updateTaskChecklistItemLocation(
input: { taskChecklistID: $taskChecklistID, taskChecklistItemID: $taskChecklistItemID, position: $position }
) {
taskChecklistID
prevChecklistID
checklistItem {
id
taskChecklistID
position
}
}
}
`;
export default UPDATE_TASK_CHECKLIST_ITEM_LOCATION_MUTATION;
| 9,886 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/updateTaskChecklistItemName.ts | import gql from 'graphql-tag';
const UPDATE_TASK_CHECKLIST_ITEM_NAME = gql`
mutation updateTaskChecklistItemName($taskChecklistItemID: UUID!, $name: String!) {
updateTaskChecklistItemName(input: { taskChecklistItemID: $taskChecklistItemID, name: $name }) {
id
name
}
}
`;
| 9,887 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/updateTaskChecklistLocation.ts | import gql from 'graphql-tag';
const UPDATE_TASK_CHECKLIST_LOCATION_MUTATION = gql`
mutation updateTaskChecklistLocation($taskChecklistID: UUID!, $position: Float!) {
updateTaskChecklistLocation(input: { taskChecklistID: $taskChecklistID, position: $position }) {
checklist {
id
position
}
}
}
`;
export default UPDATE_TASK_CHECKLIST_LOCATION_MUTATION;
| 9,888 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/updateTaskChecklistName.ts | import gql from 'graphql-tag';
const UPDATE_TASK_CHECKLIST_NAME_MUTATION = gql`
mutation updateTaskChecklistName($taskChecklistID: UUID!, $name: String!) {
updateTaskChecklistName(input: { taskChecklistID: $taskChecklistID, name: $name }) {
id
name
position
items {
id
name
taskChecklistID
complete
position
}
}
}
`;
export default UPDATE_TASK_CHECKLIST_NAME_MUTATION;
| 9,889 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/task/updateTaskComment.ts | import gql from 'graphql-tag';
const CREATE_TASK_MUTATION = gql`
mutation updateTaskComment($commentID: UUID!, $message: String!) {
updateTaskComment(input: { commentID: $commentID, message: $message }) {
comment {
id
updatedAt
message
}
}
}
`;
export default CREATE_TASK_MUTATION;
| 9,890 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/taskGroup/deleteTaskGroupTasks.ts | import gql from 'graphql-tag';
const DELETE_TASK_GROUP_TASKS_MUTATION = gql`
mutation deleteTaskGroupTasks($taskGroupID: UUID!) {
deleteTaskGroupTasks(input: { taskGroupID: $taskGroupID }) {
tasks
taskGroupID
}
}
`;
| 9,891 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/taskGroup/duplicateTaskGroup.ts | import gql from 'graphql-tag';
import TASK_FRAGMENT from '../fragments/task';
const DUPLICATE_TASK_GROUP_MUTATION = gql`
mutation duplicateTaskGroup($taskGroupID: UUID!, $name: String!, $position: Float!, $projectID: UUID!) {
duplicateTaskGroup(
input: {
projectID: $projectID
taskGroupID: $taskGroupID
name: $name
position: $position
}
) {
taskGroup {
id
name
position
tasks {
...TaskFields
}
}
}
${TASK_FRAGMENT}
}
`;
| 9,892 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/taskGroup/sortTaskGroup.ts | import gql from 'graphql-tag';
const SORT_TASK_GROUP_MUTATION = gql`
mutation sortTaskGroup($tasks: [TaskPositionUpdate!]!, $taskGroupID: UUID!) {
sortTaskGroup(input: { taskGroupID: $taskGroupID, tasks: $tasks }) {
taskGroupID
tasks {
id
position
}
}
}
`;
| 9,893 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/taskGroup/updateTaskGroupName.ts | import gql from 'graphql-tag';
import TASK_FRAGMENT from '../fragments/task';
const UPDATE_TASK_GROUP_NAME_MUTATION = gql`
mutation updateTaskGroupName($taskGroupID: UUID!, $name: String!) {
updateTaskGroupName(input:{taskGroupID:$taskGroupID, name:$name}) {
id
name
}
${TASK_FRAGMENT}
}
`;
| 9,894 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/team/createTeam.ts | import gql from 'graphql-tag';
export const CREATE_TEAM_MUTATION = gql`
mutation createTeam($name: String!, $organizationID: UUID!) {
createTeam(input: { name: $name, organizationID: $organizationID }) {
id
createdAt
name
}
}
`;
export default CREATE_TEAM_MUTATION;
| 9,895 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/team/createTeamMember.ts | import gql from 'graphql-tag';
export const CREATE_TEAM_MEMBER_MUTATION = gql`
mutation createTeamMember($userID: UUID!, $teamID: UUID!) {
createTeamMember(input: { userID: $userID, teamID: $teamID }) {
team {
id
}
teamMember {
id
username
fullName
role {
code
name
}
profileIcon {
url
initials
bgColor
}
}
}
}
`;
export default CREATE_TEAM_MEMBER_MUTATION;
| 9,896 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/team/deleteTeam.ts | import gql from 'graphql-tag';
export const DELETE_TEAM_MUTATION = gql`
mutation deleteTeam($teamID: UUID!) {
deleteTeam(input: { teamID: $teamID }) {
ok
team {
id
}
}
}
`;
export default DELETE_TEAM_MUTATION;
| 9,897 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/team/deleteTeamMember.ts | import gql from 'graphql-tag';
export const DELETE_TEAM_MEMBER_MUTATION = gql`
mutation deleteTeamMember($teamID: UUID!, $userID: UUID!, $newOwnerID: UUID) {
deleteTeamMember(input: { teamID: $teamID, userID: $userID, newOwnerID: $newOwnerID }) {
teamID
userID
}
}
`;
export default DELETE_TEAM_MEMBER_MUTATION;
| 9,898 |
0 | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql | petrpan-code/JordanKnott/taskcafe/frontend/src/shared/graphql/team/getTeam.ts | import gql from 'graphql-tag';
export const GET_TEAM_QUERY = gql`
query getTeam($teamID: UUID!) {
findTeam(input: { teamID: $teamID }) {
id
createdAt
name
members {
id
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
}
projects(input: { teamID: $teamID }) {
id
name
team {
id
name
}
}
users {
id
email
fullName
username
role {
code
name
}
profileIcon {
url
initials
bgColor
}
owned {
teams {
id
name
}
projects {
id
name
}
}
member {
teams {
id
name
}
projects {
id
name
}
}
}
}
`;
export default GET_TEAM_QUERY;
| 9,899 |