@manuscripts/body-editor 3.12.27 → 3.12.28
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/authors/AuthorDetailsForm.js +10 -1
- package/dist/cjs/components/authors/AuthorsModal.js +2 -0
- package/dist/cjs/lib/__tests__/authors.test.js +3 -0
- package/dist/cjs/lib/normalize.js +1 -0
- package/dist/cjs/versions.js +1 -1
- package/dist/es/components/authors/AuthorDetailsForm.js +11 -2
- package/dist/es/components/authors/AuthorsModal.js +2 -0
- package/dist/es/lib/__tests__/authors.test.js +3 -0
- package/dist/es/lib/normalize.js +1 -0
- package/dist/es/versions.js +1 -1
- package/dist/types/versions.d.ts +1 -1
- package/package.json +2 -2
|
@@ -109,6 +109,10 @@ const AuthorDetailsForm = ({ values, onChange, onSave, actionsRef, isEmailRequir
|
|
|
109
109
|
react_1.default.createElement(formik_1.Field, { name: 'family' }, (props) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
110
110
|
react_1.default.createElement(style_guide_1.Label, { htmlFor: "family-name" }, "Family name"),
|
|
111
111
|
react_1.default.createElement(style_guide_1.TextField, { id: 'family-name', ...props.field }))))),
|
|
112
|
+
react_1.default.createElement(style_guide_1.FormRow, null,
|
|
113
|
+
react_1.default.createElement(formik_1.Field, { name: 'suffix' }, (props) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
114
|
+
react_1.default.createElement(style_guide_1.Label, { htmlFor: "suffix" }, "Suffix"),
|
|
115
|
+
react_1.default.createElement(style_guide_1.TextField, { id: 'suffix', ...props.field }))))),
|
|
112
116
|
react_1.default.createElement(style_guide_1.FormRow, null,
|
|
113
117
|
react_1.default.createElement(formik_1.Field, { name: 'role' }, (props) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
114
118
|
react_1.default.createElement(style_guide_1.Label, { htmlFor: "role" }, "Job Title"),
|
|
@@ -135,7 +139,12 @@ const AuthorDetailsForm = ({ values, onChange, onSave, actionsRef, isEmailRequir
|
|
|
135
139
|
react_1.default.createElement(style_guide_1.Label, { htmlFor: "orcid" }, "ORCID"),
|
|
136
140
|
react_1.default.createElement(TextFieldWithError, { id: 'orcid', type: "url", placeholder: 'https://orcid.org/...', ...props.field, pattern: ORCID_INPUT_PATTERN, title: "Please enter a valid ORCID URL: https://orcid.org/xxxx-xxxx-xxxx-xxxx", error: hasError }),
|
|
137
141
|
hasError && (react_1.default.createElement(style_guide_1.InputErrorText, null, (0, formik_1.getIn)(formik.errors, 'ORCID')))));
|
|
138
|
-
}))
|
|
142
|
+
})),
|
|
143
|
+
react_1.default.createElement(style_guide_1.FormRow, null,
|
|
144
|
+
react_1.default.createElement(style_guide_1.Label, { htmlFor: 'degrees' }, "Degrees"),
|
|
145
|
+
react_1.default.createElement(style_guide_1.MultiValueInput, { id: "degrees", inputType: "text", placeholder: "Enter degree and press enter", initialValues: values.degrees, onChange: (newValues) => {
|
|
146
|
+
formik.setFieldValue('degrees', newValues);
|
|
147
|
+
} }))));
|
|
139
148
|
}));
|
|
140
149
|
};
|
|
141
150
|
exports.AuthorDetailsForm = AuthorDetailsForm;
|
|
@@ -376,9 +376,11 @@ function createEmptyAuthor(priority) {
|
|
|
376
376
|
id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.contributor),
|
|
377
377
|
role: '',
|
|
378
378
|
affiliationIDs: [],
|
|
379
|
+
degrees: [],
|
|
379
380
|
given: '',
|
|
380
381
|
family: '',
|
|
381
382
|
email: '',
|
|
383
|
+
suffix: '',
|
|
382
384
|
isCorresponding: false,
|
|
383
385
|
ORCID: '',
|
|
384
386
|
priority,
|
|
@@ -24,6 +24,7 @@ describe('authorComparator', () => {
|
|
|
24
24
|
priority: 1,
|
|
25
25
|
role: 'author',
|
|
26
26
|
affiliationIDs: [],
|
|
27
|
+
degrees: [],
|
|
27
28
|
isCorresponding: false,
|
|
28
29
|
isJointContributor: false,
|
|
29
30
|
ORCID: '',
|
|
@@ -37,6 +38,7 @@ describe('authorComparator', () => {
|
|
|
37
38
|
priority: 0,
|
|
38
39
|
role: 'author',
|
|
39
40
|
affiliationIDs: [],
|
|
41
|
+
degrees: [],
|
|
40
42
|
isCorresponding: false,
|
|
41
43
|
isJointContributor: false,
|
|
42
44
|
ORCID: '',
|
|
@@ -50,6 +52,7 @@ describe('authorComparator', () => {
|
|
|
50
52
|
priority: 2,
|
|
51
53
|
role: 'author',
|
|
52
54
|
affiliationIDs: [],
|
|
55
|
+
degrees: [],
|
|
53
56
|
isCorresponding: false,
|
|
54
57
|
isJointContributor: false,
|
|
55
58
|
ORCID: '',
|
|
@@ -30,6 +30,7 @@ const normalizeAuthor = (author) => {
|
|
|
30
30
|
ORCID: trim(author.ORCID),
|
|
31
31
|
priority: author.priority,
|
|
32
32
|
isJointContributor: author.isJointContributor || false,
|
|
33
|
+
degrees: author.degrees || [],
|
|
33
34
|
footnoteIDs: author.footnoteIDs || [],
|
|
34
35
|
correspIDs: author.correspIDs || [],
|
|
35
36
|
prefix: trim(author.prefix),
|
package/dist/cjs/versions.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 { CheckboxField, CheckboxLabel, TextField, InputErrorText, Label, FormRow, LabelText, } from '@manuscripts/style-guide';
|
|
16
|
+
import { CheckboxField, CheckboxLabel, TextField, InputErrorText, Label, FormRow, LabelText, MultiValueInput, } from '@manuscripts/style-guide';
|
|
17
17
|
import { Field, Formik, getIn, } from 'formik';
|
|
18
18
|
import React, { useEffect, useRef } from 'react';
|
|
19
19
|
import styled from 'styled-components';
|
|
@@ -70,6 +70,10 @@ export const AuthorDetailsForm = ({ values, onChange, onSave, actionsRef, isEmai
|
|
|
70
70
|
React.createElement(Field, { name: 'family' }, (props) => (React.createElement(React.Fragment, null,
|
|
71
71
|
React.createElement(Label, { htmlFor: "family-name" }, "Family name"),
|
|
72
72
|
React.createElement(TextField, { id: 'family-name', ...props.field }))))),
|
|
73
|
+
React.createElement(FormRow, null,
|
|
74
|
+
React.createElement(Field, { name: 'suffix' }, (props) => (React.createElement(React.Fragment, null,
|
|
75
|
+
React.createElement(Label, { htmlFor: "suffix" }, "Suffix"),
|
|
76
|
+
React.createElement(TextField, { id: 'suffix', ...props.field }))))),
|
|
73
77
|
React.createElement(FormRow, null,
|
|
74
78
|
React.createElement(Field, { name: 'role' }, (props) => (React.createElement(React.Fragment, null,
|
|
75
79
|
React.createElement(Label, { htmlFor: "role" }, "Job Title"),
|
|
@@ -96,7 +100,12 @@ export const AuthorDetailsForm = ({ values, onChange, onSave, actionsRef, isEmai
|
|
|
96
100
|
React.createElement(Label, { htmlFor: "orcid" }, "ORCID"),
|
|
97
101
|
React.createElement(TextFieldWithError, { id: 'orcid', type: "url", placeholder: 'https://orcid.org/...', ...props.field, pattern: ORCID_INPUT_PATTERN, title: "Please enter a valid ORCID URL: https://orcid.org/xxxx-xxxx-xxxx-xxxx", error: hasError }),
|
|
98
102
|
hasError && (React.createElement(InputErrorText, null, getIn(formik.errors, 'ORCID')))));
|
|
99
|
-
}))
|
|
103
|
+
})),
|
|
104
|
+
React.createElement(FormRow, null,
|
|
105
|
+
React.createElement(Label, { htmlFor: 'degrees' }, "Degrees"),
|
|
106
|
+
React.createElement(MultiValueInput, { id: "degrees", inputType: "text", placeholder: "Enter degree and press enter", initialValues: values.degrees, onChange: (newValues) => {
|
|
107
|
+
formik.setFieldValue('degrees', newValues);
|
|
108
|
+
} }))));
|
|
100
109
|
}));
|
|
101
110
|
};
|
|
102
111
|
export const Fieldset = styled.fieldset `
|
|
@@ -336,9 +336,11 @@ function createEmptyAuthor(priority) {
|
|
|
336
336
|
id: generateNodeID(schema.nodes.contributor),
|
|
337
337
|
role: '',
|
|
338
338
|
affiliationIDs: [],
|
|
339
|
+
degrees: [],
|
|
339
340
|
given: '',
|
|
340
341
|
family: '',
|
|
341
342
|
email: '',
|
|
343
|
+
suffix: '',
|
|
342
344
|
isCorresponding: false,
|
|
343
345
|
ORCID: '',
|
|
344
346
|
priority,
|
|
@@ -22,6 +22,7 @@ describe('authorComparator', () => {
|
|
|
22
22
|
priority: 1,
|
|
23
23
|
role: 'author',
|
|
24
24
|
affiliationIDs: [],
|
|
25
|
+
degrees: [],
|
|
25
26
|
isCorresponding: false,
|
|
26
27
|
isJointContributor: false,
|
|
27
28
|
ORCID: '',
|
|
@@ -35,6 +36,7 @@ describe('authorComparator', () => {
|
|
|
35
36
|
priority: 0,
|
|
36
37
|
role: 'author',
|
|
37
38
|
affiliationIDs: [],
|
|
39
|
+
degrees: [],
|
|
38
40
|
isCorresponding: false,
|
|
39
41
|
isJointContributor: false,
|
|
40
42
|
ORCID: '',
|
|
@@ -48,6 +50,7 @@ describe('authorComparator', () => {
|
|
|
48
50
|
priority: 2,
|
|
49
51
|
role: 'author',
|
|
50
52
|
affiliationIDs: [],
|
|
53
|
+
degrees: [],
|
|
51
54
|
isCorresponding: false,
|
|
52
55
|
isJointContributor: false,
|
|
53
56
|
ORCID: '',
|
package/dist/es/lib/normalize.js
CHANGED
|
@@ -27,6 +27,7 @@ export const normalizeAuthor = (author) => {
|
|
|
27
27
|
ORCID: trim(author.ORCID),
|
|
28
28
|
priority: author.priority,
|
|
29
29
|
isJointContributor: author.isJointContributor || false,
|
|
30
|
+
degrees: author.degrees || [],
|
|
30
31
|
footnoteIDs: author.footnoteIDs || [],
|
|
31
32
|
correspIDs: author.correspIDs || [],
|
|
32
33
|
prefix: trim(author.prefix),
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.12.
|
|
1
|
+
export const VERSION = '3.12.28';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.12.
|
|
1
|
+
export declare const VERSION = "3.12.28";
|
|
2
2
|
export declare const MATHJAX_VERSION = "3.2.2";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/body-editor",
|
|
3
3
|
"description": "Prosemirror components for editing and viewing manuscripts",
|
|
4
|
-
"version": "3.12.
|
|
4
|
+
"version": "3.12.28",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@iarna/word-count": "1.1.2",
|
|
40
40
|
"@manuscripts/style-guide": "3.5.9",
|
|
41
41
|
"@manuscripts/track-changes-plugin": "2.3.10",
|
|
42
|
-
"@manuscripts/transform": "4.3.
|
|
42
|
+
"@manuscripts/transform": "4.3.36",
|
|
43
43
|
"@popperjs/core": "2.11.8",
|
|
44
44
|
"citeproc": "2.4.63",
|
|
45
45
|
"codemirror": "5.65.19",
|