@manuscripts/style-guide 1.0.6 → 1.0.7-LEAN-2237-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/FileManager/FileManager.js +7 -20
- package/dist/cjs/components/FileManager/FileSectionItem/DragLayer.js +1 -1
- package/dist/cjs/components/FileManager/FileSectionItem/FileInfo.js +1 -3
- package/dist/cjs/components/FileManager/FileSectionItem/FileSectionItem.js +4 -6
- package/dist/cjs/components/FileManager/FileSectionItem/ItemActions.js +3 -17
- package/dist/cjs/components/FileManager/FileSectionState.js +4 -14
- package/dist/cjs/components/FileManager/FilesSection.js +6 -20
- package/dist/cjs/components/FileManager/InlineFilesSection.js +1 -1
- package/dist/cjs/components/FileManager/util.js +1 -323
- package/dist/cjs/index.js +1 -5
- package/dist/cjs/lib/capabilities.js +0 -1
- package/dist/es/components/FileManager/FileManager.js +8 -21
- package/dist/es/components/FileManager/FileSectionItem/DragLayer.js +1 -1
- package/dist/es/components/FileManager/FileSectionItem/FileInfo.js +1 -3
- package/dist/es/components/FileManager/FileSectionItem/FileSectionItem.js +4 -6
- package/dist/es/components/FileManager/FileSectionItem/ItemActions.js +3 -17
- package/dist/es/components/FileManager/FileSectionState.js +4 -14
- package/dist/es/components/FileManager/FilesSection.js +8 -22
- package/dist/es/components/FileManager/InlineFilesSection.js +1 -1
- package/dist/es/components/FileManager/util.js +0 -318
- package/dist/es/index.js +0 -2
- package/dist/es/lib/capabilities.js +0 -1
- package/dist/types/components/FileManager/FileManager.d.ts +2 -4
- package/dist/types/components/FileManager/FileSectionItem/FileInfo.d.ts +0 -5
- package/dist/types/components/FileManager/FileSectionItem/FileSectionItem.d.ts +1 -3
- package/dist/types/components/FileManager/FileSectionItem/ItemActions.d.ts +0 -2
- package/dist/types/components/FileManager/FileSectionState.d.ts +1 -5
- package/dist/types/components/FileManager/util.d.ts +0 -31
- package/dist/types/components/icons/add-author.d.ts +0 -1
- package/dist/types/components/icons/add-comment-icon.d.ts +0 -1
- package/dist/types/components/icons/add-icon-active.d.ts +0 -1
- package/dist/types/components/icons/add-icon-inverted.d.ts +0 -1
- package/dist/types/components/icons/back-arrow.d.ts +0 -1
- package/dist/types/components/icons/bookmark.d.ts +0 -1
- package/dist/types/components/icons/google.d.ts +0 -1
- package/dist/types/components/icons/orcid.d.ts +0 -1
- package/dist/types/components/icons/plus-icon.d.ts +0 -1
- package/dist/types/components/icons/project-notification.d.ts +0 -1
- package/dist/types/components/icons/project.d.ts +0 -1
- package/dist/types/components/icons/projects-list.d.ts +0 -1
- package/dist/types/components/icons/search.d.ts +0 -1
- package/dist/types/components/icons/tick-mark.d.ts +0 -1
- package/dist/types/components/icons/user.d.ts +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/lib/capabilities.d.ts +0 -1
- package/package.json +35 -37
- package/dist/cjs/components/FileManager/FileSectionItem/DesignationActions.js +0 -131
- package/dist/cjs/components/FileManager/FileSectionItem/DesignationActionsList.js +0 -54
- package/dist/cjs/components/FileManager/SelectDesignationActions.js +0 -74
- package/dist/cjs/components/FileManager/SelectDialogDesignation.js +0 -33
- package/dist/cjs/components/PdfPreview.js +0 -111
- package/dist/es/components/FileManager/FileSectionItem/DesignationActions.js +0 -101
- package/dist/es/components/FileManager/FileSectionItem/DesignationActionsList.js +0 -47
- package/dist/es/components/FileManager/SelectDesignationActions.js +0 -44
- package/dist/es/components/FileManager/SelectDialogDesignation.js +0 -26
- package/dist/es/components/PdfPreview.js +0 -83
- package/dist/types/components/FileManager/FileSectionItem/DesignationActions.d.ts +0 -14
- package/dist/types/components/FileManager/FileSectionItem/DesignationActionsList.d.ts +0 -13
- package/dist/types/components/FileManager/SelectDesignationActions.d.ts +0 -12
- package/dist/types/components/FileManager/SelectDialogDesignation.d.ts +0 -11
- package/dist/types/components/PdfPreview.d.ts +0 -7
|
@@ -51,32 +51,28 @@ const InlineFilesSection_1 = require("./InlineFilesSection");
|
|
|
51
51
|
const TooltipDiv_1 = require("./TooltipDiv");
|
|
52
52
|
const util_1 = require("./util");
|
|
53
53
|
exports.PermissionsContext = (0, react_1.createContext)(null);
|
|
54
|
-
const FileManager = ({ modelMap, saveModel, enableDragAndDrop, can, fileManagement: { getAttachments,
|
|
54
|
+
const FileManager = ({ modelMap, saveModel, enableDragAndDrop, can, fileManagement: { getAttachments, replace, upload }, addAttachmentToState, }) => {
|
|
55
55
|
const [state, dispatch] = (0, react_1.useReducer)(FileSectionState_1.reducer, (0, FileSectionState_1.getInitialState)());
|
|
56
|
-
const handleReplaceFile = (0, react_1.useCallback)((attachmentId, name, file
|
|
56
|
+
const handleReplaceFile = (0, react_1.useCallback)((attachmentId, name, file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
57
|
dispatch(FileSectionState_1.actions.HANDLE_UPLOAD_ACTION());
|
|
58
|
-
|
|
59
|
-
const res = yield replace(attachmentId, name, file, typeId);
|
|
58
|
+
const res = yield replace(attachmentId, name, file);
|
|
60
59
|
dispatch(FileSectionState_1.actions.HANDLE_FINISH_UPLOAD());
|
|
61
60
|
if (res) {
|
|
62
61
|
dispatch(FileSectionState_1.actions.HANDLE_SUCCESS_MESSAGE('File uploaded successfully.'));
|
|
63
62
|
}
|
|
64
63
|
return res;
|
|
65
64
|
}), [replace]);
|
|
66
|
-
const handleUploadFile = (0, react_1.useCallback)((file
|
|
65
|
+
const handleUploadFile = (0, react_1.useCallback)((file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
67
66
|
dispatch(FileSectionState_1.actions.HANDLE_UPLOAD_ACTION());
|
|
68
|
-
|
|
69
|
-
dispatch(FileSectionState_1.actions.SELECT_DESIGNATION(util_1.Designation.Supplementary));
|
|
70
|
-
}
|
|
71
|
-
const res = yield upload(file, designation);
|
|
67
|
+
const res = yield upload(file);
|
|
72
68
|
dispatch(FileSectionState_1.actions.HANDLE_FINISH_UPLOAD());
|
|
73
69
|
if (res) {
|
|
74
70
|
dispatch(FileSectionState_1.actions.HANDLE_SUCCESS_MESSAGE('File uploaded successfully.', index_1.FileSectionType.OtherFile));
|
|
75
71
|
}
|
|
76
72
|
return res;
|
|
77
73
|
}), [upload]);
|
|
78
|
-
const handleUploadFileWithSupplement = (0, react_1.useCallback)((file
|
|
79
|
-
const response = yield upload(file
|
|
74
|
+
const handleUploadFileWithSupplement = (0, react_1.useCallback)((file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
+
const response = yield upload(file);
|
|
80
76
|
if (typeof response === 'object') {
|
|
81
77
|
const { id, name } = response;
|
|
82
78
|
yield saveModel((0, transform_1.buildSupplementaryMaterial)(name, `attachment:${id}`));
|
|
@@ -87,13 +83,6 @@ const FileManager = ({ modelMap, saveModel, enableDragAndDrop, can, fileManageme
|
|
|
87
83
|
}
|
|
88
84
|
return response;
|
|
89
85
|
}), [upload, saveModel]);
|
|
90
|
-
const handleChangeDesignationFile = (0, react_1.useCallback)((attachmentId, typeId, name) => __awaiter(void 0, void 0, void 0, function* () {
|
|
91
|
-
const res = yield changeDesignation(attachmentId, typeId, name);
|
|
92
|
-
if (res) {
|
|
93
|
-
dispatch(FileSectionState_1.actions.HANDLE_SUCCESS_MESSAGE(''));
|
|
94
|
-
}
|
|
95
|
-
return res;
|
|
96
|
-
}), [changeDesignation]);
|
|
97
86
|
const handleDownload = (0, react_1.useCallback)((url) => {
|
|
98
87
|
window.location.assign(url);
|
|
99
88
|
}, []);
|
|
@@ -125,11 +114,9 @@ const FileManager = ({ modelMap, saveModel, enableDragAndDrop, can, fileManageme
|
|
|
125
114
|
externalFile: element.externalFile,
|
|
126
115
|
title: element.title,
|
|
127
116
|
showAttachmentName: isSupplementOrOtherFilesTab,
|
|
128
|
-
showDesignationActions: isSupplementOrOtherFilesTab,
|
|
129
117
|
showReplaceAction: !isOtherFilesTab,
|
|
130
118
|
handleDownload,
|
|
131
119
|
handleReplace: handleReplaceFile,
|
|
132
|
-
handleChangeDesignation: handleChangeDesignationFile,
|
|
133
120
|
dispatch: dispatch,
|
|
134
121
|
};
|
|
135
122
|
if (enableDragAndDrop && isSupplementOrOtherFilesTab) {
|
|
@@ -55,7 +55,7 @@ const DragLayer = () => {
|
|
|
55
55
|
const renderItem = (0, react_1.useCallback)(() => {
|
|
56
56
|
switch (itemType) {
|
|
57
57
|
case 'FileSectionItem':
|
|
58
|
-
return (react_1.default.createElement(CustomFileSectionItem, { title: item.title, externalFile: item.externalFile, showAttachmentName: item.showAttachmentName, withDot: item.withDot, showSecondaryActions: false,
|
|
58
|
+
return (react_1.default.createElement(CustomFileSectionItem, { title: item.title, externalFile: item.externalFile, showAttachmentName: item.showAttachmentName, withDot: item.withDot, showSecondaryActions: false, style: { width: item.width } }));
|
|
59
59
|
default:
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
@@ -30,12 +30,10 @@ exports.FileDescription = exports.FileName = exports.FileNameContainer = exports
|
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
31
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
32
|
const FileManager_1 = require("../FileManager");
|
|
33
|
-
const
|
|
34
|
-
const FileInfo = ({ showAttachmentName, showDesignationActions, title, submissionAttachmentName, fileExtension, designation, attachmentId, handleChangeDesignation, dispatch, }) => {
|
|
33
|
+
const FileInfo = ({ showAttachmentName, title, submissionAttachmentName, fileExtension, attachmentId, dispatch, }) => {
|
|
35
34
|
const fileName = submissionAttachmentName.substring(0, submissionAttachmentName.lastIndexOf('.'));
|
|
36
35
|
const can = (0, react_1.useContext)(FileManager_1.PermissionsContext);
|
|
37
36
|
return (react_1.default.createElement(exports.FileInfoContainer, null,
|
|
38
|
-
showDesignationActions && designation !== undefined && (react_1.default.createElement(DesignationActions_1.DesignationActions, { designation: designation, attachmentId: attachmentId, fileExtension: fileExtension, handleChangeDesignation: handleChangeDesignation, fileName: submissionAttachmentName, dispatch: dispatch, can: can })),
|
|
39
37
|
react_1.default.createElement(exports.FileNameTitleContainer, null,
|
|
40
38
|
react_1.default.createElement(exports.FileTitle, null,
|
|
41
39
|
!showAttachmentName ? fileName : title,
|
|
@@ -10,15 +10,13 @@ const use_dropdown_1 = require("../../../hooks/use-dropdown");
|
|
|
10
10
|
const Dropdown_1 = require("../../Dropdown");
|
|
11
11
|
const icons_1 = require("../../icons/");
|
|
12
12
|
const dots_icon_1 = __importDefault(require("../../icons/dots-icon"));
|
|
13
|
-
const util_1 = require("../util");
|
|
14
13
|
const FileInfo_1 = require("./FileInfo");
|
|
15
14
|
const FileTypeIcon_1 = require("./FileTypeIcon");
|
|
16
15
|
const ItemActions_1 = require("./ItemActions");
|
|
17
|
-
const FileSectionItem = ({ externalFile, title, showAttachmentName = false,
|
|
16
|
+
const FileSectionItem = ({ externalFile, title, showAttachmentName = false, showReplaceAction = true, handleDownload, handleReplace, dispatch, dragRef, className, style, onClose, isEditor, }) => {
|
|
18
17
|
const { isOpen, toggleOpen, wrapperRef } = (0, use_dropdown_1.useDropdown)();
|
|
19
18
|
const fileExtension = externalFile.name.substring(externalFile.name.lastIndexOf('.') + 1);
|
|
20
|
-
const
|
|
21
|
-
const isMainManuscript = designation === util_1.Designation.MainManuscript;
|
|
19
|
+
const isMainManuscript = externalFile.type.label === 'main-manuscript';
|
|
22
20
|
const isSelected = externalFile.id == window.location.hash.substr(1);
|
|
23
21
|
return (react_1.default.createElement(exports.Item, { ref: dragRef, className: className, style: style },
|
|
24
22
|
react_1.default.createElement(exports.ItemContainer, { onClick: () => {
|
|
@@ -29,7 +27,7 @@ const FileSectionItem = ({ externalFile, title, showAttachmentName = false, show
|
|
|
29
27
|
}
|
|
30
28
|
} },
|
|
31
29
|
react_1.default.createElement(FileTypeIcon_1.FileTypeIcon, { withDot: isMainManuscript, fileExtension: fileExtension, alt: externalFile.name }),
|
|
32
|
-
react_1.default.createElement(FileInfo_1.FileInfo, { fileExtension: fileExtension, showAttachmentName: showAttachmentName,
|
|
30
|
+
react_1.default.createElement(FileInfo_1.FileInfo, { fileExtension: fileExtension, showAttachmentName: showAttachmentName, submissionAttachmentName: externalFile.name, title: title, attachmentId: externalFile.id, dispatch: dispatch })),
|
|
33
31
|
onClose && (react_1.default.createElement(IconCloseButton, { onClick: (e) => {
|
|
34
32
|
e.preventDefault();
|
|
35
33
|
onClose();
|
|
@@ -38,7 +36,7 @@ const FileSectionItem = ({ externalFile, title, showAttachmentName = false, show
|
|
|
38
36
|
handleDownload && handleReplace && (react_1.default.createElement(Dropdown_1.DropdownContainer, { ref: wrapperRef },
|
|
39
37
|
react_1.default.createElement(exports.ActionsIcon, { onClick: toggleOpen, type: "button", "aria-label": "Download or Replace", "aria-pressed": isOpen },
|
|
40
38
|
react_1.default.createElement(dots_icon_1.default, null)),
|
|
41
|
-
isOpen && (react_1.default.createElement(ItemActions_1.ItemActions, { replaceAttachmentHandler: handleReplace, showReplaceAction: showReplaceAction, downloadAttachmentHandler: handleDownload, attachmentId: externalFile.id, fileName: externalFile.name,
|
|
39
|
+
isOpen && (react_1.default.createElement(ItemActions_1.ItemActions, { replaceAttachmentHandler: handleReplace, showReplaceAction: showReplaceAction, downloadAttachmentHandler: handleDownload, attachmentId: externalFile.id, fileName: externalFile.name, publicUrl: externalFile.link, hideActionList: toggleOpen, dispatch: dispatch }))))));
|
|
42
40
|
};
|
|
43
41
|
exports.FileSectionItem = FileSectionItem;
|
|
44
42
|
const IconCloseButton = styled_components_1.default.button `
|
|
@@ -38,22 +38,9 @@ const Dropdown_1 = require("../../Dropdown");
|
|
|
38
38
|
const FileManager_1 = require("../FileManager");
|
|
39
39
|
const FileSectionState_1 = require("../FileSectionState");
|
|
40
40
|
const ItemsAction_1 = require("../ItemsAction");
|
|
41
|
-
const
|
|
42
|
-
const ItemActions = ({ downloadAttachmentHandler, replaceAttachmentHandler, detachAttachmnetHandler, handleUpdateInline, attachmentId, fileName, designation, publicUrl, hideActionList, dispatch, dropDownClassName, showReplaceAction, }) => {
|
|
43
|
-
const attachmentDesignation = designation == undefined ? 'undefined' : designation;
|
|
44
|
-
const attachmentDesignationName = attachmentDesignation !== 'undefined'
|
|
45
|
-
? util_1.namesWithDesignationMap.get(attachmentDesignation)
|
|
46
|
-
: undefined;
|
|
41
|
+
const ItemActions = ({ downloadAttachmentHandler, replaceAttachmentHandler, detachAttachmnetHandler, handleUpdateInline, attachmentId, fileName, publicUrl, hideActionList, dispatch, dropDownClassName, showReplaceAction, }) => {
|
|
47
42
|
const can = (0, react_1.useContext)(FileManager_1.PermissionsContext);
|
|
48
|
-
const canBeReplaced =
|
|
49
|
-
(attachmentDesignationName == undefined ||
|
|
50
|
-
![
|
|
51
|
-
util_1.Designation.MainManuscript,
|
|
52
|
-
util_1.Designation.SubmissionFile,
|
|
53
|
-
util_1.Designation.SubmissionPdf,
|
|
54
|
-
].includes(attachmentDesignationName))) ||
|
|
55
|
-
(attachmentDesignationName == util_1.Designation.MainManuscript &&
|
|
56
|
-
(can === null || can === void 0 ? void 0 : can.setMainManuscript));
|
|
43
|
+
const canBeReplaced = showReplaceAction == undefined || showReplaceAction;
|
|
57
44
|
const fileInputRef = (0, react_1.useRef)(null);
|
|
58
45
|
const [selectedFile, setSelectedFile] = (0, react_1.useState)();
|
|
59
46
|
const handleChange = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -62,9 +49,8 @@ const ItemActions = ({ downloadAttachmentHandler, replaceAttachmentHandler, deta
|
|
|
62
49
|
setSelectedFile(file);
|
|
63
50
|
if (dispatch) {
|
|
64
51
|
dispatch(FileSectionState_1.actions.HANDLE_UPLOAD_ACTION());
|
|
65
|
-
dispatch(FileSectionState_1.actions.SELECT_DESIGNATION(attachmentDesignationName || util_1.Designation.Document));
|
|
66
52
|
}
|
|
67
|
-
const result = yield replaceAttachmentHandler(attachmentId, fileName, file
|
|
53
|
+
const result = yield replaceAttachmentHandler(attachmentId, fileName, file);
|
|
68
54
|
if (typeof result === 'object' && handleUpdateInline) {
|
|
69
55
|
handleUpdateInline(result);
|
|
70
56
|
}
|
|
@@ -8,15 +8,12 @@ const getInitialState = () => ({
|
|
|
8
8
|
fileUploadedSuccessfullySection: undefined,
|
|
9
9
|
successMessage: '',
|
|
10
10
|
isShowSuccessMessage: false,
|
|
11
|
-
selectDesignation: undefined,
|
|
12
|
-
showDesignationPopup: undefined,
|
|
13
11
|
});
|
|
14
12
|
exports.getInitialState = getInitialState;
|
|
15
13
|
var ActionTypes;
|
|
16
14
|
(function (ActionTypes) {
|
|
17
15
|
ActionTypes["UPLOAD_FILE"] = "UploadFile";
|
|
18
16
|
ActionTypes["MOVE_FILE"] = "moveFile";
|
|
19
|
-
ActionTypes["SELECT_DESIGNATION"] = "selectDesignation";
|
|
20
17
|
ActionTypes["HANDLE_CANCEL_UPLOAD"] = "handleCancel";
|
|
21
18
|
ActionTypes["HANDLE_UPLOAD_ACTION"] = "handleUpload";
|
|
22
19
|
ActionTypes["HANDLE_FINISH_UPLOAD"] = "handleFinishUpload";
|
|
@@ -26,7 +23,7 @@ var ActionTypes;
|
|
|
26
23
|
const reducer = (state, action) => {
|
|
27
24
|
switch (action.type) {
|
|
28
25
|
case ActionTypes.UPLOAD_FILE: {
|
|
29
|
-
return Object.assign(Object.assign({}, state), {
|
|
26
|
+
return Object.assign(Object.assign({}, state), { uploadedFile: action.uploadFile });
|
|
30
27
|
}
|
|
31
28
|
case ActionTypes.MOVE_FILE: {
|
|
32
29
|
return Object.assign(Object.assign({}, state), { moveToOtherState: {
|
|
@@ -34,17 +31,14 @@ const reducer = (state, action) => {
|
|
|
34
31
|
name: action.name,
|
|
35
32
|
}, successMessage: action.successMoveMessage, isShowSuccessMessage: false });
|
|
36
33
|
}
|
|
37
|
-
case ActionTypes.SELECT_DESIGNATION: {
|
|
38
|
-
return Object.assign(Object.assign({}, state), { selectDesignation: action.designation });
|
|
39
|
-
}
|
|
40
34
|
case ActionTypes.HANDLE_UPLOAD_ACTION: {
|
|
41
|
-
return Object.assign(Object.assign({}, state), {
|
|
35
|
+
return Object.assign(Object.assign({}, state), { isUploadFile: true, isShowSuccessMessage: false, successMessage: '' });
|
|
42
36
|
}
|
|
43
37
|
case ActionTypes.HANDLE_CANCEL_UPLOAD: {
|
|
44
|
-
return Object.assign(
|
|
38
|
+
return Object.assign({}, state);
|
|
45
39
|
}
|
|
46
40
|
case ActionTypes.HANDLE_FINISH_UPLOAD: {
|
|
47
|
-
return Object.assign(Object.assign({}, state), { isUploadFile: false, uploadedFile: undefined
|
|
41
|
+
return Object.assign(Object.assign({}, state), { isUploadFile: false, uploadedFile: undefined });
|
|
48
42
|
}
|
|
49
43
|
case ActionTypes.HANDLE_SUCCESS_MESSAGE: {
|
|
50
44
|
return Object.assign(Object.assign({}, state), { isShowSuccessMessage: true, successMessage: action.successMessage, fileUploadedSuccessfullySection: action.sectionType });
|
|
@@ -68,10 +62,6 @@ exports.actions = {
|
|
|
68
62
|
HANDLE_CANCEL_UPLOAD: () => ({
|
|
69
63
|
type: ActionTypes.HANDLE_CANCEL_UPLOAD,
|
|
70
64
|
}),
|
|
71
|
-
SELECT_DESIGNATION: (designation) => ({
|
|
72
|
-
type: ActionTypes.SELECT_DESIGNATION,
|
|
73
|
-
designation,
|
|
74
|
-
}),
|
|
75
65
|
MOVE_FILE: (attachmentId, typeId, name, successMoveMessage) => ({
|
|
76
66
|
type: ActionTypes.MOVE_FILE,
|
|
77
67
|
typeId,
|
|
@@ -26,11 +26,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.FilesSection = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const AlertMessage_1 = require("../AlertMessage");
|
|
29
|
-
const DragItemArea_1 = require("./DragItemArea");
|
|
30
29
|
const FileManager_1 = require("./FileManager");
|
|
31
30
|
const FileSectionUploadItem_1 = require("./FileSectionItem/FileSectionUploadItem");
|
|
32
31
|
const FileSectionState_1 = require("./FileSectionState");
|
|
33
|
-
const SelectDialogDesignation_1 = require("./SelectDialogDesignation");
|
|
34
32
|
const UploadFileArea_1 = require("./UploadFileArea");
|
|
35
33
|
const util_1 = require("./util");
|
|
36
34
|
const FilesSection = ({ enableDragAndDrop, handleUpload, fileSection, filesItem, dispatch, state, }) => {
|
|
@@ -40,13 +38,11 @@ const FilesSection = ({ enableDragAndDrop, handleUpload, fileSection, filesItem,
|
|
|
40
38
|
}
|
|
41
39
|
const isSupplementFilesTab = fileSection === util_1.FileSectionType.Supplements;
|
|
42
40
|
const isOtherFileTab = fileSection === util_1.FileSectionType.OtherFile;
|
|
43
|
-
const handleUploadOtherFile = () => {
|
|
44
|
-
dispatch(FileSectionState_1.actions.HANDLE_UPLOAD_ACTION());
|
|
45
|
-
state.uploadedFile &&
|
|
46
|
-
state.selectDesignation !== undefined &&
|
|
47
|
-
handleUpload(state.uploadedFile, (0, util_1.getDesignationName)(state.selectDesignation));
|
|
48
|
-
};
|
|
49
41
|
const can = (0, react_1.useContext)(FileManager_1.PermissionsContext);
|
|
42
|
+
(0, react_1.useEffect)(() => {
|
|
43
|
+
dispatch(FileSectionState_1.actions.HANDLE_UPLOAD_ACTION());
|
|
44
|
+
state.uploadedFile && handleUpload(state.uploadedFile);
|
|
45
|
+
}, [state.uploadedFile, dispatch, handleUpload]);
|
|
50
46
|
const handleSuccessMessage = () => {
|
|
51
47
|
return (react_1.default.createElement(AlertMessage_1.AlertMessage, { type: AlertMessage_1.AlertMessageType.success, hideCloseButton: true, dismissButton: {
|
|
52
48
|
text: 'OK',
|
|
@@ -56,19 +52,9 @@ const FilesSection = ({ enableDragAndDrop, handleUpload, fileSection, filesItem,
|
|
|
56
52
|
return (react_1.default.createElement("div", null,
|
|
57
53
|
(can === null || can === void 0 ? void 0 : can.uploadFile) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
58
54
|
(isOtherFileTab || isSupplementFilesTab) && (react_1.default.createElement(UploadFileArea_1.UploadFileArea, { handleUploadFile: handleUpload, fileSection: fileSection, dispatch: dispatch })),
|
|
59
|
-
state.isUploadFile &&
|
|
60
|
-
state.uploadedFile &&
|
|
61
|
-
state.selectDesignation !== undefined && (react_1.default.createElement(FileSectionUploadItem_1.FileSectionUploadItem, { fileName: state.uploadedFile.name, isLoading: state.isUploadFile })))),
|
|
55
|
+
state.isUploadFile && state.uploadedFile && (react_1.default.createElement(FileSectionUploadItem_1.FileSectionUploadItem, { fileName: state.uploadedFile.name, isLoading: state.isUploadFile })))),
|
|
62
56
|
state.fileUploadedSuccessfullySection === fileSection &&
|
|
63
57
|
handleSuccessMessage(),
|
|
64
|
-
|
|
65
|
-
dispatch(FileSectionState_1.actions.HANDLE_CANCEL_UPLOAD());
|
|
66
|
-
}, uploadFileHandler: handleUploadOtherFile, dispatch: dispatch, fileSection: fileSection }),
|
|
67
|
-
filesItem,
|
|
68
|
-
(can === null || can === void 0 ? void 0 : can.changeDesignation) &&
|
|
69
|
-
enableDragAndDrop &&
|
|
70
|
-
(isSupplementFilesTab || isOtherFileTab) && (react_1.default.createElement(DragItemArea_1.DragItemArea, { text: isSupplementFilesTab
|
|
71
|
-
? 'Drag the items to place them in the text'
|
|
72
|
-
: 'Drag the items to place in the Supplements section or in the text' }))));
|
|
58
|
+
filesItem));
|
|
73
59
|
};
|
|
74
60
|
exports.FilesSection = FilesSection;
|
|
@@ -78,7 +78,7 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
78
78
|
(attachment === null || attachment === void 0 ? void 0 : attachment.modelId) &&
|
|
79
79
|
handleUpdateInline(attachment.modelId, uploadAttachment), detachAttachmnetHandler: () => handleDetachFile &&
|
|
80
80
|
attachment.modelId &&
|
|
81
|
-
handleDetachFile(attachment.id, attachment.modelId), downloadAttachmentHandler: handleDownload, attachmentId: attachment.id, fileName: attachment.name,
|
|
81
|
+
handleDetachFile(attachment.id, attachment.modelId), downloadAttachmentHandler: handleDownload, attachmentId: attachment.id, fileName: attachment.name, publicUrl: attachment.link, hideActionList: toggleOpen, dispatch: dispatch, dropDownClassName: 'ref_item_dropdown' }))))));
|
|
82
82
|
};
|
|
83
83
|
const ElementItem = (0, styled_components_1.default)(FileSectionItem_1.Item) `
|
|
84
84
|
display: flex;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.droppableSections = exports.
|
|
6
|
+
exports.droppableSections = exports.generateAttachmentsTitles = exports.fileTypesWithIconMap = exports.fileTypesWithTitlesMap = exports.extensionsWithFileTypesMap = exports.FileType = exports.FileSectionType = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const audio_icon_1 = __importDefault(require("../icons/audio-icon"));
|
|
9
9
|
const code_file_icon_1 = __importDefault(require("../icons/code-file-icon"));
|
|
@@ -38,245 +38,6 @@ var FileType;
|
|
|
38
38
|
FileType[FileType["Figure"] = 10] = "Figure";
|
|
39
39
|
FileType[FileType["GraphicalAbstract"] = 11] = "GraphicalAbstract";
|
|
40
40
|
})(FileType = exports.FileType || (exports.FileType = {}));
|
|
41
|
-
var Designation;
|
|
42
|
-
(function (Designation) {
|
|
43
|
-
Designation[Designation["Figure"] = 0] = "Figure";
|
|
44
|
-
Designation[Designation["Table"] = 1] = "Table";
|
|
45
|
-
Designation[Designation["Supplementary"] = 2] = "Supplementary";
|
|
46
|
-
Designation[Designation["ConflictOfInterest"] = 3] = "ConflictOfInterest";
|
|
47
|
-
Designation[Designation["Document"] = 4] = "Document";
|
|
48
|
-
Designation[Designation["GraphicalAbstract"] = 5] = "GraphicalAbstract";
|
|
49
|
-
Designation[Designation["GraphicalAbstractImage"] = 6] = "GraphicalAbstractImage";
|
|
50
|
-
Designation[Designation["GraphicalAbstractText"] = 7] = "GraphicalAbstractText";
|
|
51
|
-
Designation[Designation["Metadata"] = 8] = "Metadata";
|
|
52
|
-
Designation[Designation["SubmissionFile"] = 9] = "SubmissionFile";
|
|
53
|
-
Designation[Designation["SubmissionPdf"] = 10] = "SubmissionPdf";
|
|
54
|
-
Designation[Designation["TitlePage"] = 11] = "TitlePage";
|
|
55
|
-
Designation[Designation["Dataset"] = 12] = "Dataset";
|
|
56
|
-
Designation[Designation["MainManuscript"] = 13] = "MainManuscript";
|
|
57
|
-
})(Designation = exports.Designation || (exports.Designation = {}));
|
|
58
|
-
exports.designationWithFileSectionsMap = new Map([
|
|
59
|
-
[Designation.Figure, FileSectionType.OtherFile],
|
|
60
|
-
[Designation.Table, FileSectionType.OtherFile],
|
|
61
|
-
[Designation.Supplementary, FileSectionType.Supplements],
|
|
62
|
-
[Designation.ConflictOfInterest, FileSectionType.OtherFile],
|
|
63
|
-
[Designation.Document, FileSectionType.OtherFile],
|
|
64
|
-
[Designation.GraphicalAbstract, FileSectionType.OtherFile],
|
|
65
|
-
[Designation.GraphicalAbstractImage, FileSectionType.OtherFile],
|
|
66
|
-
[Designation.GraphicalAbstractText, FileSectionType.OtherFile],
|
|
67
|
-
[Designation.Metadata, FileSectionType.OtherFile],
|
|
68
|
-
[Designation.SubmissionFile, FileSectionType.OtherFile],
|
|
69
|
-
[Designation.SubmissionPdf, FileSectionType.OtherFile],
|
|
70
|
-
[Designation.TitlePage, FileSectionType.OtherFile],
|
|
71
|
-
[Designation.Dataset, FileSectionType.OtherFile],
|
|
72
|
-
[Designation.MainManuscript, FileSectionType.OtherFile],
|
|
73
|
-
]);
|
|
74
|
-
exports.namesWithDesignationMap = new Map([
|
|
75
|
-
['figure', Designation.Figure],
|
|
76
|
-
['table', Designation.Table],
|
|
77
|
-
['supplementary', Designation.Supplementary],
|
|
78
|
-
['conflict-of-interest', Designation.ConflictOfInterest],
|
|
79
|
-
['document', Designation.Document],
|
|
80
|
-
['graphical-abstract', Designation.GraphicalAbstract],
|
|
81
|
-
['graphical-abstract-image', Designation.GraphicalAbstractImage],
|
|
82
|
-
['graphical-abstract-text', Designation.GraphicalAbstractText],
|
|
83
|
-
['metadata', Designation.Metadata],
|
|
84
|
-
['submission-file', Designation.SubmissionFile],
|
|
85
|
-
['submission-pdf', Designation.SubmissionPdf],
|
|
86
|
-
['title-page', Designation.TitlePage],
|
|
87
|
-
['dataset', Designation.Dataset],
|
|
88
|
-
['main-manuscript', Designation.MainManuscript],
|
|
89
|
-
]);
|
|
90
|
-
exports.designationWithReadableNamesMap = new Map([
|
|
91
|
-
[Designation.Figure, 'Figure'],
|
|
92
|
-
[Designation.Table, 'Table'],
|
|
93
|
-
[Designation.Supplementary, 'Supplementary'],
|
|
94
|
-
[Designation.ConflictOfInterest, 'Conflict Of Interest'],
|
|
95
|
-
[Designation.Document, 'Document'],
|
|
96
|
-
[Designation.GraphicalAbstract, 'Graphical Abstract'],
|
|
97
|
-
[Designation.GraphicalAbstractImage, 'Graphical Abstract Image'],
|
|
98
|
-
[Designation.GraphicalAbstractText, 'Graphical Abstract Text'],
|
|
99
|
-
[Designation.Metadata, 'Metadata'],
|
|
100
|
-
[Designation.SubmissionFile, 'Submission File'],
|
|
101
|
-
[Designation.SubmissionPdf, 'Submission PDF'],
|
|
102
|
-
[Designation.TitlePage, 'Title Page'],
|
|
103
|
-
[Designation.Dataset, 'Dataset'],
|
|
104
|
-
[Designation.MainManuscript, 'Main Manuscript'],
|
|
105
|
-
]);
|
|
106
|
-
exports.designationWithAllowedMediaTypesMap = new Map([
|
|
107
|
-
[Designation.Figure, ['jpeg', 'png', 'tiff', 'pdf', 'svg', 'ai']],
|
|
108
|
-
[
|
|
109
|
-
Designation.Table,
|
|
110
|
-
['xls', 'csv', 'tsv', 'tex', 'html', 'jpeg', 'jpg', 'png', 'gif', 'tiff'],
|
|
111
|
-
],
|
|
112
|
-
[Designation.Supplementary, []],
|
|
113
|
-
[Designation.ConflictOfInterest, ['doc', 'docx', 'pdf', 'tex', 'txt']],
|
|
114
|
-
[Designation.Document, ['doc', 'docx', 'pdf', 'tex']],
|
|
115
|
-
[Designation.GraphicalAbstract, ['doc', 'docx', 'pdf', 'tex', 'txt']],
|
|
116
|
-
[
|
|
117
|
-
Designation.GraphicalAbstractImage,
|
|
118
|
-
['jpeg', 'png', 'tiff', 'gif', 'pdf', 'eps'],
|
|
119
|
-
],
|
|
120
|
-
[Designation.GraphicalAbstractText, ['doc', 'docx', 'pdf', 'tex', 'txt']],
|
|
121
|
-
[Designation.Metadata, ['xml']],
|
|
122
|
-
[Designation.SubmissionFile, []],
|
|
123
|
-
[Designation.SubmissionPdf, ['pdf']],
|
|
124
|
-
[Designation.TitlePage, ['doc', 'docx', 'pdf', 'tex', 'txt']],
|
|
125
|
-
[Designation.Dataset, []],
|
|
126
|
-
[Designation.MainManuscript, ['manuproj', 'docx']],
|
|
127
|
-
]);
|
|
128
|
-
exports.designationWithAllowedDesignationsToTransitionMap = new Map([
|
|
129
|
-
[
|
|
130
|
-
Designation.Figure,
|
|
131
|
-
[
|
|
132
|
-
Designation.SubmissionFile,
|
|
133
|
-
Designation.Supplementary,
|
|
134
|
-
Designation.GraphicalAbstractImage,
|
|
135
|
-
Designation.Dataset,
|
|
136
|
-
],
|
|
137
|
-
],
|
|
138
|
-
[
|
|
139
|
-
Designation.Table,
|
|
140
|
-
[
|
|
141
|
-
Designation.Supplementary,
|
|
142
|
-
Designation.SubmissionFile,
|
|
143
|
-
Designation.Dataset,
|
|
144
|
-
],
|
|
145
|
-
],
|
|
146
|
-
[
|
|
147
|
-
Designation.Supplementary,
|
|
148
|
-
[
|
|
149
|
-
Designation.Supplementary,
|
|
150
|
-
Designation.SubmissionFile,
|
|
151
|
-
Designation.Document,
|
|
152
|
-
Designation.Figure,
|
|
153
|
-
Designation.GraphicalAbstractImage,
|
|
154
|
-
Designation.ConflictOfInterest,
|
|
155
|
-
Designation.SubmissionPdf,
|
|
156
|
-
Designation.Metadata,
|
|
157
|
-
Designation.GraphicalAbstractText,
|
|
158
|
-
Designation.GraphicalAbstract,
|
|
159
|
-
Designation.TitlePage,
|
|
160
|
-
Designation.Table,
|
|
161
|
-
Designation.Dataset,
|
|
162
|
-
],
|
|
163
|
-
],
|
|
164
|
-
[
|
|
165
|
-
Designation.ConflictOfInterest,
|
|
166
|
-
[
|
|
167
|
-
Designation.ConflictOfInterest,
|
|
168
|
-
Designation.Document,
|
|
169
|
-
Designation.GraphicalAbstract,
|
|
170
|
-
Designation.GraphicalAbstractImage,
|
|
171
|
-
Designation.GraphicalAbstractText,
|
|
172
|
-
Designation.Metadata,
|
|
173
|
-
Designation.SubmissionFile,
|
|
174
|
-
Designation.SubmissionPdf,
|
|
175
|
-
Designation.Dataset,
|
|
176
|
-
],
|
|
177
|
-
],
|
|
178
|
-
[
|
|
179
|
-
Designation.Document,
|
|
180
|
-
[
|
|
181
|
-
Designation.ConflictOfInterest,
|
|
182
|
-
Designation.Document,
|
|
183
|
-
Designation.GraphicalAbstract,
|
|
184
|
-
Designation.GraphicalAbstractImage,
|
|
185
|
-
Designation.GraphicalAbstractText,
|
|
186
|
-
Designation.Metadata,
|
|
187
|
-
Designation.SubmissionFile,
|
|
188
|
-
Designation.SubmissionPdf,
|
|
189
|
-
Designation.MainManuscript,
|
|
190
|
-
Designation.Dataset,
|
|
191
|
-
],
|
|
192
|
-
],
|
|
193
|
-
[
|
|
194
|
-
Designation.GraphicalAbstract,
|
|
195
|
-
[
|
|
196
|
-
Designation.Document,
|
|
197
|
-
Designation.SubmissionFile,
|
|
198
|
-
Designation.Supplementary,
|
|
199
|
-
Designation.Dataset,
|
|
200
|
-
],
|
|
201
|
-
],
|
|
202
|
-
[
|
|
203
|
-
Designation.GraphicalAbstractImage,
|
|
204
|
-
[
|
|
205
|
-
Designation.Figure,
|
|
206
|
-
Designation.SubmissionFile,
|
|
207
|
-
Designation.Supplementary,
|
|
208
|
-
Designation.Dataset,
|
|
209
|
-
],
|
|
210
|
-
],
|
|
211
|
-
[
|
|
212
|
-
Designation.GraphicalAbstractText,
|
|
213
|
-
[
|
|
214
|
-
Designation.Document,
|
|
215
|
-
Designation.SubmissionFile,
|
|
216
|
-
Designation.Supplementary,
|
|
217
|
-
Designation.Dataset,
|
|
218
|
-
],
|
|
219
|
-
],
|
|
220
|
-
[Designation.Metadata, [Designation.SubmissionFile, Designation.Dataset]],
|
|
221
|
-
[
|
|
222
|
-
Designation.SubmissionFile,
|
|
223
|
-
[
|
|
224
|
-
Designation.Supplementary,
|
|
225
|
-
Designation.SubmissionFile,
|
|
226
|
-
Designation.Document,
|
|
227
|
-
Designation.Figure,
|
|
228
|
-
Designation.GraphicalAbstractImage,
|
|
229
|
-
Designation.ConflictOfInterest,
|
|
230
|
-
Designation.SubmissionPdf,
|
|
231
|
-
Designation.Metadata,
|
|
232
|
-
Designation.GraphicalAbstractText,
|
|
233
|
-
Designation.GraphicalAbstract,
|
|
234
|
-
Designation.TitlePage,
|
|
235
|
-
Designation.Table,
|
|
236
|
-
Designation.Dataset,
|
|
237
|
-
],
|
|
238
|
-
],
|
|
239
|
-
[
|
|
240
|
-
Designation.SubmissionPdf,
|
|
241
|
-
[
|
|
242
|
-
Designation.ConflictOfInterest,
|
|
243
|
-
Designation.Document,
|
|
244
|
-
Designation.GraphicalAbstract,
|
|
245
|
-
Designation.GraphicalAbstractImage,
|
|
246
|
-
Designation.GraphicalAbstractText,
|
|
247
|
-
Designation.Metadata,
|
|
248
|
-
Designation.SubmissionFile,
|
|
249
|
-
Designation.SubmissionPdf,
|
|
250
|
-
Designation.Dataset,
|
|
251
|
-
],
|
|
252
|
-
],
|
|
253
|
-
[
|
|
254
|
-
Designation.TitlePage,
|
|
255
|
-
[
|
|
256
|
-
Designation.Document,
|
|
257
|
-
Designation.SubmissionFile,
|
|
258
|
-
Designation.Supplementary,
|
|
259
|
-
Designation.Dataset,
|
|
260
|
-
],
|
|
261
|
-
],
|
|
262
|
-
[
|
|
263
|
-
Designation.Dataset,
|
|
264
|
-
[
|
|
265
|
-
Designation.Supplementary,
|
|
266
|
-
Designation.SubmissionFile,
|
|
267
|
-
Designation.Document,
|
|
268
|
-
Designation.Figure,
|
|
269
|
-
Designation.GraphicalAbstractImage,
|
|
270
|
-
Designation.ConflictOfInterest,
|
|
271
|
-
Designation.SubmissionPdf,
|
|
272
|
-
Designation.Metadata,
|
|
273
|
-
Designation.GraphicalAbstractText,
|
|
274
|
-
Designation.GraphicalAbstract,
|
|
275
|
-
Designation.TitlePage,
|
|
276
|
-
Designation.Table,
|
|
277
|
-
],
|
|
278
|
-
],
|
|
279
|
-
]);
|
|
280
41
|
exports.extensionsWithFileTypesMap = new Map([
|
|
281
42
|
['png', FileType.Image],
|
|
282
43
|
['jpg', FileType.Image],
|
|
@@ -385,89 +146,6 @@ const generateAttachmentsTitles = (externalFiles, fileSectionType) => {
|
|
|
385
146
|
return result;
|
|
386
147
|
};
|
|
387
148
|
exports.generateAttachmentsTitles = generateAttachmentsTitles;
|
|
388
|
-
const getDesignationActionsList = (designation, fileExtension) => {
|
|
389
|
-
const allowedDesignationsToTransition = exports.designationWithAllowedDesignationsToTransitionMap.get(designation);
|
|
390
|
-
if (allowedDesignationsToTransition) {
|
|
391
|
-
if (designation === Designation.Supplementary ||
|
|
392
|
-
designation === Designation.SubmissionFile) {
|
|
393
|
-
return allowedDesignationsToTransition;
|
|
394
|
-
}
|
|
395
|
-
else {
|
|
396
|
-
allowedDesignationsToTransition.filter((value) => {
|
|
397
|
-
const allowedMediaTypes = exports.designationWithAllowedMediaTypesMap.get(value);
|
|
398
|
-
if (allowedMediaTypes) {
|
|
399
|
-
return allowedMediaTypes.indexOf(fileExtension) !== -1;
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
402
|
-
return false;
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
return allowedDesignationsToTransition;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
else {
|
|
409
|
-
return [];
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
exports.getDesignationActionsList = getDesignationActionsList;
|
|
413
|
-
const getDesignationName = (designation) => {
|
|
414
|
-
let result = undefined;
|
|
415
|
-
exports.namesWithDesignationMap.forEach((value, key, map) => {
|
|
416
|
-
if (value === designation) {
|
|
417
|
-
result = key;
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
if (result == undefined) {
|
|
421
|
-
result = '';
|
|
422
|
-
}
|
|
423
|
-
return result;
|
|
424
|
-
};
|
|
425
|
-
exports.getDesignationName = getDesignationName;
|
|
426
|
-
const getDesignationByFileSection = (fileSectionType) => {
|
|
427
|
-
const result = new Array();
|
|
428
|
-
exports.designationWithFileSectionsMap.forEach((value, key, map) => {
|
|
429
|
-
if (value === fileSectionType) {
|
|
430
|
-
result.push(key);
|
|
431
|
-
}
|
|
432
|
-
});
|
|
433
|
-
return result;
|
|
434
|
-
};
|
|
435
|
-
exports.getDesignationByFileSection = getDesignationByFileSection;
|
|
436
|
-
const getUploadFileDesignationList = (fileExtension, fileSectionType, can) => {
|
|
437
|
-
const result = new Array();
|
|
438
|
-
const checkDesignation = (value) => {
|
|
439
|
-
if (value === Designation.MainManuscript && !(can === null || can === void 0 ? void 0 : can.setMainManuscript)) {
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
const allowedExtension = exports.designationWithAllowedMediaTypesMap.get(value);
|
|
443
|
-
const isAllowed = allowedExtension === null || allowedExtension === void 0 ? void 0 : allowedExtension.includes(fileExtension);
|
|
444
|
-
if (isAllowed ||
|
|
445
|
-
value === Designation.Supplementary ||
|
|
446
|
-
value === Designation.SubmissionFile ||
|
|
447
|
-
value === Designation.Dataset) {
|
|
448
|
-
const label = exports.designationWithReadableNamesMap.get(value);
|
|
449
|
-
if (label) {
|
|
450
|
-
result.push({
|
|
451
|
-
value: value,
|
|
452
|
-
label: label,
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
};
|
|
457
|
-
if (typeof fileSectionType === 'number') {
|
|
458
|
-
const allowedDesignationByFileSection = (0, exports.getDesignationByFileSection)(fileSectionType);
|
|
459
|
-
allowedDesignationByFileSection.forEach(checkDesignation);
|
|
460
|
-
}
|
|
461
|
-
else if (Array.isArray(fileSectionType)) {
|
|
462
|
-
exports.designationWithFileSectionsMap.forEach((value, key) => {
|
|
463
|
-
if (fileSectionType.includes(key)) {
|
|
464
|
-
checkDesignation(key);
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
return result;
|
|
469
|
-
};
|
|
470
|
-
exports.getUploadFileDesignationList = getUploadFileDesignationList;
|
|
471
149
|
exports.droppableSections = [
|
|
472
150
|
FileSectionType.Supplements,
|
|
473
151
|
FileSectionType.OtherFile,
|
package/dist/cjs/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
32
32
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.
|
|
35
|
+
exports.errorsDecoder = exports.useDeepCompareCallback = exports.useDeepCompareMemo = exports.useFiles = void 0;
|
|
36
36
|
__exportStar(require("./components/AffiliationsEditor"), exports);
|
|
37
37
|
__exportStar(require("./components/AffiliationsList"), exports);
|
|
38
38
|
__exportStar(require("./components/AuthorForm"), exports);
|
|
@@ -66,8 +66,6 @@ __exportStar(require("./components/Inspector"), exports);
|
|
|
66
66
|
__exportStar(require("./components/InspectorSection"), exports);
|
|
67
67
|
__exportStar(require("./components/Badge"), exports);
|
|
68
68
|
__exportStar(require("./components/NavDropdown"), exports);
|
|
69
|
-
var PdfPreview_1 = require("./components/PdfPreview");
|
|
70
|
-
Object.defineProperty(exports, "PdfPreview", { enumerable: true, get: function () { return __importDefault(PdfPreview_1).default; } });
|
|
71
69
|
__exportStar(require("./components/SubmissionInspector"), exports);
|
|
72
70
|
__exportStar(require("./components/Dropdown"), exports);
|
|
73
71
|
__exportStar(require("./hooks/use-dropdown"), exports);
|
|
@@ -81,7 +79,5 @@ __exportStar(require("./lib/capabilities"), exports);
|
|
|
81
79
|
var lw_errors_decoder_1 = require("./lib/lw-errors-decoder");
|
|
82
80
|
Object.defineProperty(exports, "errorsDecoder", { enumerable: true, get: function () { return __importDefault(lw_errors_decoder_1).default; } });
|
|
83
81
|
__exportStar(require("./types"), exports);
|
|
84
|
-
var SelectDialogDesignation_1 = require("./components/FileManager/SelectDialogDesignation");
|
|
85
|
-
Object.defineProperty(exports, "SelectDialogDesignation", { enumerable: true, get: function () { return SelectDialogDesignation_1.SelectDialogDesignation; } });
|
|
86
82
|
__exportStar(require("./components/LoadingOverlay"), exports);
|
|
87
83
|
__exportStar(require("./components/EditorHeader/EditorHeader"), exports);
|