@manuscripts/body-editor 3.12.25 → 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.
@@ -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),
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MATHJAX_VERSION = exports.VERSION = void 0;
4
- exports.VERSION = '3.12.25';
4
+ exports.VERSION = '3.12.28';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -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: '',
@@ -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),
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.12.25';
1
+ export const VERSION = '3.12.28';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.12.25";
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.25",
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.35",
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",
@@ -138,12 +138,6 @@
138
138
  width: 100%;
139
139
  border: 1px solid #f2f2f2;
140
140
  border-radius: 4px;
141
-
142
- grid-template-columns: repeat(3, auto) !important;
143
- grid-template-rows:
144
- repeat(1, minmax(min-content, max-content))
145
- [caption listing] auto !important;
146
-
147
141
  margin: 16px 0 0 !important;
148
142
  box-sizing: border-box;
149
143
  justify-self: center;
@@ -155,11 +149,6 @@
155
149
  border-radius: 4px;
156
150
  position: relative;
157
151
  padding: 8px;
158
-
159
- grid-template-columns: repeat(3, auto) !important;
160
- grid-template-rows:
161
- repeat(1, minmax(min-content, max-content))
162
- [caption listing] auto !important;
163
152
  }
164
153
 
165
154
  .ProseMirror .figure-block {
@@ -171,8 +160,6 @@
171
160
  border-radius: 0;
172
161
  position: static;
173
162
  margin: 0 !important;
174
- grid-template-columns: auto;
175
- grid-template-rows: auto;
176
163
  }
177
164
 
178
165
  .ProseMirror .figure-group {
@@ -184,7 +171,6 @@
184
171
  .ProseMirror .figure-block > figure {
185
172
  width: 100%;
186
173
  position: relative;
187
- grid-column: 1/-1;
188
174
  margin: 0;
189
175
  display: flex;
190
176
  flex-direction: column;
@@ -246,8 +232,6 @@
246
232
  }
247
233
 
248
234
  .ProseMirror .figure-block > .listing {
249
- grid-column-start: 1;
250
- grid-column-end: -1;
251
235
  padding: 0;
252
236
  min-height: 0;
253
237
  overflow: visible;
@@ -313,36 +297,6 @@
313
297
  border: none;
314
298
  }
315
299
 
316
- .ProseMirror .figure-block[id^='MPTable'] {
317
- border-collapse: collapse;
318
- empty-cells: show;
319
- display: grid;
320
- }
321
-
322
- .ProseMirror .figure-block[id^='MPTable'] tr:first-of-type > td {
323
- background-color: #eee !important;
324
-
325
- border-top-color: #000 !important;
326
- border-top-style: none !important;
327
- border-top-width: 2pt !important;
328
-
329
- border-bottom-color: #000 !important;
330
- border-bottom-style: none !important;
331
- border-bottom-width: 1pt !important;
332
- }
333
-
334
- .ProseMirror .figure-block[id^='MPTable'] tr:last-of-type > td {
335
- background-color: #eee !important;
336
-
337
- border-top-color: #000 !important;
338
- border-top-style: none !important;
339
- border-top-width: 1pt !important;
340
-
341
- border-bottom-color: #000 !important;
342
- border-bottom-style: none !important;
343
- border-bottom-width: 1pt !important;
344
- }
345
-
346
300
  .position-menu-button:focus-visible {
347
301
  outline: none;
348
302
  }
@@ -558,11 +512,16 @@ ProseMirror .block-embed .position-menu {
558
512
  position: relative;
559
513
  }
560
514
 
561
- .block > div.comment-marker,
562
- .figure-block > div.comment-marker {
515
+ .block > div.comment-marker {
563
516
  top: -25px;
564
517
  left: 100%;
565
518
  }
519
+ .figure-block > div.comment-marker {
520
+ position:absolute;
521
+ top: 1px;
522
+ left: unset;
523
+ right: -25px;
524
+ }
566
525
 
567
526
  ul > .comment-marker,
568
527
  ol > .comment-marker {
@@ -573,10 +532,6 @@ li > .comment-marker {
573
532
  float: right;
574
533
  }
575
534
 
576
- .figure-block div.comment-marker {
577
- grid-column: 3;
578
- }
579
-
580
535
  figure.block > .comment-marker {
581
536
  float: right;
582
537
  top: 0;
@@ -1653,8 +1608,6 @@ th:hover > .table-context-menu-button,
1653
1608
  .ProseMirror .accessibility_element,
1654
1609
  .ProseMirror .ext-link-editor-container {
1655
1610
  margin-top: 12px;
1656
- grid-column-start: 1;
1657
- grid-column-end: -1;
1658
1611
  text-align: start;
1659
1612
  display: none;
1660
1613
  }