@manuscripts/transform 1.5.8 → 2.0.0
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/index.js +1 -1
- package/dist/cjs/jats/importer/index.js +1 -3
- package/dist/cjs/jats/importer/jats-body-dom-parser.js +23 -227
- package/dist/cjs/jats/importer/jats-body-transformations.js +110 -201
- package/dist/cjs/jats/importer/jats-comments.js +100 -98
- package/dist/cjs/jats/importer/jats-front-parser.js +87 -81
- package/dist/cjs/jats/importer/jats-journal-meta-parser.js +51 -39
- package/dist/cjs/jats/importer/jats-parser-utils.js +17 -56
- package/dist/cjs/jats/importer/jats-reference-parser.js +24 -79
- package/dist/cjs/jats/importer/jats-references.js +34 -0
- package/dist/cjs/jats/importer/parse-jats-article.js +67 -173
- package/dist/cjs/jats/index.js +1 -3
- package/dist/cjs/jats/jats-exporter.js +34 -55
- package/dist/cjs/lib/section-group-type.js +30 -0
- package/dist/cjs/lib/utils.js +1 -25
- package/dist/cjs/schema/index.js +20 -17
- package/dist/cjs/schema/nodes/abstracts.js +27 -0
- package/dist/cjs/schema/nodes/affiliations.js +27 -0
- package/dist/cjs/schema/nodes/backmatter.js +27 -0
- package/dist/cjs/schema/nodes/body.js +27 -0
- package/dist/cjs/schema/nodes/citation.js +10 -15
- package/dist/cjs/schema/nodes/{comment_list.js → comments.js} +4 -4
- package/dist/cjs/schema/nodes/contributors.js +27 -0
- package/dist/cjs/schema/nodes/{meta_section.js → core_section.js} +6 -5
- package/dist/cjs/schema/nodes/cross_reference.js +4 -3
- package/dist/cjs/schema/nodes/inline_footnote.js +6 -5
- 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 +5 -2
- package/dist/cjs/transformer/builders.js +9 -86
- package/dist/cjs/transformer/decode.js +147 -176
- package/dist/cjs/transformer/encode.js +66 -67
- package/dist/cjs/transformer/highlight-markers.js +48 -36
- package/dist/cjs/transformer/html.js +7 -23
- package/dist/cjs/transformer/labels.js +3 -17
- 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 -6
- package/dist/cjs/transformer/object-types.js +1 -2
- package/dist/cjs/transformer/section-category.js +31 -31
- package/dist/es/index.js +1 -1
- package/dist/es/jats/importer/index.js +1 -1
- package/dist/es/jats/importer/jats-body-dom-parser.js +23 -227
- package/dist/es/jats/importer/jats-body-transformations.js +111 -202
- package/dist/es/jats/importer/jats-comments.js +97 -96
- package/dist/es/jats/importer/jats-front-parser.js +88 -82
- package/dist/es/jats/importer/jats-journal-meta-parser.js +51 -39
- package/dist/es/jats/importer/jats-parser-utils.js +16 -54
- package/dist/es/jats/importer/jats-reference-parser.js +27 -82
- package/dist/es/jats/importer/jats-references.js +30 -0
- package/dist/es/jats/importer/parse-jats-article.js +70 -174
- package/dist/es/jats/index.js +1 -1
- package/dist/es/jats/jats-exporter.js +34 -55
- package/dist/es/lib/section-group-type.js +27 -0
- package/dist/es/lib/utils.js +0 -22
- package/dist/es/schema/index.js +21 -18
- package/dist/es/schema/nodes/abstracts.js +24 -0
- package/dist/es/schema/nodes/affiliations.js +24 -0
- package/dist/es/schema/nodes/backmatter.js +24 -0
- package/dist/es/schema/nodes/body.js +24 -0
- package/dist/es/schema/nodes/citation.js +10 -15
- package/dist/es/schema/nodes/{comment_list.js → comments.js} +3 -3
- package/dist/es/schema/nodes/contributors.js +24 -0
- package/dist/es/schema/nodes/{meta_section.js → core_section.js} +5 -4
- package/dist/es/schema/nodes/cross_reference.js +4 -3
- package/dist/es/schema/nodes/inline_footnote.js +6 -5
- 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 +3 -1
- package/dist/es/transformer/builders.js +6 -73
- package/dist/es/transformer/decode.js +147 -175
- package/dist/es/transformer/encode.js +70 -71
- package/dist/es/transformer/highlight-markers.js +44 -32
- package/dist/es/transformer/html.js +7 -23
- package/dist/es/transformer/labels.js +3 -17
- 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 -6
- package/dist/es/transformer/object-types.js +0 -1
- package/dist/es/transformer/section-category.js +29 -29
- package/dist/types/index.d.ts +1 -1
- package/dist/types/jats/importer/index.d.ts +1 -1
- package/dist/types/jats/importer/jats-body-transformations.d.ts +16 -19
- package/dist/types/jats/importer/jats-comments.d.ts +13 -9
- package/dist/types/jats/importer/jats-front-parser.d.ts +35 -12
- package/dist/types/jats/importer/jats-journal-meta-parser.d.ts +4 -4
- package/dist/types/jats/importer/jats-parser-utils.d.ts +1 -6
- package/dist/types/jats/importer/jats-reference-parser.d.ts +2 -6
- package/dist/types/jats/importer/jats-references.d.ts +12 -0
- package/dist/types/jats/importer/parse-jats-article.d.ts +5 -17
- package/dist/types/jats/index.d.ts +1 -1
- package/dist/types/lib/section-group-type.d.ts +23 -0
- package/dist/types/lib/utils.d.ts +1 -4
- package/dist/types/schema/index.d.ts +4 -5
- package/dist/types/schema/nodes/{meta_section.d.ts → abstracts.d.ts} +1 -9
- package/dist/types/schema/nodes/affiliations.d.ts +17 -0
- package/dist/types/schema/nodes/backmatter.d.ts +17 -0
- package/dist/types/schema/nodes/body.d.ts +17 -0
- package/dist/types/schema/nodes/citation.d.ts +3 -5
- package/dist/types/schema/nodes/comments.d.ts +17 -0
- package/dist/types/schema/nodes/contributors.d.ts +17 -0
- package/dist/types/schema/nodes/core_section.d.ts +17 -0
- package/dist/types/schema/nodes/cross_reference.d.ts +1 -1
- package/dist/types/schema/nodes/inline_footnote.d.ts +1 -1
- package/dist/types/schema/nodes/keyword.d.ts +0 -1
- package/dist/types/schema/nodes/{contributors_element.d.ts → keyword_group.d.ts} +3 -4
- package/dist/types/schema/nodes/{comment_list.d.ts → keywords.d.ts} +3 -2
- package/dist/types/schema/nodes/manuscript.d.ts +1 -0
- package/dist/types/schema/types.d.ts +1 -1
- package/dist/types/transformer/builders.d.ts +2 -14
- package/dist/types/transformer/decode.d.ts +5 -9
- package/dist/types/transformer/encode.d.ts +4 -4
- package/dist/types/transformer/highlight-markers.d.ts +7 -2
- package/dist/types/transformer/object-types.d.ts +1 -2
- package/dist/types/transformer/section-category.d.ts +4 -3
- package/package.json +1 -6
- package/dist/cjs/lib/core-section-categories.js +0 -29
- package/dist/cjs/schema/nodes/affiliations_section.js +0 -36
- package/dist/cjs/schema/nodes/contributors_element.js +0 -49
- package/dist/cjs/schema/nodes/contributors_section.js +0 -36
- package/dist/es/lib/core-section-categories.js +0 -26
- package/dist/es/schema/nodes/affiliations_section.js +0 -32
- package/dist/es/schema/nodes/contributors_element.js +0 -46
- package/dist/es/schema/nodes/contributors_section.js +0 -32
- package/dist/types/lib/core-section-categories.d.ts +0 -8
- package/dist/types/schema/nodes/affiliations_section.d.ts +0 -11
- package/dist/types/schema/nodes/contributors_section.d.ts +0 -12
- package/dist/types/schema/nodes/keywords_group.d.ts +0 -26
- package/dist/types/schema/nodes/keywords_section.d.ts +0 -26
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Element } from '@manuscripts/json-schema';
|
|
17
|
+
import { SectionGroupType } from '../lib/section-group-type';
|
|
17
18
|
import { ManuscriptNode, ManuscriptNodeType } from '../schema';
|
|
18
|
-
export declare const getCoreSectionTitles: (sectionCategory: SectionCategory) => string[];
|
|
19
19
|
export declare const isAnySectionNode: (node: ManuscriptNode) => boolean;
|
|
20
|
-
export type SectionCategory = 'MPSectionCategory:abstract' | 'MPSectionCategory:abstract-teaser' | 'MPSectionCategory:abstract-graphical' | 'MPSectionCategory:acknowledgement' | 'MPSectionCategory:availability' | 'MPSectionCategory:bibliography' | 'MPSectionCategory:conclusions' | 'MPSectionCategory:discussion' | 'MPSectionCategory:endnotes' | 'MPSectionCategory:introduction' | 'MPSectionCategory:keywords' | 'MPSectionCategory:materials-method' | 'MPSectionCategory:results' | 'MPSectionCategory:toc' | 'MPSectionCategory:floating-element' | 'MPSectionCategory:appendices' | 'MPSectionCategory:competing-interests' | 'MPSectionCategory:financial-disclosure' | 'MPSectionCategory:con' | 'MPSectionCategory:deceased' | 'MPSectionCategory:equal' | 'MPSectionCategory:present-address' | 'MPSectionCategory:presented-at' | 'MPSectionCategory:previously-at' | 'MPSectionCategory:supplementary-material' | 'MPSectionCategory:supported-by' | 'MPSectionCategory:ethics-statement'
|
|
21
|
-
export type SecType = 'abstract' | 'abstract-teaser' | 'abstract-graphical' | 'acknowledgments' | 'availability' | 'bibliography' | 'conclusions' | 'data-availability' | 'discussion' | 'endnotes' | 'intro' | 'keywords' | 'materials' | 'methods' | 'results' | 'toc' | 'floating-element' | 'appendices' | 'competing-interests' | 'financial-disclosure' | 'con' | 'deceased' | 'equal' | 'present-address' | 'presented-at' | 'previously-at' | 'supplementary-material' | 'supported-by' | 'ethics-statement'
|
|
20
|
+
export type SectionCategory = 'MPSectionCategory:abstract' | 'MPSectionCategory:abstract-teaser' | 'MPSectionCategory:abstract-graphical' | 'MPSectionCategory:acknowledgement' | 'MPSectionCategory:availability' | 'MPSectionCategory:bibliography' | 'MPSectionCategory:conclusions' | 'MPSectionCategory:discussion' | 'MPSectionCategory:endnotes' | 'MPSectionCategory:introduction' | 'MPSectionCategory:keywords' | 'MPSectionCategory:materials-method' | 'MPSectionCategory:results' | 'MPSectionCategory:toc' | 'MPSectionCategory:floating-element' | 'MPSectionCategory:appendices' | 'MPSectionCategory:competing-interests' | 'MPSectionCategory:financial-disclosure' | 'MPSectionCategory:con' | 'MPSectionCategory:deceased' | 'MPSectionCategory:equal' | 'MPSectionCategory:present-address' | 'MPSectionCategory:presented-at' | 'MPSectionCategory:previously-at' | 'MPSectionCategory:supplementary-material' | 'MPSectionCategory:supported-by' | 'MPSectionCategory:ethics-statement';
|
|
21
|
+
export type SecType = 'abstract' | 'abstract-teaser' | 'abstract-graphical' | 'acknowledgments' | 'availability' | 'bibliography' | 'conclusions' | 'data-availability' | 'discussion' | 'endnotes' | 'intro' | 'keywords' | 'materials' | 'methods' | 'results' | 'toc' | 'floating-element' | 'appendices' | 'competing-interests' | 'financial-disclosure' | 'con' | 'deceased' | 'equal' | 'present-address' | 'presented-at' | 'previously-at' | 'supplementary-material' | 'supported-by' | 'ethics-statement';
|
|
22
22
|
export declare const chooseSectionNodeType: (category?: SectionCategory) => ManuscriptNodeType;
|
|
23
23
|
export declare const chooseSectionLableName: (type?: SecType) => string;
|
|
24
24
|
export declare const guessSectionCategory: (elements: Element[]) => SectionCategory | undefined;
|
|
25
25
|
export declare const buildSectionCategory: (node: ManuscriptNode) => SectionCategory | undefined;
|
|
26
26
|
export declare const chooseJatsFnType: (footnoteType: string) => string;
|
|
27
27
|
export declare const chooseSecType: (sectionCategory: SectionCategory) => SecType;
|
|
28
|
+
export declare const getSectionGroupType: (category: string) => SectionGroupType;
|
|
28
29
|
export declare const chooseSectionCategoryByType: (secType: string) => SectionCategory | undefined;
|
|
29
30
|
export declare const chooseSectionCategory: (section: HTMLElement) => SectionCategory | undefined;
|
|
30
31
|
export declare const chooseSectionCategoryFromTitle: (title: string | null) => SectionCategory | undefined;
|
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
|
+
"version": "2.0.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -76,10 +76,5 @@
|
|
|
76
76
|
"prosemirror-view": "^1.29.1",
|
|
77
77
|
"rimraf": "^3.0.2",
|
|
78
78
|
"typescript": "^4.0.5"
|
|
79
|
-
},
|
|
80
|
-
"peerDependencies": {
|
|
81
|
-
"prosemirror-model": "^1.18.3",
|
|
82
|
-
"prosemirror-state": "^1.4.2",
|
|
83
|
-
"prosemirror-view": "^1.29.1"
|
|
84
79
|
}
|
|
85
80
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coreSectionCategories = void 0;
|
|
4
|
-
exports.coreSectionCategories = [
|
|
5
|
-
{
|
|
6
|
-
_id: 'MPSectionCategory:abstracts',
|
|
7
|
-
name: 'Abstracts',
|
|
8
|
-
desc: 'Abstracts section for grouping',
|
|
9
|
-
objectType: 'MPSectionCategory',
|
|
10
|
-
titles: [],
|
|
11
|
-
priority: 120,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
_id: 'MPSectionCategory:backmatter',
|
|
15
|
-
name: 'Backmatter',
|
|
16
|
-
desc: 'Backmatter section for grouping',
|
|
17
|
-
objectType: 'MPSectionCategory',
|
|
18
|
-
titles: [],
|
|
19
|
-
priority: 180,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
_id: 'MPSectionCategory:body',
|
|
23
|
-
name: 'Body',
|
|
24
|
-
desc: 'Body section for grouping',
|
|
25
|
-
objectType: 'MPSectionCategory',
|
|
26
|
-
titles: [],
|
|
27
|
-
priority: 200,
|
|
28
|
-
},
|
|
29
|
-
];
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAffiliationsSectionNode = exports.affiliationsSection = void 0;
|
|
4
|
-
exports.affiliationsSection = {
|
|
5
|
-
content: 'section_title? affiliation*',
|
|
6
|
-
attrs: {
|
|
7
|
-
id: { default: 'META_SECTION_AFFILLIATIONS' },
|
|
8
|
-
dataTracked: { default: null },
|
|
9
|
-
},
|
|
10
|
-
group: 'block sections',
|
|
11
|
-
selectable: false,
|
|
12
|
-
parseDOM: [
|
|
13
|
-
{
|
|
14
|
-
tag: 'section.affiliations',
|
|
15
|
-
getAttrs: (section) => {
|
|
16
|
-
const dom = section;
|
|
17
|
-
return {
|
|
18
|
-
contents: dom.innerHTML,
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
toDOM: (node) => {
|
|
24
|
-
const affiliationsSectionNode = node;
|
|
25
|
-
return [
|
|
26
|
-
'section',
|
|
27
|
-
{
|
|
28
|
-
class: 'affiliations',
|
|
29
|
-
id: affiliationsSectionNode.attrs.id,
|
|
30
|
-
},
|
|
31
|
-
0
|
|
32
|
-
];
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
const isAffiliationsSectionNode = (node) => node.type === node.type.schema.nodes.affiliations_section;
|
|
36
|
-
exports.isAffiliationsSectionNode = isAffiliationsSectionNode;
|
|
@@ -1,49 +0,0 @@
|
|
|
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.contributorsElement = void 0;
|
|
19
|
-
exports.contributorsElement = {
|
|
20
|
-
content: 'contributor*',
|
|
21
|
-
attrs: {
|
|
22
|
-
id: { default: '' },
|
|
23
|
-
contents: { default: '' },
|
|
24
|
-
dataTracked: { default: null },
|
|
25
|
-
},
|
|
26
|
-
group: 'block element',
|
|
27
|
-
selectable: false,
|
|
28
|
-
parseDOM: [
|
|
29
|
-
{
|
|
30
|
-
tag: 'div.manuscript-contributors',
|
|
31
|
-
getAttrs: () => {
|
|
32
|
-
return {
|
|
33
|
-
contents: '',
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
toDOM: (node) => {
|
|
39
|
-
const contributorsElementNode = node;
|
|
40
|
-
return [
|
|
41
|
-
'div',
|
|
42
|
-
{
|
|
43
|
-
class: 'manuscript-contributors',
|
|
44
|
-
id: contributorsElementNode.attrs.id,
|
|
45
|
-
},
|
|
46
|
-
0,
|
|
47
|
-
];
|
|
48
|
-
},
|
|
49
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isContributorsSectionNode = exports.contributorsSection = void 0;
|
|
4
|
-
exports.contributorsSection = {
|
|
5
|
-
content: 'section_title? contributor*',
|
|
6
|
-
attrs: {
|
|
7
|
-
id: { default: 'META_SECTION_CONTRIBUTORS' },
|
|
8
|
-
dataTracked: { default: null },
|
|
9
|
-
contents: { default: '' },
|
|
10
|
-
},
|
|
11
|
-
group: 'block sections',
|
|
12
|
-
selectable: false,
|
|
13
|
-
parseDOM: [
|
|
14
|
-
{
|
|
15
|
-
tag: 'section.contributors',
|
|
16
|
-
getAttrs: () => {
|
|
17
|
-
return {
|
|
18
|
-
contents: '',
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
toDOM: (node) => {
|
|
24
|
-
const contributorsSectionNode = node;
|
|
25
|
-
return [
|
|
26
|
-
'section',
|
|
27
|
-
{
|
|
28
|
-
class: 'contributors',
|
|
29
|
-
id: contributorsSectionNode.attrs.id,
|
|
30
|
-
},
|
|
31
|
-
0,
|
|
32
|
-
];
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
const isContributorsSectionNode = (node) => node.type === node.type.schema.nodes.contributors_section;
|
|
36
|
-
exports.isContributorsSectionNode = isContributorsSectionNode;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export const coreSectionCategories = [
|
|
2
|
-
{
|
|
3
|
-
_id: 'MPSectionCategory:abstracts',
|
|
4
|
-
name: 'Abstracts',
|
|
5
|
-
desc: 'Abstracts section for grouping',
|
|
6
|
-
objectType: 'MPSectionCategory',
|
|
7
|
-
titles: [],
|
|
8
|
-
priority: 120,
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
_id: 'MPSectionCategory:backmatter',
|
|
12
|
-
name: 'Backmatter',
|
|
13
|
-
desc: 'Backmatter section for grouping',
|
|
14
|
-
objectType: 'MPSectionCategory',
|
|
15
|
-
titles: [],
|
|
16
|
-
priority: 180,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
_id: 'MPSectionCategory:body',
|
|
20
|
-
name: 'Body',
|
|
21
|
-
desc: 'Body section for grouping',
|
|
22
|
-
objectType: 'MPSectionCategory',
|
|
23
|
-
titles: [],
|
|
24
|
-
priority: 200,
|
|
25
|
-
},
|
|
26
|
-
];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export const affiliationsSection = {
|
|
2
|
-
content: 'section_title? affiliation*',
|
|
3
|
-
attrs: {
|
|
4
|
-
id: { default: 'META_SECTION_AFFILLIATIONS' },
|
|
5
|
-
dataTracked: { default: null },
|
|
6
|
-
},
|
|
7
|
-
group: 'block sections',
|
|
8
|
-
selectable: false,
|
|
9
|
-
parseDOM: [
|
|
10
|
-
{
|
|
11
|
-
tag: 'section.affiliations',
|
|
12
|
-
getAttrs: (section) => {
|
|
13
|
-
const dom = section;
|
|
14
|
-
return {
|
|
15
|
-
contents: dom.innerHTML,
|
|
16
|
-
};
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
toDOM: (node) => {
|
|
21
|
-
const affiliationsSectionNode = node;
|
|
22
|
-
return [
|
|
23
|
-
'section',
|
|
24
|
-
{
|
|
25
|
-
class: 'affiliations',
|
|
26
|
-
id: affiliationsSectionNode.attrs.id,
|
|
27
|
-
},
|
|
28
|
-
0
|
|
29
|
-
];
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
export const isAffiliationsSectionNode = (node) => node.type === node.type.schema.nodes.affiliations_section;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2019 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
|
-
*/
|
|
16
|
-
export const contributorsElement = {
|
|
17
|
-
content: 'contributor*',
|
|
18
|
-
attrs: {
|
|
19
|
-
id: { default: '' },
|
|
20
|
-
contents: { default: '' },
|
|
21
|
-
dataTracked: { default: null },
|
|
22
|
-
},
|
|
23
|
-
group: 'block element',
|
|
24
|
-
selectable: false,
|
|
25
|
-
parseDOM: [
|
|
26
|
-
{
|
|
27
|
-
tag: 'div.manuscript-contributors',
|
|
28
|
-
getAttrs: () => {
|
|
29
|
-
return {
|
|
30
|
-
contents: '',
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
toDOM: (node) => {
|
|
36
|
-
const contributorsElementNode = node;
|
|
37
|
-
return [
|
|
38
|
-
'div',
|
|
39
|
-
{
|
|
40
|
-
class: 'manuscript-contributors',
|
|
41
|
-
id: contributorsElementNode.attrs.id,
|
|
42
|
-
},
|
|
43
|
-
0,
|
|
44
|
-
];
|
|
45
|
-
},
|
|
46
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export const contributorsSection = {
|
|
2
|
-
content: 'section_title? contributor*',
|
|
3
|
-
attrs: {
|
|
4
|
-
id: { default: 'META_SECTION_CONTRIBUTORS' },
|
|
5
|
-
dataTracked: { default: null },
|
|
6
|
-
contents: { default: '' },
|
|
7
|
-
},
|
|
8
|
-
group: 'block sections',
|
|
9
|
-
selectable: false,
|
|
10
|
-
parseDOM: [
|
|
11
|
-
{
|
|
12
|
-
tag: 'section.contributors',
|
|
13
|
-
getAttrs: () => {
|
|
14
|
-
return {
|
|
15
|
-
contents: '',
|
|
16
|
-
};
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
toDOM: (node) => {
|
|
21
|
-
const contributorsSectionNode = node;
|
|
22
|
-
return [
|
|
23
|
-
'section',
|
|
24
|
-
{
|
|
25
|
-
class: 'contributors',
|
|
26
|
-
id: contributorsSectionNode.attrs.id,
|
|
27
|
-
},
|
|
28
|
-
0,
|
|
29
|
-
];
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
export const isContributorsSectionNode = (node) => node.type === node.type.schema.nodes.contributors_section;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
-
import { ManuscriptNode } from '../types';
|
|
3
|
-
interface Attrs {
|
|
4
|
-
id: string;
|
|
5
|
-
}
|
|
6
|
-
export interface AffiliationsSectionNode extends ManuscriptNode {
|
|
7
|
-
attrs: Attrs;
|
|
8
|
-
}
|
|
9
|
-
export declare const affiliationsSection: NodeSpec;
|
|
10
|
-
export declare const isAffiliationsSectionNode: (node: ManuscriptNode) => node is AffiliationsSectionNode;
|
|
11
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
-
import { ManuscriptNode } from '../types';
|
|
3
|
-
interface Attrs {
|
|
4
|
-
id: string;
|
|
5
|
-
contents: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ContributorsSectionNode extends ManuscriptNode {
|
|
8
|
-
attrs: Attrs;
|
|
9
|
-
}
|
|
10
|
-
export declare const contributorsSection: NodeSpec;
|
|
11
|
-
export declare const isContributorsSectionNode: (node: ManuscriptNode) => node is ContributorsSectionNode;
|
|
12
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2019 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
|
-
*/
|
|
16
|
-
import { NodeSpec } from 'prosemirror-model';
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
18
|
-
interface Attrs {
|
|
19
|
-
id: string;
|
|
20
|
-
}
|
|
21
|
-
export interface KeywordsGroupNode extends ManuscriptNode {
|
|
22
|
-
attrs: Attrs;
|
|
23
|
-
}
|
|
24
|
-
export declare const keywordsGroup: NodeSpec;
|
|
25
|
-
export declare const isKeywordsGroupNode: (node: ManuscriptNode) => node is KeywordsGroupNode;
|
|
26
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2019 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
|
-
*/
|
|
16
|
-
import { NodeSpec } from 'prosemirror-model';
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
18
|
-
interface Attrs {
|
|
19
|
-
id: string;
|
|
20
|
-
}
|
|
21
|
-
export interface KeywordsSectionNode extends ManuscriptNode {
|
|
22
|
-
attrs: Attrs;
|
|
23
|
-
}
|
|
24
|
-
export declare const keywordsSection: NodeSpec;
|
|
25
|
-
export declare const isKeywordsSectionNode: (node: ManuscriptNode) => node is KeywordsSectionNode;
|
|
26
|
-
export {};
|