@manuscripts/style-guide 1.1.9-LEAN-2192-v11 → 1.1.9-LEAN-2505-1
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/CommentBody.js +6 -3
- package/dist/cjs/components/Comments/CommentWrapper.js +2 -2
- package/dist/cjs/components/EditorHeader/EditorHeader.js +2 -2
- package/dist/cjs/components/EditorHeader/ProceedView.js +6 -6
- package/dist/es/components/Comments/CommentBody.js +6 -3
- package/dist/es/components/Comments/CommentWrapper.js +2 -2
- package/dist/es/components/EditorHeader/EditorHeader.js +2 -2
- package/dist/es/components/EditorHeader/ProceedView.js +6 -6
- package/dist/types/components/Comments/CommentBody.d.ts +2 -0
- package/dist/types/components/EditorHeader/EditorHeader.d.ts +0 -1
- package/dist/types/components/EditorHeader/ProceedView.d.ts +1 -2
- package/package.json +2 -2
|
@@ -35,7 +35,7 @@ const react_tooltip_1 = __importDefault(require("react-tooltip"));
|
|
|
35
35
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
36
36
|
const Button_1 = require("../Button");
|
|
37
37
|
const Form_1 = require("../Form");
|
|
38
|
-
exports.CommentBody = react_1.default.memo(({ createKeyword, comment, getCollaborator, getKeyword, listCollaborators, listKeywords, saveComment, deleteComment, isReply, isNew, handleCreateReply, setIsEditing, scrollIntoHighlight, isEditing, isProdNote, }) => {
|
|
38
|
+
exports.CommentBody = react_1.default.memo(({ createKeyword, comment, getCollaborator, getKeyword, listCollaborators, listKeywords, saveComment, deleteComment, isReply, isNew, handleCreateReply, setIsEditing, scrollIntoHighlight, onFocusOut, isEditing, isProdNote, }) => {
|
|
39
39
|
(0, react_1.useEffect)(() => {
|
|
40
40
|
if (isNew) {
|
|
41
41
|
setIsEditing(true);
|
|
@@ -54,11 +54,14 @@ exports.CommentBody = react_1.default.memo(({ createKeyword, comment, getCollabo
|
|
|
54
54
|
} }, ({ errors, values, setFieldValue }) => (react_1.default.createElement(formik_1.Form, null,
|
|
55
55
|
errors.contents && react_1.default.createElement(Form_1.FormError, null, errors.contents),
|
|
56
56
|
react_1.default.createElement(formik_1.Field, { name: 'contents' }, (props) => (react_1.default.createElement(CommentContent, null,
|
|
57
|
-
react_1.default.createElement(StyledCommentField, { autoFocus: isEditing, value: values.contents, handleChange: (data) => setFieldValue(props.field.name, data), createKeyword: createKeyword, listCollaborators: listCollaborators, listKeywords: listKeywords, notePlaceholder: !isReply ? 'Comment or @mention...' : 'Reply...' })))),
|
|
57
|
+
react_1.default.createElement(StyledCommentField, { id: comment._id, autoFocus: isEditing, value: values.contents, handleChange: (data) => setFieldValue(props.field.name, data), handleBlur: onFocusOut, createKeyword: createKeyword, listCollaborators: listCollaborators, listKeywords: listKeywords, notePlaceholder: !isReply ? 'Comment or @mention...' : 'Reply...' })))),
|
|
58
58
|
react_1.default.createElement(EditingCommentFooter, null,
|
|
59
59
|
react_1.default.createElement(Actions, null,
|
|
60
60
|
react_1.default.createElement(Button_1.SecondaryButton, { onClick: cancelEditing }, "Cancel"),
|
|
61
|
-
react_1.default.createElement(Button_1.PrimaryButton, {
|
|
61
|
+
react_1.default.createElement(Button_1.PrimaryButton, { disabled: !values.contents.replace(/<[^>]+>/g, '').length ||
|
|
62
|
+
(!isNew &&
|
|
63
|
+
(comment.contents === values.contents ||
|
|
64
|
+
!values.contents.replace(/<[^>]+>/g, '').length)), type: "submit" }, "Save"))))))) : (react_1.default.createElement("div", null,
|
|
62
65
|
react_1.default.createElement(CommentContent, { onClick: () => scrollIntoHighlight && scrollIntoHighlight(comment) },
|
|
63
66
|
react_1.default.createElement(StyledCommentViewer, { value: comment.contents, getCollaborator: getCollaborator, getKeyword: getKeyword })),
|
|
64
67
|
!isReply && (react_1.default.createElement(CommentFooter, null,
|
|
@@ -54,7 +54,7 @@ const isOwn = (comment, userId) => {
|
|
|
54
54
|
? (_a = comment.contributions) === null || _a === void 0 ? void 0 : _a.some((c) => c.profileID === userId)
|
|
55
55
|
: false;
|
|
56
56
|
};
|
|
57
|
-
const CommentWrapper = ({ createKeyword, comment, can, currentUserId, getCollaborator, getKeyword, listCollaborators, listKeywords, saveComment, deleteComment, isReply, isNew, handleCreateReply, handleSetResolved, isProdNote, isSelected, handleRequestSelect, scrollIntoHighlight, children, }) => {
|
|
57
|
+
const CommentWrapper = ({ createKeyword, comment, can, currentUserId, getCollaborator, getKeyword, listCollaborators, listKeywords, saveComment, deleteComment, isReply, isNew, handleCreateReply, handleSetResolved, isProdNote, isSelected, handleRequestSelect, scrollIntoHighlight, onFocusOut, children, }) => {
|
|
58
58
|
const [isEditing, setIsEditing] = (0, react_1.useState)();
|
|
59
59
|
const threadRef = (0, react_1.useRef)(null);
|
|
60
60
|
(0, react_1.useEffect)(() => {
|
|
@@ -89,7 +89,7 @@ const CommentWrapper = ({ createKeyword, comment, can, currentUserId, getCollabo
|
|
|
89
89
|
react_1.default.createElement(NoteTitle, { type: "button", onMouseDown: onTitleMouseDown, onKeyDown: onTitleKeyDown }, comment.contributions && (react_1.default.createElement(CommentUser_1.CommentUser, { contributions: comment.contributions, getCollaboratorById: getCollaborator, displayName: comment.displayName, createdAt: (0, comments_1.isSavedComment)(comment) ? comment.createdAt * 1000 : undefined }))),
|
|
90
90
|
react_1.default.createElement(CommentActions_1.CommentActions, { id: comment._id, isOwnComment: isOwnComment, can: can, target: comment.target, isResolved: comment.resolved, handleSetResolved: handleSetResolved, deleteComment: deleteComment, setIsEditing: setIsEditing, isProdNote: isProdNote })),
|
|
91
91
|
children,
|
|
92
|
-
react_1.default.createElement(CommentBody_1.CommentBody, { createKeyword: createKeyword, comment: comment, deleteComment: deleteComment, getCollaborator: getCollaborator, getKeyword: getKeyword, listCollaborators: listCollaborators, listKeywords: listKeywords, isReply: isReply, saveComment: saveComment, handleCreateReply: handleCreateReply, scrollIntoHighlight: scrollIntoHighlight, isNew: isNew, setIsEditing: setIsEditing, isEditing: isEditing, isProdNote: isProdNote })));
|
|
92
|
+
react_1.default.createElement(CommentBody_1.CommentBody, { createKeyword: createKeyword, onFocusOut: onFocusOut, comment: comment, deleteComment: deleteComment, getCollaborator: getCollaborator, getKeyword: getKeyword, listCollaborators: listCollaborators, listKeywords: listKeywords, isReply: isReply, saveComment: saveComment, handleCreateReply: handleCreateReply, scrollIntoHighlight: scrollIntoHighlight, isNew: isNew, setIsEditing: setIsEditing, isEditing: isEditing, isProdNote: isProdNote })));
|
|
93
93
|
};
|
|
94
94
|
exports.CommentWrapper = CommentWrapper;
|
|
95
95
|
const Note = styled_components_1.default.div `
|
|
@@ -49,7 +49,7 @@ const MapUserRole = {
|
|
|
49
49
|
Viewer: { label: 'Reading...', icon: __1.ReadingIcon },
|
|
50
50
|
};
|
|
51
51
|
const EditorHeader = ({ handleSnapshot, submission, hasPendingSuggestions, userRole, canCompleteTask, submitProceed, goBack, status, isAnnotator, message, exceptionDialog: ExceptionDialog, disabelProceedNote, }) => {
|
|
52
|
-
var _a, _b, _c
|
|
52
|
+
var _a, _b, _c;
|
|
53
53
|
const [confirmationDialog, toggleConfirmationDialog] = (0, react_1.useState)(false);
|
|
54
54
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
55
55
|
const [noteValue, setNoteValue] = (0, react_1.useState)('');
|
|
@@ -95,7 +95,7 @@ const EditorHeader = ({ handleSnapshot, submission, hasPendingSuggestions, userR
|
|
|
95
95
|
react_1.default.createElement("span", null, "Dashboard"))),
|
|
96
96
|
handleSnapshot &&
|
|
97
97
|
typeof hasPendingSuggestions == 'boolean' &&
|
|
98
|
-
submission.nextStep && (react_1.default.createElement(ProceedView_1.ProceedView, { isAnnotator: isAnnotator, disable: disable, onTransitionClick: onTransitionClick, hasPendingSuggestions: hasPendingSuggestions, loading: loading, showComplete: showComplete, noteValue: noteValue, currentStepTransition: currentStepTransition, error: error,
|
|
98
|
+
submission.nextStep && (react_1.default.createElement(ProceedView_1.ProceedView, { isAnnotator: isAnnotator, disable: disable, onTransitionClick: onTransitionClick, hasPendingSuggestions: hasPendingSuggestions, loading: loading, showComplete: showComplete, noteValue: noteValue, currentStepTransition: currentStepTransition, error: error, nextStepType: submission.nextStep.type, currentStepType: submission.currentStep.type, confirmationDialog: confirmationDialog, onNoteChange: disabelProceedNote ? undefined : onNoteChange, continueDialogAction: continueDialogAction, onCancelClick: onCancelClick, message: message })),
|
|
99
99
|
status && (react_1.default.createElement(ChildWrapper, null,
|
|
100
100
|
react_1.default.createElement(__1.SaveStatus, { status: status }))),
|
|
101
101
|
react_1.default.createElement(Spacer, null),
|
|
@@ -46,7 +46,7 @@ const StepDetails = ({ icon, label, description, role }) => (react_1.default.cre
|
|
|
46
46
|
react_1.default.createElement(__1.SecondarySmallText, null,
|
|
47
47
|
"Actor: ",
|
|
48
48
|
role.label))));
|
|
49
|
-
const ProceedView = ({ currentStepTransition, onTransitionClick, disable, loading, showComplete, confirmationDialog,
|
|
49
|
+
const ProceedView = ({ currentStepTransition, onTransitionClick, disable, loading, showComplete, confirmationDialog, nextStepType, currentStepType, isAnnotator, hasPendingSuggestions, error, noteValue, onNoteChange, onCancelClick, continueDialogAction, message: Message, }) => {
|
|
50
50
|
const dialogMessages = (0, react_1.useMemo)(() => hasPendingSuggestions && !isAnnotator
|
|
51
51
|
? {
|
|
52
52
|
header: 'The task can not be transitioned to the next step',
|
|
@@ -62,7 +62,7 @@ const ProceedView = ({ currentStepTransition, onTransitionClick, disable, loadin
|
|
|
62
62
|
: showComplete
|
|
63
63
|
? {
|
|
64
64
|
header: 'Content reassigned successfully',
|
|
65
|
-
message: `to the ${
|
|
65
|
+
message: `to the ${nextStepType.label}`,
|
|
66
66
|
actions: {
|
|
67
67
|
primary: {
|
|
68
68
|
action: onCancelClick,
|
|
@@ -87,7 +87,7 @@ const ProceedView = ({ currentStepTransition, onTransitionClick, disable, loadin
|
|
|
87
87
|
showComplete,
|
|
88
88
|
continueDialogAction,
|
|
89
89
|
onCancelClick,
|
|
90
|
-
|
|
90
|
+
nextStepType,
|
|
91
91
|
hasPendingSuggestions,
|
|
92
92
|
isAnnotator,
|
|
93
93
|
]);
|
|
@@ -100,10 +100,10 @@ const ProceedView = ({ currentStepTransition, onTransitionClick, disable, loadin
|
|
|
100
100
|
(loading && (react_1.default.createElement(__1.LoadingOverlay, null,
|
|
101
101
|
react_1.default.createElement(Message, { isCentered: true }, "Proceeding with your submission\u2026")))) || (react_1.default.createElement(__1.Dialog, { isOpen: confirmationDialog && !loading, category: __1.Category.confirmation, header: dialogMessages.header, message: dialogMessages.message, actions: dialogMessages.actions },
|
|
102
102
|
(showComplete && (react_1.default.createElement(Grid, null,
|
|
103
|
-
|
|
103
|
+
react_1.default.createElement(StepDetails, Object.assign({}, currentStepType, { icon: react_1.default.createElement(react_1.default.Fragment, null,
|
|
104
104
|
react_1.default.createElement(__1.TaskStepDoneIcon, null),
|
|
105
|
-
react_1.default.createElement(Line, null)) }))
|
|
106
|
-
react_1.default.createElement(StepDetails, Object.assign({},
|
|
105
|
+
react_1.default.createElement(Line, null)) })),
|
|
106
|
+
react_1.default.createElement(StepDetails, Object.assign({}, nextStepType))))) ||
|
|
107
107
|
((!hasPendingSuggestions || isAnnotator) && onNoteChange && (react_1.default.createElement(TextAreaWrapper, null,
|
|
108
108
|
react_1.default.createElement(EditorHeader_1.MediumTextArea, { value: noteValue, onChange: onNoteChange, rows: 5, placeholder: 'Add any additional comment here...' })))),
|
|
109
109
|
error && (react_1.default.createElement(AlertMessage_1.AlertMessage, { type: AlertMessage_1.AlertMessageType.error, hideCloseButton: true }, error))))));
|
|
@@ -6,7 +6,7 @@ import ReactTooltip from 'react-tooltip';
|
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
import { ButtonGroup, PrimaryButton, SecondaryButton } from '../Button';
|
|
8
8
|
import { FormError } from '../Form';
|
|
9
|
-
export const CommentBody = React.memo(({ createKeyword, comment, getCollaborator, getKeyword, listCollaborators, listKeywords, saveComment, deleteComment, isReply, isNew, handleCreateReply, setIsEditing, scrollIntoHighlight, isEditing, isProdNote, }) => {
|
|
9
|
+
export const CommentBody = React.memo(({ createKeyword, comment, getCollaborator, getKeyword, listCollaborators, listKeywords, saveComment, deleteComment, isReply, isNew, handleCreateReply, setIsEditing, scrollIntoHighlight, onFocusOut, isEditing, isProdNote, }) => {
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
if (isNew) {
|
|
12
12
|
setIsEditing(true);
|
|
@@ -25,11 +25,14 @@ export const CommentBody = React.memo(({ createKeyword, comment, getCollaborator
|
|
|
25
25
|
} }, ({ errors, values, setFieldValue }) => (React.createElement(Form, null,
|
|
26
26
|
errors.contents && React.createElement(FormError, null, errors.contents),
|
|
27
27
|
React.createElement(Field, { name: 'contents' }, (props) => (React.createElement(CommentContent, null,
|
|
28
|
-
React.createElement(StyledCommentField, { autoFocus: isEditing, value: values.contents, handleChange: (data) => setFieldValue(props.field.name, data), createKeyword: createKeyword, listCollaborators: listCollaborators, listKeywords: listKeywords, notePlaceholder: !isReply ? 'Comment or @mention...' : 'Reply...' })))),
|
|
28
|
+
React.createElement(StyledCommentField, { id: comment._id, autoFocus: isEditing, value: values.contents, handleChange: (data) => setFieldValue(props.field.name, data), handleBlur: onFocusOut, createKeyword: createKeyword, listCollaborators: listCollaborators, listKeywords: listKeywords, notePlaceholder: !isReply ? 'Comment or @mention...' : 'Reply...' })))),
|
|
29
29
|
React.createElement(EditingCommentFooter, null,
|
|
30
30
|
React.createElement(Actions, null,
|
|
31
31
|
React.createElement(SecondaryButton, { onClick: cancelEditing }, "Cancel"),
|
|
32
|
-
React.createElement(PrimaryButton, {
|
|
32
|
+
React.createElement(PrimaryButton, { disabled: !values.contents.replace(/<[^>]+>/g, '').length ||
|
|
33
|
+
(!isNew &&
|
|
34
|
+
(comment.contents === values.contents ||
|
|
35
|
+
!values.contents.replace(/<[^>]+>/g, '').length)), type: "submit" }, "Save"))))))) : (React.createElement("div", null,
|
|
33
36
|
React.createElement(CommentContent, { onClick: () => scrollIntoHighlight && scrollIntoHighlight(comment) },
|
|
34
37
|
React.createElement(StyledCommentViewer, { value: comment.contents, getCollaborator: getCollaborator, getKeyword: getKeyword })),
|
|
35
38
|
!isReply && (React.createElement(CommentFooter, null,
|
|
@@ -25,7 +25,7 @@ const isOwn = (comment, userId) => {
|
|
|
25
25
|
? (_a = comment.contributions) === null || _a === void 0 ? void 0 : _a.some((c) => c.profileID === userId)
|
|
26
26
|
: false;
|
|
27
27
|
};
|
|
28
|
-
export const CommentWrapper = ({ createKeyword, comment, can, currentUserId, getCollaborator, getKeyword, listCollaborators, listKeywords, saveComment, deleteComment, isReply, isNew, handleCreateReply, handleSetResolved, isProdNote, isSelected, handleRequestSelect, scrollIntoHighlight, children, }) => {
|
|
28
|
+
export const CommentWrapper = ({ createKeyword, comment, can, currentUserId, getCollaborator, getKeyword, listCollaborators, listKeywords, saveComment, deleteComment, isReply, isNew, handleCreateReply, handleSetResolved, isProdNote, isSelected, handleRequestSelect, scrollIntoHighlight, onFocusOut, children, }) => {
|
|
29
29
|
const [isEditing, setIsEditing] = useState();
|
|
30
30
|
const threadRef = useRef(null);
|
|
31
31
|
useEffect(() => {
|
|
@@ -60,7 +60,7 @@ export const CommentWrapper = ({ createKeyword, comment, can, currentUserId, get
|
|
|
60
60
|
React.createElement(NoteTitle, { type: "button", onMouseDown: onTitleMouseDown, onKeyDown: onTitleKeyDown }, comment.contributions && (React.createElement(CommentUser, { contributions: comment.contributions, getCollaboratorById: getCollaborator, displayName: comment.displayName, createdAt: isSavedComment(comment) ? comment.createdAt * 1000 : undefined }))),
|
|
61
61
|
React.createElement(CommentActions, { id: comment._id, isOwnComment: isOwnComment, can: can, target: comment.target, isResolved: comment.resolved, handleSetResolved: handleSetResolved, deleteComment: deleteComment, setIsEditing: setIsEditing, isProdNote: isProdNote })),
|
|
62
62
|
children,
|
|
63
|
-
React.createElement(CommentBody, { createKeyword: createKeyword, comment: comment, deleteComment: deleteComment, getCollaborator: getCollaborator, getKeyword: getKeyword, listCollaborators: listCollaborators, listKeywords: listKeywords, isReply: isReply, saveComment: saveComment, handleCreateReply: handleCreateReply, scrollIntoHighlight: scrollIntoHighlight, isNew: isNew, setIsEditing: setIsEditing, isEditing: isEditing, isProdNote: isProdNote })));
|
|
63
|
+
React.createElement(CommentBody, { createKeyword: createKeyword, onFocusOut: onFocusOut, comment: comment, deleteComment: deleteComment, getCollaborator: getCollaborator, getKeyword: getKeyword, listCollaborators: listCollaborators, listKeywords: listKeywords, isReply: isReply, saveComment: saveComment, handleCreateReply: handleCreateReply, scrollIntoHighlight: scrollIntoHighlight, isNew: isNew, setIsEditing: setIsEditing, isEditing: isEditing, isProdNote: isProdNote })));
|
|
64
64
|
};
|
|
65
65
|
const Note = styled.div `
|
|
66
66
|
& .note-actions {
|
|
@@ -20,7 +20,7 @@ const MapUserRole = {
|
|
|
20
20
|
Viewer: { label: 'Reading...', icon: ReadingIcon },
|
|
21
21
|
};
|
|
22
22
|
export const EditorHeader = ({ handleSnapshot, submission, hasPendingSuggestions, userRole, canCompleteTask, submitProceed, goBack, status, isAnnotator, message, exceptionDialog: ExceptionDialog, disabelProceedNote, }) => {
|
|
23
|
-
var _a, _b, _c
|
|
23
|
+
var _a, _b, _c;
|
|
24
24
|
const [confirmationDialog, toggleConfirmationDialog] = useState(false);
|
|
25
25
|
const [loading, setLoading] = useState(false);
|
|
26
26
|
const [noteValue, setNoteValue] = useState('');
|
|
@@ -66,7 +66,7 @@ export const EditorHeader = ({ handleSnapshot, submission, hasPendingSuggestions
|
|
|
66
66
|
React.createElement("span", null, "Dashboard"))),
|
|
67
67
|
handleSnapshot &&
|
|
68
68
|
typeof hasPendingSuggestions == 'boolean' &&
|
|
69
|
-
submission.nextStep && (React.createElement(ProceedView, { isAnnotator: isAnnotator, disable: disable, onTransitionClick: onTransitionClick, hasPendingSuggestions: hasPendingSuggestions, loading: loading, showComplete: showComplete, noteValue: noteValue, currentStepTransition: currentStepTransition, error: error,
|
|
69
|
+
submission.nextStep && (React.createElement(ProceedView, { isAnnotator: isAnnotator, disable: disable, onTransitionClick: onTransitionClick, hasPendingSuggestions: hasPendingSuggestions, loading: loading, showComplete: showComplete, noteValue: noteValue, currentStepTransition: currentStepTransition, error: error, nextStepType: submission.nextStep.type, currentStepType: submission.currentStep.type, confirmationDialog: confirmationDialog, onNoteChange: disabelProceedNote ? undefined : onNoteChange, continueDialogAction: continueDialogAction, onCancelClick: onCancelClick, message: message })),
|
|
70
70
|
status && (React.createElement(ChildWrapper, null,
|
|
71
71
|
React.createElement(SaveStatus, { status: status }))),
|
|
72
72
|
React.createElement(Spacer, null),
|
|
@@ -17,7 +17,7 @@ const StepDetails = ({ icon, label, description, role }) => (React.createElement
|
|
|
17
17
|
React.createElement(SecondarySmallText, null,
|
|
18
18
|
"Actor: ",
|
|
19
19
|
role.label))));
|
|
20
|
-
export const ProceedView = ({ currentStepTransition, onTransitionClick, disable, loading, showComplete, confirmationDialog,
|
|
20
|
+
export const ProceedView = ({ currentStepTransition, onTransitionClick, disable, loading, showComplete, confirmationDialog, nextStepType, currentStepType, isAnnotator, hasPendingSuggestions, error, noteValue, onNoteChange, onCancelClick, continueDialogAction, message: Message, }) => {
|
|
21
21
|
const dialogMessages = useMemo(() => hasPendingSuggestions && !isAnnotator
|
|
22
22
|
? {
|
|
23
23
|
header: 'The task can not be transitioned to the next step',
|
|
@@ -33,7 +33,7 @@ export const ProceedView = ({ currentStepTransition, onTransitionClick, disable,
|
|
|
33
33
|
: showComplete
|
|
34
34
|
? {
|
|
35
35
|
header: 'Content reassigned successfully',
|
|
36
|
-
message: `to the ${
|
|
36
|
+
message: `to the ${nextStepType.label}`,
|
|
37
37
|
actions: {
|
|
38
38
|
primary: {
|
|
39
39
|
action: onCancelClick,
|
|
@@ -58,7 +58,7 @@ export const ProceedView = ({ currentStepTransition, onTransitionClick, disable,
|
|
|
58
58
|
showComplete,
|
|
59
59
|
continueDialogAction,
|
|
60
60
|
onCancelClick,
|
|
61
|
-
|
|
61
|
+
nextStepType,
|
|
62
62
|
hasPendingSuggestions,
|
|
63
63
|
isAnnotator,
|
|
64
64
|
]);
|
|
@@ -71,10 +71,10 @@ export const ProceedView = ({ currentStepTransition, onTransitionClick, disable,
|
|
|
71
71
|
(loading && (React.createElement(LoadingOverlay, null,
|
|
72
72
|
React.createElement(Message, { isCentered: true }, "Proceeding with your submission\u2026")))) || (React.createElement(Dialog, { isOpen: confirmationDialog && !loading, category: Category.confirmation, header: dialogMessages.header, message: dialogMessages.message, actions: dialogMessages.actions },
|
|
73
73
|
(showComplete && (React.createElement(Grid, null,
|
|
74
|
-
|
|
74
|
+
React.createElement(StepDetails, Object.assign({}, currentStepType, { icon: React.createElement(React.Fragment, null,
|
|
75
75
|
React.createElement(TaskStepDoneIcon, null),
|
|
76
|
-
React.createElement(Line, null)) }))
|
|
77
|
-
React.createElement(StepDetails, Object.assign({},
|
|
76
|
+
React.createElement(Line, null)) })),
|
|
77
|
+
React.createElement(StepDetails, Object.assign({}, nextStepType))))) ||
|
|
78
78
|
((!hasPendingSuggestions || isAnnotator) && onNoteChange && (React.createElement(TextAreaWrapper, null,
|
|
79
79
|
React.createElement(MediumTextArea, { value: noteValue, onChange: onNoteChange, rows: 5, placeholder: 'Add any additional comment here...' })))),
|
|
80
80
|
error && (React.createElement(AlertMessage, { type: AlertMessageType.error, hideCloseButton: true }, error))))));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Keyword, UserProfile } from '@manuscripts/json-schema';
|
|
2
|
+
import { EditorView } from 'prosemirror-view';
|
|
2
3
|
import React, { Dispatch, SetStateAction } from 'react';
|
|
3
4
|
import { CommentType, UnsavedComment } from '../../lib/comments';
|
|
4
5
|
export interface CommentBodyProps {
|
|
@@ -14,6 +15,7 @@ export interface CommentBodyProps {
|
|
|
14
15
|
saveComment: (comment: CommentType | UnsavedComment) => Promise<CommentType>;
|
|
15
16
|
handleCreateReply: (id: string) => void;
|
|
16
17
|
scrollIntoHighlight?: (comment: CommentType | UnsavedComment) => void;
|
|
18
|
+
onFocusOut?: (view: EditorView, event: Event) => boolean;
|
|
17
19
|
}
|
|
18
20
|
export declare const CommentBody: React.FC<CommentBodyProps & {
|
|
19
21
|
setIsEditing: Dispatch<SetStateAction<boolean | undefined>>;
|
|
@@ -11,9 +11,8 @@ export declare const ProceedView: React.FC<{
|
|
|
11
11
|
noteValue: string;
|
|
12
12
|
currentStepTransition: SubmissionStepTransition[];
|
|
13
13
|
error: string | undefined;
|
|
14
|
-
previousStepType: SubmissionStepType | undefined;
|
|
15
|
-
currentStepType: SubmissionStepType;
|
|
16
14
|
nextStepType: SubmissionStepType;
|
|
15
|
+
currentStepType: SubmissionStepType;
|
|
17
16
|
confirmationDialog: boolean;
|
|
18
17
|
onCancelClick: () => void;
|
|
19
18
|
continueDialogAction: () => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/style-guide",
|
|
3
3
|
"description": "Shared components for Manuscripts applications",
|
|
4
|
-
"version": "1.1.9-LEAN-
|
|
4
|
+
"version": "1.1.9-LEAN-2505-1",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@manuscripts/transform": "^1.3.0",
|
|
40
40
|
"@manuscripts/json-schema": "^2.0.2",
|
|
41
41
|
"@manuscripts/title-editor": "^1.1.0",
|
|
42
|
-
"@manuscripts/comment-editor": "^1.0.1",
|
|
42
|
+
"@manuscripts/comment-editor": "^1.0.1-LEAN-2505",
|
|
43
43
|
"@reach/tabs": "^0.11.2",
|
|
44
44
|
"formik": "^2.2.9",
|
|
45
45
|
"date-fns": "^2.29.3",
|