@manuscripts/style-guide 0.31.12 → 0.31.13
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.
|
@@ -102,9 +102,7 @@ const FileManager = ({ submissionId, attachments, modelMap, saveModel, enableDra
|
|
|
102
102
|
const itemsData = (fileSection === util_1.FileSectionType.Supplements && supplementFiles) ||
|
|
103
103
|
attachments.filter((element) => {
|
|
104
104
|
const designation = util_1.namesWithDesignationMap.get(element.type.label);
|
|
105
|
-
return (designation !== undefined &&
|
|
106
|
-
util_1.designationWithFileSectionsMap.get(designation) === fileSection &&
|
|
107
|
-
!excludedAttachmentsIds.has(element.id));
|
|
105
|
+
return (designation !== undefined && !excludedAttachmentsIds.has(element.id));
|
|
108
106
|
});
|
|
109
107
|
const itemsDataWithTitle = (0, util_1.generateAttachmentsTitles)(itemsData, fileSection);
|
|
110
108
|
const filesItems = itemsDataWithTitle.map((element) => {
|
|
@@ -21,7 +21,7 @@ import { actions, getInitialState, reducer } from './FileSectionState';
|
|
|
21
21
|
import { FilesSection } from './FilesSection';
|
|
22
22
|
import { InlineFilesSection } from './InlineFilesSection';
|
|
23
23
|
import { TooltipDiv } from './TooltipDiv';
|
|
24
|
-
import { Designation,
|
|
24
|
+
import { Designation, FileSectionType, generateAttachmentsTitles, namesWithDesignationMap, } from './util';
|
|
25
25
|
export const PermissionsContext = createContext(null);
|
|
26
26
|
export const FileManager = ({ submissionId, attachments, modelMap, saveModel, enableDragAndDrop, can, handleUpload, handleDownload, handleReplace, handleChangeDesignation, handleUpdateInline, }) => {
|
|
27
27
|
const [state, dispatch] = useReducer(reducer, getInitialState());
|
|
@@ -77,9 +77,7 @@ export const FileManager = ({ submissionId, attachments, modelMap, saveModel, en
|
|
|
77
77
|
const itemsData = (fileSection === FileSectionType.Supplements && supplementFiles) ||
|
|
78
78
|
attachments.filter((element) => {
|
|
79
79
|
const designation = namesWithDesignationMap.get(element.type.label);
|
|
80
|
-
return (designation !== undefined &&
|
|
81
|
-
designationWithFileSectionsMap.get(designation) === fileSection &&
|
|
82
|
-
!excludedAttachmentsIds.has(element.id));
|
|
80
|
+
return (designation !== undefined && !excludedAttachmentsIds.has(element.id));
|
|
83
81
|
});
|
|
84
82
|
const itemsDataWithTitle = generateAttachmentsTitles(itemsData, fileSection);
|
|
85
83
|
const filesItems = itemsDataWithTitle.map((element) => {
|
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.31.
|
|
4
|
+
"version": "0.31.13",
|
|
5
5
|
"repository": "gitlab:atypon-opensource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|