@manuscripts/transform 2.1.0 → 2.1.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.
- package/dist/cjs/schema/nodes/affiliation.js +4 -1
- package/dist/cjs/schema/nodes/contributor.js +3 -1
- package/dist/cjs/transformer/decode.js +4 -0
- package/dist/cjs/transformer/encode.js +4 -0
- package/dist/es/schema/nodes/affiliation.js +4 -1
- package/dist/es/schema/nodes/contributor.js +3 -1
- package/dist/es/transformer/decode.js +4 -0
- package/dist/es/transformer/encode.js +4 -0
- package/dist/types/schema/nodes/affiliation.d.ts +2 -0
- package/dist/types/schema/nodes/contributor.d.ts +4 -2
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isAffiliationNode = exports.affiliation = void 0;
|
|
4
4
|
exports.affiliation = {
|
|
5
|
+
content: 'inline*',
|
|
5
6
|
attrs: {
|
|
6
7
|
id: { default: '' },
|
|
7
8
|
institution: { default: '' },
|
|
@@ -11,6 +12,8 @@ exports.affiliation = {
|
|
|
11
12
|
addressLine3: { default: '' },
|
|
12
13
|
postCode: { default: '' },
|
|
13
14
|
country: { default: '' },
|
|
15
|
+
county: { default: '' },
|
|
16
|
+
city: { default: '' },
|
|
14
17
|
priority: { default: undefined },
|
|
15
18
|
email: {
|
|
16
19
|
default: {
|
|
@@ -20,7 +23,7 @@ exports.affiliation = {
|
|
|
20
23
|
},
|
|
21
24
|
dataTracked: { default: null },
|
|
22
25
|
},
|
|
23
|
-
group: 'block
|
|
26
|
+
group: 'block',
|
|
24
27
|
parseDOM: [
|
|
25
28
|
{
|
|
26
29
|
tag: 'div.affiliation',
|
|
@@ -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,12 +14,13 @@ 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 },
|
|
19
21
|
contents: { default: '' },
|
|
20
22
|
},
|
|
21
|
-
group: 'block
|
|
23
|
+
group: 'block',
|
|
22
24
|
toDOM: (node) => {
|
|
23
25
|
const contributorNode = node;
|
|
24
26
|
return [
|
|
@@ -628,6 +628,8 @@ class Decoder {
|
|
|
628
628
|
addressLine3: model.addressLine3,
|
|
629
629
|
postCode: model.postCode,
|
|
630
630
|
country: model.country,
|
|
631
|
+
county: model.county,
|
|
632
|
+
city: model.city,
|
|
631
633
|
email: model.email,
|
|
632
634
|
department: model.department,
|
|
633
635
|
priority: model.priority,
|
|
@@ -639,6 +641,8 @@ class Decoder {
|
|
|
639
641
|
id: model._id,
|
|
640
642
|
role: model.role,
|
|
641
643
|
affiliations: model.affiliations,
|
|
644
|
+
email: model.email,
|
|
645
|
+
isJointContributor: model.isJointContributor,
|
|
642
646
|
bibliographicName: model.bibliographicName,
|
|
643
647
|
userID: model.userID,
|
|
644
648
|
invitationID: model.invitationID,
|
|
@@ -508,8 +508,11 @@ const encoders = {
|
|
|
508
508
|
addressLine1: node.attrs.addressLine1,
|
|
509
509
|
addressLine2: node.attrs.addressLine2,
|
|
510
510
|
addressLine3: node.attrs.addressLine3,
|
|
511
|
+
department: node.attrs.department,
|
|
511
512
|
postCode: node.attrs.postCode,
|
|
512
513
|
country: node.attrs.country,
|
|
514
|
+
county: node.attrs.county,
|
|
515
|
+
city: node.attrs.city,
|
|
513
516
|
email: node.attrs.email,
|
|
514
517
|
priority: node.attrs.priority,
|
|
515
518
|
}),
|
|
@@ -520,6 +523,7 @@ const encoders = {
|
|
|
520
523
|
userID: node.attrs.userID,
|
|
521
524
|
invitationID: node.attrs.invitationID,
|
|
522
525
|
isCorresponding: node.attrs.isCorresponding,
|
|
526
|
+
isJointContributor: node.attrs.isJointContributor,
|
|
523
527
|
ORCIDIdentifier: node.attrs.ORCIDIdentifier,
|
|
524
528
|
footnote: node.attrs.footnote,
|
|
525
529
|
corresp: node.attrs.corresp,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const affiliation = {
|
|
2
|
+
content: 'inline*',
|
|
2
3
|
attrs: {
|
|
3
4
|
id: { default: '' },
|
|
4
5
|
institution: { default: '' },
|
|
@@ -8,6 +9,8 @@ export const affiliation = {
|
|
|
8
9
|
addressLine3: { default: '' },
|
|
9
10
|
postCode: { default: '' },
|
|
10
11
|
country: { default: '' },
|
|
12
|
+
county: { default: '' },
|
|
13
|
+
city: { default: '' },
|
|
11
14
|
priority: { default: undefined },
|
|
12
15
|
email: {
|
|
13
16
|
default: {
|
|
@@ -17,7 +20,7 @@ export const affiliation = {
|
|
|
17
20
|
},
|
|
18
21
|
dataTracked: { default: null },
|
|
19
22
|
},
|
|
20
|
-
group: 'block
|
|
23
|
+
group: 'block',
|
|
21
24
|
parseDOM: [
|
|
22
25
|
{
|
|
23
26
|
tag: 'div.affiliation',
|
|
@@ -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,12 +11,13 @@ 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 },
|
|
16
18
|
contents: { default: '' },
|
|
17
19
|
},
|
|
18
|
-
group: 'block
|
|
20
|
+
group: 'block',
|
|
19
21
|
toDOM: (node) => {
|
|
20
22
|
const contributorNode = node;
|
|
21
23
|
return [
|
|
@@ -619,6 +619,8 @@ export class Decoder {
|
|
|
619
619
|
addressLine3: model.addressLine3,
|
|
620
620
|
postCode: model.postCode,
|
|
621
621
|
country: model.country,
|
|
622
|
+
county: model.county,
|
|
623
|
+
city: model.city,
|
|
622
624
|
email: model.email,
|
|
623
625
|
department: model.department,
|
|
624
626
|
priority: model.priority,
|
|
@@ -630,6 +632,8 @@ export class Decoder {
|
|
|
630
632
|
id: model._id,
|
|
631
633
|
role: model.role,
|
|
632
634
|
affiliations: model.affiliations,
|
|
635
|
+
email: model.email,
|
|
636
|
+
isJointContributor: model.isJointContributor,
|
|
633
637
|
bibliographicName: model.bibliographicName,
|
|
634
638
|
userID: model.userID,
|
|
635
639
|
invitationID: model.invitationID,
|
|
@@ -500,8 +500,11 @@ const encoders = {
|
|
|
500
500
|
addressLine1: node.attrs.addressLine1,
|
|
501
501
|
addressLine2: node.attrs.addressLine2,
|
|
502
502
|
addressLine3: node.attrs.addressLine3,
|
|
503
|
+
department: node.attrs.department,
|
|
503
504
|
postCode: node.attrs.postCode,
|
|
504
505
|
country: node.attrs.country,
|
|
506
|
+
county: node.attrs.county,
|
|
507
|
+
city: node.attrs.city,
|
|
505
508
|
email: node.attrs.email,
|
|
506
509
|
priority: node.attrs.priority,
|
|
507
510
|
}),
|
|
@@ -512,6 +515,7 @@ const encoders = {
|
|
|
512
515
|
userID: node.attrs.userID,
|
|
513
516
|
invitationID: node.attrs.invitationID,
|
|
514
517
|
isCorresponding: node.attrs.isCorresponding,
|
|
518
|
+
isJointContributor: node.attrs.isJointContributor,
|
|
515
519
|
ORCIDIdentifier: node.attrs.ORCIDIdentifier,
|
|
516
520
|
footnote: node.attrs.footnote,
|
|
517
521
|
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.1.
|
|
4
|
+
"version": "2.1.1",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|