@manuscripts/transform 3.0.14 → 3.0.15-LEAN-3961.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/index.js +1 -2
- package/dist/cjs/jats/exporter/jats-exporter.js +7 -7
- package/dist/cjs/jats/importer/jats-dom-parser.js +969 -949
- package/dist/cjs/jats/importer/jats-transformations.js +9 -14
- package/dist/cjs/jats/importer/parse-jats-article.js +7 -5
- package/dist/cjs/lib/{section-group-type.js → section-categories.js} +4 -14
- package/dist/cjs/schema/migration/migration-scripts/3.0.15.js +25 -0
- package/dist/cjs/schema/migration/migration-scripts/index.js +2 -0
- package/dist/cjs/transformer/index.js +0 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/index.js +1 -2
- package/dist/es/jats/exporter/jats-exporter.js +8 -8
- package/dist/es/jats/importer/jats-dom-parser.js +967 -948
- package/dist/es/jats/importer/jats-transformations.js +9 -14
- package/dist/es/jats/importer/parse-jats-article.js +8 -6
- package/dist/es/lib/{section-group-type.js → section-categories.js} +2 -13
- package/dist/es/schema/migration/migration-scripts/3.0.15.js +23 -0
- package/dist/es/schema/migration/migration-scripts/index.js +2 -0
- package/dist/es/transformer/index.js +0 -1
- package/dist/es/version.js +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/jats/importer/jats-dom-parser.d.ts +24 -9
- package/dist/types/jats/importer/jats-transformations.d.ts +2 -1
- package/dist/types/jats/importer/parse-jats-article.d.ts +2 -2
- package/dist/types/lib/{section-group-type.d.ts → section-categories.d.ts} +3 -9
- package/dist/types/schema/migration/migration-scripts/3.0.15.d.ts +9 -0
- package/dist/types/schema/migration/migration-scripts/index.d.ts +2 -1
- package/dist/types/schema/types.d.ts +21 -1
- package/dist/types/transformer/index.d.ts +0 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/lib/table-cell-styles.js +0 -52
- package/dist/cjs/transformer/section-category.js +0 -263
- package/dist/es/lib/table-cell-styles.js +0 -47
- package/dist/es/transformer/section-category.js +0 -249
- package/dist/types/lib/table-cell-styles.d.ts +0 -27
- package/dist/types/transformer/section-category.d.ts +0 -31
package/dist/cjs/index.js
CHANGED
|
@@ -20,10 +20,9 @@ var getVersion_1 = require("./getVersion");
|
|
|
20
20
|
Object.defineProperty(exports, "getVersion", { enumerable: true, get: function () { return getVersion_1.getVersion; } });
|
|
21
21
|
__exportStar(require("./jats"), exports);
|
|
22
22
|
__exportStar(require("./jats/types"), exports);
|
|
23
|
-
__exportStar(require("./lib/section-group-type"), exports);
|
|
24
|
-
__exportStar(require("./lib/table-cell-styles"), exports);
|
|
25
23
|
__exportStar(require("./lib/footnotes"), exports);
|
|
26
24
|
__exportStar(require("./lib/utils"), exports);
|
|
25
|
+
__exportStar(require("./lib/section-categories"), exports);
|
|
27
26
|
__exportStar(require("./schema"), exports);
|
|
28
27
|
var migrate_1 = require("./schema/migration/migrate");
|
|
29
28
|
Object.defineProperty(exports, "migrateFor", { enumerable: true, get: function () { return migrate_1.migrateFor; } });
|
|
@@ -784,7 +784,7 @@ class JATSExporter {
|
|
|
784
784
|
id: normalizeID(node.attrs.id),
|
|
785
785
|
};
|
|
786
786
|
if (node.attrs.category) {
|
|
787
|
-
attrs['sec-type'] =
|
|
787
|
+
attrs['sec-type'] = node.attrs.category;
|
|
788
788
|
}
|
|
789
789
|
return ['sec', attrs, 0];
|
|
790
790
|
},
|
|
@@ -1236,7 +1236,7 @@ class JATSExporter {
|
|
|
1236
1236
|
break;
|
|
1237
1237
|
}
|
|
1238
1238
|
case 'table': {
|
|
1239
|
-
this.fixTable(childNode
|
|
1239
|
+
this.fixTable(childNode);
|
|
1240
1240
|
break;
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
@@ -1257,7 +1257,7 @@ class JATSExporter {
|
|
|
1257
1257
|
node.replaceWith(clone);
|
|
1258
1258
|
return clone;
|
|
1259
1259
|
};
|
|
1260
|
-
this.fixTable = (table
|
|
1260
|
+
this.fixTable = (table) => {
|
|
1261
1261
|
let tbody;
|
|
1262
1262
|
Array.from(table.childNodes).forEach((child) => {
|
|
1263
1263
|
if (child instanceof Element && child.tagName.toLowerCase() === 'tbody') {
|
|
@@ -1384,7 +1384,7 @@ class JATSExporter {
|
|
|
1384
1384
|
if (availabilitySection) {
|
|
1385
1385
|
back.insertBefore(availabilitySection, back.firstChild);
|
|
1386
1386
|
}
|
|
1387
|
-
const section = body.querySelector('sec[sec-type="
|
|
1387
|
+
const section = body.querySelector('sec[sec-type="acknowledgements"]');
|
|
1388
1388
|
if (section) {
|
|
1389
1389
|
const ack = this.document.createElement('ack');
|
|
1390
1390
|
while (section.firstChild) {
|
|
@@ -1421,7 +1421,7 @@ class JATSExporter {
|
|
|
1421
1421
|
'supported-by',
|
|
1422
1422
|
'financial-disclosure',
|
|
1423
1423
|
'ethics-statement',
|
|
1424
|
-
'
|
|
1424
|
+
'coi-statement',
|
|
1425
1425
|
];
|
|
1426
1426
|
const sections = body.querySelectorAll('sec');
|
|
1427
1427
|
for (const currentSection of sections) {
|
|
@@ -1572,7 +1572,7 @@ class JATSExporter {
|
|
|
1572
1572
|
const fnGroups = back.querySelectorAll('fn-group');
|
|
1573
1573
|
fnGroups.forEach((fnGroup) => {
|
|
1574
1574
|
if (fnGroup) {
|
|
1575
|
-
const coiStatement = fnGroup.querySelector('fn[fn-type="
|
|
1575
|
+
const coiStatement = fnGroup.querySelector('fn[fn-type="coi-statement"]');
|
|
1576
1576
|
if (coiStatement) {
|
|
1577
1577
|
const authorNotes = this.document.createElement('author-notes');
|
|
1578
1578
|
authorNotes.append(coiStatement);
|
|
@@ -1614,7 +1614,7 @@ class JATSExporter {
|
|
|
1614
1614
|
footnotes.forEach((fn) => {
|
|
1615
1615
|
const fnType = fn.getAttribute('fn-type');
|
|
1616
1616
|
if (fnType) {
|
|
1617
|
-
fn.setAttribute('fn-type',
|
|
1617
|
+
fn.setAttribute('fn-type', fnType);
|
|
1618
1618
|
}
|
|
1619
1619
|
});
|
|
1620
1620
|
}
|