@manuscripts/style-guide 0.33.0 → 1.0.0-LEAN-2108
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/AffiliationsEditor/AffiliationsEditor.js +5 -1
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorItem.js +5 -1
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorProfile.js +7 -3
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorView.js +5 -1
- package/dist/cjs/components/AlertMessage.js +5 -1
- package/dist/cjs/components/AuthorForm/ContributorRolesSelect.js +5 -1
- package/dist/cjs/components/AuthorForm/index.js +5 -1
- package/dist/cjs/components/AuthorName.js +5 -1
- package/dist/cjs/components/AuthorsContainer.js +5 -1
- package/dist/cjs/components/AuthorsDND/AuthorsDND.js +5 -1
- package/dist/cjs/components/AuthorsList/Author.js +5 -1
- package/dist/cjs/components/AuthorsList/index.js +5 -1
- package/dist/cjs/components/Avatar.js +5 -1
- package/dist/cjs/components/Button.js +5 -1
- package/dist/cjs/components/ColorField/ColorSelector.js +5 -1
- package/dist/cjs/components/ColorField/index.js +5 -1
- package/dist/cjs/components/Comments/CommentActions.js +5 -1
- package/dist/cjs/components/Comments/CommentBody.js +5 -1
- package/dist/cjs/components/Comments/CommentTarget.js +5 -1
- package/dist/cjs/components/Comments/CommentWrapper.js +5 -1
- package/dist/cjs/components/EditorHeader/EditorHeader.js +5 -1
- package/dist/cjs/components/EditorHeader/ProceedView.js +5 -1
- package/dist/cjs/components/FileManager/FileManager.js +8 -6
- package/dist/cjs/components/FileManager/FileSectionItem/DesignationActions.js +5 -1
- package/dist/cjs/components/FileManager/FileSectionItem/DragLayer.js +5 -1
- package/dist/cjs/components/FileManager/FileSectionItem/DraggableFileSectionItem.js +5 -1
- package/dist/cjs/components/FileManager/FileSectionItem/FileInfo.js +5 -1
- package/dist/cjs/components/FileManager/FileSectionItem/ItemActions.js +5 -1
- package/dist/cjs/components/FileManager/FilesSection.js +5 -1
- package/dist/cjs/components/FileManager/InlineFilesSection.js +10 -4
- package/dist/cjs/components/FileManager/SelectDesignationActions.js +5 -1
- package/dist/cjs/components/FileManager/UploadFileArea.js +5 -1
- package/dist/cjs/components/FileManager/index.js +5 -1
- package/dist/cjs/components/InspectorSection.js +5 -1
- package/dist/cjs/components/ManuscriptNoteList.js +10 -6
- package/dist/cjs/components/NavDropdown.js +5 -1
- package/dist/cjs/components/PdfPreview.js +5 -1
- package/dist/cjs/components/Resizer/index.js +5 -1
- package/dist/cjs/components/SubmissionInspector/BaseInformation.js +5 -1
- package/dist/cjs/components/SubmissionInspector/index.js +5 -1
- package/dist/cjs/components/TextField.js +5 -1
- package/dist/cjs/components/Tip.js +5 -1
- package/dist/cjs/hooks/use-files.js +3 -3
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/lib/authors.js +2 -2
- package/dist/cjs/lib/inlineFiles.js +10 -11
- package/dist/es/components/AffiliationsEditor/AffiliationsEditorProfile.js +1 -1
- package/dist/es/components/FileManager/FileManager.js +2 -4
- package/dist/es/components/FileManager/InlineFilesSection.js +5 -3
- package/dist/es/components/ManuscriptNoteList.js +2 -2
- package/dist/es/hooks/use-files.js +2 -2
- package/dist/es/lib/authors.js +1 -1
- package/dist/es/lib/inlineFiles.js +2 -3
- package/dist/types/components/AffiliationsEditor/AffiliationsEditorProfile.d.ts +1 -1
- package/dist/types/components/AuthorForm/AuthorForm.d.ts +1 -1
- package/dist/types/components/AuthorForm/AuthorFormComponents.d.ts +1 -1
- package/dist/types/components/AuthorForm/ContributorRolesSelect.d.ts +1 -1
- package/dist/types/components/AuthorForm/RemoveAuthorButton.d.ts +1 -1
- package/dist/types/components/AuthorName.d.ts +1 -1
- package/dist/types/components/AuthorsContainer.d.ts +1 -1
- package/dist/types/components/AuthorsDND/AuthorItemComponents.d.ts +1 -1
- package/dist/types/components/AuthorsDND/AuthorsDND.d.ts +1 -1
- package/dist/types/components/AuthorsDND/DraggableAuthorItem.d.ts +2 -2
- package/dist/types/components/AuthorsList/Author.d.ts +1 -1
- package/dist/types/components/AuthorsList/AuthorsList.d.ts +1 -1
- package/dist/types/components/ColorField/ColorField.d.ts +2 -2
- package/dist/types/components/Comments/CommentBody.d.ts +1 -1
- package/dist/types/components/Comments/CommentUser.d.ts +2 -2
- package/dist/types/components/Dialog.d.ts +1 -0
- package/dist/types/components/EditorHeader/EditorHeader.d.ts +4 -4
- package/dist/types/components/FileManager/FileManager.d.ts +5 -5
- package/dist/types/components/FileManager/FileSectionItem/FileSectionItem.d.ts +2 -2
- package/dist/types/components/FileManager/util.d.ts +1 -0
- package/dist/types/components/ManuscriptNoteList.d.ts +2 -2
- package/dist/types/components/Resizer/types.d.ts +2 -2
- package/dist/types/components/SubmissionInspector/types.d.ts +11 -11
- package/dist/types/components/icons/add-author.d.ts +1 -0
- package/dist/types/components/icons/add-comment-icon.d.ts +1 -0
- package/dist/types/components/icons/add-icon-active.d.ts +1 -0
- package/dist/types/components/icons/add-icon-inverted.d.ts +1 -0
- package/dist/types/components/icons/back-arrow.d.ts +1 -0
- package/dist/types/components/icons/bookmark.d.ts +1 -0
- package/dist/types/components/icons/google.d.ts +1 -0
- package/dist/types/components/icons/orcid.d.ts +1 -0
- package/dist/types/components/icons/project-notification.d.ts +1 -0
- package/dist/types/components/icons/project.d.ts +1 -0
- package/dist/types/components/icons/projects-list.d.ts +1 -0
- package/dist/types/components/icons/search.d.ts +1 -0
- package/dist/types/components/icons/tick-mark.d.ts +1 -0
- package/dist/types/components/icons/user.d.ts +1 -0
- package/dist/types/hooks/use-files.d.ts +3 -3
- package/dist/types/lib/authors.d.ts +2 -2
- package/dist/types/lib/capabilities.d.ts +4 -4
- package/dist/types/lib/comments.d.ts +5 -5
- package/dist/types/lib/formatAddress.d.ts +1 -1
- package/dist/types/lib/inlineFiles.d.ts +2 -2
- package/dist/types/lib/name.d.ts +1 -1
- package/dist/types/types.d.ts +4 -4
- package/package.json +98 -76
- package/NOTICE +0 -2
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
|
19
|
-
Object.
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
20
24
|
}) : (function(o, m, k, k2) {
|
|
21
25
|
if (k2 === undefined) k2 = k;
|
|
22
26
|
o[k2] = m[k];
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
|
19
|
-
Object.
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
20
24
|
}) : (function(o, m, k, k2) {
|
|
21
25
|
if (k2 === undefined) k2 = k;
|
|
22
26
|
o[k2] = m[k];
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
|
19
|
-
Object.
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
20
24
|
}) : (function(o, m, k, k2) {
|
|
21
25
|
if (k2 === undefined) k2 = k;
|
|
22
26
|
o[k2] = m[k];
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
|
19
|
-
Object.
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
20
24
|
}) : (function(o, m, k, k2) {
|
|
21
25
|
if (k2 === undefined) k2 = k;
|
|
22
26
|
o[k2] = m[k];
|
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useFiles = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
8
|
+
const transform_1 = require("@manuscripts/transform");
|
|
9
9
|
const inlineFiles_1 = __importDefault(require("../lib/inlineFiles"));
|
|
10
10
|
const use_deep_compare_1 = require("./use-deep-compare");
|
|
11
11
|
const getSupplementFiles = (modelMap, attachments, filePredicate) => {
|
|
12
|
-
const supplements = new Map((0,
|
|
12
|
+
const supplements = new Map((0, transform_1.getModelsByType)(modelMap, json_schema_1.ObjectTypes.Supplement).map((supplement) => { var _a; return [(_a = supplement.href) === null || _a === void 0 ? void 0 : _a.replace('attachment:', ''), supplement]; }));
|
|
13
13
|
return attachments.filter((attachment) => {
|
|
14
14
|
if (supplements.has(attachment.id) && filePredicate) {
|
|
15
15
|
return filePredicate(attachment.name);
|
package/dist/cjs/index.js
CHANGED
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
18
|
if (k2 === undefined) k2 = k;
|
|
19
|
-
Object.
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
20
24
|
}) : (function(o, m, k, k2) {
|
|
21
25
|
if (k2 === undefined) k2 = k;
|
|
22
26
|
o[k2] = m[k];
|
package/dist/cjs/lib/authors.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.affiliationsOptions = exports.affiliationLabel = exports.isJointFirstAuthor = exports.buildAuthorsAndAffiliations = exports.buildAffiliationsMap = exports.buildAuthorAffiliations = exports.buildAffiliationIDs = exports.buildAuthorPriority = exports.buildSortedAuthors = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const getModelsByType = (modelMap, objectType) => {
|
|
21
21
|
const output = [];
|
|
22
22
|
for (const model of modelMap.values()) {
|
|
@@ -27,7 +27,7 @@ const getModelsByType = (modelMap, objectType) => {
|
|
|
27
27
|
return output;
|
|
28
28
|
};
|
|
29
29
|
const buildSortedAuthors = (modelMap) => {
|
|
30
|
-
return getModelsByType(modelMap,
|
|
30
|
+
return getModelsByType(modelMap, json_schema_1.ObjectTypes.Contributor)
|
|
31
31
|
.filter((item) => item.role === 'author')
|
|
32
32
|
.sort((a, b) => Number(a.priority) - Number(b.priority));
|
|
33
33
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
4
|
+
const transform_1 = require("@manuscripts/transform");
|
|
5
5
|
const util_1 = require("../components/FileManager/util");
|
|
6
6
|
const getFigureData = (element, modelMap, attachmentsMap) => {
|
|
7
7
|
const attachments = [];
|
|
8
8
|
element.containedObjectIDs.map((id) => {
|
|
9
9
|
const object = modelMap.get(id);
|
|
10
|
-
if (object && object.objectType ===
|
|
10
|
+
if (object && object.objectType === json_schema_1.ObjectTypes.Figure) {
|
|
11
11
|
const figure = object;
|
|
12
12
|
if (figure.src) {
|
|
13
13
|
const attachment = attachmentsMap.get(figure.src.replace('attachment:', ''));
|
|
@@ -43,12 +43,12 @@ const getAuxiliaryObjects = (modelMap) => {
|
|
|
43
43
|
const tableElementIds = [], orderObjects = {};
|
|
44
44
|
for (const model of modelMap.values()) {
|
|
45
45
|
switch (model.objectType) {
|
|
46
|
-
case
|
|
46
|
+
case json_schema_1.ObjectTypes.Section: {
|
|
47
47
|
const section = model;
|
|
48
48
|
if (section.category === 'MPSectionCategory:abstract-graphical') {
|
|
49
49
|
graphicalAbstractFigureId = (_a = section.elementIDs) === null || _a === void 0 ? void 0 : _a.find((id) => {
|
|
50
50
|
const obj = modelMap.get(id);
|
|
51
|
-
return obj && (0,
|
|
51
|
+
return obj && (0, transform_1.hasObjectType)(json_schema_1.ObjectTypes.FigureElement)(obj);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
@@ -58,11 +58,10 @@ const getAuxiliaryObjects = (modelMap) => {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
switch (element.objectType) {
|
|
61
|
-
case
|
|
62
|
-
case manuscripts_json_schema_1.ObjectTypes.MultiGraphicFigureElement:
|
|
61
|
+
case json_schema_1.ObjectTypes.FigureElement:
|
|
63
62
|
figureElementIds.push(element._id);
|
|
64
63
|
break;
|
|
65
|
-
case
|
|
64
|
+
case json_schema_1.ObjectTypes.TableElement:
|
|
66
65
|
tableElementIds.push(element._id);
|
|
67
66
|
break;
|
|
68
67
|
}
|
|
@@ -70,7 +69,7 @@ const getAuxiliaryObjects = (modelMap) => {
|
|
|
70
69
|
}
|
|
71
70
|
break;
|
|
72
71
|
}
|
|
73
|
-
case
|
|
72
|
+
case json_schema_1.ObjectTypes.ElementsOrder: {
|
|
74
73
|
const elementsOrder = model;
|
|
75
74
|
orderObjects[elementsOrder.elementType] = elementsOrder;
|
|
76
75
|
}
|
|
@@ -81,8 +80,8 @@ const getAuxiliaryObjects = (modelMap) => {
|
|
|
81
80
|
}
|
|
82
81
|
return {
|
|
83
82
|
graphicalAbstractFigureId,
|
|
84
|
-
figureElement: sortAuxiliaryObject(figureElementIds, orderObjects[
|
|
85
|
-
tableElement: sortAuxiliaryObject(tableElementIds, orderObjects[
|
|
83
|
+
figureElement: sortAuxiliaryObject(figureElementIds, orderObjects[json_schema_1.ObjectTypes.FigureElement]),
|
|
84
|
+
tableElement: sortAuxiliaryObject(tableElementIds, orderObjects[json_schema_1.ObjectTypes.TableElement]),
|
|
86
85
|
};
|
|
87
86
|
};
|
|
88
87
|
const sortAuxiliaryObject = (auxiliaryObjectIds, orderObject) => {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ObjectTypes
|
|
16
|
+
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
17
17
|
import React, { useCallback, useState } from 'react';
|
|
18
18
|
import AffiliationsEditorView from './AffiliationsEditorView';
|
|
19
19
|
const AffiliationsEditorProfile = ({ affiliations, addAffiliation, updateAffiliation, removeAffiliation, components, styleOverrides, }) => {
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { buildSupplementaryMaterial
|
|
10
|
+
import { buildSupplementaryMaterial } from '@manuscripts/transform';
|
|
11
11
|
import React, { createContext, useCallback, useReducer } from 'react';
|
|
12
12
|
import ReactTooltip from 'react-tooltip';
|
|
13
13
|
import { useFiles } from '../../index';
|
|
@@ -71,11 +71,9 @@ export const FileManager = ({ modelMap, saveModel, enableDragAndDrop, can, fileM
|
|
|
71
71
|
const attachments = getAttachments();
|
|
72
72
|
const { otherFiles, supplementFiles, inlineFiles } = useFiles(modelMap, attachments);
|
|
73
73
|
const handleDetachFile = (attachmentId, modelId) => {
|
|
74
|
-
var _a;
|
|
75
74
|
const model = modelMap.get(modelId);
|
|
76
75
|
if (model) {
|
|
77
|
-
|
|
78
|
-
saveModel(Object.assign(Object.assign({}, model), { externalFileReferences: externalFileReferences || [], src: '' }));
|
|
76
|
+
saveModel(Object.assign(Object.assign({}, model), { src: '' }));
|
|
79
77
|
}
|
|
80
78
|
};
|
|
81
79
|
const getFileSectionExternalFile = (fileSection) => {
|
|
@@ -6,16 +6,18 @@ import { FileInfoContainer, FileNameTitleContainer, FileTitle, } from './FileSec
|
|
|
6
6
|
import { ActionsIcon, Item, } from './FileSectionItem/FileSectionItem';
|
|
7
7
|
import { ItemActions } from './FileSectionItem/ItemActions';
|
|
8
8
|
import { extensionsWithFileTypesMap, fileTypesWithIconMap, } from './util';
|
|
9
|
+
const trackedJoint = ':dataTracked:';
|
|
9
10
|
export const InlineFilesSection = ({ handleReplace, handleDownload, handleUpdateInline, handleDetachFile, inlineFiles, isEditor, dispatch, }) => {
|
|
10
11
|
const onElementClick = useCallback((e) => {
|
|
11
12
|
if (!isEditor) {
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
15
|
const { id } = e.currentTarget;
|
|
15
|
-
const
|
|
16
|
-
|
|
16
|
+
const clearedId = id.split(trackedJoint)[0];
|
|
17
|
+
const isSelected = clearedId == window.location.hash.substr(1);
|
|
18
|
+
window.location.hash = !isSelected ? `#${clearedId}` : '#';
|
|
17
19
|
if (isSelected) {
|
|
18
|
-
window.location.hash = `#${
|
|
20
|
+
window.location.hash = `#${clearedId}`;
|
|
19
21
|
}
|
|
20
22
|
}, [isEditor]);
|
|
21
23
|
return (React.createElement("div", null, inlineFiles.map((file, index) => {
|
|
@@ -8,8 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import GutterAddIconNormal from '@manuscripts/assets/react/GutterAddIconNormal';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { ObjectTypes, } from '@manuscripts/json-schema';
|
|
12
|
+
import { buildContribution, buildNote } from '@manuscripts/transform';
|
|
13
13
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
14
14
|
import styled from 'styled-components';
|
|
15
15
|
import { v4 as uuid } from 'uuid';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
2
|
+
import { getModelsByType } from '@manuscripts/transform';
|
|
3
3
|
import getInlineFiles from '../lib/inlineFiles';
|
|
4
4
|
import { useDeepCompareMemo } from './use-deep-compare';
|
|
5
5
|
const getSupplementFiles = (modelMap, attachments, filePredicate) => {
|
package/dist/es/lib/authors.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ObjectTypes, } from '@manuscripts/
|
|
16
|
+
import { ObjectTypes, } from '@manuscripts/json-schema';
|
|
17
17
|
const getModelsByType = (modelMap, objectType) => {
|
|
18
18
|
const output = [];
|
|
19
19
|
for (const model of modelMap.values()) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ObjectTypes, } from '@manuscripts/json-schema';
|
|
2
|
+
import { hasObjectType } from '@manuscripts/transform';
|
|
3
3
|
import { FileType } from '../components/FileManager/util';
|
|
4
4
|
const getFigureData = (element, modelMap, attachmentsMap) => {
|
|
5
5
|
const attachments = [];
|
|
@@ -57,7 +57,6 @@ const getAuxiliaryObjects = (modelMap) => {
|
|
|
57
57
|
}
|
|
58
58
|
switch (element.objectType) {
|
|
59
59
|
case ObjectTypes.FigureElement:
|
|
60
|
-
case ObjectTypes.MultiGraphicFigureElement:
|
|
61
60
|
figureElementIds.push(element._id);
|
|
62
61
|
break;
|
|
63
62
|
case ObjectTypes.TableElement:
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { UserProfileAffiliation } from '@manuscripts/
|
|
16
|
+
import { UserProfileAffiliation } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { AuthorFormComponentOverrides } from '../AuthorForm/AuthorFormComponents';
|
|
19
19
|
interface Props {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Contributor, ContributorRole } from '@manuscripts/
|
|
16
|
+
import { Contributor, ContributorRole } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { AuthorValues } from '../../types';
|
|
19
19
|
import { AuthorFormComponentOverrides } from './AuthorFormComponents';
|
|
@@ -25,7 +25,7 @@ export interface AuthorFormComponents {
|
|
|
25
25
|
CheckboxLabel: StyledComponent<'label', DefaultTheme>;
|
|
26
26
|
TextField: StyledComponent<'input', DefaultTheme>;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export type AuthorFormComponentOverrides = {
|
|
29
29
|
[K in keyof AuthorFormComponents]?: AuthorFormComponents[K];
|
|
30
30
|
};
|
|
31
31
|
export declare const defaultAuthorFormComponents: AuthorFormComponents;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ContributorRole } from '@manuscripts/
|
|
16
|
+
import { ContributorRole } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
export declare const ContributorRolesSelect: React.FC<{
|
|
19
19
|
contributorRoles: ContributorRole[];
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Contributor } from '@manuscripts/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
interface Props {
|
|
19
19
|
author: Contributor;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { BibliographicName } from '@manuscripts/
|
|
16
|
+
import { BibliographicName } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
export interface AuthorNameProps {
|
|
19
19
|
name: BibliographicName;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Contributor } from '@manuscripts/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { AuthorData } from '../types';
|
|
19
19
|
export declare const AuthorsContainer: React.FC<{
|
|
@@ -18,7 +18,7 @@ import { AuthorNameProps } from '../AuthorName';
|
|
|
18
18
|
export interface AuthorItemComponents {
|
|
19
19
|
AuthorName: React.FunctionComponent<AuthorNameProps>;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export type AuthorItemComponentOverrides = {
|
|
22
22
|
[K in keyof AuthorItemComponents]?: AuthorItemComponents[K];
|
|
23
23
|
};
|
|
24
24
|
export declare const defaultAuthorItemComponents: AuthorItemComponents;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Contributor } from '@manuscripts/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { AuthorItemComponentOverrides } from './AuthorItemComponents';
|
|
19
19
|
interface Props {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Contributor } from '@manuscripts/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { DefaultTheme } from 'styled-components';
|
|
19
19
|
import { AuthorItem, ConnectedDragSourceProps, ConnectedDropTargetProps, DropSide } from '../../types';
|
|
20
20
|
import { AuthorItemComponentOverrides } from './AuthorItemComponents';
|
|
21
|
-
|
|
21
|
+
type ConnectedProps = ConnectedDragSourceProps & ConnectedDropTargetProps;
|
|
22
22
|
interface Props {
|
|
23
23
|
authorItem: AuthorItem;
|
|
24
24
|
onDrop: (oldIndex: number, newIndex: number) => void;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Contributor } from '@manuscripts/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { AuthorAffiliation as AuthorAffiliationT } from '../../types';
|
|
19
19
|
interface AuthorProps {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Contributor } from '@manuscripts/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { AuthorAffiliation } from '../../types';
|
|
19
19
|
interface Props {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Color } from '@manuscripts/
|
|
16
|
+
import { Color } from '@manuscripts/json-schema';
|
|
17
17
|
import React from 'react';
|
|
18
|
-
|
|
18
|
+
type ColorReq = Partial<Color> & {
|
|
19
19
|
value: string;
|
|
20
20
|
};
|
|
21
21
|
interface Props {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Keyword, UserProfile } from '@manuscripts/
|
|
1
|
+
import { Keyword, UserProfile } from '@manuscripts/json-schema';
|
|
2
2
|
import React, { Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { CommentType, UnsavedComment } from '../../lib/comments';
|
|
4
4
|
export interface CommentBodyProps {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { Contribution } from '@manuscripts/json-schema';
|
|
17
|
+
import { UserProfileWithAvatar } from '@manuscripts/transform';
|
|
18
18
|
import React from 'react';
|
|
19
19
|
export declare const CommentUser: React.FC<{
|
|
20
20
|
contributions?: Contribution[];
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ApolloError } from '@apollo/client';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type PartialSubmission = {
|
|
4
4
|
id: string;
|
|
5
5
|
currentStep: SubmissionStep;
|
|
6
6
|
nextStep?: SubmissionStep | null | undefined;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type SubmissionStep = {
|
|
9
9
|
type: SubmissionStepType;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type SubmissionStepTransition = {
|
|
12
12
|
status: {
|
|
13
13
|
id: string;
|
|
14
14
|
label: string;
|
|
15
15
|
};
|
|
16
16
|
type: SubmissionStepType;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type SubmissionStepType = {
|
|
19
19
|
id: string;
|
|
20
20
|
label: string;
|
|
21
21
|
description: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Model } from '@manuscripts/json-schema';
|
|
2
|
+
import { Build } from '@manuscripts/transform';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Capabilities } from '../../lib/capabilities';
|
|
5
5
|
import { SubmissionAttachment } from './FileSectionItem/FileSectionItem';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type Upload = (file: File, designation: string) => Promise<boolean | SubmissionAttachment | undefined>;
|
|
7
|
+
export type Replace = (attachmentId: string, name: string, file: File, typeId: string) => Promise<boolean | SubmissionAttachment | undefined>;
|
|
8
|
+
export type ChangeDesignation = (attachmentId: string, typeId: string, name: string) => Promise<boolean>;
|
|
9
9
|
export interface FileManagement {
|
|
10
10
|
getAttachments: () => SubmissionAttachment[];
|
|
11
11
|
upload: Upload;
|
|
@@ -3,13 +3,13 @@ import { DragElementWrapper, DragSourceOptions } from 'react-dnd';
|
|
|
3
3
|
import { Maybe } from '../../SubmissionInspector/types';
|
|
4
4
|
import { ChangeDesignation, Replace } from '../FileManager';
|
|
5
5
|
import { Action } from '../FileSectionState';
|
|
6
|
-
export
|
|
6
|
+
export type SubmissionAttachment = {
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
type: SubmissionAttachmentType;
|
|
10
10
|
link: string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type SubmissionAttachmentType = {
|
|
13
13
|
id: string;
|
|
14
14
|
label?: Maybe<string> | undefined;
|
|
15
15
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Keyword, ManuscriptNote, UserProfile } from '@manuscripts/json-schema';
|
|
2
|
+
import { Selected } from '@manuscripts/transform';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Capabilities } from '../lib/capabilities';
|
|
5
5
|
interface Props {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type ResizerDirection = 'row' | 'column';
|
|
2
|
+
export type ResizerSide = 'start' | 'end';
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type Maybe<T> = T | null;
|
|
17
17
|
export declare enum SubmissionCriticality {
|
|
18
18
|
ON_SCHEDULE = "ON_SCHEDULE",
|
|
19
19
|
DUE_TODAY = "DUE_TODAY",
|
|
20
20
|
OVERDUE = "OVERDUE"
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type Submission = {
|
|
23
23
|
id: string;
|
|
24
24
|
code: string;
|
|
25
25
|
doi: string;
|
|
@@ -35,7 +35,7 @@ export declare type Submission = {
|
|
|
35
35
|
isPublished: boolean;
|
|
36
36
|
publishedDate?: Date;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type Journal = {
|
|
39
39
|
id: string;
|
|
40
40
|
code: string;
|
|
41
41
|
title: string;
|
|
@@ -43,7 +43,7 @@ export declare type Journal = {
|
|
|
43
43
|
issn: string;
|
|
44
44
|
productionEditor: User;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type SubmissionStep = {
|
|
47
47
|
id: string;
|
|
48
48
|
type: SubmissionStepType;
|
|
49
49
|
status: SubmissionStepStatus;
|
|
@@ -51,15 +51,15 @@ export declare type SubmissionStep = {
|
|
|
51
51
|
dueDate: Date;
|
|
52
52
|
criticality: SubmissionCriticality;
|
|
53
53
|
};
|
|
54
|
-
export
|
|
54
|
+
export type ProjectedSubmissionStep = {
|
|
55
55
|
type: SubmissionStepType;
|
|
56
56
|
dueDate: Date;
|
|
57
57
|
};
|
|
58
|
-
export
|
|
58
|
+
export type User = {
|
|
59
59
|
id: string;
|
|
60
60
|
displayName: string;
|
|
61
61
|
};
|
|
62
|
-
export
|
|
62
|
+
export type Person = User & {
|
|
63
63
|
id: string;
|
|
64
64
|
displayName: string;
|
|
65
65
|
email: string;
|
|
@@ -67,22 +67,22 @@ export declare type Person = User & {
|
|
|
67
67
|
lastName?: Maybe<string>;
|
|
68
68
|
role: Role;
|
|
69
69
|
};
|
|
70
|
-
export
|
|
70
|
+
export type Role = {
|
|
71
71
|
id: string;
|
|
72
72
|
label: string;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type SubmissionStepType = {
|
|
75
75
|
id: string;
|
|
76
76
|
label: string;
|
|
77
77
|
description: string;
|
|
78
78
|
stage: SubmissionStepStage;
|
|
79
79
|
role: Role;
|
|
80
80
|
};
|
|
81
|
-
export
|
|
81
|
+
export type SubmissionStepStage = {
|
|
82
82
|
id: string;
|
|
83
83
|
label: string;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type SubmissionStepStatus = {
|
|
86
86
|
id: string;
|
|
87
87
|
label: string;
|
|
88
88
|
};
|