@manuscripts/transform 2.1.1-LEAN-3336-7 → 2.1.1-LEAN-3336-8
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-dom-parser.js +4 -0
- package/dist/cjs/jats/importer/parse-jats-article.js +1 -2
- package/dist/cjs/schema/nodes/table.js +1 -1
- package/dist/cjs/transformer/decode.js +4 -1
- package/dist/es/jats/importer/jats-body-dom-parser.js +4 -0
- package/dist/es/jats/importer/parse-jats-article.js +1 -2
- package/dist/es/schema/nodes/table.js +1 -1
- package/dist/es/transformer/decode.js +4 -1
- package/dist/types/schema/nodes/table.d.ts +6 -0
- package/package.json +2 -2
- package/dist/cjs/schema/nodes/table_row.js +0 -16
- package/dist/es/schema/nodes/table_row.js +0 -16
- package/dist/types/schema/nodes/table_row.d.ts +0 -15
|
@@ -73,8 +73,7 @@ const parseJATSBody = (doc, body, references) => {
|
|
|
73
73
|
}
|
|
74
74
|
const replacements = new Map(references === null || references === void 0 ? void 0 : references.IDs);
|
|
75
75
|
(0, jats_parser_utils_1.updateDocumentIDs)(node, replacements);
|
|
76
|
-
|
|
77
|
-
return models.values();
|
|
76
|
+
return (0, transformer_1.encode)(node).values();
|
|
78
77
|
};
|
|
79
78
|
exports.parseJATSBody = parseJATSBody;
|
|
80
79
|
const createBibliographyModels = (references) => {
|
|
@@ -92,7 +92,7 @@ const tableOptions = {
|
|
|
92
92
|
},
|
|
93
93
|
};
|
|
94
94
|
exports.tableNodes = (0, prosemirror_tables_1.tableNodes)(tableOptions);
|
|
95
|
-
exports.table = Object.assign(Object.assign({}, exports.tableNodes.table), { attrs: Object.assign(Object.assign({}, exports.tableNodes.table.attrs), { id: { default: '' } }) });
|
|
95
|
+
exports.table = Object.assign(Object.assign({}, exports.tableNodes.table), { attrs: Object.assign(Object.assign({}, exports.tableNodes.table.attrs), { id: { default: '' }, dataTracked: { default: null }, comments: { default: null } }) });
|
|
96
96
|
exports.tableCell = exports.tableNodes.table_cell;
|
|
97
97
|
exports.tableRow = exports.tableNodes.table_row;
|
|
98
98
|
exports.tableHeader = exports.tableNodes.table_header;
|
|
@@ -557,9 +557,12 @@ class Decoder {
|
|
|
557
557
|
},
|
|
558
558
|
[json_schema_1.ObjectTypes.Table]: (data) => {
|
|
559
559
|
const model = data;
|
|
560
|
-
|
|
560
|
+
const comments = this.createCommentNodes(model);
|
|
561
|
+
comments.forEach((c) => this.comments.set(c.attrs.id, c));
|
|
562
|
+
return this.parseContents(model.contents, undefined, this.getComments(model), {
|
|
561
563
|
topNode: schema_1.schema.nodes.table.create({
|
|
562
564
|
id: model._id,
|
|
565
|
+
comments: comments.map((c) => c.attrs.id),
|
|
563
566
|
}),
|
|
564
567
|
});
|
|
565
568
|
},
|
|
@@ -69,8 +69,7 @@ export const parseJATSBody = (doc, body, references) => {
|
|
|
69
69
|
}
|
|
70
70
|
const replacements = new Map(references === null || references === void 0 ? void 0 : references.IDs);
|
|
71
71
|
updateDocumentIDs(node, replacements);
|
|
72
|
-
|
|
73
|
-
return models.values();
|
|
72
|
+
return encode(node).values();
|
|
74
73
|
};
|
|
75
74
|
const createBibliographyModels = (references) => {
|
|
76
75
|
const models = [];
|
|
@@ -89,7 +89,7 @@ const tableOptions = {
|
|
|
89
89
|
},
|
|
90
90
|
};
|
|
91
91
|
export const tableNodes = createTableNodes(tableOptions);
|
|
92
|
-
export const table = Object.assign(Object.assign({}, tableNodes.table), { attrs: Object.assign(Object.assign({}, tableNodes.table.attrs), { id: { default: '' } }) });
|
|
92
|
+
export const table = Object.assign(Object.assign({}, tableNodes.table), { attrs: Object.assign(Object.assign({}, tableNodes.table.attrs), { id: { default: '' }, dataTracked: { default: null }, comments: { default: null } }) });
|
|
93
93
|
export const tableCell = tableNodes.table_cell;
|
|
94
94
|
export const tableRow = tableNodes.table_row;
|
|
95
95
|
export const tableHeader = tableNodes.table_header;
|
|
@@ -548,9 +548,12 @@ export class Decoder {
|
|
|
548
548
|
},
|
|
549
549
|
[ObjectTypes.Table]: (data) => {
|
|
550
550
|
const model = data;
|
|
551
|
-
|
|
551
|
+
const comments = this.createCommentNodes(model);
|
|
552
|
+
comments.forEach((c) => this.comments.set(c.attrs.id, c));
|
|
553
|
+
return this.parseContents(model.contents, undefined, this.getComments(model), {
|
|
552
554
|
topNode: schema.nodes.table.create({
|
|
553
555
|
id: model._id,
|
|
556
|
+
comments: comments.map((c) => c.attrs.id),
|
|
554
557
|
}),
|
|
555
558
|
});
|
|
556
559
|
},
|
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.1.1-LEAN-3336-
|
|
4
|
+
"version": "2.1.1-LEAN-3336-8",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"jszip": "^3.10.1",
|
|
36
36
|
"mathjax-full": "^3.2.2",
|
|
37
37
|
"mime": "^3.0.0",
|
|
38
|
-
"prosemirror-model": "^1.
|
|
38
|
+
"prosemirror-model": "^1.8.1",
|
|
39
39
|
"prosemirror-tables": "^1.3.5",
|
|
40
40
|
"uuid": "^9.0.0",
|
|
41
41
|
"w3c-xmlserializer": "^4.0.0"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* © 2024 Atypon Systems LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* © 2024 Atypon Systems LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2024 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|