@manuscripts/transform 2.0.1-LEAN-3074-0 → 2.0.1-LEAN-3083-5
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/schema/nodes/affiliation.js +2 -0
- package/dist/cjs/schema/nodes/contributor.js +2 -0
- package/dist/cjs/schema/nodes/table_element.js +1 -1
- package/dist/cjs/transformer/decode.js +5 -1
- package/dist/cjs/transformer/encode.js +3 -0
- package/dist/es/schema/nodes/affiliation.js +2 -0
- package/dist/es/schema/nodes/contributor.js +2 -0
- package/dist/es/schema/nodes/table_element.js +1 -1
- package/dist/es/transformer/decode.js +5 -1
- package/dist/es/transformer/encode.js +3 -0
- package/dist/types/schema/nodes/affiliation.d.ts +2 -0
- package/dist/types/schema/nodes/contributor.d.ts +4 -2
- package/package.json +2 -2
|
@@ -6,6 +6,7 @@ exports.contributor = {
|
|
|
6
6
|
attrs: {
|
|
7
7
|
id: { default: '' },
|
|
8
8
|
role: { default: '' },
|
|
9
|
+
email: { default: '' },
|
|
9
10
|
affiliations: { default: [] },
|
|
10
11
|
footnote: { default: undefined },
|
|
11
12
|
corresp: { default: undefined },
|
|
@@ -13,6 +14,7 @@ exports.contributor = {
|
|
|
13
14
|
userID: { default: undefined },
|
|
14
15
|
invitationID: { default: undefined },
|
|
15
16
|
isCorresponding: { default: undefined },
|
|
17
|
+
isJointContributor: { default: undefined },
|
|
16
18
|
ORCIDIdentifier: { default: undefined },
|
|
17
19
|
priority: { default: undefined },
|
|
18
20
|
dataTracked: { default: null },
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.tableElement = void 0;
|
|
19
19
|
exports.tableElement = {
|
|
20
|
-
content: '(table | placeholder)
|
|
20
|
+
content: '(table | placeholder) figcaption? table_element_footer? (listing | placeholder)',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
paragraphStyle: { default: '' },
|
|
@@ -564,7 +564,7 @@ class Decoder {
|
|
|
564
564
|
const comments = this.createCommentNodes(model);
|
|
565
565
|
comments.forEach((c) => this.comments.set(c.attrs.id, c));
|
|
566
566
|
const content = tableElementFooter
|
|
567
|
-
? [table,
|
|
567
|
+
? [table, figcaption, tableElementFooter]
|
|
568
568
|
: [table, figcaption];
|
|
569
569
|
if (model.listingID) {
|
|
570
570
|
const listing = this.createListing(model.listingID);
|
|
@@ -618,6 +618,8 @@ class Decoder {
|
|
|
618
618
|
addressLine3: model.addressLine3,
|
|
619
619
|
postCode: model.postCode,
|
|
620
620
|
country: model.country,
|
|
621
|
+
county: model.county,
|
|
622
|
+
city: model.city,
|
|
621
623
|
email: model.email,
|
|
622
624
|
department: model.department,
|
|
623
625
|
priority: model.priority,
|
|
@@ -629,6 +631,8 @@ class Decoder {
|
|
|
629
631
|
id: model._id,
|
|
630
632
|
role: model.role,
|
|
631
633
|
affiliations: model.affiliations,
|
|
634
|
+
email: model.email,
|
|
635
|
+
isJointContributor: model.isJointContributor,
|
|
632
636
|
bibliographicName: model.bibliographicName,
|
|
633
637
|
userID: model.userID,
|
|
634
638
|
invitationID: model.invitationID,
|
|
@@ -510,6 +510,8 @@ const encoders = {
|
|
|
510
510
|
addressLine3: node.attrs.addressLine3,
|
|
511
511
|
postCode: node.attrs.postCode,
|
|
512
512
|
country: node.attrs.country,
|
|
513
|
+
county: node.attrs.county,
|
|
514
|
+
city: node.attrs.city,
|
|
513
515
|
email: node.attrs.email,
|
|
514
516
|
priority: node.attrs.priority,
|
|
515
517
|
}),
|
|
@@ -520,6 +522,7 @@ const encoders = {
|
|
|
520
522
|
userID: node.attrs.userID,
|
|
521
523
|
invitationID: node.attrs.invitationID,
|
|
522
524
|
isCorresponding: node.attrs.isCorresponding,
|
|
525
|
+
isJointContributor: node.attrs.isJointContributor,
|
|
523
526
|
ORCIDIdentifier: node.attrs.ORCIDIdentifier,
|
|
524
527
|
footnote: node.attrs.footnote,
|
|
525
528
|
corresp: node.attrs.corresp,
|
|
@@ -3,6 +3,7 @@ export const contributor = {
|
|
|
3
3
|
attrs: {
|
|
4
4
|
id: { default: '' },
|
|
5
5
|
role: { default: '' },
|
|
6
|
+
email: { default: '' },
|
|
6
7
|
affiliations: { default: [] },
|
|
7
8
|
footnote: { default: undefined },
|
|
8
9
|
corresp: { default: undefined },
|
|
@@ -10,6 +11,7 @@ export const contributor = {
|
|
|
10
11
|
userID: { default: undefined },
|
|
11
12
|
invitationID: { default: undefined },
|
|
12
13
|
isCorresponding: { default: undefined },
|
|
14
|
+
isJointContributor: { default: undefined },
|
|
13
15
|
ORCIDIdentifier: { default: undefined },
|
|
14
16
|
priority: { default: undefined },
|
|
15
17
|
dataTracked: { default: null },
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export const tableElement = {
|
|
17
|
-
content: '(table | placeholder)
|
|
17
|
+
content: '(table | placeholder) figcaption? table_element_footer? (listing | placeholder)',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
20
|
paragraphStyle: { default: '' },
|
|
@@ -555,7 +555,7 @@ export class Decoder {
|
|
|
555
555
|
const comments = this.createCommentNodes(model);
|
|
556
556
|
comments.forEach((c) => this.comments.set(c.attrs.id, c));
|
|
557
557
|
const content = tableElementFooter
|
|
558
|
-
? [table,
|
|
558
|
+
? [table, figcaption, tableElementFooter]
|
|
559
559
|
: [table, figcaption];
|
|
560
560
|
if (model.listingID) {
|
|
561
561
|
const listing = this.createListing(model.listingID);
|
|
@@ -609,6 +609,8 @@ export class Decoder {
|
|
|
609
609
|
addressLine3: model.addressLine3,
|
|
610
610
|
postCode: model.postCode,
|
|
611
611
|
country: model.country,
|
|
612
|
+
county: model.county,
|
|
613
|
+
city: model.city,
|
|
612
614
|
email: model.email,
|
|
613
615
|
department: model.department,
|
|
614
616
|
priority: model.priority,
|
|
@@ -620,6 +622,8 @@ export class Decoder {
|
|
|
620
622
|
id: model._id,
|
|
621
623
|
role: model.role,
|
|
622
624
|
affiliations: model.affiliations,
|
|
625
|
+
email: model.email,
|
|
626
|
+
isJointContributor: model.isJointContributor,
|
|
623
627
|
bibliographicName: model.bibliographicName,
|
|
624
628
|
userID: model.userID,
|
|
625
629
|
invitationID: model.invitationID,
|
|
@@ -502,6 +502,8 @@ const encoders = {
|
|
|
502
502
|
addressLine3: node.attrs.addressLine3,
|
|
503
503
|
postCode: node.attrs.postCode,
|
|
504
504
|
country: node.attrs.country,
|
|
505
|
+
county: node.attrs.county,
|
|
506
|
+
city: node.attrs.city,
|
|
505
507
|
email: node.attrs.email,
|
|
506
508
|
priority: node.attrs.priority,
|
|
507
509
|
}),
|
|
@@ -512,6 +514,7 @@ const encoders = {
|
|
|
512
514
|
userID: node.attrs.userID,
|
|
513
515
|
invitationID: node.attrs.invitationID,
|
|
514
516
|
isCorresponding: node.attrs.isCorresponding,
|
|
517
|
+
isJointContributor: node.attrs.isJointContributor,
|
|
515
518
|
ORCIDIdentifier: node.attrs.ORCIDIdentifier,
|
|
516
519
|
footnote: node.attrs.footnote,
|
|
517
520
|
corresp: node.attrs.corresp,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
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:
|
|
7
|
+
affiliations: string[];
|
|
8
8
|
bibliographicName: BibliographicName;
|
|
9
9
|
userID: string;
|
|
10
|
+
email: string;
|
|
10
11
|
invitationID: string;
|
|
11
12
|
isCorresponding: boolean;
|
|
12
13
|
ORCIDIdentifier: string;
|
|
13
14
|
priority: number;
|
|
15
|
+
isJointContributor: boolean;
|
|
14
16
|
}
|
|
15
17
|
export interface ContributorNode extends ManuscriptNode {
|
|
16
18
|
attrs: Attrs;
|
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-
|
|
4
|
+
"version": "2.0.1-LEAN-3083-5",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -77,4 +77,4 @@
|
|
|
77
77
|
"rimraf": "^3.0.2",
|
|
78
78
|
"typescript": "^4.0.5"
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
}
|