@manuscripts/transform 3.0.13 → 3.0.14-LEAN-3961.0
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.14.js +25 -0
- package/dist/cjs/schema/migration/migration-scripts/index.js +6 -1
- 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.14.js +23 -0
- package/dist/es/schema/migration/migration-scripts/index.js +6 -1
- 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.14.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 -268
- package/dist/es/lib/table-cell-styles.js +0 -47
- package/dist/es/transformer/section-category.js +0 -254
- 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
|
},
|
|
@@ -1238,7 +1238,7 @@ class JATSExporter {
|
|
|
1238
1238
|
break;
|
|
1239
1239
|
}
|
|
1240
1240
|
case 'table': {
|
|
1241
|
-
this.fixTable(childNode
|
|
1241
|
+
this.fixTable(childNode);
|
|
1242
1242
|
break;
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
@@ -1259,7 +1259,7 @@ class JATSExporter {
|
|
|
1259
1259
|
node.replaceWith(clone);
|
|
1260
1260
|
return clone;
|
|
1261
1261
|
};
|
|
1262
|
-
this.fixTable = (table
|
|
1262
|
+
this.fixTable = (table) => {
|
|
1263
1263
|
let tbody;
|
|
1264
1264
|
Array.from(table.childNodes).forEach((child) => {
|
|
1265
1265
|
if (child instanceof Element && child.tagName.toLowerCase() === 'tbody') {
|
|
@@ -1386,7 +1386,7 @@ class JATSExporter {
|
|
|
1386
1386
|
if (availabilitySection) {
|
|
1387
1387
|
back.insertBefore(availabilitySection, back.firstChild);
|
|
1388
1388
|
}
|
|
1389
|
-
const section = body.querySelector('sec[sec-type="
|
|
1389
|
+
const section = body.querySelector('sec[sec-type="acknowledgements"]');
|
|
1390
1390
|
if (section) {
|
|
1391
1391
|
const ack = this.document.createElement('ack');
|
|
1392
1392
|
while (section.firstChild) {
|
|
@@ -1423,7 +1423,7 @@ class JATSExporter {
|
|
|
1423
1423
|
'supported-by',
|
|
1424
1424
|
'financial-disclosure',
|
|
1425
1425
|
'ethics-statement',
|
|
1426
|
-
'
|
|
1426
|
+
'coi-statement',
|
|
1427
1427
|
];
|
|
1428
1428
|
const sections = body.querySelectorAll('sec');
|
|
1429
1429
|
for (const currentSection of sections) {
|
|
@@ -1574,7 +1574,7 @@ class JATSExporter {
|
|
|
1574
1574
|
const fnGroups = back.querySelectorAll('fn-group');
|
|
1575
1575
|
fnGroups.forEach((fnGroup) => {
|
|
1576
1576
|
if (fnGroup) {
|
|
1577
|
-
const coiStatement = fnGroup.querySelector('fn[fn-type="
|
|
1577
|
+
const coiStatement = fnGroup.querySelector('fn[fn-type="coi-statement"]');
|
|
1578
1578
|
if (coiStatement) {
|
|
1579
1579
|
const authorNotes = this.document.createElement('author-notes');
|
|
1580
1580
|
authorNotes.append(coiStatement);
|
|
@@ -1616,7 +1616,7 @@ class JATSExporter {
|
|
|
1616
1616
|
footnotes.forEach((fn) => {
|
|
1617
1617
|
const fnType = fn.getAttribute('fn-type');
|
|
1618
1618
|
if (fnType) {
|
|
1619
|
-
fn.setAttribute('fn-type',
|
|
1619
|
+
fn.setAttribute('fn-type', fnType);
|
|
1620
1620
|
}
|
|
1621
1621
|
});
|
|
1622
1622
|
}
|