@manuscripts/transform 2.0.3 → 2.0.4
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/importer/jats-body-transformations.js +0 -8
- package/dist/cjs/jats/importer/parse-jats-article.js +0 -1
- package/dist/cjs/schema/nodes/table_element.js +1 -1
- package/dist/cjs/transformer/decode.js +1 -1
- package/dist/es/jats/importer/jats-body-transformations.js +0 -8
- package/dist/es/jats/importer/parse-jats-article.js +0 -1
- package/dist/es/schema/nodes/table_element.js +1 -1
- package/dist/es/transformer/decode.js +1 -1
- package/dist/types/jats/importer/jats-body-transformations.d.ts +0 -1
- package/package.json +3 -3
|
@@ -265,14 +265,6 @@ exports.jatsBodyTransformations = {
|
|
|
265
265
|
}
|
|
266
266
|
});
|
|
267
267
|
},
|
|
268
|
-
moveTableFooterToEnd(body) {
|
|
269
|
-
const footers = body.querySelectorAll('table-wrap-foot');
|
|
270
|
-
for (const footer of footers) {
|
|
271
|
-
if (footer.parentNode) {
|
|
272
|
-
footer.parentNode.appendChild(footer);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
268
|
moveFloatsGroupToBody(doc, body, createElement) {
|
|
277
269
|
const group = doc.querySelector('floats-group');
|
|
278
270
|
if (group) {
|
|
@@ -66,7 +66,6 @@ const parseJATSBody = (doc, body, references) => {
|
|
|
66
66
|
jats_body_transformations_1.jatsBodyTransformations.ensureSection(body, createElement);
|
|
67
67
|
jats_body_transformations_1.jatsBodyTransformations.moveCaptionsToEnd(body);
|
|
68
68
|
jats_body_transformations_1.jatsBodyTransformations.fixTables(body, createElement);
|
|
69
|
-
jats_body_transformations_1.jatsBodyTransformations.moveTableFooterToEnd(body);
|
|
70
69
|
jats_body_transformations_1.jatsBodyTransformations.createBody(doc, body, createElement);
|
|
71
70
|
jats_body_transformations_1.jatsBodyTransformations.createAbstracts(doc, body, createElement);
|
|
72
71
|
jats_body_transformations_1.jatsBodyTransformations.createBackmatter(doc, body, createElement);
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.tableElement = void 0;
|
|
19
19
|
exports.tableElement = {
|
|
20
|
-
content: '(table | placeholder)
|
|
20
|
+
content: '(table | placeholder) table_element_footer? figcaption? (listing | placeholder)',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
paragraphStyle: { default: '' },
|
|
@@ -564,7 +564,7 @@ class Decoder {
|
|
|
564
564
|
const comments = this.createCommentNodes(model);
|
|
565
565
|
comments.forEach((c) => this.comments.set(c.attrs.id, c));
|
|
566
566
|
const content = tableElementFooter
|
|
567
|
-
? [table,
|
|
567
|
+
? [table, tableElementFooter, figcaption]
|
|
568
568
|
: [table, figcaption];
|
|
569
569
|
if (model.listingID) {
|
|
570
570
|
const listing = this.createListing(model.listingID);
|
|
@@ -262,14 +262,6 @@ export const jatsBodyTransformations = {
|
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
264
|
},
|
|
265
|
-
moveTableFooterToEnd(body) {
|
|
266
|
-
const footers = body.querySelectorAll('table-wrap-foot');
|
|
267
|
-
for (const footer of footers) {
|
|
268
|
-
if (footer.parentNode) {
|
|
269
|
-
footer.parentNode.appendChild(footer);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
265
|
moveFloatsGroupToBody(doc, body, createElement) {
|
|
274
266
|
const group = doc.querySelector('floats-group');
|
|
275
267
|
if (group) {
|
|
@@ -62,7 +62,6 @@ export const parseJATSBody = (doc, body, references) => {
|
|
|
62
62
|
jatsBodyTransformations.ensureSection(body, createElement);
|
|
63
63
|
jatsBodyTransformations.moveCaptionsToEnd(body);
|
|
64
64
|
jatsBodyTransformations.fixTables(body, createElement);
|
|
65
|
-
jatsBodyTransformations.moveTableFooterToEnd(body);
|
|
66
65
|
jatsBodyTransformations.createBody(doc, body, createElement);
|
|
67
66
|
jatsBodyTransformations.createAbstracts(doc, body, createElement);
|
|
68
67
|
jatsBodyTransformations.createBackmatter(doc, body, createElement);
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export const tableElement = {
|
|
17
|
-
content: '(table | placeholder)
|
|
17
|
+
content: '(table | placeholder) table_element_footer? figcaption? (listing | placeholder)',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
20
|
paragraphStyle: { default: '' },
|
|
@@ -555,7 +555,7 @@ export class Decoder {
|
|
|
555
555
|
const comments = this.createCommentNodes(model);
|
|
556
556
|
comments.forEach((c) => this.comments.set(c.attrs.id, c));
|
|
557
557
|
const content = tableElementFooter
|
|
558
|
-
? [table,
|
|
558
|
+
? [table, tableElementFooter, figcaption]
|
|
559
559
|
: [table, figcaption];
|
|
560
560
|
if (model.listingID) {
|
|
561
561
|
const listing = this.createListing(model.listingID);
|
|
@@ -32,7 +32,6 @@ export declare const jatsBodyTransformations: {
|
|
|
32
32
|
moveFootnotes(doc: Document, group: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
33
33
|
moveCaptionsToEnd(body: Element): void;
|
|
34
34
|
fixTables(body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
35
|
-
moveTableFooterToEnd(body: Element): void;
|
|
36
35
|
moveFloatsGroupToBody(doc: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
37
36
|
createKeywords(document: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
38
37
|
};
|
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": "2.0.
|
|
4
|
+
"version": "2.0.4",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@manuscripts/json-schema": "^2.2.2",
|
|
33
|
-
"@manuscripts/library": "
|
|
33
|
+
"@manuscripts/library": "1.3.2",
|
|
34
34
|
"debug": "^4.3.4",
|
|
35
35
|
"jszip": "^3.10.1",
|
|
36
36
|
"mathjax-full": "^3.2.2",
|
|
@@ -78,4 +78,4 @@
|
|
|
78
78
|
"rimraf": "^3.0.2",
|
|
79
79
|
"typescript": "^4.0.5"
|
|
80
80
|
}
|
|
81
|
-
}
|
|
81
|
+
}
|