@manuscripts/body-editor 3.4.8 → 3.5.1

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.
@@ -319,7 +319,7 @@ const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, author,
319
319
  valuesRef.current = { ...updatedValues, priority: values.priority };
320
320
  const { given, family } = values.bibliographicName;
321
321
  const { email, isCorresponding } = values;
322
- const isNameFilled = given?.length && family?.length;
322
+ const isNameFilled = given?.length || family?.length;
323
323
  if (hasChanges && isNameFilled) {
324
324
  if (isCorresponding) {
325
325
  setDisableSave(!email?.length);
@@ -43,7 +43,7 @@ const authorLabel = (author) => {
43
43
  const name = author.bibliographicName;
44
44
  const parts = [
45
45
  author.prefix,
46
- (0, exports.initials)(name),
46
+ name.family ? (0, exports.initials)(name) : name.given,
47
47
  name.family,
48
48
  name.suffix,
49
49
  ].filter(Boolean);
@@ -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.4.8';
4
+ exports.VERSION = '3.5.1';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -280,7 +280,7 @@ export const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, a
280
280
  valuesRef.current = { ...updatedValues, priority: values.priority };
281
281
  const { given, family } = values.bibliographicName;
282
282
  const { email, isCorresponding } = values;
283
- const isNameFilled = given?.length && family?.length;
283
+ const isNameFilled = given?.length || family?.length;
284
284
  if (hasChanges && isNameFilled) {
285
285
  if (isCorresponding) {
286
286
  setDisableSave(!email?.length);
@@ -38,7 +38,7 @@ export const authorLabel = (author) => {
38
38
  const name = author.bibliographicName;
39
39
  const parts = [
40
40
  author.prefix,
41
- initials(name),
41
+ name.family ? initials(name) : name.given,
42
42
  name.family,
43
43
  name.suffix,
44
44
  ].filter(Boolean);
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.4.8';
1
+ export const VERSION = '3.5.1';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.4.8";
1
+ export declare const VERSION = "3.5.1";
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.4.8",
4
+ "version": "3.5.1",
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
  "@cospired/i18n-iso-languages": "^4.2.0",
40
40
  "@iarna/word-count": "1.1.2",
41
41
  "@manuscripts/json-schema": "2.2.12",
42
- "@manuscripts/style-guide": "3.2.4",
42
+ "@manuscripts/style-guide": "3.3.0",
43
43
  "@manuscripts/track-changes-plugin": "2.0.10",
44
44
  "@manuscripts/transform": "4.2.14",
45
45
  "@popperjs/core": "2.11.8",