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