@manuscripts/style-guide 1.4.3 → 1.4.5-LEAN-3030
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Comments/index.js +21 -0
- package/dist/cjs/components/DatePicker/CalendarDatePicker.js +153 -0
- package/dist/cjs/components/DatePicker/index.js +17 -0
- package/dist/cjs/components/NavDropdown.js +2 -7
- package/dist/cjs/components/icons/plus-icon.js +3 -3
- package/dist/cjs/index.js +8 -3
- package/dist/es/components/Comments/index.js +5 -0
- package/dist/es/components/DatePicker/CalendarDatePicker.js +121 -0
- package/dist/es/components/DatePicker/index.js +1 -0
- package/dist/es/components/NavDropdown.js +1 -6
- package/dist/es/components/icons/plus-icon.js +3 -3
- package/dist/es/index.js +8 -3
- package/dist/types/components/Comments/index.d.ts +5 -0
- package/dist/types/components/DatePicker/CalendarDatePicker.d.ts +32 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -0
- package/dist/types/components/NavDropdown.d.ts +0 -2
- package/dist/types/components/icons/plus-icon.d.ts +3 -1
- package/dist/types/components/icons/types.d.ts +2 -0
- package/dist/types/index.d.ts +8 -3
- package/package.json +3 -4
- package/dist/cjs/components/SubmissionInspector/BaseInformation.js +0 -273
- package/dist/cjs/components/SubmissionInspector/Button.js +0 -31
- package/dist/cjs/components/SubmissionInspector/Progress.js +0 -86
- package/dist/cjs/components/SubmissionInspector/index.js +0 -43
- package/dist/cjs/components/SubmissionInspector/types.js +0 -24
- package/dist/es/components/SubmissionInspector/BaseInformation.js +0 -243
- package/dist/es/components/SubmissionInspector/Button.js +0 -25
- package/dist/es/components/SubmissionInspector/Progress.js +0 -79
- package/dist/es/components/SubmissionInspector/index.js +0 -27
- package/dist/es/components/SubmissionInspector/types.js +0 -21
- package/dist/types/components/SubmissionInspector/BaseInformation.d.ts +0 -24
- package/dist/types/components/SubmissionInspector/Button.d.ts +0 -27
- package/dist/types/components/SubmissionInspector/Progress.d.ts +0 -20
- package/dist/types/components/SubmissionInspector/index.d.ts +0 -27
- package/dist/types/components/SubmissionInspector/types.d.ts +0 -88
- /package/dist/cjs/components/{SubmissionInspector/Text.js → Text.js} +0 -0
- /package/dist/es/components/{SubmissionInspector/Text.js → Text.js} +0 -0
- /package/dist/types/components/{SubmissionInspector/Text.d.ts → Text.d.ts} +0 -0
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import 'react-modern-calendar-datepicker/lib/DatePicker.css';
|
|
17
|
-
import AttentionOrange from '@manuscripts/assets/react/AttentionOrange';
|
|
18
|
-
import AttentionRed from '@manuscripts/assets/react/AttentionRed';
|
|
19
|
-
import { add, format, intervalToDuration } from 'date-fns';
|
|
20
|
-
import React, { useCallback, useMemo, useState } from 'react';
|
|
21
|
-
import DatePicker from 'react-modern-calendar-datepicker';
|
|
22
|
-
import ReactTooltip from 'react-tooltip';
|
|
23
|
-
import styled, { css } from 'styled-components';
|
|
24
|
-
import { IconTextButton } from '../Button';
|
|
25
|
-
import { Category, Dialog, MessageContainer } from '../Dialog';
|
|
26
|
-
import { SubmissionCriticality } from './types';
|
|
27
|
-
const dateFormat = 'd MMM, EEEE';
|
|
28
|
-
const criticalityPill = {
|
|
29
|
-
[SubmissionCriticality.OVERDUE]: { label: 'Overdue', color: '#F5C1B7' },
|
|
30
|
-
[SubmissionCriticality.DUE_TODAY]: { label: 'At risk', color: '#FFE0B2' },
|
|
31
|
-
[SubmissionCriticality.ON_SCHEDULE]: { label: 'At risk', color: '#FFE0B2' },
|
|
32
|
-
};
|
|
33
|
-
const CalenderDatePicker = ({ submission, handleDateChange, Button }) => {
|
|
34
|
-
const [dueDate, setDueDate] = useState(undefined);
|
|
35
|
-
const [toggleDialog, setToggleDialog] = useState(false);
|
|
36
|
-
const onConfirmClick = useCallback(() => {
|
|
37
|
-
handleDateChange(dueDate);
|
|
38
|
-
setToggleDialog(false);
|
|
39
|
-
}, [dueDate, setToggleDialog, handleDateChange]);
|
|
40
|
-
const formattedDueDate = useMemo(() => dueDate &&
|
|
41
|
-
format(new Date(dueDate.year, dueDate.month, dueDate.day), dateFormat), [dueDate]);
|
|
42
|
-
const formattedPotentialDueDate = useMemo(() => dueDate &&
|
|
43
|
-
format(potentialDueDate(submission.currentStep.dueDate, dueDate, submission.dueDate), dateFormat), [submission.dueDate, submission.currentStep.dueDate, dueDate]);
|
|
44
|
-
const onDatePickerChange = useCallback((date) => {
|
|
45
|
-
setDueDate(date);
|
|
46
|
-
setToggleDialog(true);
|
|
47
|
-
const button = document.querySelector('.DatePicker button');
|
|
48
|
-
button.blur();
|
|
49
|
-
}, []);
|
|
50
|
-
return (React.createElement(React.Fragment, null,
|
|
51
|
-
React.createElement(Calendar, null,
|
|
52
|
-
React.createElement(DatePicker, { value: getDay(submission.currentStep.dueDate), onChange: onDatePickerChange, calendarPopperPosition: 'bottom', colorPrimary: "#f2fbfc", calendarSelectedDayClassName: 'selected-day', calendarClassName: 'responsive-calendar', renderInput: Button })),
|
|
53
|
-
React.createElement(Dialog, { isOpen: toggleDialog, category: Category.confirmation, header: "Change the task due date?", message: React.createElement(React.Fragment, null,
|
|
54
|
-
React.createElement(UpdatedDueDate, null, formattedDueDate),
|
|
55
|
-
React.createElement(DueDateMessage, null, "By rescheduling the task, the publication expected date of the article will be modified accordingly:"),
|
|
56
|
-
React.createElement(Value, null,
|
|
57
|
-
React.createElement(StrikeDueDate, { as: 'del' }, format(submission.dueDate, 'd MMM, EEEE')),
|
|
58
|
-
formattedPotentialDueDate)), actions: {
|
|
59
|
-
primary: {
|
|
60
|
-
action: onConfirmClick,
|
|
61
|
-
title: 'Reschedule',
|
|
62
|
-
},
|
|
63
|
-
secondary: {
|
|
64
|
-
action: () => setToggleDialog(false),
|
|
65
|
-
title: 'Cancel',
|
|
66
|
-
},
|
|
67
|
-
} })));
|
|
68
|
-
};
|
|
69
|
-
export const BaseInformation = ({ submission, handleDateChange, userRole }) => {
|
|
70
|
-
const Button = ({ ref }) => (React.createElement(Container, null,
|
|
71
|
-
React.createElement("div", { "data-tip": true, "data-for": submission.id },
|
|
72
|
-
React.createElement(DateButton, { ref: ref, criticality: submission.currentStep.criticality, disabled: userRole !== 'pe' },
|
|
73
|
-
format(submission.currentStep.dueDate, 'd MMM, EEEE'),
|
|
74
|
-
submission.currentStep.criticality ===
|
|
75
|
-
SubmissionCriticality.DUE_TODAY && React.createElement(AttentionOrange, null),
|
|
76
|
-
submission.currentStep.criticality ===
|
|
77
|
-
SubmissionCriticality.OVERDUE && React.createElement(AttentionRed, null))),
|
|
78
|
-
React.createElement(ReactTooltip, { id: submission.id, place: "bottom", effect: "solid", offset: { top: 10 }, className: "tooltip", disable: userRole == 'pe' }, "No permissions to reschedule")));
|
|
79
|
-
return (React.createElement(Grid, null,
|
|
80
|
-
(!submission.isPublished && (React.createElement(React.Fragment, null,
|
|
81
|
-
React.createElement(DateLabel, null, "Due date"),
|
|
82
|
-
React.createElement(Value, null,
|
|
83
|
-
React.createElement(CalenderDatePicker, { submission: submission, handleDateChange: handleDateChange, Button: Button }))))) || (React.createElement(React.Fragment, null,
|
|
84
|
-
React.createElement(Label, null, "Published:"),
|
|
85
|
-
React.createElement(Value, null, format(submission.publishedDate || 0, 'd MMM yyyy, EEEE')))),
|
|
86
|
-
React.createElement(Label, null, "Article ID:"),
|
|
87
|
-
React.createElement(Value, null, submission.code),
|
|
88
|
-
React.createElement(Label, null, "DOI:"),
|
|
89
|
-
React.createElement(Value, null, submission.doi),
|
|
90
|
-
React.createElement(Label, null, "Journal:"),
|
|
91
|
-
React.createElement(Value, { "data-journal": submission.journal.title }, submission.journal.title),
|
|
92
|
-
React.createElement(Label, null, "Journal ID:"),
|
|
93
|
-
React.createElement(Value, null, submission.journal.id),
|
|
94
|
-
submission.author && (React.createElement(React.Fragment, null,
|
|
95
|
-
React.createElement(Label, null, "Corresponding Author:"),
|
|
96
|
-
React.createElement(Value, null, submission.author.displayName),
|
|
97
|
-
React.createElement(Label, null, "Email:"),
|
|
98
|
-
React.createElement(Value, null, submission.author.email))),
|
|
99
|
-
React.createElement(Label, null, "Production Editor:"),
|
|
100
|
-
React.createElement(Value, null, submission.journal.productionEditor.displayName),
|
|
101
|
-
!submission.isPublished && (React.createElement(React.Fragment, null,
|
|
102
|
-
React.createElement(Label, null, "Publication Due:"),
|
|
103
|
-
React.createElement(Value, null,
|
|
104
|
-
format(submission.dueDate, 'd MMM, EEEE'),
|
|
105
|
-
submission.isAtRisk && (React.createElement(Pill, { background: criticalityPill[submission.criticality].color }, criticalityPill[submission.criticality].label)))))));
|
|
106
|
-
};
|
|
107
|
-
const getDay = (date) => ({
|
|
108
|
-
year: date.getFullYear(),
|
|
109
|
-
month: date.getMonth() + 1,
|
|
110
|
-
day: date.getDate(),
|
|
111
|
-
});
|
|
112
|
-
const potentialDueDate = (stepDueDate, dueDate, submissionDueDate) => {
|
|
113
|
-
const duration = intervalToDuration({
|
|
114
|
-
start: stepDueDate,
|
|
115
|
-
end: new Date(`${dueDate.year}-${dueDate.month < 10 ? `0${dueDate.month}` : dueDate.month}-${dueDate.day < 10 ? `0${dueDate.day}` : dueDate.day}`),
|
|
116
|
-
});
|
|
117
|
-
return add(submissionDueDate, duration);
|
|
118
|
-
};
|
|
119
|
-
const Container = styled.div `
|
|
120
|
-
.tooltip {
|
|
121
|
-
border-radius: 6px;
|
|
122
|
-
padding: ${(props) => props.theme.grid.unit * 2}px;
|
|
123
|
-
}
|
|
124
|
-
`;
|
|
125
|
-
const Grid = styled.div `
|
|
126
|
-
display: grid;
|
|
127
|
-
grid-template-columns: 30% auto;
|
|
128
|
-
column-gap: ${(props) => props.theme.grid.unit * 2}px;
|
|
129
|
-
row-gap: ${(props) => props.theme.grid.unit * 4}px;
|
|
130
|
-
`;
|
|
131
|
-
const Value = styled.div `
|
|
132
|
-
flex: 1;
|
|
133
|
-
display: flex;
|
|
134
|
-
color: ${(props) => props.theme.colors.text.primary};
|
|
135
|
-
align-items: center;
|
|
136
|
-
line-height: 1;
|
|
137
|
-
`;
|
|
138
|
-
const Label = styled.div `
|
|
139
|
-
align-self: center;
|
|
140
|
-
width: fit-content;
|
|
141
|
-
color: ${(props) => props.theme.colors.text.secondary};
|
|
142
|
-
line-height: 1;
|
|
143
|
-
`;
|
|
144
|
-
const DateLabel = styled(Label) `
|
|
145
|
-
color: ${(props) => props.theme.colors.text.primary};
|
|
146
|
-
`;
|
|
147
|
-
const disabledStyle = css `
|
|
148
|
-
background-color: ${(props) => props.theme.colors.background.secondary} !important;
|
|
149
|
-
color: ${(props) => props.theme.colors.text.secondary} !important;
|
|
150
|
-
`;
|
|
151
|
-
const DateButton = styled(IconTextButton) `
|
|
152
|
-
border: 1px solid ${(props) => props.theme.colors.border.secondary}!important;
|
|
153
|
-
box-sizing: border-box;
|
|
154
|
-
border-radius: 6px;
|
|
155
|
-
font-weight: ${(props) => props.theme.font.weight.normal};
|
|
156
|
-
font-size: ${(props) => props.theme.font.size.normal};
|
|
157
|
-
line-height: ${(props) => props.theme.font.lineHeight.large};
|
|
158
|
-
color: ${(props) => props.criticality === SubmissionCriticality.OVERDUE &&
|
|
159
|
-
props.theme.colors.text.error}!important;
|
|
160
|
-
width: 100%;
|
|
161
|
-
height: ${(props) => props.theme.grid.unit * 7.5}px;
|
|
162
|
-
justify-content: space-between;
|
|
163
|
-
padding: 0 ${(props) => props.theme.grid.unit * 2}px 0
|
|
164
|
-
${(props) => props.theme.grid.unit * 4}px;
|
|
165
|
-
|
|
166
|
-
${(props) => props.disabled && disabledStyle}
|
|
167
|
-
|
|
168
|
-
&:focus {
|
|
169
|
-
border-color: ${(props) => props.theme.colors.border.field.hover}!important;
|
|
170
|
-
background-color: ${(props) => props.theme.colors.background.fifth};
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&:hover {
|
|
174
|
-
background-color: ${(props) => props.theme.colors.background.fifth};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
svg {
|
|
178
|
-
margin-right: 0;
|
|
179
|
-
}
|
|
180
|
-
`;
|
|
181
|
-
const Calendar = styled.div `
|
|
182
|
-
flex: 1;
|
|
183
|
-
|
|
184
|
-
.DatePicker {
|
|
185
|
-
width: 100%;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.DatePicker__calendarContainer {
|
|
189
|
-
position: absolute;
|
|
190
|
-
top: unset;
|
|
191
|
-
left: unset !important;
|
|
192
|
-
right: 0 !important;
|
|
193
|
-
transform: unset !important;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.Calendar__weekDay {
|
|
197
|
-
color: #e6e6e;
|
|
198
|
-
font-size: ${(props) => props.theme.font.size.normal};
|
|
199
|
-
line-height: ${(props) => props.theme.font.lineHeight.large};
|
|
200
|
-
font-weight: ${(props) => props.theme.font.weight.medium};
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.Calendar__day:not(.-blank):not(.-selected):hover {
|
|
204
|
-
background: #f2fbfc !important;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.Calendar__day.-today:hover::after {
|
|
208
|
-
opacity: 0.5 !important;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.selected-day {
|
|
212
|
-
color: ${(props) => props.theme.colors.text.primary} !important;
|
|
213
|
-
border: 1px solid ${(props) => props.theme.colors.border.primary} !important;
|
|
214
|
-
}
|
|
215
|
-
`;
|
|
216
|
-
const Pill = styled.div `
|
|
217
|
-
${(props) => props.background && `background: ${props.background}`};
|
|
218
|
-
padding: ${(props) => props.theme.grid.unit}px;
|
|
219
|
-
margin-left: ${(props) => props.theme.grid.unit}px;
|
|
220
|
-
font-size: ${(props) => props.theme.font.size.small};
|
|
221
|
-
line-height: ${(props) => props.theme.font.lineHeight.normal};
|
|
222
|
-
font-weight: ${(props) => props.theme.font.weight.normal};
|
|
223
|
-
border-radius: 6px;
|
|
224
|
-
`;
|
|
225
|
-
const UpdatedDueDate = styled.div `
|
|
226
|
-
background: ${(props) => props.theme.colors.background.secondary};
|
|
227
|
-
color: ${(props) => props.theme.colors.text.primary};
|
|
228
|
-
width: max-content;
|
|
229
|
-
border: 1px solid ${(props) => props.theme.colors.border.secondary};
|
|
230
|
-
box-sizing: border-box;
|
|
231
|
-
border-radius: ${(props) => props.theme.grid.unit}px;
|
|
232
|
-
padding: ${(props) => props.theme.grid.unit}px
|
|
233
|
-
${(props) => props.theme.grid.unit * 2}px;
|
|
234
|
-
`;
|
|
235
|
-
const DueDateMessage = styled(MessageContainer) `
|
|
236
|
-
min-height: min-content;
|
|
237
|
-
margin: ${(props) => props.theme.grid.unit * 6}px 0 0 0;
|
|
238
|
-
`;
|
|
239
|
-
const StrikeDueDate = styled(MessageContainer) `
|
|
240
|
-
margin: 0;
|
|
241
|
-
min-height: min-content;
|
|
242
|
-
padding-right: ${(props) => props.theme.grid.unit}px;
|
|
243
|
-
`;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import styled from 'styled-components';
|
|
17
|
-
import { ButtonGroup, IconButton } from '../Button';
|
|
18
|
-
export const ZoomButton = styled(IconButton) `
|
|
19
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
|
|
20
|
-
border-radius: ${(props) => props.theme.grid.unit * 8}px;
|
|
21
|
-
`;
|
|
22
|
-
export const ZoomButtonGroup = styled(ButtonGroup) `
|
|
23
|
-
width: ${(props) => props.theme.grid.unit * 22}px;
|
|
24
|
-
justify-content: space-between;
|
|
25
|
-
`;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { format } from 'date-fns';
|
|
17
|
-
import React from 'react';
|
|
18
|
-
import styled from 'styled-components';
|
|
19
|
-
import { TaskStepCurrentIcon, TaskStepDoneIcon, TaskStepNextIcon, } from '../icons';
|
|
20
|
-
import { PrimaryBoldHeading, PrimarySmallText, SecondaryBoldHeading, SecondarySmallText, } from './Text';
|
|
21
|
-
import { SubmissionCriticality } from './types';
|
|
22
|
-
const CriticalityLabel = {
|
|
23
|
-
ON_SCHEDULE: { label: '', color: '' },
|
|
24
|
-
DUE_TODAY: { label: 'Due today', color: '#353535' },
|
|
25
|
-
OVERDUE: { label: 'Overdue', color: '#F35143' },
|
|
26
|
-
};
|
|
27
|
-
export const Progress = ({ submission }) => {
|
|
28
|
-
const { currentStep, nextStep, previousStep } = submission;
|
|
29
|
-
return (React.createElement(Grid, null,
|
|
30
|
-
previousStep && (React.createElement(React.Fragment, null,
|
|
31
|
-
React.createElement(TaskStatus, null,
|
|
32
|
-
React.createElement(TaskStepDoneIcon, null)),
|
|
33
|
-
React.createElement(TaskContainer, null,
|
|
34
|
-
React.createElement(SecondaryBoldHeading, null, previousStep.type.label),
|
|
35
|
-
React.createElement(SecondarySmallText, null, previousStep.type.description),
|
|
36
|
-
React.createElement(SecondarySmallText, null,
|
|
37
|
-
"Actor: ",
|
|
38
|
-
previousStep.type.role.label),
|
|
39
|
-
React.createElement(SecondarySmallText, null, format(previousStep.dueDate, 'd MMMM, EEEE'))))),
|
|
40
|
-
React.createElement(TaskStatus, null,
|
|
41
|
-
React.createElement(TaskStepCurrentIcon, { color: CriticalityLabel[currentStep.criticality].color })),
|
|
42
|
-
React.createElement(TaskContainer, null,
|
|
43
|
-
React.createElement(PrimaryBoldHeading, null, currentStep.type.label),
|
|
44
|
-
React.createElement(SecondarySmallText, null, currentStep.type.description),
|
|
45
|
-
React.createElement(SecondarySmallText, null,
|
|
46
|
-
"Actor: ",
|
|
47
|
-
currentStep.type.role.label),
|
|
48
|
-
React.createElement(PrimarySmallText, null, format(currentStep.dueDate, 'd MMMM, EEEE')),
|
|
49
|
-
!(currentStep.criticality === SubmissionCriticality.ON_SCHEDULE) && (React.createElement(CriticalityText, { color: CriticalityLabel[currentStep.criticality].color }, CriticalityLabel[currentStep.criticality].label))),
|
|
50
|
-
nextStep && (React.createElement(React.Fragment, null,
|
|
51
|
-
React.createElement(TaskStatus, null,
|
|
52
|
-
React.createElement(TaskStepNextIcon, null)),
|
|
53
|
-
React.createElement(TaskContainer, null,
|
|
54
|
-
React.createElement(PrimaryBoldHeading, null, nextStep.type.label),
|
|
55
|
-
React.createElement(SecondarySmallText, null, nextStep.type.description),
|
|
56
|
-
React.createElement(SecondarySmallText, null,
|
|
57
|
-
"Actor: ",
|
|
58
|
-
nextStep.type.role.label),
|
|
59
|
-
React.createElement(PrimarySmallText, null, format(nextStep.dueDate, 'd MMMM, EEEE')))))));
|
|
60
|
-
};
|
|
61
|
-
const Grid = styled.div `
|
|
62
|
-
display: grid;
|
|
63
|
-
grid-template-columns: max-content auto;
|
|
64
|
-
gap: 0 ${(props) => props.theme.grid.unit * 2}px;
|
|
65
|
-
`;
|
|
66
|
-
const TaskStatus = styled.div `
|
|
67
|
-
grid-column: 1;
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
align-items: center;
|
|
71
|
-
padding-top: 5px;
|
|
72
|
-
`;
|
|
73
|
-
const TaskContainer = styled.div `
|
|
74
|
-
grid-column: 2;
|
|
75
|
-
margin-bottom: 8px;
|
|
76
|
-
`;
|
|
77
|
-
const CriticalityText = styled(PrimarySmallText) `
|
|
78
|
-
color: ${(props) => props.color};
|
|
79
|
-
`;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export * from './Button';
|
|
17
|
-
export * from '../SubmissionInspector/BaseInformation';
|
|
18
|
-
export * from '../SubmissionInspector/Text';
|
|
19
|
-
export * from '../SubmissionInspector/Progress';
|
|
20
|
-
export * from '../ManuscriptNoteList';
|
|
21
|
-
export * from '../Comments/CommentBody';
|
|
22
|
-
export * from '../Comments/CommentTarget';
|
|
23
|
-
export * from '../Comments/CommentUser';
|
|
24
|
-
export * from '../Comments/ResolveButton';
|
|
25
|
-
export * from '../Comments/CommentWrapper';
|
|
26
|
-
export * from '../RelativeDate';
|
|
27
|
-
export * from '../../lib/comments';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export var SubmissionCriticality;
|
|
17
|
-
(function (SubmissionCriticality) {
|
|
18
|
-
SubmissionCriticality["ON_SCHEDULE"] = "ON_SCHEDULE";
|
|
19
|
-
SubmissionCriticality["DUE_TODAY"] = "DUE_TODAY";
|
|
20
|
-
SubmissionCriticality["OVERDUE"] = "OVERDUE";
|
|
21
|
-
})(SubmissionCriticality || (SubmissionCriticality = {}));
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import 'react-modern-calendar-datepicker/lib/DatePicker.css';
|
|
17
|
-
import React from 'react';
|
|
18
|
-
import { DayValue } from 'react-modern-calendar-datepicker';
|
|
19
|
-
import { Submission } from './types';
|
|
20
|
-
export declare const BaseInformation: React.FC<{
|
|
21
|
-
submission: Submission;
|
|
22
|
-
handleDateChange: (day: DayValue) => void;
|
|
23
|
-
userRole?: string;
|
|
24
|
-
}>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export declare const ZoomButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
17
|
-
type: "button" | "reset" | "submit";
|
|
18
|
-
} & {
|
|
19
|
-
danger?: boolean | undefined;
|
|
20
|
-
disabled?: boolean | undefined;
|
|
21
|
-
mini?: boolean | undefined;
|
|
22
|
-
} & {
|
|
23
|
-
defaultColor?: boolean | undefined;
|
|
24
|
-
size?: number | undefined;
|
|
25
|
-
iconColor?: string | undefined;
|
|
26
|
-
}, "type">;
|
|
27
|
-
export declare const ZoomButtonGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import { Submission } from './types';
|
|
18
|
-
export declare const Progress: React.FC<{
|
|
19
|
-
submission: Submission;
|
|
20
|
-
}>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export * from './Button';
|
|
17
|
-
export * from '../SubmissionInspector/BaseInformation';
|
|
18
|
-
export * from '../SubmissionInspector/Text';
|
|
19
|
-
export * from '../SubmissionInspector/Progress';
|
|
20
|
-
export * from '../ManuscriptNoteList';
|
|
21
|
-
export * from '../Comments/CommentBody';
|
|
22
|
-
export * from '../Comments/CommentTarget';
|
|
23
|
-
export * from '../Comments/CommentUser';
|
|
24
|
-
export * from '../Comments/ResolveButton';
|
|
25
|
-
export * from '../Comments/CommentWrapper';
|
|
26
|
-
export * from '../RelativeDate';
|
|
27
|
-
export * from '../../lib/comments';
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2020 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export type Maybe<T> = T | null;
|
|
17
|
-
export declare enum SubmissionCriticality {
|
|
18
|
-
ON_SCHEDULE = "ON_SCHEDULE",
|
|
19
|
-
DUE_TODAY = "DUE_TODAY",
|
|
20
|
-
OVERDUE = "OVERDUE"
|
|
21
|
-
}
|
|
22
|
-
export type Submission = {
|
|
23
|
-
id: string;
|
|
24
|
-
code: string;
|
|
25
|
-
doi: string;
|
|
26
|
-
title: string;
|
|
27
|
-
journal: Journal;
|
|
28
|
-
author?: Maybe<Person>;
|
|
29
|
-
currentStep: SubmissionStep;
|
|
30
|
-
previousStep?: Maybe<SubmissionStep>;
|
|
31
|
-
nextStep?: Maybe<ProjectedSubmissionStep>;
|
|
32
|
-
dueDate: Date;
|
|
33
|
-
criticality: SubmissionCriticality;
|
|
34
|
-
isAtRisk: boolean;
|
|
35
|
-
isPublished: boolean;
|
|
36
|
-
publishedDate?: Date;
|
|
37
|
-
};
|
|
38
|
-
export type Journal = {
|
|
39
|
-
id: string;
|
|
40
|
-
code: string;
|
|
41
|
-
title: string;
|
|
42
|
-
doi: string;
|
|
43
|
-
issn: string;
|
|
44
|
-
productionEditor: User;
|
|
45
|
-
};
|
|
46
|
-
export type SubmissionStep = {
|
|
47
|
-
id: string;
|
|
48
|
-
type: SubmissionStepType;
|
|
49
|
-
status: SubmissionStepStatus;
|
|
50
|
-
assignee: User;
|
|
51
|
-
dueDate: Date;
|
|
52
|
-
criticality: SubmissionCriticality;
|
|
53
|
-
};
|
|
54
|
-
export type ProjectedSubmissionStep = {
|
|
55
|
-
type: SubmissionStepType;
|
|
56
|
-
dueDate: Date;
|
|
57
|
-
};
|
|
58
|
-
export type User = {
|
|
59
|
-
id: string;
|
|
60
|
-
displayName: string;
|
|
61
|
-
};
|
|
62
|
-
export type Person = User & {
|
|
63
|
-
id: string;
|
|
64
|
-
displayName: string;
|
|
65
|
-
email: string;
|
|
66
|
-
firstName?: Maybe<string>;
|
|
67
|
-
lastName?: Maybe<string>;
|
|
68
|
-
role: Role;
|
|
69
|
-
};
|
|
70
|
-
export type Role = {
|
|
71
|
-
id: string;
|
|
72
|
-
label: string;
|
|
73
|
-
};
|
|
74
|
-
export type SubmissionStepType = {
|
|
75
|
-
id: string;
|
|
76
|
-
label: string;
|
|
77
|
-
description: string;
|
|
78
|
-
stage: SubmissionStepStage;
|
|
79
|
-
role: Role;
|
|
80
|
-
};
|
|
81
|
-
export type SubmissionStepStage = {
|
|
82
|
-
id: string;
|
|
83
|
-
label: string;
|
|
84
|
-
};
|
|
85
|
-
export type SubmissionStepStatus = {
|
|
86
|
-
id: string;
|
|
87
|
-
label: string;
|
|
88
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|