@manuscripts/transform 1.5.5 → 1.5.7-LEAN-3030
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 +23 -18
- package/dist/cjs/jats/importer/jats-body-transformations.js +3 -3
- package/dist/cjs/jats/jats-exporter.js +11 -6
- package/dist/cjs/lib/utils.js +10 -1
- package/dist/cjs/schema/index.js +15 -11
- package/dist/cjs/schema/nodes/{affiliations_section.js → affiliations.js} +9 -8
- package/dist/cjs/schema/nodes/{contributors_section.js → contributors.js} +8 -7
- package/dist/cjs/schema/nodes/core_section.js +27 -0
- package/dist/cjs/schema/nodes/graphical_abstract_section.js +1 -0
- package/dist/cjs/schema/nodes/keyword.js +0 -1
- package/dist/cjs/schema/nodes/{keywords_group.js → keyword_group.js} +6 -6
- package/dist/cjs/schema/nodes/{keywords_section.js → keywords.js} +7 -7
- package/dist/cjs/schema/nodes/keywords_element.js +1 -1
- package/dist/cjs/schema/nodes/manuscript.js +1 -1
- package/dist/cjs/transformer/decode.js +110 -113
- package/dist/cjs/transformer/encode.js +24 -28
- package/dist/cjs/transformer/node-names.js +1 -1
- package/dist/cjs/transformer/node-title.js +1 -1
- package/dist/cjs/transformer/node-types.js +7 -4
- package/dist/cjs/transformer/section-category.js +35 -8
- package/dist/es/jats/importer/jats-body-dom-parser.js +23 -18
- package/dist/es/jats/importer/jats-body-transformations.js +3 -3
- package/dist/es/jats/jats-exporter.js +11 -6
- package/dist/es/lib/utils.js +8 -0
- package/dist/es/schema/index.js +15 -11
- package/dist/es/schema/nodes/{affiliations_section.js → affiliations.js} +7 -6
- package/dist/es/schema/nodes/{contributors_section.js → contributors.js} +6 -5
- package/dist/es/schema/nodes/core_section.js +24 -0
- package/dist/es/schema/nodes/graphical_abstract_section.js +1 -0
- package/dist/es/schema/nodes/keyword.js +0 -1
- package/dist/es/schema/nodes/{keywords_group.js → keyword_group.js} +4 -4
- package/dist/es/schema/nodes/{keywords_section.js → keywords.js} +5 -5
- package/dist/es/schema/nodes/keywords_element.js +1 -1
- package/dist/es/schema/nodes/manuscript.js +1 -1
- package/dist/es/transformer/decode.js +111 -114
- package/dist/es/transformer/encode.js +24 -28
- package/dist/es/transformer/node-names.js +1 -1
- package/dist/es/transformer/node-title.js +1 -1
- package/dist/es/transformer/node-types.js +7 -4
- package/dist/es/transformer/section-category.js +33 -7
- package/dist/types/lib/utils.d.ts +1 -0
- package/dist/types/schema/index.d.ts +3 -3
- package/dist/types/schema/nodes/affiliations.d.ts +11 -0
- package/dist/types/schema/nodes/contributors.d.ts +12 -0
- package/dist/types/schema/nodes/core_section.d.ts +17 -0
- package/dist/types/schema/nodes/keyword.d.ts +0 -1
- package/dist/types/schema/nodes/{keywords_group.d.ts → keyword_group.d.ts} +3 -3
- package/dist/types/schema/nodes/{keywords_section.d.ts → keywords.d.ts} +3 -3
- package/dist/types/schema/types.d.ts +1 -1
- package/dist/types/transformer/decode.d.ts +6 -6
- package/dist/types/transformer/encode.d.ts +1 -1
- package/dist/types/transformer/section-category.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/schema/nodes/affiliations_section.d.ts +0 -11
- package/dist/types/schema/nodes/contributors_section.d.ts +0 -12
|
@@ -507,7 +507,7 @@ const nodes = [
|
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
509
|
tag: 'sec[sec-type="affiliations"]',
|
|
510
|
-
node: '
|
|
510
|
+
node: 'affiliations',
|
|
511
511
|
getAttrs: (node) => {
|
|
512
512
|
const element = node;
|
|
513
513
|
return {
|
|
@@ -519,7 +519,7 @@ const nodes = [
|
|
|
519
519
|
{
|
|
520
520
|
tag: 'aff',
|
|
521
521
|
node: 'affiliation',
|
|
522
|
-
context: '
|
|
522
|
+
context: 'affiliations/',
|
|
523
523
|
getAttrs: (node) => {
|
|
524
524
|
const element = node;
|
|
525
525
|
const aff = {
|
|
@@ -566,7 +566,7 @@ const nodes = [
|
|
|
566
566
|
},
|
|
567
567
|
{
|
|
568
568
|
tag: 'sec[sec-type="contributors"]',
|
|
569
|
-
node: '
|
|
569
|
+
node: 'contributors',
|
|
570
570
|
getAttrs: (node) => {
|
|
571
571
|
const element = node;
|
|
572
572
|
return {
|
|
@@ -578,7 +578,7 @@ const nodes = [
|
|
|
578
578
|
{
|
|
579
579
|
tag: 'contrib',
|
|
580
580
|
node: 'contributor',
|
|
581
|
-
context: '
|
|
581
|
+
context: 'contributors/',
|
|
582
582
|
getAttrs: (node) => {
|
|
583
583
|
const element = node;
|
|
584
584
|
const contrib = {
|
|
@@ -633,19 +633,19 @@ const nodes = [
|
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
tag: 'sec[sec-type="keywords"]',
|
|
636
|
-
node: '
|
|
637
|
-
getAttrs: (node) => {
|
|
638
|
-
const element = node;
|
|
639
|
-
return {
|
|
640
|
-
id: element.getAttribute('id'),
|
|
641
|
-
category: (0, transformer_1.chooseSectionCategory)(element),
|
|
642
|
-
};
|
|
643
|
-
},
|
|
636
|
+
node: 'keywords',
|
|
644
637
|
},
|
|
645
638
|
{
|
|
646
|
-
tag: '
|
|
647
|
-
|
|
648
|
-
|
|
639
|
+
tag: 'sec[sec-type="abstracts"]',
|
|
640
|
+
node: 'abstracts',
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
tag: 'sec[sec-type="body"]',
|
|
644
|
+
node: 'body',
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
tag: 'sec[sec-type="backmatter"]',
|
|
648
|
+
node: 'backmatter',
|
|
649
649
|
},
|
|
650
650
|
{
|
|
651
651
|
tag: 'sec',
|
|
@@ -658,10 +658,15 @@ const nodes = [
|
|
|
658
658
|
};
|
|
659
659
|
},
|
|
660
660
|
},
|
|
661
|
+
{
|
|
662
|
+
tag: 'kwd-group-list',
|
|
663
|
+
context: 'keywords/',
|
|
664
|
+
node: 'keywords_element',
|
|
665
|
+
},
|
|
661
666
|
{
|
|
662
667
|
tag: 'kwd-group',
|
|
663
668
|
context: 'keywords_element/',
|
|
664
|
-
node: '
|
|
669
|
+
node: 'keyword_group',
|
|
665
670
|
getAttrs: (node) => {
|
|
666
671
|
const element = node;
|
|
667
672
|
return {
|
|
@@ -671,7 +676,7 @@ const nodes = [
|
|
|
671
676
|
},
|
|
672
677
|
{
|
|
673
678
|
tag: 'kwd',
|
|
674
|
-
context: '
|
|
679
|
+
context: 'keyword_group//',
|
|
675
680
|
node: 'keyword',
|
|
676
681
|
},
|
|
677
682
|
{
|
|
@@ -726,7 +731,7 @@ const nodes = [
|
|
|
726
731
|
{
|
|
727
732
|
tag: 'title',
|
|
728
733
|
node: 'section_title',
|
|
729
|
-
context: 'section/|footnotes_section/|bibliography_section/|
|
|
734
|
+
context: 'section/|footnotes_section/|bibliography_section/|keywords/',
|
|
730
735
|
},
|
|
731
736
|
{
|
|
732
737
|
tag: 'title',
|
|
@@ -380,9 +380,9 @@ exports.jatsBodyTransformations = {
|
|
|
380
380
|
const title = createElement('title');
|
|
381
381
|
title.textContent = 'Keywords';
|
|
382
382
|
section.append(title);
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
section.append(
|
|
383
|
+
const keywordsElement = createElement('kwd-group-list');
|
|
384
|
+
keywordsElement.append(keywordGroups[0]);
|
|
385
|
+
section.append(keywordsElement);
|
|
386
386
|
body.prepend(section);
|
|
387
387
|
}
|
|
388
388
|
},
|
|
@@ -431,9 +431,11 @@ class JATSExporter {
|
|
|
431
431
|
}
|
|
432
432
|
};
|
|
433
433
|
this.buildBody = (fragment) => {
|
|
434
|
-
const content = this.serializeFragment(fragment);
|
|
435
434
|
const body = this.document.createElement('body');
|
|
436
|
-
|
|
435
|
+
fragment.forEach((cFragment) => {
|
|
436
|
+
const serializedNode = this.serializeNode(cFragment);
|
|
437
|
+
body.append(...serializedNode.childNodes);
|
|
438
|
+
});
|
|
437
439
|
this.fixBody(body, fragment);
|
|
438
440
|
return body;
|
|
439
441
|
};
|
|
@@ -600,8 +602,8 @@ class JATSExporter {
|
|
|
600
602
|
const getModel = (id) => id ? this.modelMap.get(id) : undefined;
|
|
601
603
|
const nodes = {
|
|
602
604
|
title: () => '',
|
|
603
|
-
|
|
604
|
-
|
|
605
|
+
affiliations: () => '',
|
|
606
|
+
contributors: () => '',
|
|
605
607
|
table_element_footer: () => ['table-wrap-foot', 0],
|
|
606
608
|
contributor: () => '',
|
|
607
609
|
affiliation: () => '',
|
|
@@ -610,7 +612,10 @@ class JATSExporter {
|
|
|
610
612
|
bibliography_element: () => '',
|
|
611
613
|
bibliography_item: () => '',
|
|
612
614
|
comment_list: () => '',
|
|
613
|
-
|
|
615
|
+
keyword_group: () => '',
|
|
616
|
+
body: () => ['body', 0],
|
|
617
|
+
abstracts: () => ['abstract', 0],
|
|
618
|
+
backmatter: () => ['backmatter', 0],
|
|
614
619
|
bibliography_section: (node) => [
|
|
615
620
|
'ref-list',
|
|
616
621
|
{ id: normalizeID(node.attrs.id) },
|
|
@@ -789,7 +794,7 @@ class JATSExporter {
|
|
|
789
794
|
},
|
|
790
795
|
keyword: () => '',
|
|
791
796
|
keywords_element: () => '',
|
|
792
|
-
|
|
797
|
+
keywords: () => '',
|
|
793
798
|
link: (node) => {
|
|
794
799
|
const text = node.textContent;
|
|
795
800
|
if (!text) {
|
package/dist/cjs/lib/utils.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.getTrimmedTextContent = exports.findParentNodeClosestToPos = exports.isInAbstractsSection = exports.isInBibliographySection = exports.isInGraphicalAbstractSection = exports.findNodePositions = exports.iterateChildren = void 0;
|
|
18
|
+
exports.groupBy = exports.getTrimmedTextContent = exports.findParentNodeClosestToPos = exports.isInAbstractsSection = exports.isInBibliographySection = exports.isInGraphicalAbstractSection = exports.findNodePositions = exports.iterateChildren = void 0;
|
|
19
19
|
const bibliography_section_1 = require("../schema/nodes/bibliography_section");
|
|
20
20
|
const graphical_abstract_section_1 = require("../schema/nodes/graphical_abstract_section");
|
|
21
21
|
function* iterateChildren(node, recurse = false) {
|
|
@@ -94,3 +94,12 @@ const getTrimmedTextContent = (node, querySelector) => {
|
|
|
94
94
|
return (_b = (_a = node.querySelector(querySelector)) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim();
|
|
95
95
|
};
|
|
96
96
|
exports.getTrimmedTextContent = getTrimmedTextContent;
|
|
97
|
+
const groupBy = (list, getKey) => list.reduce((previous, currentItem) => {
|
|
98
|
+
const group = getKey(currentItem);
|
|
99
|
+
if (!previous[group]) {
|
|
100
|
+
previous[group] = [];
|
|
101
|
+
}
|
|
102
|
+
previous[group].push(currentItem);
|
|
103
|
+
return previous;
|
|
104
|
+
}, {});
|
|
105
|
+
exports.groupBy = groupBy;
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -33,7 +33,7 @@ exports.schema = void 0;
|
|
|
33
33
|
const prosemirror_model_1 = require("prosemirror-model");
|
|
34
34
|
const marks_1 = require("./marks");
|
|
35
35
|
const affiliation_1 = require("./nodes/affiliation");
|
|
36
|
-
const
|
|
36
|
+
const affiliations_1 = require("./nodes/affiliations");
|
|
37
37
|
const attribution_1 = require("./nodes/attribution");
|
|
38
38
|
const bibliography_element_1 = require("./nodes/bibliography_element");
|
|
39
39
|
const bibliography_item_1 = require("./nodes/bibliography_item");
|
|
@@ -45,7 +45,8 @@ const citation_1 = require("./nodes/citation");
|
|
|
45
45
|
const comment_1 = require("./nodes/comment");
|
|
46
46
|
const comment_list_1 = require("./nodes/comment_list");
|
|
47
47
|
const contributor_1 = require("./nodes/contributor");
|
|
48
|
-
const
|
|
48
|
+
const contributors_1 = require("./nodes/contributors");
|
|
49
|
+
const core_section_1 = require("./nodes/core_section");
|
|
49
50
|
const cross_reference_1 = require("./nodes/cross_reference");
|
|
50
51
|
const doc_1 = require("./nodes/doc");
|
|
51
52
|
const equation_1 = require("./nodes/equation");
|
|
@@ -62,9 +63,9 @@ const highlight_marker_1 = require("./nodes/highlight_marker");
|
|
|
62
63
|
const inline_equation_1 = require("./nodes/inline_equation");
|
|
63
64
|
const inline_footnote_1 = require("./nodes/inline_footnote");
|
|
64
65
|
const keyword_1 = require("./nodes/keyword");
|
|
66
|
+
const keyword_group_1 = require("./nodes/keyword_group");
|
|
67
|
+
const keywords_1 = require("./nodes/keywords");
|
|
65
68
|
const keywords_element_1 = require("./nodes/keywords_element");
|
|
66
|
-
const keywords_group_1 = require("./nodes/keywords_group");
|
|
67
|
-
const keywords_section_1 = require("./nodes/keywords_section");
|
|
68
69
|
const link_1 = require("./nodes/link");
|
|
69
70
|
const list_1 = require("./nodes/list");
|
|
70
71
|
const listing_1 = require("./nodes/listing");
|
|
@@ -117,7 +118,7 @@ __exportStar(require("./nodes/inline_equation"), exports);
|
|
|
117
118
|
__exportStar(require("./nodes/inline_footnote"), exports);
|
|
118
119
|
__exportStar(require("./nodes/keyword"), exports);
|
|
119
120
|
__exportStar(require("./nodes/keywords_element"), exports);
|
|
120
|
-
__exportStar(require("./nodes/
|
|
121
|
+
__exportStar(require("./nodes/keywords"), exports);
|
|
121
122
|
__exportStar(require("./nodes/link"), exports);
|
|
122
123
|
__exportStar(require("./nodes/list"), exports);
|
|
123
124
|
__exportStar(require("./nodes/listing"), exports);
|
|
@@ -142,8 +143,8 @@ __exportStar(require("./nodes/meta_section"), exports);
|
|
|
142
143
|
__exportStar(require("./nodes/contributor"), exports);
|
|
143
144
|
__exportStar(require("./nodes/table_element_footer"), exports);
|
|
144
145
|
__exportStar(require("./nodes/title"), exports);
|
|
145
|
-
__exportStar(require("./nodes/
|
|
146
|
-
__exportStar(require("./nodes/
|
|
146
|
+
__exportStar(require("./nodes/affiliations"), exports);
|
|
147
|
+
__exportStar(require("./nodes/contributors"), exports);
|
|
147
148
|
exports.schema = new prosemirror_model_1.Schema({
|
|
148
149
|
marks: {
|
|
149
150
|
bold: marks_1.bold,
|
|
@@ -170,6 +171,9 @@ exports.schema = new prosemirror_model_1.Schema({
|
|
|
170
171
|
caption: caption_1.caption,
|
|
171
172
|
caption_title: caption_title_1.captionTitle,
|
|
172
173
|
citation: citation_1.citation,
|
|
174
|
+
abstracts: core_section_1.coreSection,
|
|
175
|
+
body: core_section_1.coreSection,
|
|
176
|
+
backmatter: core_section_1.coreSection,
|
|
173
177
|
cross_reference: cross_reference_1.crossReference,
|
|
174
178
|
doc: doc_1.doc,
|
|
175
179
|
equation: equation_1.equation,
|
|
@@ -187,8 +191,8 @@ exports.schema = new prosemirror_model_1.Schema({
|
|
|
187
191
|
inline_footnote: inline_footnote_1.inlineFootnote,
|
|
188
192
|
keyword: keyword_1.keyword,
|
|
189
193
|
keywords_element: keywords_element_1.keywordsElement,
|
|
190
|
-
|
|
191
|
-
|
|
194
|
+
keywords: keywords_1.keywords,
|
|
195
|
+
keyword_group: keyword_group_1.keywordGroup,
|
|
192
196
|
link: link_1.link,
|
|
193
197
|
list_item: list_1.listItem,
|
|
194
198
|
listing: listing_1.listing,
|
|
@@ -219,7 +223,7 @@ exports.schema = new prosemirror_model_1.Schema({
|
|
|
219
223
|
contributor: contributor_1.contributor,
|
|
220
224
|
table_element_footer: table_element_footer_1.tableElementFooter,
|
|
221
225
|
title: title_1.title,
|
|
222
|
-
|
|
223
|
-
|
|
226
|
+
affiliations: affiliations_1.affiliations,
|
|
227
|
+
contributors: contributors_1.contributors,
|
|
224
228
|
},
|
|
225
229
|
});
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.isAffiliationsNode = exports.affiliations = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
exports.affiliations = {
|
|
5
6
|
content: 'section_title? affiliation*',
|
|
6
7
|
attrs: {
|
|
7
8
|
id: { default: 'META_SECTION_AFFILLIATIONS' },
|
|
8
9
|
dataTracked: { default: null },
|
|
9
10
|
},
|
|
10
|
-
group: 'block
|
|
11
|
+
group: 'block',
|
|
11
12
|
selectable: false,
|
|
12
13
|
parseDOM: [
|
|
13
14
|
{
|
|
@@ -21,16 +22,16 @@ exports.affiliationsSection = {
|
|
|
21
22
|
},
|
|
22
23
|
],
|
|
23
24
|
toDOM: (node) => {
|
|
24
|
-
const
|
|
25
|
+
const affiliations = node;
|
|
25
26
|
return [
|
|
26
27
|
'section',
|
|
27
28
|
{
|
|
28
29
|
class: 'affiliations',
|
|
29
|
-
id:
|
|
30
|
+
id: affiliations.attrs.id,
|
|
30
31
|
},
|
|
31
|
-
0
|
|
32
|
+
0,
|
|
32
33
|
];
|
|
33
34
|
},
|
|
34
35
|
};
|
|
35
|
-
const
|
|
36
|
-
exports.
|
|
36
|
+
const isAffiliationsNode = (node) => node.type === index_1.schema.nodes.affiliations;
|
|
37
|
+
exports.isAffiliationsNode = isAffiliationsNode;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.isContributorsNode = exports.contributors = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
exports.contributors = {
|
|
5
6
|
content: 'section_title? contributor*',
|
|
6
7
|
attrs: {
|
|
7
8
|
id: { default: 'META_SECTION_CONTRIBUTORS' },
|
|
8
9
|
dataTracked: { default: null },
|
|
9
10
|
contents: { default: '' },
|
|
10
11
|
},
|
|
11
|
-
group: 'block
|
|
12
|
+
group: 'block',
|
|
12
13
|
selectable: false,
|
|
13
14
|
parseDOM: [
|
|
14
15
|
{
|
|
@@ -21,16 +22,16 @@ exports.contributorsSection = {
|
|
|
21
22
|
},
|
|
22
23
|
],
|
|
23
24
|
toDOM: (node) => {
|
|
24
|
-
const
|
|
25
|
+
const contributors = node;
|
|
25
26
|
return [
|
|
26
27
|
'section',
|
|
27
28
|
{
|
|
28
29
|
class: 'contributors',
|
|
29
|
-
id:
|
|
30
|
+
id: contributors.attrs.id,
|
|
30
31
|
},
|
|
31
32
|
0,
|
|
32
33
|
];
|
|
33
34
|
},
|
|
34
35
|
};
|
|
35
|
-
const
|
|
36
|
-
exports.
|
|
36
|
+
const isContributorsNode = (node) => node.type === index_1.schema.nodes.contributors;
|
|
37
|
+
exports.isContributorsNode = isContributorsNode;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2019 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
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.coreSection = void 0;
|
|
19
|
+
exports.coreSection = {
|
|
20
|
+
content: 'sections*',
|
|
21
|
+
atom: true,
|
|
22
|
+
attrs: {
|
|
23
|
+
id: { default: '' },
|
|
24
|
+
},
|
|
25
|
+
group: 'block',
|
|
26
|
+
toDOM: () => ['section', 0],
|
|
27
|
+
};
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
18
|
+
exports.isKeywordGroupNode = exports.keywordGroup = void 0;
|
|
19
|
+
exports.keywordGroup = {
|
|
20
20
|
content: 'keyword*',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
@@ -31,11 +31,11 @@ exports.keywordsGroup = {
|
|
|
31
31
|
},
|
|
32
32
|
],
|
|
33
33
|
toDOM: (node) => {
|
|
34
|
-
const
|
|
34
|
+
const keywordGroupNode = node;
|
|
35
35
|
return [
|
|
36
36
|
'div',
|
|
37
37
|
{
|
|
38
|
-
id:
|
|
38
|
+
id: keywordGroupNode.attrs.id,
|
|
39
39
|
class: 'keywords',
|
|
40
40
|
spellcheck: 'false',
|
|
41
41
|
contenteditable: false,
|
|
@@ -44,5 +44,5 @@ exports.keywordsGroup = {
|
|
|
44
44
|
];
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
|
-
const
|
|
48
|
-
exports.
|
|
47
|
+
const isKeywordGroupNode = (node) => node.type === node.type.schema.nodes.keywords_group;
|
|
48
|
+
exports.isKeywordGroupNode = isKeywordGroupNode;
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
18
|
+
exports.isKeywordsNode = exports.keywords = void 0;
|
|
19
|
+
exports.keywords = {
|
|
20
20
|
content: 'section_title (keywords_element | placeholder_element)',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
dataTracked: { default: null },
|
|
24
24
|
},
|
|
25
|
-
group: 'block
|
|
25
|
+
group: 'block',
|
|
26
26
|
selectable: false,
|
|
27
27
|
parseDOM: [
|
|
28
28
|
{
|
|
@@ -30,11 +30,11 @@ exports.keywordsSection = {
|
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
32
|
toDOM: (node) => {
|
|
33
|
-
const
|
|
33
|
+
const keywords = node;
|
|
34
34
|
return [
|
|
35
35
|
'div',
|
|
36
36
|
{
|
|
37
|
-
id:
|
|
37
|
+
id: keywords.attrs.id,
|
|
38
38
|
class: 'keywords',
|
|
39
39
|
spellcheck: 'false',
|
|
40
40
|
contenteditable: false,
|
|
@@ -43,5 +43,5 @@ exports.keywordsSection = {
|
|
|
43
43
|
];
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
|
-
const
|
|
47
|
-
exports.
|
|
46
|
+
const isKeywordsNode = (node) => node.type === node.type.schema.nodes.keywords;
|
|
47
|
+
exports.isKeywordsNode = isKeywordsNode;
|
|
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.keywordsElement = void 0;
|
|
19
19
|
exports.keywordsElement = {
|
|
20
20
|
atom: true,
|
|
21
|
-
content: '
|
|
21
|
+
content: 'keyword_group*',
|
|
22
22
|
attrs: {
|
|
23
23
|
id: { default: '' },
|
|
24
24
|
contents: { default: '' },
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.manuscript = void 0;
|
|
19
19
|
exports.manuscript = {
|
|
20
|
-
content: 'title
|
|
20
|
+
content: 'title? contributors? affiliations? keywords? abstracts body backmatter meta_section',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
},
|