@manuscripts/style-guide 0.30.17 → 0.30.18
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.
|
@@ -53,11 +53,8 @@ exports.FileManager = ({ submissionId, externalFiles, enableDragAndDrop, can, ha
|
|
|
53
53
|
const res = yield handleReplace(submissionId, name, file, typeId);
|
|
54
54
|
if (res) {
|
|
55
55
|
dispatch(FileSectionState_1.actions.SHOW_FILE_UPLOADED_ALERT());
|
|
56
|
-
dispatch(FileSectionState_1.actions.HANDLE_FINISH_UPLOAD());
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
dispatch(FileSectionState_1.actions.HANDLE_FINISH_UPLOAD());
|
|
60
56
|
}
|
|
57
|
+
dispatch(FileSectionState_1.actions.HANDLE_FINISH_UPLOAD());
|
|
61
58
|
return res;
|
|
62
59
|
}), [handleReplace]);
|
|
63
60
|
const handleUploadFile = react_1.useCallback((submissionId, file, designation) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -69,11 +66,8 @@ exports.FileManager = ({ submissionId, externalFiles, enableDragAndDrop, can, ha
|
|
|
69
66
|
const res = yield handleUpload(submissionId, file, designation);
|
|
70
67
|
if (res) {
|
|
71
68
|
dispatch(FileSectionState_1.actions.SHOW_FILE_UPLOADED_ALERT());
|
|
72
|
-
dispatch(FileSectionState_1.actions.HANDLE_FINISH_UPLOAD());
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
dispatch(FileSectionState_1.actions.HANDLE_FINISH_UPLOAD());
|
|
76
69
|
}
|
|
70
|
+
dispatch(FileSectionState_1.actions.HANDLE_FINISH_UPLOAD());
|
|
77
71
|
return res;
|
|
78
72
|
}
|
|
79
73
|
catch (e) {
|
|
@@ -85,7 +85,7 @@ exports.actions = {
|
|
|
85
85
|
type: ActionTypes.HANDLE_FINISH_UPLOAD,
|
|
86
86
|
}),
|
|
87
87
|
SHOW_FILE_UPLOADED_ALERT: () => ({
|
|
88
|
-
type: ActionTypes.
|
|
88
|
+
type: ActionTypes.SHOW_FILE_UPLOADED_ALERT,
|
|
89
89
|
}),
|
|
90
90
|
CLOSE_FILE_UPLOADED_ALERT: () => ({
|
|
91
91
|
type: ActionTypes.CLOSE_FILE_UPLOADED_ALERT,
|
|
@@ -28,11 +28,8 @@ export const FileManager = ({ submissionId, externalFiles, enableDragAndDrop, ca
|
|
|
28
28
|
const res = yield handleReplace(submissionId, name, file, typeId);
|
|
29
29
|
if (res) {
|
|
30
30
|
dispatch(actions.SHOW_FILE_UPLOADED_ALERT());
|
|
31
|
-
dispatch(actions.HANDLE_FINISH_UPLOAD());
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
dispatch(actions.HANDLE_FINISH_UPLOAD());
|
|
35
31
|
}
|
|
32
|
+
dispatch(actions.HANDLE_FINISH_UPLOAD());
|
|
36
33
|
return res;
|
|
37
34
|
}), [handleReplace]);
|
|
38
35
|
const handleUploadFile = useCallback((submissionId, file, designation) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -44,11 +41,8 @@ export const FileManager = ({ submissionId, externalFiles, enableDragAndDrop, ca
|
|
|
44
41
|
const res = yield handleUpload(submissionId, file, designation);
|
|
45
42
|
if (res) {
|
|
46
43
|
dispatch(actions.SHOW_FILE_UPLOADED_ALERT());
|
|
47
|
-
dispatch(actions.HANDLE_FINISH_UPLOAD());
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
dispatch(actions.HANDLE_FINISH_UPLOAD());
|
|
51
44
|
}
|
|
45
|
+
dispatch(actions.HANDLE_FINISH_UPLOAD());
|
|
52
46
|
return res;
|
|
53
47
|
}
|
|
54
48
|
catch (e) {
|
|
@@ -82,7 +82,7 @@ export const actions = {
|
|
|
82
82
|
type: ActionTypes.HANDLE_FINISH_UPLOAD,
|
|
83
83
|
}),
|
|
84
84
|
SHOW_FILE_UPLOADED_ALERT: () => ({
|
|
85
|
-
type: ActionTypes.
|
|
85
|
+
type: ActionTypes.SHOW_FILE_UPLOADED_ALERT,
|
|
86
86
|
}),
|
|
87
87
|
CLOSE_FILE_UPLOADED_ALERT: () => ({
|
|
88
88
|
type: ActionTypes.CLOSE_FILE_UPLOADED_ALERT,
|
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": "0.30.
|
|
4
|
+
"version": "0.30.18",
|
|
5
5
|
"repository": "gitlab:mpapp-public/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|