@manuscripts/transform 4.2.11 → 4.2.13
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/getVersion.js +1 -2
- package/dist/cjs/jats/exporter/jats-exporter.js +17 -7
- package/dist/cjs/jats/importer/jats-dom-parser.js +3 -3
- package/dist/cjs/jats/importer/jats-transformations.js +7 -3
- package/dist/cjs/lib/credit-roles.js +1 -1
- package/dist/cjs/lib/utils.js +3 -3
- package/dist/cjs/schema/__tests__/migration.test.js +17 -7
- package/dist/cjs/schema/migration/migrate.js +2 -3
- package/dist/cjs/schema/migration/migration-scripts/4.2.13.js +21 -0
- package/dist/cjs/schema/migration/migration-scripts/index.js +2 -0
- package/dist/cjs/schema/nodes/trans_abstract.js +2 -2
- package/dist/cjs/schema/types.js +1 -2
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/importer/jats-dom-parser.js +3 -3
- package/dist/es/jats/importer/jats-transformations.js +7 -3
- package/dist/es/schema/migration/migration-scripts/4.2.13.js +19 -0
- package/dist/es/schema/migration/migration-scripts/index.js +2 -0
- package/dist/es/schema/nodes/trans_abstract.js +2 -2
- package/dist/es/version.js +1 -1
- package/dist/types/jats/__tests__/utils.d.ts +1 -1
- package/dist/types/jats/importer/jats-parser-utils.d.ts +1 -1
- package/dist/types/jats/importer/parse-jats-article.d.ts +1 -1
- package/dist/types/lib/html.d.ts +1 -1
- package/dist/types/schema/migration/migration-scripts/4.2.13.d.ts +8 -0
- package/dist/types/schema/migration/migration-scripts/index.d.ts +2 -1
- package/dist/types/schema/nodes/manuscript.d.ts +1 -1
- package/dist/types/transformer/node-types.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +6 -6
package/dist/cjs/getVersion.js
CHANGED
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.getVersion =
|
|
18
|
+
exports.getVersion = getVersion;
|
|
19
19
|
const version_1 = require("./version");
|
|
20
20
|
function getVersion() {
|
|
21
21
|
return version_1.VERSION;
|
|
22
22
|
}
|
|
23
|
-
exports.getVersion = getVersion;
|
|
@@ -30,13 +30,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
30
30
|
}) : function(o, v) {
|
|
31
31
|
o["default"] = v;
|
|
32
32
|
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
40
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
52
|
};
|
|
@@ -786,7 +786,7 @@ class JATSDOMParser {
|
|
|
786
786
|
getAttrs: (node) => {
|
|
787
787
|
const element = node;
|
|
788
788
|
return {
|
|
789
|
-
lang: element.
|
|
789
|
+
lang: element.getAttributeNS(xml_1.XML_NAMESPACE, 'lang') ?? '',
|
|
790
790
|
category: this.chooseSectionCategory(element),
|
|
791
791
|
};
|
|
792
792
|
},
|
|
@@ -913,7 +913,7 @@ class JATSDOMParser {
|
|
|
913
913
|
{
|
|
914
914
|
tag: 'title',
|
|
915
915
|
node: 'section_title',
|
|
916
|
-
context: 'section/|footnotes_section/|bibliography_section/|keywords/|supplements/|author_notes/|graphical_abstract_section/',
|
|
916
|
+
context: 'section/|footnotes_section/|bibliography_section/|keywords/|supplements/|author_notes/|graphical_abstract_section/|trans_abstract/',
|
|
917
917
|
},
|
|
918
918
|
{
|
|
919
919
|
tag: 'title',
|
|
@@ -1068,7 +1068,7 @@ class JATSDOMParser {
|
|
|
1068
1068
|
return false;
|
|
1069
1069
|
}
|
|
1070
1070
|
chooseSectionCategory(section) {
|
|
1071
|
-
const secType = section.getAttribute('sec-type')
|
|
1071
|
+
const secType = section.getAttribute('sec-type');
|
|
1072
1072
|
const titleNode = section.firstElementChild;
|
|
1073
1073
|
for (const category of this.sectionCategories) {
|
|
1074
1074
|
if (this.isMatchingCategory(secType, titleNode, category)) {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.fixTables = exports.createAttachments = exports.orderTableFootnote = exports.moveReferencesToBackmatter = exports.createAccessibilityItems = exports.createSupplementaryMaterialsSection = exports.createKeywordsSection = exports.moveCaptionsToEnd = exports.createBackmatter = exports.createAbstracts = exports.createBody = exports.createBoxedElementSection = exports.moveHeroImage = exports.moveAbstracts = exports.moveAffiliations = exports.moveContributors = exports.moveAwards = exports.moveAuthorNotes = exports.createTitles = exports.addMissingCaptions = void 0;
|
|
19
19
|
const deafults_1 = require("../../lib/deafults");
|
|
20
|
+
const xml_1 = require("../../lib/xml");
|
|
20
21
|
const jats_parser_utils_1 = require("./jats-parser-utils");
|
|
21
22
|
const removeNodeFromParent = (node) => node.parentNode && node.parentNode.removeChild(node);
|
|
22
23
|
const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -231,11 +232,14 @@ exports.moveCaptionsToEnd = moveCaptionsToEnd;
|
|
|
231
232
|
const createAbstractSection = (abstract, createElement) => {
|
|
232
233
|
const abstractType = abstract.getAttribute('abstract-type');
|
|
233
234
|
const sectionType = abstractType ? `abstract-${abstractType}` : 'abstract';
|
|
235
|
+
let section = createElement('sec');
|
|
234
236
|
if (abstract.nodeName === 'trans-abstract') {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
+
section = createElement('trans-abstract');
|
|
238
|
+
const lang = abstract.getAttributeNS(xml_1.XML_NAMESPACE, 'lang');
|
|
239
|
+
if (lang) {
|
|
240
|
+
section.setAttributeNS(xml_1.XML_NAMESPACE, 'lang', lang);
|
|
241
|
+
}
|
|
237
242
|
}
|
|
238
|
-
const section = createElement('sec');
|
|
239
243
|
section.setAttribute('sec-type', sectionType);
|
|
240
244
|
if (!abstract.querySelector(':scope > title')) {
|
|
241
245
|
const title = createElement('title');
|
|
@@ -32,7 +32,7 @@ var CreditVocabTerm;
|
|
|
32
32
|
CreditVocabTerm["Visualization"] = "Visualization";
|
|
33
33
|
CreditVocabTerm["WritingOriginalDraft"] = "Writing \u2013 original draft";
|
|
34
34
|
CreditVocabTerm["WritingReviewEditing"] = "Writing \u2013 review & editing";
|
|
35
|
-
})(CreditVocabTerm
|
|
35
|
+
})(CreditVocabTerm || (exports.CreditVocabTerm = CreditVocabTerm = {}));
|
|
36
36
|
exports.CreditRoleUrls = new Map([
|
|
37
37
|
[
|
|
38
38
|
CreditVocabTerm.Conceptualization,
|
package/dist/cjs/lib/utils.js
CHANGED
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.dateToTimestamp = exports.getHTMLContent = exports.getTrimmedTextContent = exports.findParentNodeClosestToPos = exports.isInBibliographySection = exports.isInGraphicalAbstractSection = exports.findNodePositions = void 0;
|
|
19
|
+
exports.iterateChildren = iterateChildren;
|
|
20
|
+
exports.getCreditRole = getCreditRole;
|
|
19
21
|
const jats_parser_utils_1 = require("../jats/importer/jats-parser-utils");
|
|
20
22
|
const schema_1 = require("../schema");
|
|
21
23
|
const credit_roles_1 = require("./credit-roles");
|
|
@@ -30,7 +32,6 @@ function* iterateChildren(node, recurse = false) {
|
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
|
-
exports.iterateChildren = iterateChildren;
|
|
34
35
|
const findNodePositions = (state, predicate) => {
|
|
35
36
|
const found = [];
|
|
36
37
|
state.doc.descendants((node, nodePos) => {
|
|
@@ -116,4 +117,3 @@ function getCreditRole(elem) {
|
|
|
116
117
|
});
|
|
117
118
|
return results;
|
|
118
119
|
}
|
|
119
|
-
exports.getCreditRole = getCreditRole;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const prevPackage = __importStar(require("migration-base"));
|
|
27
37
|
const migrate_1 = require("../migration/migrate");
|
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = migrate;
|
|
7
|
+
exports.migrateFor = migrateFor;
|
|
7
8
|
const lodash_1 = require("lodash");
|
|
8
9
|
const semver_1 = __importDefault(require("semver"));
|
|
9
10
|
const __1 = require("..");
|
|
@@ -18,7 +19,6 @@ function migrate(oldDoc, migrationScript) {
|
|
|
18
19
|
}
|
|
19
20
|
return migrateNode(oldDoc);
|
|
20
21
|
}
|
|
21
|
-
exports.default = migrate;
|
|
22
22
|
function migrateFor(oldDoc, baseVersion) {
|
|
23
23
|
const migrationScripts = ensureVersionAscOrder();
|
|
24
24
|
let migratedDoc = (0, lodash_1.cloneDeep)(oldDoc);
|
|
@@ -32,7 +32,6 @@ function migrateFor(oldDoc, baseVersion) {
|
|
|
32
32
|
}
|
|
33
33
|
return testDoc(migratedDoc, baseVersion);
|
|
34
34
|
}
|
|
35
|
-
exports.migrateFor = migrateFor;
|
|
36
35
|
const ensureVersionAscOrder = () => migration_scripts_1.default.sort((a, b) => semver_1.default.compare(a.toVersion, b.toVersion));
|
|
37
36
|
function testDoc(doc, fromVersion) {
|
|
38
37
|
try {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const __1 = require("../..");
|
|
4
|
+
class Migration4213 {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.fromVersion = '4.2.12';
|
|
7
|
+
this.toVersion = '4.2.13';
|
|
8
|
+
}
|
|
9
|
+
migrateNode(node) {
|
|
10
|
+
if (node.type === 'trans_abstract') {
|
|
11
|
+
const content = node.content || [];
|
|
12
|
+
const sectionTitleNode = __1.schema.nodes.section_title.create();
|
|
13
|
+
return {
|
|
14
|
+
...node,
|
|
15
|
+
content: [sectionTitleNode.toJSON(), ...content],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return node;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = Migration4213;
|
|
@@ -27,6 +27,7 @@ const _3_0_31_1 = __importDefault(require("./3.0.31"));
|
|
|
27
27
|
const _3_0_41_1 = __importDefault(require("./3.0.41"));
|
|
28
28
|
const _3_0_55_1 = __importDefault(require("./3.0.55"));
|
|
29
29
|
const _3_0_56_1 = __importDefault(require("./3.0.56"));
|
|
30
|
+
const _4_2_13_1 = __importDefault(require("./4.2.13"));
|
|
30
31
|
const migrations = [
|
|
31
32
|
new _1_2_5_1.default(),
|
|
32
33
|
new _2_3_22_1.default(),
|
|
@@ -37,5 +38,6 @@ const migrations = [
|
|
|
37
38
|
new _3_0_41_1.default(),
|
|
38
39
|
new _3_0_55_1.default(),
|
|
39
40
|
new _3_0_56_1.default(),
|
|
41
|
+
new _4_2_13_1.default(),
|
|
40
42
|
];
|
|
41
43
|
exports.default = migrations;
|
|
@@ -18,14 +18,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.isTransAbstractNode = exports.transAbstract = void 0;
|
|
19
19
|
const index_1 = require("../index");
|
|
20
20
|
exports.transAbstract = {
|
|
21
|
-
content: '(paragraph | element)* sections*',
|
|
21
|
+
content: 'section_title (paragraph | element)* sections*',
|
|
22
22
|
attrs: {
|
|
23
23
|
id: { default: '' },
|
|
24
24
|
lang: { default: '' },
|
|
25
25
|
category: { default: '' },
|
|
26
26
|
dataTracked: { default: null },
|
|
27
27
|
},
|
|
28
|
-
group: 'block
|
|
28
|
+
group: 'block sections',
|
|
29
29
|
selectable: false,
|
|
30
30
|
toDOM: (node) => {
|
|
31
31
|
const { id, lang } = node.attrs;
|
package/dist/cjs/schema/types.js
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.isNodeOfType =
|
|
18
|
+
exports.isNodeOfType = isNodeOfType;
|
|
19
19
|
function isNodeOfType(node, type) {
|
|
20
20
|
return node.type === type;
|
|
21
21
|
}
|
|
22
|
-
exports.isNodeOfType = isNodeOfType;
|
package/dist/cjs/version.js
CHANGED
|
@@ -783,7 +783,7 @@ export class JATSDOMParser {
|
|
|
783
783
|
getAttrs: (node) => {
|
|
784
784
|
const element = node;
|
|
785
785
|
return {
|
|
786
|
-
lang: element.
|
|
786
|
+
lang: element.getAttributeNS(XML_NAMESPACE, 'lang') ?? '',
|
|
787
787
|
category: this.chooseSectionCategory(element),
|
|
788
788
|
};
|
|
789
789
|
},
|
|
@@ -910,7 +910,7 @@ export class JATSDOMParser {
|
|
|
910
910
|
{
|
|
911
911
|
tag: 'title',
|
|
912
912
|
node: 'section_title',
|
|
913
|
-
context: 'section/|footnotes_section/|bibliography_section/|keywords/|supplements/|author_notes/|graphical_abstract_section/',
|
|
913
|
+
context: 'section/|footnotes_section/|bibliography_section/|keywords/|supplements/|author_notes/|graphical_abstract_section/|trans_abstract/',
|
|
914
914
|
},
|
|
915
915
|
{
|
|
916
916
|
tag: 'title',
|
|
@@ -1065,7 +1065,7 @@ export class JATSDOMParser {
|
|
|
1065
1065
|
return false;
|
|
1066
1066
|
}
|
|
1067
1067
|
chooseSectionCategory(section) {
|
|
1068
|
-
const secType = section.getAttribute('sec-type')
|
|
1068
|
+
const secType = section.getAttribute('sec-type');
|
|
1069
1069
|
const titleNode = section.firstElementChild;
|
|
1070
1070
|
for (const category of this.sectionCategories) {
|
|
1071
1071
|
if (this.isMatchingCategory(secType, titleNode, category)) {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { defaultTitle } from '../../lib/deafults';
|
|
17
|
+
import { XML_NAMESPACE } from '../../lib/xml';
|
|
17
18
|
import { htmlFromJatsNode } from './jats-parser-utils';
|
|
18
19
|
const removeNodeFromParent = (node) => node.parentNode && node.parentNode.removeChild(node);
|
|
19
20
|
const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -215,11 +216,14 @@ export const moveCaptionsToEnd = (body) => {
|
|
|
215
216
|
const createAbstractSection = (abstract, createElement) => {
|
|
216
217
|
const abstractType = abstract.getAttribute('abstract-type');
|
|
217
218
|
const sectionType = abstractType ? `abstract-${abstractType}` : 'abstract';
|
|
219
|
+
let section = createElement('sec');
|
|
218
220
|
if (abstract.nodeName === 'trans-abstract') {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
+
section = createElement('trans-abstract');
|
|
222
|
+
const lang = abstract.getAttributeNS(XML_NAMESPACE, 'lang');
|
|
223
|
+
if (lang) {
|
|
224
|
+
section.setAttributeNS(XML_NAMESPACE, 'lang', lang);
|
|
225
|
+
}
|
|
221
226
|
}
|
|
222
|
-
const section = createElement('sec');
|
|
223
227
|
section.setAttribute('sec-type', sectionType);
|
|
224
228
|
if (!abstract.querySelector(':scope > title')) {
|
|
225
229
|
const title = createElement('title');
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { schema } from '../..';
|
|
2
|
+
class Migration4213 {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.fromVersion = '4.2.12';
|
|
5
|
+
this.toVersion = '4.2.13';
|
|
6
|
+
}
|
|
7
|
+
migrateNode(node) {
|
|
8
|
+
if (node.type === 'trans_abstract') {
|
|
9
|
+
const content = node.content || [];
|
|
10
|
+
const sectionTitleNode = schema.nodes.section_title.create();
|
|
11
|
+
return {
|
|
12
|
+
...node,
|
|
13
|
+
content: [sectionTitleNode.toJSON(), ...content],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return node;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export default Migration4213;
|
|
@@ -22,6 +22,7 @@ import Migration3031 from './3.0.31';
|
|
|
22
22
|
import Migration3041 from './3.0.41';
|
|
23
23
|
import Migration3055 from './3.0.55';
|
|
24
24
|
import Migration3056 from './3.0.56';
|
|
25
|
+
import Migration4213 from './4.2.13';
|
|
25
26
|
const migrations = [
|
|
26
27
|
new Migration125(),
|
|
27
28
|
new Migration2322(),
|
|
@@ -32,5 +33,6 @@ const migrations = [
|
|
|
32
33
|
new Migration3041(),
|
|
33
34
|
new Migration3055(),
|
|
34
35
|
new Migration3056(),
|
|
36
|
+
new Migration4213(),
|
|
35
37
|
];
|
|
36
38
|
export default migrations;
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { schema } from '../index';
|
|
17
17
|
export const transAbstract = {
|
|
18
|
-
content: '(paragraph | element)* sections*',
|
|
18
|
+
content: 'section_title (paragraph | element)* sections*',
|
|
19
19
|
attrs: {
|
|
20
20
|
id: { default: '' },
|
|
21
21
|
lang: { default: '' },
|
|
22
22
|
category: { default: '' },
|
|
23
23
|
dataTracked: { default: null },
|
|
24
24
|
},
|
|
25
|
-
group: 'block
|
|
25
|
+
group: 'block sections',
|
|
26
26
|
selectable: false,
|
|
27
27
|
toDOM: (node) => {
|
|
28
28
|
const { id, lang } = node.attrs;
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "4.2.
|
|
1
|
+
export const VERSION = "4.2.13";
|
|
@@ -18,7 +18,7 @@ import { ManuscriptNode } from '../../schema';
|
|
|
18
18
|
export declare const createNodeFromJATS: (fileName: string) => Promise<{
|
|
19
19
|
node: import("../../schema").ActualManuscriptNode;
|
|
20
20
|
journal: {
|
|
21
|
-
objectType: import("@manuscripts/json-schema
|
|
21
|
+
objectType: import("@manuscripts/json-schema").ObjectTypes;
|
|
22
22
|
abbreviatedTitles: import("../importer/jats-journal-meta-parser").AbbreviatedTitle[];
|
|
23
23
|
journalIdentifiers: import("../importer/jats-journal-meta-parser").JournalIdentifier[];
|
|
24
24
|
ISSNs: import("../importer/jats-journal-meta-parser").ISSN[];
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ManuscriptNode } from '../../schema';
|
|
17
17
|
export declare const updateDocumentIDs: (node: ManuscriptNode) => string[];
|
|
18
|
-
export declare const htmlFromJatsNode: (element: Element | undefined | null, createElement?: (
|
|
18
|
+
export declare const htmlFromJatsNode: (element: Element | undefined | null, createElement?: (tagName: string) => HTMLElement) => string | undefined;
|
|
@@ -17,7 +17,7 @@ import { ActualManuscriptNode, SectionCategory } from '../../schema';
|
|
|
17
17
|
export declare const parseJATSArticle: (doc: Document, sectionCategories: SectionCategory[], template?: string) => {
|
|
18
18
|
node: ActualManuscriptNode;
|
|
19
19
|
journal: {
|
|
20
|
-
objectType: import("@manuscripts/json-schema
|
|
20
|
+
objectType: import("@manuscripts/json-schema").ObjectTypes;
|
|
21
21
|
abbreviatedTitles: import("./jats-journal-meta-parser").AbbreviatedTitle[];
|
|
22
22
|
journalIdentifiers: import("./jats-journal-meta-parser").JournalIdentifier[];
|
|
23
23
|
ISSNs: import("./jats-journal-meta-parser").ISSN[];
|
package/dist/types/lib/html.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JSONProsemirrorNode } from '../../../types';
|
|
2
|
+
import { MigrationScript } from '../migration-script';
|
|
3
|
+
declare class Migration4213 implements MigrationScript {
|
|
4
|
+
fromVersion: string;
|
|
5
|
+
toVersion: string;
|
|
6
|
+
migrateNode(node: JSONProsemirrorNode): JSONProsemirrorNode;
|
|
7
|
+
}
|
|
8
|
+
export default Migration4213;
|
|
@@ -22,5 +22,6 @@ import Migration3031 from './3.0.31';
|
|
|
22
22
|
import Migration3041 from './3.0.41';
|
|
23
23
|
import Migration3055 from './3.0.55';
|
|
24
24
|
import Migration3056 from './3.0.56';
|
|
25
|
-
|
|
25
|
+
import Migration4213 from './4.2.13';
|
|
26
|
+
declare const migrations: (Migration125 | Migration2322 | Migration3012 | Migration3021 | Migration3030 | Migration3031 | Migration3041 | Migration3055 | Migration3056 | Migration4213)[];
|
|
26
27
|
export default migrations;
|
|
@@ -32,4 +32,4 @@ export interface ManuscriptAttrs {
|
|
|
32
32
|
receiveDate?: number;
|
|
33
33
|
}
|
|
34
34
|
export declare const manuscript: NodeSpec;
|
|
35
|
-
export declare const isManuscriptNode: (node: ManuscriptNode) => node is
|
|
35
|
+
export declare const isManuscriptNode: (node: ManuscriptNode) => node is ManuscriptNode;
|
|
@@ -19,4 +19,4 @@ export declare const nodeTypesMap: Map<ManuscriptNodeType, ObjectTypes>;
|
|
|
19
19
|
export declare const isExecutableNodeType: (type: ManuscriptNodeType) => boolean;
|
|
20
20
|
export declare const isElementNodeType: (type: ManuscriptNodeType) => boolean;
|
|
21
21
|
export declare const isSectionNodeType: (type: ManuscriptNodeType) => boolean;
|
|
22
|
-
export declare const isNodeType: <T extends
|
|
22
|
+
export declare const isNodeType: <T extends ManuscriptNode>(node: ManuscriptNode, type: Nodes) => node is T;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.2.
|
|
1
|
+
export declare const VERSION = "4.2.13";
|
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.2.
|
|
4
|
+
"version": "4.2.13",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@babel/preset-typescript": "7.23.3",
|
|
47
47
|
"@jats4r/dtds": "0.0.10",
|
|
48
48
|
"@manuscripts/eslint-config": "0.5.1",
|
|
49
|
-
"@types/jest": "
|
|
49
|
+
"@types/jest": "30.0.0",
|
|
50
50
|
"@types/lodash": "4.17.16",
|
|
51
51
|
"@types/mime": "3.0.4",
|
|
52
52
|
"@types/node": "20.17.46",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@types/w3c-xmlserializer": "2.0.4",
|
|
56
56
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
57
57
|
"@typescript-eslint/parser": "5.62.0",
|
|
58
|
-
"babel-jest": "
|
|
58
|
+
"babel-jest": "30.0.5",
|
|
59
59
|
"eslint": "8.57.1",
|
|
60
60
|
"eslint-config-prettier": "8.10.0",
|
|
61
61
|
"eslint-plugin-header": "3.1.1",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"eslint-plugin-react-hooks": "4.6.2",
|
|
71
71
|
"eslint-plugin-simple-import-sort": "8.0.0",
|
|
72
72
|
"husky": "8.0.3",
|
|
73
|
-
"jest": "
|
|
74
|
-
"jest-environment-jsdom": "
|
|
73
|
+
"jest": "30.0.5",
|
|
74
|
+
"jest-environment-jsdom": "30.0.5",
|
|
75
75
|
"libxmljs2": "0.35.0",
|
|
76
76
|
"migration-base": "npm:@manuscripts/transform@2.3.20",
|
|
77
77
|
"npm-run-all": "4.1.5",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"prosemirror-state": "1.4.3",
|
|
80
80
|
"prosemirror-view": "1.39.2",
|
|
81
81
|
"rimraf": "6.0.1",
|
|
82
|
-
"typescript": "
|
|
82
|
+
"typescript": "5.9.2"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=20.16.0"
|