@manuscripts/transform 2.1.9 → 2.1.10
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 +1 -0
- package/dist/cjs/jats/jats-exporter.js +8 -1
- package/dist/cjs/schema/nodes/list.js +3 -0
- package/dist/cjs/transformer/decode.js +1 -0
- package/dist/cjs/transformer/encode.js +1 -0
- package/dist/es/jats/importer/jats-body-dom-parser.js +1 -0
- package/dist/es/jats/jats-exporter.js +8 -1
- package/dist/es/schema/nodes/list.js +3 -0
- package/dist/es/transformer/decode.js +1 -0
- package/dist/es/transformer/encode.js +1 -0
- package/dist/types/schema/nodes/list.d.ts +1 -0
- package/package.json +3 -3
|
@@ -639,7 +639,14 @@ class JATSExporter {
|
|
|
639
639
|
0,
|
|
640
640
|
],
|
|
641
641
|
blockquote_element: () => ['disp-quote', { 'content-type': 'quote' }, 0],
|
|
642
|
-
bullet_list: () =>
|
|
642
|
+
bullet_list: (node) => {
|
|
643
|
+
var _a;
|
|
644
|
+
return [
|
|
645
|
+
'list',
|
|
646
|
+
{ 'list-type': (_a = node.attrs.listStyleType) !== null && _a !== void 0 ? _a : 'bullet' },
|
|
647
|
+
0,
|
|
648
|
+
];
|
|
649
|
+
},
|
|
643
650
|
caption: () => ['p', 0],
|
|
644
651
|
caption_title: (node) => {
|
|
645
652
|
if (!node.textContent) {
|
|
@@ -25,6 +25,7 @@ exports.bulletList = {
|
|
|
25
25
|
id: { default: '' },
|
|
26
26
|
paragraphStyle: { default: '' },
|
|
27
27
|
dataTracked: { default: null },
|
|
28
|
+
listStyleType: { default: null },
|
|
28
29
|
},
|
|
29
30
|
parseDOM: [
|
|
30
31
|
{
|
|
@@ -33,6 +34,7 @@ exports.bulletList = {
|
|
|
33
34
|
const dom = p;
|
|
34
35
|
return {
|
|
35
36
|
id: dom.getAttribute('id'),
|
|
37
|
+
listStyleType: dom.getAttribute('list-type'),
|
|
36
38
|
};
|
|
37
39
|
},
|
|
38
40
|
},
|
|
@@ -44,6 +46,7 @@ exports.bulletList = {
|
|
|
44
46
|
'ul',
|
|
45
47
|
{
|
|
46
48
|
id: bulletListNode.attrs.id,
|
|
49
|
+
'list-type': bulletListNode.attrs.listStyleType,
|
|
47
50
|
class: (0, attributes_1.buildElementClass)(bulletListNode.attrs),
|
|
48
51
|
'data-object-type': json_schema_1.ObjectTypes.ListElement,
|
|
49
52
|
},
|
|
@@ -399,6 +399,7 @@ class Decoder {
|
|
|
399
399
|
return this.parseContents(model.contents || '<ul></ul>', undefined, this.getComments(model), {
|
|
400
400
|
topNode: schema_1.schema.nodes.bullet_list.create({
|
|
401
401
|
id: model._id,
|
|
402
|
+
listStyleType: model.listStyleType,
|
|
402
403
|
paragraphStyle: model.paragraphStyle,
|
|
403
404
|
}),
|
|
404
405
|
});
|
|
@@ -631,7 +631,14 @@ export class JATSExporter {
|
|
|
631
631
|
0,
|
|
632
632
|
],
|
|
633
633
|
blockquote_element: () => ['disp-quote', { 'content-type': 'quote' }, 0],
|
|
634
|
-
bullet_list: () =>
|
|
634
|
+
bullet_list: (node) => {
|
|
635
|
+
var _a;
|
|
636
|
+
return [
|
|
637
|
+
'list',
|
|
638
|
+
{ 'list-type': (_a = node.attrs.listStyleType) !== null && _a !== void 0 ? _a : 'bullet' },
|
|
639
|
+
0,
|
|
640
|
+
];
|
|
641
|
+
},
|
|
635
642
|
caption: () => ['p', 0],
|
|
636
643
|
caption_title: (node) => {
|
|
637
644
|
if (!node.textContent) {
|
|
@@ -22,6 +22,7 @@ export const bulletList = {
|
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
paragraphStyle: { default: '' },
|
|
24
24
|
dataTracked: { default: null },
|
|
25
|
+
listStyleType: { default: null },
|
|
25
26
|
},
|
|
26
27
|
parseDOM: [
|
|
27
28
|
{
|
|
@@ -30,6 +31,7 @@ export const bulletList = {
|
|
|
30
31
|
const dom = p;
|
|
31
32
|
return {
|
|
32
33
|
id: dom.getAttribute('id'),
|
|
34
|
+
listStyleType: dom.getAttribute('list-type'),
|
|
33
35
|
};
|
|
34
36
|
},
|
|
35
37
|
},
|
|
@@ -41,6 +43,7 @@ export const bulletList = {
|
|
|
41
43
|
'ul',
|
|
42
44
|
{
|
|
43
45
|
id: bulletListNode.attrs.id,
|
|
46
|
+
'list-type': bulletListNode.attrs.listStyleType,
|
|
44
47
|
class: buildElementClass(bulletListNode.attrs),
|
|
45
48
|
'data-object-type': ObjectTypes.ListElement,
|
|
46
49
|
},
|
|
@@ -390,6 +390,7 @@ export class Decoder {
|
|
|
390
390
|
return this.parseContents(model.contents || '<ul></ul>', undefined, this.getComments(model), {
|
|
391
391
|
topNode: schema.nodes.bullet_list.create({
|
|
392
392
|
id: model._id,
|
|
393
|
+
listStyleType: model.listStyleType,
|
|
393
394
|
paragraphStyle: model.paragraphStyle,
|
|
394
395
|
}),
|
|
395
396
|
});
|
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.
|
|
4
|
+
"version": "2.1.10",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"version": "yarn build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@manuscripts/json-schema": "^2.2.
|
|
33
|
-
"@manuscripts/library": "^1.3.
|
|
32
|
+
"@manuscripts/json-schema": "^2.2.7",
|
|
33
|
+
"@manuscripts/library": "^1.3.6",
|
|
34
34
|
"debug": "^4.3.4",
|
|
35
35
|
"jszip": "^3.10.1",
|
|
36
36
|
"mime": "^3.0.0",
|