@manuscripts/style-guide 0.31.9 → 0.31.10
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.
|
@@ -51,8 +51,7 @@ const InlineFilesSection = ({ submissionId, handleReplace, handleDownload, inlin
|
|
|
51
51
|
util_1.fileTypesWithIconMap.get(file.type),
|
|
52
52
|
react_1.default.createElement(FileInfo_1.FileInfoContainer, null,
|
|
53
53
|
react_1.default.createElement(FileInfo_1.FileNameTitleContainer, null,
|
|
54
|
-
react_1.default.createElement(FileInfo_1.FileTitle, null, file.label))
|
|
55
|
-
file.caption && (react_1.default.createElement(FileInfo_1.FileDescription, null, file.caption))))));
|
|
54
|
+
react_1.default.createElement(FileInfo_1.FileTitle, null, file.label))))));
|
|
56
55
|
})));
|
|
57
56
|
};
|
|
58
57
|
exports.InlineFilesSection = InlineFilesSection;
|
|
@@ -66,8 +66,8 @@ exports.default = (modelMap, attachments) => {
|
|
|
66
66
|
};
|
|
67
67
|
const getAuxiliaryObjects = (modelMap) => {
|
|
68
68
|
var _a, _b;
|
|
69
|
-
let graphicalAbstractFigureId;
|
|
70
|
-
const
|
|
69
|
+
let graphicalAbstractFigureId, figureElementIds = [];
|
|
70
|
+
const tableElementIds = [], orderObjects = {};
|
|
71
71
|
for (const model of modelMap.values()) {
|
|
72
72
|
switch (model.objectType) {
|
|
73
73
|
case manuscripts_json_schema_1.ObjectTypes.Section: {
|
|
@@ -103,6 +103,9 @@ const getAuxiliaryObjects = (modelMap) => {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
+
if (graphicalAbstractFigureId) {
|
|
107
|
+
figureElementIds = figureElementIds.filter((id) => id != graphicalAbstractFigureId);
|
|
108
|
+
}
|
|
106
109
|
return {
|
|
107
110
|
graphicalAbstractFigureId,
|
|
108
111
|
figureElement: orderObjects[manuscripts_json_schema_1.ObjectTypes.FigureElement]
|
|
@@ -2,7 +2,7 @@ import React, { useCallback } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { useDropdown } from '../../hooks/use-dropdown';
|
|
4
4
|
import DotsIcon from '../icons/dots-icon';
|
|
5
|
-
import {
|
|
5
|
+
import { FileInfoContainer, FileNameTitleContainer, FileTitle, } from './FileSectionItem/FileInfo';
|
|
6
6
|
import { ActionsIcon, Item, } from './FileSectionItem/FileSectionItem';
|
|
7
7
|
import { ItemActions } from './FileSectionItem/ItemActions';
|
|
8
8
|
import { extensionsWithFileTypesMap, fileTypesWithIconMap, } from './util';
|
|
@@ -26,8 +26,7 @@ export const InlineFilesSection = ({ submissionId, handleReplace, handleDownload
|
|
|
26
26
|
fileTypesWithIconMap.get(file.type),
|
|
27
27
|
React.createElement(FileInfoContainer, null,
|
|
28
28
|
React.createElement(FileNameTitleContainer, null,
|
|
29
|
-
React.createElement(FileTitle, null, file.label))
|
|
30
|
-
file.caption && (React.createElement(FileDescription, null, file.caption))))));
|
|
29
|
+
React.createElement(FileTitle, null, file.label))))));
|
|
31
30
|
})));
|
|
32
31
|
};
|
|
33
32
|
const FileReference = ({ attachment, submissionId, handleReplace, handleDownload, dispatch, }) => {
|
|
@@ -64,8 +64,8 @@ export default (modelMap, attachments) => {
|
|
|
64
64
|
};
|
|
65
65
|
const getAuxiliaryObjects = (modelMap) => {
|
|
66
66
|
var _a, _b;
|
|
67
|
-
let graphicalAbstractFigureId;
|
|
68
|
-
const
|
|
67
|
+
let graphicalAbstractFigureId, figureElementIds = [];
|
|
68
|
+
const tableElementIds = [], orderObjects = {};
|
|
69
69
|
for (const model of modelMap.values()) {
|
|
70
70
|
switch (model.objectType) {
|
|
71
71
|
case ObjectTypes.Section: {
|
|
@@ -101,6 +101,9 @@ const getAuxiliaryObjects = (modelMap) => {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
if (graphicalAbstractFigureId) {
|
|
105
|
+
figureElementIds = figureElementIds.filter((id) => id != graphicalAbstractFigureId);
|
|
106
|
+
}
|
|
104
107
|
return {
|
|
105
108
|
graphicalAbstractFigureId,
|
|
106
109
|
figureElement: orderObjects[ObjectTypes.FigureElement]
|
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.10",
|
|
5
5
|
"repository": "gitlab:atypon-opensource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|