@manuscripts/transform 1.4.4-LEAN-2737-2 → 1.4.5
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.
|
@@ -158,7 +158,10 @@ exports.jatsReferenceParser = {
|
|
|
158
158
|
const citation = (0, builders_1.buildCitation)('', rids);
|
|
159
159
|
modelNodes.push(citation);
|
|
160
160
|
crossReferenceNode.setAttribute('rid', citation._id);
|
|
161
|
-
crossReferenceNode.setAttribute('data-reference-embedded-citation', JSON.stringify(citation.embeddedCitationItems)
|
|
161
|
+
crossReferenceNode.setAttribute('data-reference-embedded-citation', JSON.stringify(citation.embeddedCitationItems.map(({ _id: id, bibliographyItem }) => ({
|
|
162
|
+
id,
|
|
163
|
+
bibliographyItem,
|
|
164
|
+
}))));
|
|
162
165
|
}
|
|
163
166
|
else {
|
|
164
167
|
crossReferenceNode.removeAttribute('rid');
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.isNodeType = exports.isSectionNodeType = exports.isElementNodeType = exports.isExecutableNodeType = exports.nodeTypesMap = void 0;
|
|
19
19
|
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const schema_1 = require("../schema");
|
|
21
21
|
exports.nodeTypesMap = new Map([
|
|
@@ -66,8 +66,3 @@ const isSectionNodeType = (type) => (0, schema_1.hasGroup)(type, schema_1.GROUP_
|
|
|
66
66
|
exports.isSectionNodeType = isSectionNodeType;
|
|
67
67
|
const isNodeType = (node, type) => node.type === node.type.schema.nodes[type];
|
|
68
68
|
exports.isNodeType = isNodeType;
|
|
69
|
-
const isMetaNode = (nodeType) => nodeType === schema_1.schema.nodes.bibliography_item.name ||
|
|
70
|
-
nodeType === schema_1.schema.nodes.affiliation.name ||
|
|
71
|
-
nodeType === schema_1.schema.nodes.contributor.name ||
|
|
72
|
-
nodeType === schema_1.schema.nodes.manuscript.name;
|
|
73
|
-
exports.isMetaNode = isMetaNode;
|
|
@@ -155,7 +155,10 @@ export const jatsReferenceParser = {
|
|
|
155
155
|
const citation = buildCitation('', rids);
|
|
156
156
|
modelNodes.push(citation);
|
|
157
157
|
crossReferenceNode.setAttribute('rid', citation._id);
|
|
158
|
-
crossReferenceNode.setAttribute('data-reference-embedded-citation', JSON.stringify(citation.embeddedCitationItems)
|
|
158
|
+
crossReferenceNode.setAttribute('data-reference-embedded-citation', JSON.stringify(citation.embeddedCitationItems.map(({ _id: id, bibliographyItem }) => ({
|
|
159
|
+
id,
|
|
160
|
+
bibliographyItem,
|
|
161
|
+
}))));
|
|
159
162
|
}
|
|
160
163
|
else {
|
|
161
164
|
crossReferenceNode.removeAttribute('rid');
|
|
@@ -59,7 +59,3 @@ export const isExecutableNodeType = (type) => hasGroup(type, GROUP_EXECUTABLE);
|
|
|
59
59
|
export const isElementNodeType = (type) => hasGroup(type, GROUP_ELEMENT);
|
|
60
60
|
export const isSectionNodeType = (type) => hasGroup(type, GROUP_SECTION);
|
|
61
61
|
export const isNodeType = (node, type) => node.type === node.type.schema.nodes[type];
|
|
62
|
-
export const isMetaNode = (nodeType) => nodeType === schema.nodes.bibliography_item.name ||
|
|
63
|
-
nodeType === schema.nodes.affiliation.name ||
|
|
64
|
-
nodeType === schema.nodes.contributor.name ||
|
|
65
|
-
nodeType === schema.nodes.manuscript.name;
|
|
@@ -20,4 +20,3 @@ 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
22
|
export declare const isNodeType: <T extends import("prosemirror-model").Node>(node: ManuscriptNode, type: Nodes) => node is T;
|
|
23
|
-
export declare const isMetaNode: (nodeType: string) => boolean;
|
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": "1.4.
|
|
4
|
+
"version": "1.4.5",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|