@manuscripts/style-guide 1.7.0 → 1.7.1-LEAN-3281-0
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 +1 -1
- package/dist/cjs/components/Comments/CommentTarget.js +1 -1
- package/dist/cjs/components/Comments/CommentWrapper.js +2 -2
- package/dist/cjs/components/FileManager/FileActions.js +2 -2
- package/dist/cjs/components/FileManager/FileManager.js +6 -6
- package/dist/cjs/components/FileManager/FileName.js +1 -1
- package/dist/cjs/components/FileManager/InlineFilesSection.js +1 -1
- package/dist/cjs/components/FileManager/OtherFilesSection.js +1 -1
- package/dist/cjs/components/FileManager/SupplementsSection.js +2 -2
- package/dist/cjs/components/References/ReferencesModal.js +8 -1
- package/dist/es/components/Comments/CommentBody.js +1 -1
- package/dist/es/components/Comments/CommentTarget.js +1 -1
- package/dist/es/components/Comments/CommentWrapper.js +2 -2
- package/dist/es/components/FileManager/FileActions.js +2 -2
- package/dist/es/components/FileManager/FileManager.js +6 -6
- package/dist/es/components/FileManager/FileName.js +1 -1
- package/dist/es/components/FileManager/InlineFilesSection.js +1 -1
- package/dist/es/components/FileManager/OtherFilesSection.js +1 -1
- package/dist/es/components/FileManager/SupplementsSection.js +2 -2
- package/dist/es/components/References/ReferencesModal.js +8 -1
- package/package.json +2 -2
|
@@ -63,7 +63,7 @@ exports.CommentBody = react_1.default.memo(({ comment, saveComment, deleteCommen
|
|
|
63
63
|
(comment.contents === values.contents ||
|
|
64
64
|
!values.contents.replace(/<[^>]+>/g, '').length)), type: "submit" }, "Save"))))))) : (react_1.default.createElement("div", null,
|
|
65
65
|
react_1.default.createElement(CommentContent, { onClick: () => scrollIntoHighlight && scrollIntoHighlight(comment) },
|
|
66
|
-
react_1.default.createElement(StyledCommentViewer,
|
|
66
|
+
react_1.default.createElement(StyledCommentViewer, { "data-cy": "note-text" }, comment.contents)),
|
|
67
67
|
!isReply && (react_1.default.createElement(CommentFooter, null,
|
|
68
68
|
react_1.default.createElement("span", null,
|
|
69
69
|
react_1.default.createElement(ActionButton, { hidden: !isProdNote, "data-tip": true, "data-for": `reply-${comment._id}`, onClick: () => handleCreateReply(comment._id), "aria-label": 'reply', className: "reply-button note-actions" },
|
|
@@ -51,5 +51,5 @@ exports.CommentTarget = react_1.default.memo(({ isSelected, children }) => {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
return react_1.default.createElement("div", { ref: threadRef }, children);
|
|
54
|
+
return (react_1.default.createElement("div", { "data-cy": "comment-target", ref: threadRef }, children));
|
|
55
55
|
});
|
|
@@ -84,8 +84,8 @@ const CommentWrapper = ({ createKeyword, comment, can, currentUserId, getCollabo
|
|
|
84
84
|
}
|
|
85
85
|
}, [handleRequestSelect]);
|
|
86
86
|
const isOwnComment = (0, react_1.useMemo)(() => isOwn(comment, currentUserId), [comment, currentUserId]);
|
|
87
|
-
return (react_1.default.createElement(Note, { ref: threadRef, isSelected: isSelected },
|
|
88
|
-
react_1.default.createElement(NoteHeader,
|
|
87
|
+
return (react_1.default.createElement(Note, { "data-cy": "note", ref: threadRef, isSelected: isSelected },
|
|
88
|
+
react_1.default.createElement(NoteHeader, { "data-cy": "note-header" },
|
|
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,
|
|
@@ -65,9 +65,9 @@ const FileActions = ({ sectionType, handleDownload, handleReplace, handleDetach,
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
return show ? (react_1.default.createElement(Dropdown_1.DropdownContainer, { ref: wrapperRef },
|
|
68
|
-
react_1.default.createElement(exports.ActionsIcon, { onClick: toggleOpen, type: "button", className: "show-on-hover", "aria-label": "Actions", "aria-pressed": isOpen },
|
|
68
|
+
react_1.default.createElement(exports.ActionsIcon, { onClick: toggleOpen, type: "button", className: "show-on-hover", "data-cy": "file-actions", "aria-label": "Actions", "aria-pressed": isOpen },
|
|
69
69
|
react_1.default.createElement(dots_icon_1.default, null)),
|
|
70
|
-
isOpen && (react_1.default.createElement(exports.FileActionDropdownList, { direction: "right", className: className, width: 192, top: 5, onClick: toggleOpen },
|
|
70
|
+
isOpen && (react_1.default.createElement(exports.FileActionDropdownList, { "data-cy": "file-actions-dropdown", direction: "right", className: className, width: 192, top: 5, onClick: toggleOpen },
|
|
71
71
|
showDownload && (react_1.default.createElement(exports.FileAction, { onClick: handleDownload }, "Download")),
|
|
72
72
|
showReplace && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
73
73
|
react_1.default.createElement(exports.FileAction, { onClick: openFileDialog }, "Replace"),
|
|
@@ -50,11 +50,11 @@ const FileManager = ({ files, fileManagement, modelMap, saveModel, deleteModel,
|
|
|
50
50
|
react_1.default.createElement(Inspector_1.InspectorTab, { "data-for": "other", "data-tip": true }, "Other files"),
|
|
51
51
|
react_1.default.createElement(Tooltip_1.Tooltip, { id: "other", place: "bottom", offset: { bottom: -11 }, effect: "solid", className: "tooltip" }, "Files excluded from the final submission.")),
|
|
52
52
|
react_1.default.createElement(Inspector_1.InspectorTabPanels, { style: { overflowY: 'visible', position: 'relative' } },
|
|
53
|
-
react_1.default.createElement(Inspector_1.InspectorTabPanel,
|
|
54
|
-
react_1.default.createElement(InlineFilesSection_1.InlineFilesSection, {
|
|
55
|
-
react_1.default.createElement(Inspector_1.InspectorTabPanel,
|
|
56
|
-
react_1.default.createElement(SupplementsSection_1.SupplementsSection, {
|
|
57
|
-
react_1.default.createElement(Inspector_1.InspectorTabPanel,
|
|
58
|
-
react_1.default.createElement(OtherFilesSection_1.OtherFilesSection, {
|
|
53
|
+
react_1.default.createElement(Inspector_1.InspectorTabPanel, { "data-cy": "inline" },
|
|
54
|
+
react_1.default.createElement(InlineFilesSection_1.InlineFilesSection, { elements: inlineFiles, isEditor: enableDragAndDrop })),
|
|
55
|
+
react_1.default.createElement(Inspector_1.InspectorTabPanel, { "data-cy": "supplements" },
|
|
56
|
+
react_1.default.createElement(SupplementsSection_1.SupplementsSection, { supplements: supplements })),
|
|
57
|
+
react_1.default.createElement(Inspector_1.InspectorTabPanel, { "data-cy": "other" },
|
|
58
|
+
react_1.default.createElement(OtherFilesSection_1.OtherFilesSection, { files: otherFiles }))))))));
|
|
59
59
|
};
|
|
60
60
|
exports.FileManager = FileManager;
|
|
@@ -10,7 +10,7 @@ const FileTypeIcon_1 = require("./FileTypeIcon");
|
|
|
10
10
|
const FileName = ({ file }) => {
|
|
11
11
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
12
12
|
react_1.default.createElement(FileTypeIcon_1.FileTypeIcon, { file: file }),
|
|
13
|
-
react_1.default.createElement(exports.FileNameText,
|
|
13
|
+
react_1.default.createElement(exports.FileNameText, { "data-cy": "filename" }, file.name)));
|
|
14
14
|
};
|
|
15
15
|
exports.FileName = FileName;
|
|
16
16
|
exports.FileNameText = styled_components_1.default.div `
|
|
@@ -84,7 +84,7 @@ const InlineFilesSection = ({ elements, isEditor }) => {
|
|
|
84
84
|
};
|
|
85
85
|
exports.InlineFilesSection = InlineFilesSection;
|
|
86
86
|
const ElementFile = ({ file, handleReplace, handleDownload, handleDetach }) => {
|
|
87
|
-
return (react_1.default.createElement(ModelFileContainer,
|
|
87
|
+
return (react_1.default.createElement(ModelFileContainer, { "data-cy": "file-container" },
|
|
88
88
|
react_1.default.createElement(FileName_1.FileName, { file: file }),
|
|
89
89
|
react_1.default.createElement(FileCreatedDate_1.FileCreatedDate, { file: file, className: "show-on-hover" }),
|
|
90
90
|
react_1.default.createElement(FileActions_1.FileActions, { "data-cy": "file-actions", sectionType: util_1.FileSectionType.Inline, handleDownload: file.id ? handleDownload : undefined, handleDetach: file.id ? handleDetach : undefined, handleReplace: handleReplace })));
|
|
@@ -91,7 +91,7 @@ const OtherFile = ({ file, handleDownload, handleMoveToSupplements }) => {
|
|
|
91
91
|
(0, react_1.useEffect)(() => {
|
|
92
92
|
preview((0, react_dnd_html5_backend_1.getEmptyImage)());
|
|
93
93
|
}, [preview]);
|
|
94
|
-
return (react_1.default.createElement(FileContainer_1.FileContainer, { key: file.id, ref: drag, className: isDragging ? 'dragging' : '' },
|
|
94
|
+
return (react_1.default.createElement(FileContainer_1.FileContainer, { key: file.id, "data-cy": "file-container", ref: drag, className: isDragging ? 'dragging' : '' },
|
|
95
95
|
react_1.default.createElement(FileName_1.FileName, { file: file }),
|
|
96
96
|
react_1.default.createElement(FileCreatedDate_1.FileCreatedDate, { file: file, className: "show-on-hover" }),
|
|
97
97
|
react_1.default.createElement(FileActions_1.FileActions, { sectionType: util_1.FileSectionType.OtherFile, handleDownload: handleDownload, move: {
|
|
@@ -106,10 +106,10 @@ const SupplementFile = ({ file, handleDownload, handleReplace, handleDetach }) =
|
|
|
106
106
|
(0, react_1.useEffect)(() => {
|
|
107
107
|
preview((0, react_dnd_html5_backend_1.getEmptyImage)());
|
|
108
108
|
}, [preview]);
|
|
109
|
-
return (react_1.default.createElement(FileContainer_1.FileContainer, { key: file.id, ref: drag, className: isDragging ? 'dragging' : '' },
|
|
109
|
+
return (react_1.default.createElement(FileContainer_1.FileContainer, { "data-cy": "file-container", key: file.id, ref: drag, className: isDragging ? 'dragging' : '' },
|
|
110
110
|
react_1.default.createElement(FileName_1.FileName, { file: file }),
|
|
111
111
|
react_1.default.createElement(FileCreatedDate_1.FileCreatedDate, { file: file, className: "show-on-hover" }),
|
|
112
|
-
react_1.default.createElement(FileActions_1.FileActions, { sectionType: util_1.FileSectionType.Supplements, handleDownload: file.id ? handleDownload : undefined, handleReplace: handleReplace, move: file.id
|
|
112
|
+
react_1.default.createElement(FileActions_1.FileActions, { "data-cy": "file-actions", sectionType: util_1.FileSectionType.Supplements, handleDownload: file.id ? handleDownload : undefined, handleReplace: handleReplace, move: file.id
|
|
113
113
|
? {
|
|
114
114
|
sectionType: util_1.FileSectionType.OtherFile,
|
|
115
115
|
handler: handleDetach,
|
|
@@ -175,6 +175,13 @@ const ReferencesModal = ({ isOpen, onCancel, items, item, citationCounts, onSave
|
|
|
175
175
|
setSelection(item);
|
|
176
176
|
setConfirm(false);
|
|
177
177
|
};
|
|
178
|
+
const handleDelete = () => {
|
|
179
|
+
if (!selection) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
onDelete(selection);
|
|
183
|
+
setSelection(undefined);
|
|
184
|
+
};
|
|
178
185
|
const handleItemClick = (item) => {
|
|
179
186
|
const values = valuesRef.current;
|
|
180
187
|
if (values && selection && !(0, lodash_1.isEqual)(values, (0, exports.normalize)(selection))) {
|
|
@@ -214,6 +221,6 @@ const ReferencesModal = ({ isOpen, onCancel, items, item, citationCounts, onSave
|
|
|
214
221
|
react_1.default.createElement(CitationCount, { className: citationCounts.get(item._id) ? '' : 'unused' }, citationCounts.get(item._id) || 0),
|
|
215
222
|
react_1.default.createElement(react_tooltip_1.default, { disable: (citationCounts.get(item._id) || 0) < 1, id: "citation-count", place: "bottom", effect: "solid", offset: { top: 40 }, className: "tooltip" }, "Number of times used in the document")),
|
|
216
223
|
react_1.default.createElement(ReferenceLine_1.ReferenceLine, { item: item }))))))),
|
|
217
|
-
react_1.default.createElement(StyledModal_1.ScrollableModalContent, null, selection && (react_1.default.createElement(ReferenceForm_1.ReferenceForm, { values: (0, exports.normalize)(selection), showDelete: !citationCounts.get(selection._id), onChange: handleChange, onCancel: onCancel, onDelete:
|
|
224
|
+
react_1.default.createElement(StyledModal_1.ScrollableModalContent, null, selection && (react_1.default.createElement(ReferenceForm_1.ReferenceForm, { values: (0, exports.normalize)(selection), showDelete: !citationCounts.get(selection._id), onChange: handleChange, onCancel: onCancel, onDelete: handleDelete, onSave: save, actionsRef: actionsRef })))))));
|
|
218
225
|
};
|
|
219
226
|
exports.ReferencesModal = ReferencesModal;
|
|
@@ -34,7 +34,7 @@ export const CommentBody = React.memo(({ comment, saveComment, deleteComment, is
|
|
|
34
34
|
(comment.contents === values.contents ||
|
|
35
35
|
!values.contents.replace(/<[^>]+>/g, '').length)), type: "submit" }, "Save"))))))) : (React.createElement("div", null,
|
|
36
36
|
React.createElement(CommentContent, { onClick: () => scrollIntoHighlight && scrollIntoHighlight(comment) },
|
|
37
|
-
React.createElement(StyledCommentViewer,
|
|
37
|
+
React.createElement(StyledCommentViewer, { "data-cy": "note-text" }, comment.contents)),
|
|
38
38
|
!isReply && (React.createElement(CommentFooter, null,
|
|
39
39
|
React.createElement("span", null,
|
|
40
40
|
React.createElement(ActionButton, { hidden: !isProdNote, "data-tip": true, "data-for": `reply-${comment._id}`, onClick: () => handleCreateReply(comment._id), "aria-label": 'reply', className: "reply-button note-actions" },
|
|
@@ -55,8 +55,8 @@ export const CommentWrapper = ({ createKeyword, comment, can, currentUserId, get
|
|
|
55
55
|
}
|
|
56
56
|
}, [handleRequestSelect]);
|
|
57
57
|
const isOwnComment = useMemo(() => isOwn(comment, currentUserId), [comment, currentUserId]);
|
|
58
|
-
return (React.createElement(Note, { ref: threadRef, isSelected: isSelected },
|
|
59
|
-
React.createElement(NoteHeader,
|
|
58
|
+
return (React.createElement(Note, { "data-cy": "note", ref: threadRef, isSelected: isSelected },
|
|
59
|
+
React.createElement(NoteHeader, { "data-cy": "note-header" },
|
|
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,
|
|
@@ -36,9 +36,9 @@ export const FileActions = ({ sectionType, handleDownload, handleReplace, handle
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
return show ? (React.createElement(DropdownContainer, { ref: wrapperRef },
|
|
39
|
-
React.createElement(ActionsIcon, { onClick: toggleOpen, type: "button", className: "show-on-hover", "aria-label": "Actions", "aria-pressed": isOpen },
|
|
39
|
+
React.createElement(ActionsIcon, { onClick: toggleOpen, type: "button", className: "show-on-hover", "data-cy": "file-actions", "aria-label": "Actions", "aria-pressed": isOpen },
|
|
40
40
|
React.createElement(DotsIcon, null)),
|
|
41
|
-
isOpen && (React.createElement(FileActionDropdownList, { direction: "right", className: className, width: 192, top: 5, onClick: toggleOpen },
|
|
41
|
+
isOpen && (React.createElement(FileActionDropdownList, { "data-cy": "file-actions-dropdown", direction: "right", className: className, width: 192, top: 5, onClick: toggleOpen },
|
|
42
42
|
showDownload && (React.createElement(FileAction, { onClick: handleDownload }, "Download")),
|
|
43
43
|
showReplace && (React.createElement(React.Fragment, null,
|
|
44
44
|
React.createElement(FileAction, { onClick: openFileDialog }, "Replace"),
|
|
@@ -24,10 +24,10 @@ export const FileManager = ({ files, fileManagement, modelMap, saveModel, delete
|
|
|
24
24
|
React.createElement(InspectorTab, { "data-for": "other", "data-tip": true }, "Other files"),
|
|
25
25
|
React.createElement(Tooltip, { id: "other", place: "bottom", offset: { bottom: -11 }, effect: "solid", className: "tooltip" }, "Files excluded from the final submission.")),
|
|
26
26
|
React.createElement(InspectorTabPanels, { style: { overflowY: 'visible', position: 'relative' } },
|
|
27
|
-
React.createElement(InspectorTabPanel,
|
|
28
|
-
React.createElement(InlineFilesSection, {
|
|
29
|
-
React.createElement(InspectorTabPanel,
|
|
30
|
-
React.createElement(SupplementsSection, {
|
|
31
|
-
React.createElement(InspectorTabPanel,
|
|
32
|
-
React.createElement(OtherFilesSection, {
|
|
27
|
+
React.createElement(InspectorTabPanel, { "data-cy": "inline" },
|
|
28
|
+
React.createElement(InlineFilesSection, { elements: inlineFiles, isEditor: enableDragAndDrop })),
|
|
29
|
+
React.createElement(InspectorTabPanel, { "data-cy": "supplements" },
|
|
30
|
+
React.createElement(SupplementsSection, { supplements: supplements })),
|
|
31
|
+
React.createElement(InspectorTabPanel, { "data-cy": "other" },
|
|
32
|
+
React.createElement(OtherFilesSection, { files: otherFiles }))))))));
|
|
33
33
|
};
|
|
@@ -4,7 +4,7 @@ import { FileTypeIcon } from './FileTypeIcon';
|
|
|
4
4
|
export const FileName = ({ file }) => {
|
|
5
5
|
return (React.createElement(React.Fragment, null,
|
|
6
6
|
React.createElement(FileTypeIcon, { file: file }),
|
|
7
|
-
React.createElement(FileNameText,
|
|
7
|
+
React.createElement(FileNameText, { "data-cy": "filename" }, file.name)));
|
|
8
8
|
};
|
|
9
9
|
export const FileNameText = styled.div `
|
|
10
10
|
font-family: ${(props) => props.theme.font.family.Lato};
|
|
@@ -54,7 +54,7 @@ export const InlineFilesSection = ({ elements, isEditor }) => {
|
|
|
54
54
|
})));
|
|
55
55
|
};
|
|
56
56
|
const ElementFile = ({ file, handleReplace, handleDownload, handleDetach }) => {
|
|
57
|
-
return (React.createElement(ModelFileContainer,
|
|
57
|
+
return (React.createElement(ModelFileContainer, { "data-cy": "file-container" },
|
|
58
58
|
React.createElement(FileName, { file: file }),
|
|
59
59
|
React.createElement(FileCreatedDate, { file: file, className: "show-on-hover" }),
|
|
60
60
|
React.createElement(FileActions, { "data-cy": "file-actions", sectionType: FileSectionType.Inline, handleDownload: file.id ? handleDownload : undefined, handleDetach: file.id ? handleDetach : undefined, handleReplace: handleReplace })));
|
|
@@ -64,7 +64,7 @@ const OtherFile = ({ file, handleDownload, handleMoveToSupplements }) => {
|
|
|
64
64
|
useEffect(() => {
|
|
65
65
|
preview(getEmptyImage());
|
|
66
66
|
}, [preview]);
|
|
67
|
-
return (React.createElement(FileContainer, { key: file.id, ref: drag, className: isDragging ? 'dragging' : '' },
|
|
67
|
+
return (React.createElement(FileContainer, { key: file.id, "data-cy": "file-container", ref: drag, className: isDragging ? 'dragging' : '' },
|
|
68
68
|
React.createElement(FileName, { file: file }),
|
|
69
69
|
React.createElement(FileCreatedDate, { file: file, className: "show-on-hover" }),
|
|
70
70
|
React.createElement(FileActions, { sectionType: FileSectionType.OtherFile, handleDownload: handleDownload, move: {
|
|
@@ -79,10 +79,10 @@ const SupplementFile = ({ file, handleDownload, handleReplace, handleDetach }) =
|
|
|
79
79
|
useEffect(() => {
|
|
80
80
|
preview(getEmptyImage());
|
|
81
81
|
}, [preview]);
|
|
82
|
-
return (React.createElement(FileContainer, { key: file.id, ref: drag, className: isDragging ? 'dragging' : '' },
|
|
82
|
+
return (React.createElement(FileContainer, { "data-cy": "file-container", key: file.id, ref: drag, className: isDragging ? 'dragging' : '' },
|
|
83
83
|
React.createElement(FileName, { file: file }),
|
|
84
84
|
React.createElement(FileCreatedDate, { file: file, className: "show-on-hover" }),
|
|
85
|
-
React.createElement(FileActions, { sectionType: FileSectionType.Supplements, handleDownload: file.id ? handleDownload : undefined, handleReplace: handleReplace, move: file.id
|
|
85
|
+
React.createElement(FileActions, { "data-cy": "file-actions", sectionType: FileSectionType.Supplements, handleDownload: file.id ? handleDownload : undefined, handleReplace: handleReplace, move: file.id
|
|
86
86
|
? {
|
|
87
87
|
sectionType: FileSectionType.OtherFile,
|
|
88
88
|
handler: handleDetach,
|
|
@@ -145,6 +145,13 @@ export const ReferencesModal = ({ isOpen, onCancel, items, item, citationCounts,
|
|
|
145
145
|
setSelection(item);
|
|
146
146
|
setConfirm(false);
|
|
147
147
|
};
|
|
148
|
+
const handleDelete = () => {
|
|
149
|
+
if (!selection) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
onDelete(selection);
|
|
153
|
+
setSelection(undefined);
|
|
154
|
+
};
|
|
148
155
|
const handleItemClick = (item) => {
|
|
149
156
|
const values = valuesRef.current;
|
|
150
157
|
if (values && selection && !isEqual(values, normalize(selection))) {
|
|
@@ -184,5 +191,5 @@ export const ReferencesModal = ({ isOpen, onCancel, items, item, citationCounts,
|
|
|
184
191
|
React.createElement(CitationCount, { className: citationCounts.get(item._id) ? '' : 'unused' }, citationCounts.get(item._id) || 0),
|
|
185
192
|
React.createElement(ReactTooltip, { disable: (citationCounts.get(item._id) || 0) < 1, id: "citation-count", place: "bottom", effect: "solid", offset: { top: 40 }, className: "tooltip" }, "Number of times used in the document")),
|
|
186
193
|
React.createElement(ReferenceLine, { item: item }))))))),
|
|
187
|
-
React.createElement(ScrollableModalContent, null, selection && (React.createElement(ReferenceForm, { values: normalize(selection), showDelete: !citationCounts.get(selection._id), onChange: handleChange, onCancel: onCancel, onDelete:
|
|
194
|
+
React.createElement(ScrollableModalContent, null, selection && (React.createElement(ReferenceForm, { values: normalize(selection), showDelete: !citationCounts.get(selection._id), onChange: handleChange, onCancel: onCancel, onDelete: handleDelete, onSave: save, actionsRef: actionsRef })))))));
|
|
188
195
|
};
|
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.7.0",
|
|
4
|
+
"version": "1.7.1-LEAN-3281-0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -114,4 +114,4 @@
|
|
|
114
114
|
"resolutions": {
|
|
115
115
|
"@types/react": "^17.0.2"
|
|
116
116
|
}
|
|
117
|
-
}
|
|
117
|
+
}
|