@manuscripts/transform 3.0.21-LEAN-4076.1 → 3.0.21

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.
Files changed (40) hide show
  1. package/dist/cjs/index.js +1 -2
  2. package/dist/cjs/jats/exporter/jats-exporter.js +7 -7
  3. package/dist/cjs/jats/importer/jats-dom-parser.js +972 -948
  4. package/dist/cjs/jats/importer/jats-transformations.js +9 -14
  5. package/dist/cjs/jats/importer/parse-jats-article.js +7 -5
  6. package/dist/cjs/lib/{section-group-type.js → section-categories.js} +4 -14
  7. package/dist/cjs/schema/index.js +0 -2
  8. package/dist/cjs/schema/migration/migration-scripts/3.0.21.js +25 -0
  9. package/dist/cjs/schema/migration/migration-scripts/index.js +2 -0
  10. package/dist/cjs/transformer/index.js +0 -1
  11. package/dist/cjs/version.js +1 -1
  12. package/dist/es/index.js +1 -2
  13. package/dist/es/jats/exporter/jats-exporter.js +8 -8
  14. package/dist/es/jats/importer/jats-dom-parser.js +970 -947
  15. package/dist/es/jats/importer/jats-transformations.js +9 -14
  16. package/dist/es/jats/importer/parse-jats-article.js +8 -6
  17. package/dist/es/lib/{section-group-type.js → section-categories.js} +2 -13
  18. package/dist/es/schema/index.js +0 -2
  19. package/dist/es/schema/migration/migration-scripts/3.0.21.js +23 -0
  20. package/dist/es/schema/migration/migration-scripts/index.js +2 -0
  21. package/dist/es/transformer/index.js +0 -1
  22. package/dist/es/version.js +1 -1
  23. package/dist/types/index.d.ts +1 -2
  24. package/dist/types/jats/importer/jats-dom-parser.d.ts +24 -9
  25. package/dist/types/jats/importer/jats-transformations.d.ts +2 -1
  26. package/dist/types/jats/importer/parse-jats-article.d.ts +2 -2
  27. package/dist/types/lib/{section-group-type.d.ts → section-categories.d.ts} +3 -9
  28. package/dist/types/schema/index.d.ts +0 -2
  29. package/dist/types/schema/migration/migration-scripts/3.0.21.d.ts +9 -0
  30. package/dist/types/schema/migration/migration-scripts/index.d.ts +2 -1
  31. package/dist/types/schema/types.d.ts +21 -1
  32. package/dist/types/transformer/index.d.ts +0 -1
  33. package/dist/types/version.d.ts +1 -1
  34. package/package.json +1 -1
  35. package/dist/cjs/lib/table-cell-styles.js +0 -52
  36. package/dist/cjs/transformer/section-category.js +0 -263
  37. package/dist/es/lib/table-cell-styles.js +0 -47
  38. package/dist/es/transformer/section-category.js +0 -249
  39. package/dist/types/lib/table-cell-styles.d.ts +0 -27
  40. package/dist/types/transformer/section-category.d.ts +0 -31
@@ -1,263 +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.chooseSectionCategoryFromTitle = exports.chooseSectionCategory = exports.chooseSectionCategoryByType = exports.getSectionGroupType = exports.chooseSecType = exports.chooseJatsFnType = exports.buildSectionCategory = exports.guessSectionCategory = exports.chooseSectionLableName = exports.chooseSectionNodeType = exports.isAnySectionNode = void 0;
19
- const json_schema_1 = require("@manuscripts/json-schema");
20
- const section_group_type_1 = require("../lib/section-group-type");
21
- const schema_1 = require("../schema");
22
- const sectionNodeTypes = [
23
- schema_1.schema.nodes.bibliography_section,
24
- schema_1.schema.nodes.footnotes_section,
25
- schema_1.schema.nodes.keywords,
26
- schema_1.schema.nodes.section,
27
- ];
28
- const isAnySectionNode = (node) => sectionNodeTypes.includes(node.type);
29
- exports.isAnySectionNode = isAnySectionNode;
30
- const chooseSectionNodeType = (category) => {
31
- switch (category) {
32
- case 'MPSectionCategory:bibliography':
33
- return schema_1.schema.nodes.bibliography_section;
34
- case 'MPSectionCategory:abstract-graphical':
35
- return schema_1.schema.nodes.graphical_abstract_section;
36
- case 'MPSectionCategory:endnotes':
37
- return schema_1.schema.nodes.footnotes_section;
38
- case 'MPSectionCategory:keywords':
39
- return schema_1.schema.nodes.keywords;
40
- case 'MPSectionCategory:box-element':
41
- return schema_1.schema.nodes.box_element;
42
- default:
43
- return schema_1.schema.nodes.section;
44
- }
45
- };
46
- exports.chooseSectionNodeType = chooseSectionNodeType;
47
- const chooseSectionLableName = (type) => {
48
- switch (type) {
49
- case 'appendices':
50
- return 'Appendix';
51
- default:
52
- return type;
53
- }
54
- };
55
- exports.chooseSectionLableName = chooseSectionLableName;
56
- const guessSectionCategory = (elements) => {
57
- if (!elements.length) {
58
- return undefined;
59
- }
60
- switch (elements[0].objectType) {
61
- case json_schema_1.ObjectTypes.BibliographyElement:
62
- return 'MPSectionCategory:bibliography';
63
- case json_schema_1.ObjectTypes.FootnotesElement:
64
- return 'MPSectionCategory:endnotes';
65
- case json_schema_1.ObjectTypes.KeywordsElement:
66
- return 'MPSectionCategory:keywords';
67
- case json_schema_1.ObjectTypes.TOCElement:
68
- return 'MPSectionCategory:toc';
69
- default:
70
- return undefined;
71
- }
72
- };
73
- exports.guessSectionCategory = guessSectionCategory;
74
- const buildSectionCategory = (node) => {
75
- switch (node.type) {
76
- case schema_1.schema.nodes.bibliography_section:
77
- return 'MPSectionCategory:bibliography';
78
- case schema_1.schema.nodes.footnotes_section:
79
- return 'MPSectionCategory:endnotes';
80
- case schema_1.schema.nodes.keywords:
81
- return 'MPSectionCategory:keywords';
82
- case schema_1.schema.nodes.graphical_abstract_section:
83
- return 'MPSectionCategory:abstract-graphical';
84
- case schema_1.schema.nodes.box_element:
85
- return 'MPSectionCategory:box-element';
86
- default:
87
- return node.attrs.category || undefined;
88
- }
89
- };
90
- exports.buildSectionCategory = buildSectionCategory;
91
- const chooseJatsFnType = (footnoteType) => {
92
- switch (footnoteType) {
93
- case 'competing-interests':
94
- return 'coi-statement';
95
- default:
96
- return footnoteType;
97
- }
98
- };
99
- exports.chooseJatsFnType = chooseJatsFnType;
100
- const chooseSecType = (sectionCategory) => {
101
- const [, suffix] = sectionCategory.split(':', 2);
102
- switch (suffix) {
103
- case 'acknowledgement':
104
- return 'acknowledgments';
105
- case 'introduction':
106
- return 'intro';
107
- case 'materials-method':
108
- return 'methods';
109
- default:
110
- return suffix;
111
- }
112
- };
113
- exports.chooseSecType = chooseSecType;
114
- const getSectionGroupType = (category) => {
115
- switch (category) {
116
- case 'MPSectionCategory:abstract':
117
- case 'MPSectionCategory:abstract-graphical':
118
- return section_group_type_1.abstractsType;
119
- case 'MPSectionCategory:competing-interests':
120
- case 'MPSectionCategory:con':
121
- case 'MPSectionCategory:ethics-statement':
122
- case 'MPSectionCategory:financial-disclosure':
123
- case 'MPSectionCategory:supplementary-material':
124
- case 'MPSectionCategory:supported-by':
125
- case 'MPSectionCategory:availability':
126
- case 'MPSectionCategory:acknowledgement':
127
- case 'MPSectionCategory:endnotes':
128
- case 'MPSectionCategory:bibliography':
129
- case 'MPSectionCategory:appendices':
130
- case 'MPSectionCategory:deceased':
131
- case 'MPSectionCategory:equal':
132
- case 'MPSectionCategory:present-address':
133
- case 'MPSectionCategory:presented-at':
134
- case 'MPSectionCategory:previously-at':
135
- return section_group_type_1.backmatterType;
136
- }
137
- return section_group_type_1.bodyType;
138
- };
139
- exports.getSectionGroupType = getSectionGroupType;
140
- const chooseSectionCategoryByType = (secType) => {
141
- switch (secType) {
142
- case 'abstract':
143
- return 'MPSectionCategory:abstract';
144
- case 'abstract-teaser':
145
- return 'MPSectionCategory:abstract-teaser';
146
- case 'abstract-graphical':
147
- return 'MPSectionCategory:abstract-graphical';
148
- case 'acknowledgments':
149
- return 'MPSectionCategory:acknowledgement';
150
- case 'availability':
151
- case 'data-availability':
152
- return 'MPSectionCategory:availability';
153
- case 'bibliography':
154
- return 'MPSectionCategory:bibliography';
155
- case 'conclusions':
156
- return 'MPSectionCategory:conclusions';
157
- case 'discussion':
158
- return 'MPSectionCategory:discussion';
159
- case 'endnotes':
160
- return 'MPSectionCategory:endnotes';
161
- case 'intro':
162
- return 'MPSectionCategory:introduction';
163
- case 'keywords':
164
- return 'MPSectionCategory:keywords';
165
- case 'materials':
166
- case 'methods':
167
- return 'MPSectionCategory:materials-method';
168
- case 'results':
169
- return 'MPSectionCategory:results';
170
- case 'toc':
171
- return 'MPSectionCategory:toc';
172
- case 'floating-element':
173
- return 'MPSectionCategory:floating-element';
174
- case 'appendices':
175
- return 'MPSectionCategory:appendices';
176
- case 'competing-interests':
177
- case 'conflict':
178
- return 'MPSectionCategory:competing-interests';
179
- case 'financial-disclosure':
180
- return 'MPSectionCategory:financial-disclosure';
181
- case 'con':
182
- return 'MPSectionCategory:con';
183
- case 'deceased':
184
- return 'MPSectionCategory:deceased';
185
- case 'equal':
186
- return 'MPSectionCategory:equal';
187
- case 'present-address':
188
- return 'MPSectionCategory:present-address';
189
- case 'presented-at':
190
- return 'MPSectionCategory:presented-at';
191
- case 'previously-at':
192
- return 'MPSectionCategory:previously-at';
193
- case 'supplementary-material':
194
- return 'MPSectionCategory:supplementary-material';
195
- case 'supported-by':
196
- return 'MPSectionCategory:supported-by';
197
- case 'ethics-statement':
198
- return 'MPSectionCategory:ethics-statement';
199
- case 'box-element':
200
- return 'MPSectionCategory:box-element';
201
- case 'subsection':
202
- return 'MPSectionCategory:subsection';
203
- default:
204
- return undefined;
205
- }
206
- };
207
- exports.chooseSectionCategoryByType = chooseSectionCategoryByType;
208
- const chooseSectionCategory = (section) => {
209
- const secType = section.getAttribute('sec-type');
210
- const secCat = (0, exports.chooseSectionCategoryByType)(secType);
211
- if (secCat) {
212
- return secCat;
213
- }
214
- else {
215
- const titleNode = section.firstElementChild;
216
- if (titleNode && titleNode.nodeName === 'title' && titleNode.textContent) {
217
- return (0, exports.chooseSectionCategoryFromTitle)(titleNode.textContent.trim().toLowerCase());
218
- }
219
- return undefined;
220
- }
221
- };
222
- exports.chooseSectionCategory = chooseSectionCategory;
223
- const chooseSectionCategoryFromTitle = (title) => {
224
- if (!title) {
225
- return undefined;
226
- }
227
- switch (title) {
228
- case 'abstract':
229
- return 'MPSectionCategory:abstract';
230
- case 'acknowledgments':
231
- case 'acknowledgements':
232
- return 'MPSectionCategory:acknowledgement';
233
- case 'availability':
234
- case 'data availability':
235
- return 'MPSectionCategory:availability';
236
- case 'conclusions':
237
- return 'MPSectionCategory:conclusions';
238
- case 'discussion':
239
- return 'MPSectionCategory:discussion';
240
- case 'introduction':
241
- return 'MPSectionCategory:introduction';
242
- case 'methods':
243
- case 'materials':
244
- case 'materials and methods':
245
- case 'materials & methods':
246
- return 'MPSectionCategory:materials-method';
247
- case 'results':
248
- return 'MPSectionCategory:results';
249
- case 'bibliography':
250
- case 'references':
251
- return 'MPSectionCategory:bibliography';
252
- case 'conflict':
253
- case 'conflict of interest':
254
- case 'competing interests':
255
- return 'MPSectionCategory:competing-interests';
256
- case 'financial-disclosure':
257
- case 'funding information':
258
- return 'MPSectionCategory:financial-disclosure';
259
- case 'box-element':
260
- return 'MPSectionCategory:box-element';
261
- }
262
- };
263
- exports.chooseSectionCategoryFromTitle = chooseSectionCategoryFromTitle;
@@ -1,47 +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 TABLE_CELL_STYLES = [
17
- 'backgroundColor',
18
- 'border-top',
19
- 'border-right',
20
- 'border-bottom',
21
- 'border-left',
22
- 'verticalAlign',
23
- 'textAlign',
24
- ];
25
- const dashify = (str) => {
26
- return str
27
- .trim()
28
- .replace(/([a-z])([A-Z])/g, '$1-$2')
29
- .replace(/\W/g, (m) => (/[À-ž]/.test(m) ? m : '-'))
30
- .replace(/^-+|-+$/g, '')
31
- .toLowerCase();
32
- };
33
- export const serializeTableCellStyles = (styles) => {
34
- return Object.keys(styles)
35
- .map((key) => styles[key] && `${dashify(key)}: ${styles[key]}`)
36
- .filter(Boolean)
37
- .join('; ');
38
- };
39
- const isStyleKey = (key) => TABLE_CELL_STYLES.includes(key);
40
- export const getTableCellStyles = (styles) => {
41
- return Object.entries(styles).reduce((acc, [key, value]) => {
42
- if (isStyleKey(key)) {
43
- acc[key] = value;
44
- }
45
- return acc;
46
- }, {});
47
- };
@@ -1,249 +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 { ObjectTypes } from '@manuscripts/json-schema';
17
- import { abstractsType, backmatterType, bodyType, } from '../lib/section-group-type';
18
- import { schema } from '../schema';
19
- const sectionNodeTypes = [
20
- schema.nodes.bibliography_section,
21
- schema.nodes.footnotes_section,
22
- schema.nodes.keywords,
23
- schema.nodes.section,
24
- ];
25
- export const isAnySectionNode = (node) => sectionNodeTypes.includes(node.type);
26
- export const chooseSectionNodeType = (category) => {
27
- switch (category) {
28
- case 'MPSectionCategory:bibliography':
29
- return schema.nodes.bibliography_section;
30
- case 'MPSectionCategory:abstract-graphical':
31
- return schema.nodes.graphical_abstract_section;
32
- case 'MPSectionCategory:endnotes':
33
- return schema.nodes.footnotes_section;
34
- case 'MPSectionCategory:keywords':
35
- return schema.nodes.keywords;
36
- case 'MPSectionCategory:box-element':
37
- return schema.nodes.box_element;
38
- default:
39
- return schema.nodes.section;
40
- }
41
- };
42
- export const chooseSectionLableName = (type) => {
43
- switch (type) {
44
- case 'appendices':
45
- return 'Appendix';
46
- default:
47
- return type;
48
- }
49
- };
50
- export const guessSectionCategory = (elements) => {
51
- if (!elements.length) {
52
- return undefined;
53
- }
54
- switch (elements[0].objectType) {
55
- case ObjectTypes.BibliographyElement:
56
- return 'MPSectionCategory:bibliography';
57
- case ObjectTypes.FootnotesElement:
58
- return 'MPSectionCategory:endnotes';
59
- case ObjectTypes.KeywordsElement:
60
- return 'MPSectionCategory:keywords';
61
- case ObjectTypes.TOCElement:
62
- return 'MPSectionCategory:toc';
63
- default:
64
- return undefined;
65
- }
66
- };
67
- export const buildSectionCategory = (node) => {
68
- switch (node.type) {
69
- case schema.nodes.bibliography_section:
70
- return 'MPSectionCategory:bibliography';
71
- case schema.nodes.footnotes_section:
72
- return 'MPSectionCategory:endnotes';
73
- case schema.nodes.keywords:
74
- return 'MPSectionCategory:keywords';
75
- case schema.nodes.graphical_abstract_section:
76
- return 'MPSectionCategory:abstract-graphical';
77
- case schema.nodes.box_element:
78
- return 'MPSectionCategory:box-element';
79
- default:
80
- return node.attrs.category || undefined;
81
- }
82
- };
83
- export const chooseJatsFnType = (footnoteType) => {
84
- switch (footnoteType) {
85
- case 'competing-interests':
86
- return 'coi-statement';
87
- default:
88
- return footnoteType;
89
- }
90
- };
91
- export const chooseSecType = (sectionCategory) => {
92
- const [, suffix] = sectionCategory.split(':', 2);
93
- switch (suffix) {
94
- case 'acknowledgement':
95
- return 'acknowledgments';
96
- case 'introduction':
97
- return 'intro';
98
- case 'materials-method':
99
- return 'methods';
100
- default:
101
- return suffix;
102
- }
103
- };
104
- export const getSectionGroupType = (category) => {
105
- switch (category) {
106
- case 'MPSectionCategory:abstract':
107
- case 'MPSectionCategory:abstract-graphical':
108
- return abstractsType;
109
- case 'MPSectionCategory:competing-interests':
110
- case 'MPSectionCategory:con':
111
- case 'MPSectionCategory:ethics-statement':
112
- case 'MPSectionCategory:financial-disclosure':
113
- case 'MPSectionCategory:supplementary-material':
114
- case 'MPSectionCategory:supported-by':
115
- case 'MPSectionCategory:availability':
116
- case 'MPSectionCategory:acknowledgement':
117
- case 'MPSectionCategory:endnotes':
118
- case 'MPSectionCategory:bibliography':
119
- case 'MPSectionCategory:appendices':
120
- case 'MPSectionCategory:deceased':
121
- case 'MPSectionCategory:equal':
122
- case 'MPSectionCategory:present-address':
123
- case 'MPSectionCategory:presented-at':
124
- case 'MPSectionCategory:previously-at':
125
- return backmatterType;
126
- }
127
- return bodyType;
128
- };
129
- export const chooseSectionCategoryByType = (secType) => {
130
- switch (secType) {
131
- case 'abstract':
132
- return 'MPSectionCategory:abstract';
133
- case 'abstract-teaser':
134
- return 'MPSectionCategory:abstract-teaser';
135
- case 'abstract-graphical':
136
- return 'MPSectionCategory:abstract-graphical';
137
- case 'acknowledgments':
138
- return 'MPSectionCategory:acknowledgement';
139
- case 'availability':
140
- case 'data-availability':
141
- return 'MPSectionCategory:availability';
142
- case 'bibliography':
143
- return 'MPSectionCategory:bibliography';
144
- case 'conclusions':
145
- return 'MPSectionCategory:conclusions';
146
- case 'discussion':
147
- return 'MPSectionCategory:discussion';
148
- case 'endnotes':
149
- return 'MPSectionCategory:endnotes';
150
- case 'intro':
151
- return 'MPSectionCategory:introduction';
152
- case 'keywords':
153
- return 'MPSectionCategory:keywords';
154
- case 'materials':
155
- case 'methods':
156
- return 'MPSectionCategory:materials-method';
157
- case 'results':
158
- return 'MPSectionCategory:results';
159
- case 'toc':
160
- return 'MPSectionCategory:toc';
161
- case 'floating-element':
162
- return 'MPSectionCategory:floating-element';
163
- case 'appendices':
164
- return 'MPSectionCategory:appendices';
165
- case 'competing-interests':
166
- case 'conflict':
167
- return 'MPSectionCategory:competing-interests';
168
- case 'financial-disclosure':
169
- return 'MPSectionCategory:financial-disclosure';
170
- case 'con':
171
- return 'MPSectionCategory:con';
172
- case 'deceased':
173
- return 'MPSectionCategory:deceased';
174
- case 'equal':
175
- return 'MPSectionCategory:equal';
176
- case 'present-address':
177
- return 'MPSectionCategory:present-address';
178
- case 'presented-at':
179
- return 'MPSectionCategory:presented-at';
180
- case 'previously-at':
181
- return 'MPSectionCategory:previously-at';
182
- case 'supplementary-material':
183
- return 'MPSectionCategory:supplementary-material';
184
- case 'supported-by':
185
- return 'MPSectionCategory:supported-by';
186
- case 'ethics-statement':
187
- return 'MPSectionCategory:ethics-statement';
188
- case 'box-element':
189
- return 'MPSectionCategory:box-element';
190
- case 'subsection':
191
- return 'MPSectionCategory:subsection';
192
- default:
193
- return undefined;
194
- }
195
- };
196
- export const chooseSectionCategory = (section) => {
197
- const secType = section.getAttribute('sec-type');
198
- const secCat = chooseSectionCategoryByType(secType);
199
- if (secCat) {
200
- return secCat;
201
- }
202
- else {
203
- const titleNode = section.firstElementChild;
204
- if (titleNode && titleNode.nodeName === 'title' && titleNode.textContent) {
205
- return chooseSectionCategoryFromTitle(titleNode.textContent.trim().toLowerCase());
206
- }
207
- return undefined;
208
- }
209
- };
210
- export const chooseSectionCategoryFromTitle = (title) => {
211
- if (!title) {
212
- return undefined;
213
- }
214
- switch (title) {
215
- case 'abstract':
216
- return 'MPSectionCategory:abstract';
217
- case 'acknowledgments':
218
- case 'acknowledgements':
219
- return 'MPSectionCategory:acknowledgement';
220
- case 'availability':
221
- case 'data availability':
222
- return 'MPSectionCategory:availability';
223
- case 'conclusions':
224
- return 'MPSectionCategory:conclusions';
225
- case 'discussion':
226
- return 'MPSectionCategory:discussion';
227
- case 'introduction':
228
- return 'MPSectionCategory:introduction';
229
- case 'methods':
230
- case 'materials':
231
- case 'materials and methods':
232
- case 'materials & methods':
233
- return 'MPSectionCategory:materials-method';
234
- case 'results':
235
- return 'MPSectionCategory:results';
236
- case 'bibliography':
237
- case 'references':
238
- return 'MPSectionCategory:bibliography';
239
- case 'conflict':
240
- case 'conflict of interest':
241
- case 'competing interests':
242
- return 'MPSectionCategory:competing-interests';
243
- case 'financial-disclosure':
244
- case 'funding information':
245
- return 'MPSectionCategory:financial-disclosure';
246
- case 'box-element':
247
- return 'MPSectionCategory:box-element';
248
- }
249
- };
@@ -1,27 +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 declare const TABLE_CELL_STYLES: readonly ["backgroundColor", "border-top", "border-right", "border-bottom", "border-left", "verticalAlign", "textAlign"];
17
- export type TableCellStyleKey = typeof TABLE_CELL_STYLES[number];
18
- export declare const serializeTableCellStyles: (styles: {
19
- backgroundColor?: string | null | undefined;
20
- "border-top"?: string | null | undefined;
21
- "border-right"?: string | null | undefined;
22
- "border-bottom"?: string | null | undefined;
23
- "border-left"?: string | null | undefined;
24
- verticalAlign?: string | null | undefined;
25
- textAlign?: string | null | undefined;
26
- }) => string;
27
- export declare const getTableCellStyles: (styles: CSSStyleDeclaration) => Record<"backgroundColor" | "border-top" | "border-right" | "border-bottom" | "border-left" | "verticalAlign" | "textAlign", string>;
@@ -1,31 +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 { Element } from '@manuscripts/json-schema';
17
- import { SectionGroupType } from '../lib/section-group-type';
18
- import { ManuscriptNode, ManuscriptNodeType } from '../schema';
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' | 'MPSectionCategory:box-element' | 'MPSectionCategory:subsection';
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' | 'box-element' | 'subsection';
22
- export declare const chooseSectionNodeType: (category?: SectionCategory) => ManuscriptNodeType;
23
- export declare const chooseSectionLableName: (type?: SecType) => string;
24
- export declare const guessSectionCategory: (elements: Element[]) => SectionCategory | undefined;
25
- export declare const buildSectionCategory: (node: ManuscriptNode) => SectionCategory | undefined;
26
- export declare const chooseJatsFnType: (footnoteType: string) => string;
27
- export declare const chooseSecType: (sectionCategory: SectionCategory) => SecType;
28
- export declare const getSectionGroupType: (category: string) => SectionGroupType;
29
- export declare const chooseSectionCategoryByType: (secType: string) => SectionCategory | undefined;
30
- export declare const chooseSectionCategory: (section: HTMLElement) => SectionCategory | undefined;
31
- export declare const chooseSectionCategoryFromTitle: (title: string | null) => SectionCategory | undefined;