@manuscripts/transform 2.0.1-LEAN-3083 → 2.0.1-LEAN-3083-2

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.
@@ -14,6 +14,7 @@ exports.contributor = {
14
14
  userID: { default: undefined },
15
15
  invitationID: { default: undefined },
16
16
  isCorresponding: { default: undefined },
17
+ isJointContributor: { default: undefined },
17
18
  ORCIDIdentifier: { default: undefined },
18
19
  priority: { default: undefined },
19
20
  dataTracked: { default: null },
@@ -91,7 +91,7 @@ class Decoder {
91
91
  const contributors = getContributors(this.modelMap)
92
92
  .map((c) => this.decode(c))
93
93
  .filter(Boolean);
94
- return schema_1.schema.nodes.contributors.createAndFill({}, contributors);
94
+ return schema_1.schema.nodes.contributors.createAndFill({}, contributors.sort((a, b) => Number(a.attrs.priority) - Number(b.attrs.priority)));
95
95
  }
96
96
  createKeywordsNode() {
97
97
  const elements = getKeywordElements(this.modelMap)
@@ -629,6 +629,7 @@ class Decoder {
629
629
  id: model._id,
630
630
  role: model.role,
631
631
  affiliations: model.affiliations,
632
+ email: model.email,
632
633
  bibliographicName: model.bibliographicName,
633
634
  userID: model.userID,
634
635
  invitationID: model.invitationID,
@@ -11,6 +11,7 @@ export const contributor = {
11
11
  userID: { default: undefined },
12
12
  invitationID: { default: undefined },
13
13
  isCorresponding: { default: undefined },
14
+ isJointContributor: { default: undefined },
14
15
  ORCIDIdentifier: { default: undefined },
15
16
  priority: { default: undefined },
16
17
  dataTracked: { default: null },
@@ -82,7 +82,7 @@ export class Decoder {
82
82
  const contributors = getContributors(this.modelMap)
83
83
  .map((c) => this.decode(c))
84
84
  .filter(Boolean);
85
- return schema.nodes.contributors.createAndFill({}, contributors);
85
+ return schema.nodes.contributors.createAndFill({}, contributors.sort((a, b) => Number(a.attrs.priority) - Number(b.attrs.priority)));
86
86
  }
87
87
  createKeywordsNode() {
88
88
  const elements = getKeywordElements(this.modelMap)
@@ -620,6 +620,7 @@ export class Decoder {
620
620
  id: model._id,
621
621
  role: model.role,
622
622
  affiliations: model.affiliations,
623
+ email: model.email,
623
624
  bibliographicName: model.bibliographicName,
624
625
  userID: model.userID,
625
626
  invitationID: model.invitationID,
@@ -1,10 +1,10 @@
1
- import { Affiliation, BibliographicName } from '@manuscripts/json-schema';
1
+ import { BibliographicName } from '@manuscripts/json-schema';
2
2
  import { NodeSpec } from 'prosemirror-model';
3
3
  import { ManuscriptNode } from '../types';
4
4
  interface Attrs {
5
5
  id: string;
6
6
  role: string;
7
- affiliations: Affiliation[];
7
+ affiliations: string[];
8
8
  bibliographicName: BibliographicName;
9
9
  userID: string;
10
10
  email: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/transform",
3
3
  "description": "ProseMirror transformer for Manuscripts applications",
4
- "version": "2.0.1-LEAN-3083",
4
+ "version": "2.0.1-LEAN-3083-2",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",