@manuscripts/transform 4.3.34 → 4.3.36
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/jats/exporter/jats-exporter.js +6 -0
- package/dist/cjs/jats/importer/jats-dom-parser.js +2 -0
- package/dist/cjs/schema/migration/migration-scripts/{4.3.28.js → 4.3.34.js} +4 -4
- package/dist/cjs/schema/migration/migration-scripts/index.js +2 -2
- package/dist/cjs/schema/nodes/contributor.js +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/exporter/jats-exporter.js +6 -0
- package/dist/es/jats/importer/jats-dom-parser.js +2 -0
- package/dist/es/schema/migration/migration-scripts/{4.3.28.js → 4.3.34.js} +4 -4
- package/dist/es/schema/migration/migration-scripts/index.js +2 -2
- package/dist/es/schema/nodes/contributor.js +1 -0
- package/dist/es/version.js +1 -1
- package/dist/types/schema/migration/migration-scripts/{4.3.28.d.ts → 4.3.34.d.ts} +2 -2
- package/dist/types/schema/migration/migration-scripts/index.d.ts +2 -2
- package/dist/types/schema/nodes/contributor.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1020,6 +1020,12 @@ class JATSExporter {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
const $name = this.buildContributorName(contributor);
|
|
1022
1022
|
$contrib.appendChild($name);
|
|
1023
|
+
if (contributor.attrs.suffix) {
|
|
1024
|
+
this.appendElement($name, 'suffix', contributor.attrs.suffix);
|
|
1025
|
+
}
|
|
1026
|
+
contributor.attrs.degrees?.forEach((degree) => {
|
|
1027
|
+
this.appendElement($contrib, 'degrees', degree);
|
|
1028
|
+
});
|
|
1023
1029
|
if (contributor.attrs.email) {
|
|
1024
1030
|
this.appendElement($contrib, 'email', contributor.attrs.email);
|
|
1025
1031
|
}
|
|
@@ -406,6 +406,8 @@ class JATSDOMParser {
|
|
|
406
406
|
given: (0, utils_1.getTrimmedTextContent)(element, 'given-names'),
|
|
407
407
|
family: this.getSurname(element),
|
|
408
408
|
prefix: (0, utils_1.getTrimmedTextContent)(element, 'prefix'),
|
|
409
|
+
suffix: (0, utils_1.getTrimmedTextContent)(element, 'suffix'),
|
|
410
|
+
degrees: Array.from(element.querySelectorAll('degrees')).map((degree) => (0, utils_1.getTrimmedTextContent)(degree)) || [],
|
|
409
411
|
ORCID: (0, utils_1.getTrimmedTextContent)(element, 'contrib-id[contrib-id-type="orcid"]'),
|
|
410
412
|
creditRoles: (0, utils_1.getCreditRole)(element),
|
|
411
413
|
priority: this.parsePriority(element.getAttribute('priority')),
|
|
@@ -22,10 +22,10 @@ const CONFIG = {
|
|
|
22
22
|
location: { pos: 'start' },
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
|
-
class
|
|
25
|
+
class Migration4334 {
|
|
26
26
|
constructor() {
|
|
27
|
-
this.fromVersion = '4.3.
|
|
28
|
-
this.toVersion = '4.3.
|
|
27
|
+
this.fromVersion = '4.3.33';
|
|
28
|
+
this.toVersion = '4.3.34';
|
|
29
29
|
}
|
|
30
30
|
migrateNode(node) {
|
|
31
31
|
const config = CONFIG[node.type];
|
|
@@ -67,4 +67,4 @@ class Migration4328 {
|
|
|
67
67
|
return { ...node, content: cleanContent };
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
exports.default =
|
|
70
|
+
exports.default = Migration4334;
|
|
@@ -30,7 +30,7 @@ const _3_0_56_1 = __importDefault(require("./3.0.56"));
|
|
|
30
30
|
const _4_2_13_1 = __importDefault(require("./4.2.13"));
|
|
31
31
|
const _4_2_15_1 = __importDefault(require("./4.2.15"));
|
|
32
32
|
const _4_3_23_1 = __importDefault(require("./4.3.23"));
|
|
33
|
-
const
|
|
33
|
+
const _4_3_34_1 = __importDefault(require("./4.3.34"));
|
|
34
34
|
const migrations = [
|
|
35
35
|
new _1_2_5_1.default(),
|
|
36
36
|
new _2_3_22_1.default(),
|
|
@@ -44,6 +44,6 @@ const migrations = [
|
|
|
44
44
|
new _4_2_13_1.default(),
|
|
45
45
|
new _4_2_15_1.default(),
|
|
46
46
|
new _4_3_23_1.default(),
|
|
47
|
-
new
|
|
47
|
+
new _4_3_34_1.default(),
|
|
48
48
|
];
|
|
49
49
|
exports.default = migrations;
|
|
@@ -14,6 +14,7 @@ exports.contributor = {
|
|
|
14
14
|
family: { default: undefined },
|
|
15
15
|
prefix: { default: undefined },
|
|
16
16
|
suffix: { default: undefined },
|
|
17
|
+
degrees: { default: [] },
|
|
17
18
|
email: { default: undefined },
|
|
18
19
|
ORCID: { default: undefined },
|
|
19
20
|
isCorresponding: { default: false },
|
package/dist/cjs/version.js
CHANGED
|
@@ -980,6 +980,12 @@ export class JATSExporter {
|
|
|
980
980
|
}
|
|
981
981
|
const $name = this.buildContributorName(contributor);
|
|
982
982
|
$contrib.appendChild($name);
|
|
983
|
+
if (contributor.attrs.suffix) {
|
|
984
|
+
this.appendElement($name, 'suffix', contributor.attrs.suffix);
|
|
985
|
+
}
|
|
986
|
+
contributor.attrs.degrees?.forEach((degree) => {
|
|
987
|
+
this.appendElement($contrib, 'degrees', degree);
|
|
988
|
+
});
|
|
983
989
|
if (contributor.attrs.email) {
|
|
984
990
|
this.appendElement($contrib, 'email', contributor.attrs.email);
|
|
985
991
|
}
|
|
@@ -403,6 +403,8 @@ export class JATSDOMParser {
|
|
|
403
403
|
given: getTrimmedTextContent(element, 'given-names'),
|
|
404
404
|
family: this.getSurname(element),
|
|
405
405
|
prefix: getTrimmedTextContent(element, 'prefix'),
|
|
406
|
+
suffix: getTrimmedTextContent(element, 'suffix'),
|
|
407
|
+
degrees: Array.from(element.querySelectorAll('degrees')).map((degree) => getTrimmedTextContent(degree)) || [],
|
|
406
408
|
ORCID: getTrimmedTextContent(element, 'contrib-id[contrib-id-type="orcid"]'),
|
|
407
409
|
creditRoles: getCreditRole(element),
|
|
408
410
|
priority: this.parsePriority(element.getAttribute('priority')),
|
|
@@ -20,10 +20,10 @@ const CONFIG = {
|
|
|
20
20
|
location: { pos: 'start' },
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
|
-
class
|
|
23
|
+
class Migration4334 {
|
|
24
24
|
constructor() {
|
|
25
|
-
this.fromVersion = '4.3.
|
|
26
|
-
this.toVersion = '4.3.
|
|
25
|
+
this.fromVersion = '4.3.33';
|
|
26
|
+
this.toVersion = '4.3.34';
|
|
27
27
|
}
|
|
28
28
|
migrateNode(node) {
|
|
29
29
|
const config = CONFIG[node.type];
|
|
@@ -65,4 +65,4 @@ class Migration4328 {
|
|
|
65
65
|
return { ...node, content: cleanContent };
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
export default
|
|
68
|
+
export default Migration4334;
|
|
@@ -25,7 +25,7 @@ import Migration3056 from './3.0.56';
|
|
|
25
25
|
import Migration4213 from './4.2.13';
|
|
26
26
|
import Migration4215 from './4.2.15';
|
|
27
27
|
import Migration4323 from './4.3.23';
|
|
28
|
-
import
|
|
28
|
+
import Migration4334 from './4.3.34';
|
|
29
29
|
const migrations = [
|
|
30
30
|
new Migration125(),
|
|
31
31
|
new Migration2322(),
|
|
@@ -39,6 +39,6 @@ const migrations = [
|
|
|
39
39
|
new Migration4213(),
|
|
40
40
|
new Migration4215(),
|
|
41
41
|
new Migration4323(),
|
|
42
|
-
new
|
|
42
|
+
new Migration4334(),
|
|
43
43
|
];
|
|
44
44
|
export default migrations;
|
|
@@ -11,6 +11,7 @@ export const contributor = {
|
|
|
11
11
|
family: { default: undefined },
|
|
12
12
|
prefix: { default: undefined },
|
|
13
13
|
suffix: { default: undefined },
|
|
14
|
+
degrees: { default: [] },
|
|
14
15
|
email: { default: undefined },
|
|
15
16
|
ORCID: { default: undefined },
|
|
16
17
|
isCorresponding: { default: false },
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "4.3.
|
|
1
|
+
export const VERSION = "4.3.36";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSONProsemirrorNode } from '../../../types';
|
|
2
2
|
import { MigrationScript } from '../migration-script';
|
|
3
|
-
declare class
|
|
3
|
+
declare class Migration4334 implements MigrationScript {
|
|
4
4
|
fromVersion: string;
|
|
5
5
|
toVersion: string;
|
|
6
6
|
migrateNode(node: JSONProsemirrorNode): JSONProsemirrorNode;
|
|
7
7
|
}
|
|
8
|
-
export default
|
|
8
|
+
export default Migration4334;
|
|
@@ -25,6 +25,6 @@ import Migration3056 from './3.0.56';
|
|
|
25
25
|
import Migration4213 from './4.2.13';
|
|
26
26
|
import Migration4215 from './4.2.15';
|
|
27
27
|
import Migration4323 from './4.3.23';
|
|
28
|
-
import
|
|
29
|
-
declare const migrations: (Migration125 | Migration2322 | Migration3012 | Migration3021 | Migration3030 | Migration3031 | Migration3041 | Migration3055 | Migration3056 | Migration4213 | Migration4215 | Migration4323 |
|
|
28
|
+
import Migration4334 from './4.3.34';
|
|
29
|
+
declare const migrations: (Migration125 | Migration2322 | Migration3012 | Migration3021 | Migration3030 | Migration3031 | Migration3041 | Migration3055 | Migration3056 | Migration4213 | Migration4215 | Migration4323 | Migration4334)[];
|
|
30
30
|
export default migrations;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.3.
|
|
1
|
+
export declare const VERSION = "4.3.36";
|
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": "4.3.
|
|
4
|
+
"version": "4.3.36",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|