@manuscripts/transform 3.0.41 → 3.0.42
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 +5 -5
- package/dist/cjs/schema/migration/migration-scripts/{3.0.38.js → 3.0.41.js} +4 -4
- package/dist/cjs/schema/migration/migration-scripts/index.js +2 -2
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/exporter/jats-exporter.js +5 -5
- package/dist/es/schema/migration/migration-scripts/{3.0.38.js → 3.0.41.js} +4 -4
- package/dist/es/schema/migration/migration-scripts/index.js +2 -2
- package/dist/es/version.js +1 -1
- package/dist/types/schema/migration/migration-scripts/{3.0.38.d.ts → 3.0.41.d.ts} +2 -2
- package/dist/types/schema/migration/migration-scripts/index.d.ts +2 -2
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -343,16 +343,16 @@ class JATSExporter {
|
|
|
343
343
|
if (!journalMeta.hasChildNodes()) {
|
|
344
344
|
journalMeta.remove();
|
|
345
345
|
}
|
|
346
|
-
const
|
|
347
|
-
|
|
346
|
+
const selfUriAttachments = (0, prosemirror_utils_1.findChildrenByType)(this.manuscriptNode, schema_1.schema.nodes.attachment).map((r) => r.node);
|
|
347
|
+
selfUriAttachments.forEach((attachment) => {
|
|
348
348
|
const selfUriElement = this.document.createElement('self-uri');
|
|
349
|
-
selfUriElement.setAttribute('content-type',
|
|
350
|
-
selfUriElement.setAttributeNS(XLINK_NAMESPACE, 'href',
|
|
349
|
+
selfUriElement.setAttribute('content-type', attachment.attrs.type);
|
|
350
|
+
selfUriElement.setAttributeNS(XLINK_NAMESPACE, 'href', attachment.attrs.href);
|
|
351
351
|
const insertBeforeElements = articleMeta.querySelector('related-article, related-object, abstract, trans-abstract, kwd-group, funding-group, support-group, conference, counts, custom-meta-group');
|
|
352
352
|
insertBeforeElements
|
|
353
353
|
? articleMeta.insertBefore(selfUriElement, insertBeforeElements)
|
|
354
354
|
: articleMeta.appendChild(selfUriElement);
|
|
355
|
-
}
|
|
355
|
+
});
|
|
356
356
|
return front;
|
|
357
357
|
};
|
|
358
358
|
this.buildDateElement = (timestamp, type) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class
|
|
3
|
+
class Migration3041 {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.fromVersion = '3.0.
|
|
6
|
-
this.toVersion = '3.0.
|
|
5
|
+
this.fromVersion = '3.0.40';
|
|
6
|
+
this.toVersion = '3.0.41';
|
|
7
7
|
}
|
|
8
8
|
migrateNode(node) {
|
|
9
9
|
if (node.type === 'graphical_abstract_section') {
|
|
@@ -12,4 +12,4 @@ class Migration3038 {
|
|
|
12
12
|
return node;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
exports.default =
|
|
15
|
+
exports.default = Migration3041;
|
|
@@ -24,7 +24,7 @@ const _3_0_12_1 = require("./3.0.12");
|
|
|
24
24
|
const _3_0_21_1 = __importDefault(require("./3.0.21"));
|
|
25
25
|
const _3_0_30_1 = __importDefault(require("./3.0.30"));
|
|
26
26
|
const _3_0_31_1 = __importDefault(require("./3.0.31"));
|
|
27
|
-
const
|
|
27
|
+
const _3_0_41_1 = __importDefault(require("./3.0.41"));
|
|
28
28
|
const migrations = [
|
|
29
29
|
new _1_2_5_1.default(),
|
|
30
30
|
new _2_3_22_1.default(),
|
|
@@ -32,6 +32,6 @@ const migrations = [
|
|
|
32
32
|
new _3_0_21_1.default(),
|
|
33
33
|
new _3_0_30_1.default(),
|
|
34
34
|
new _3_0_31_1.default(),
|
|
35
|
-
new
|
|
35
|
+
new _3_0_41_1.default(),
|
|
36
36
|
];
|
|
37
37
|
exports.default = migrations;
|
package/dist/cjs/version.js
CHANGED
|
@@ -335,16 +335,16 @@ export class JATSExporter {
|
|
|
335
335
|
if (!journalMeta.hasChildNodes()) {
|
|
336
336
|
journalMeta.remove();
|
|
337
337
|
}
|
|
338
|
-
const
|
|
339
|
-
|
|
338
|
+
const selfUriAttachments = findChildrenByType(this.manuscriptNode, schema.nodes.attachment).map((r) => r.node);
|
|
339
|
+
selfUriAttachments.forEach((attachment) => {
|
|
340
340
|
const selfUriElement = this.document.createElement('self-uri');
|
|
341
|
-
selfUriElement.setAttribute('content-type',
|
|
342
|
-
selfUriElement.setAttributeNS(XLINK_NAMESPACE, 'href',
|
|
341
|
+
selfUriElement.setAttribute('content-type', attachment.attrs.type);
|
|
342
|
+
selfUriElement.setAttributeNS(XLINK_NAMESPACE, 'href', attachment.attrs.href);
|
|
343
343
|
const insertBeforeElements = articleMeta.querySelector('related-article, related-object, abstract, trans-abstract, kwd-group, funding-group, support-group, conference, counts, custom-meta-group');
|
|
344
344
|
insertBeforeElements
|
|
345
345
|
? articleMeta.insertBefore(selfUriElement, insertBeforeElements)
|
|
346
346
|
: articleMeta.appendChild(selfUriElement);
|
|
347
|
-
}
|
|
347
|
+
});
|
|
348
348
|
return front;
|
|
349
349
|
};
|
|
350
350
|
this.buildDateElement = (timestamp, type) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Migration3041 {
|
|
2
2
|
constructor() {
|
|
3
|
-
this.fromVersion = '3.0.
|
|
4
|
-
this.toVersion = '3.0.
|
|
3
|
+
this.fromVersion = '3.0.40';
|
|
4
|
+
this.toVersion = '3.0.41';
|
|
5
5
|
}
|
|
6
6
|
migrateNode(node) {
|
|
7
7
|
if (node.type === 'graphical_abstract_section') {
|
|
@@ -10,4 +10,4 @@ class Migration3038 {
|
|
|
10
10
|
return node;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export default
|
|
13
|
+
export default Migration3041;
|
|
@@ -19,7 +19,7 @@ import { Migration3012 } from './3.0.12';
|
|
|
19
19
|
import Migration3021 from './3.0.21';
|
|
20
20
|
import Migration3030 from './3.0.30';
|
|
21
21
|
import Migration3031 from './3.0.31';
|
|
22
|
-
import
|
|
22
|
+
import Migration3041 from './3.0.41';
|
|
23
23
|
const migrations = [
|
|
24
24
|
new Migration125(),
|
|
25
25
|
new Migration2322(),
|
|
@@ -27,6 +27,6 @@ const migrations = [
|
|
|
27
27
|
new Migration3021(),
|
|
28
28
|
new Migration3030(),
|
|
29
29
|
new Migration3031(),
|
|
30
|
-
new
|
|
30
|
+
new Migration3041(),
|
|
31
31
|
];
|
|
32
32
|
export default migrations;
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.
|
|
1
|
+
export const VERSION = "3.0.42";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSONNode } from '../migrate';
|
|
2
2
|
import { MigrationScript } from '../migration-script';
|
|
3
|
-
declare class
|
|
3
|
+
declare class Migration3041 implements MigrationScript {
|
|
4
4
|
fromVersion: string;
|
|
5
5
|
toVersion: string;
|
|
6
6
|
migrateNode(node: JSONNode): JSONNode;
|
|
7
7
|
}
|
|
8
|
-
export default
|
|
8
|
+
export default Migration3041;
|
|
@@ -19,6 +19,6 @@ import { Migration3012 } from './3.0.12';
|
|
|
19
19
|
import Migration3021 from './3.0.21';
|
|
20
20
|
import Migration3030 from './3.0.30';
|
|
21
21
|
import Migration3031 from './3.0.31';
|
|
22
|
-
import
|
|
23
|
-
declare const migrations: (Migration125 | Migration2322 | Migration3012 | Migration3021 | Migration3030 | Migration3031 |
|
|
22
|
+
import Migration3041 from './3.0.41';
|
|
23
|
+
declare const migrations: (Migration125 | Migration2322 | Migration3012 | Migration3021 | Migration3030 | Migration3031 | Migration3041)[];
|
|
24
24
|
export default migrations;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.
|
|
1
|
+
export declare const VERSION = "3.0.42";
|
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": "3.0.
|
|
4
|
+
"version": "3.0.42",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|