@manuscripts/transform 3.0.21-LEAN-4076.1 → 3.0.21

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.
Files changed (40) hide show
  1. package/dist/cjs/index.js +1 -2
  2. package/dist/cjs/jats/exporter/jats-exporter.js +7 -7
  3. package/dist/cjs/jats/importer/jats-dom-parser.js +972 -948
  4. package/dist/cjs/jats/importer/jats-transformations.js +9 -14
  5. package/dist/cjs/jats/importer/parse-jats-article.js +7 -5
  6. package/dist/cjs/lib/{section-group-type.js → section-categories.js} +4 -14
  7. package/dist/cjs/schema/index.js +0 -2
  8. package/dist/cjs/schema/migration/migration-scripts/3.0.21.js +25 -0
  9. package/dist/cjs/schema/migration/migration-scripts/index.js +2 -0
  10. package/dist/cjs/transformer/index.js +0 -1
  11. package/dist/cjs/version.js +1 -1
  12. package/dist/es/index.js +1 -2
  13. package/dist/es/jats/exporter/jats-exporter.js +8 -8
  14. package/dist/es/jats/importer/jats-dom-parser.js +970 -947
  15. package/dist/es/jats/importer/jats-transformations.js +9 -14
  16. package/dist/es/jats/importer/parse-jats-article.js +8 -6
  17. package/dist/es/lib/{section-group-type.js → section-categories.js} +2 -13
  18. package/dist/es/schema/index.js +0 -2
  19. package/dist/es/schema/migration/migration-scripts/3.0.21.js +23 -0
  20. package/dist/es/schema/migration/migration-scripts/index.js +2 -0
  21. package/dist/es/transformer/index.js +0 -1
  22. package/dist/es/version.js +1 -1
  23. package/dist/types/index.d.ts +1 -2
  24. package/dist/types/jats/importer/jats-dom-parser.d.ts +24 -9
  25. package/dist/types/jats/importer/jats-transformations.d.ts +2 -1
  26. package/dist/types/jats/importer/parse-jats-article.d.ts +2 -2
  27. package/dist/types/lib/{section-group-type.d.ts → section-categories.d.ts} +3 -9
  28. package/dist/types/schema/index.d.ts +0 -2
  29. package/dist/types/schema/migration/migration-scripts/3.0.21.d.ts +9 -0
  30. package/dist/types/schema/migration/migration-scripts/index.d.ts +2 -1
  31. package/dist/types/schema/types.d.ts +21 -1
  32. package/dist/types/transformer/index.d.ts +0 -1
  33. package/dist/types/version.d.ts +1 -1
  34. package/package.json +1 -1
  35. package/dist/cjs/lib/table-cell-styles.js +0 -52
  36. package/dist/cjs/transformer/section-category.js +0 -263
  37. package/dist/es/lib/table-cell-styles.js +0 -47
  38. package/dist/es/transformer/section-category.js +0 -249
  39. package/dist/types/lib/table-cell-styles.d.ts +0 -27
  40. 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'] = (0, transformer_1.chooseSecType)(node.attrs.category);
787
+ attrs['sec-type'] = node.attrs.category;
788
788
  }
789
789
  return ['sec', attrs, 0];
790
790
  },
@@ -1237,7 +1237,7 @@ class JATSExporter {
1237
1237
  break;
1238
1238
  }
1239
1239
  case 'table': {
1240
- this.fixTable(childNode, node);
1240
+ this.fixTable(childNode);
1241
1241
  break;
1242
1242
  }
1243
1243
  }
@@ -1258,7 +1258,7 @@ class JATSExporter {
1258
1258
  node.replaceWith(clone);
1259
1259
  return clone;
1260
1260
  };
1261
- this.fixTable = (table, node) => {
1261
+ this.fixTable = (table) => {
1262
1262
  let tbody;
1263
1263
  Array.from(table.childNodes).forEach((child) => {
1264
1264
  if (child instanceof Element && child.tagName.toLowerCase() === 'tbody') {
@@ -1385,7 +1385,7 @@ class JATSExporter {
1385
1385
  if (availabilitySection) {
1386
1386
  back.insertBefore(availabilitySection, back.firstChild);
1387
1387
  }
1388
- const section = body.querySelector('sec[sec-type="acknowledgments"]');
1388
+ const section = body.querySelector('sec[sec-type="acknowledgements"]');
1389
1389
  if (section) {
1390
1390
  const ack = this.document.createElement('ack');
1391
1391
  while (section.firstChild) {
@@ -1422,7 +1422,7 @@ class JATSExporter {
1422
1422
  'supported-by',
1423
1423
  'financial-disclosure',
1424
1424
  'ethics-statement',
1425
- 'competing-interests',
1425
+ 'coi-statement',
1426
1426
  ];
1427
1427
  const sections = body.querySelectorAll('sec');
1428
1428
  for (const currentSection of sections) {
@@ -1573,7 +1573,7 @@ class JATSExporter {
1573
1573
  const fnGroups = back.querySelectorAll('fn-group');
1574
1574
  fnGroups.forEach((fnGroup) => {
1575
1575
  if (fnGroup) {
1576
- const coiStatement = fnGroup.querySelector('fn[fn-type="competing-interests"]');
1576
+ const coiStatement = fnGroup.querySelector('fn[fn-type="coi-statement"]');
1577
1577
  if (coiStatement) {
1578
1578
  const authorNotes = this.document.createElement('author-notes');
1579
1579
  authorNotes.append(coiStatement);
@@ -1615,7 +1615,7 @@ class JATSExporter {
1615
1615
  footnotes.forEach((fn) => {
1616
1616
  const fnType = fn.getAttribute('fn-type');
1617
1617
  if (fnType) {
1618
- fn.setAttribute('fn-type', (0, transformer_1.chooseJatsFnType)(fnType));
1618
+ fn.setAttribute('fn-type', fnType);
1619
1619
  }
1620
1620
  });
1621
1621
  }