@manuscripts/transform 1.4.1 → 1.4.3

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.
@@ -17,7 +17,7 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.bibliographyElement = void 0;
19
19
  exports.bibliographyElement = {
20
- content: '(bibliography_item | placeholder)+',
20
+ content: 'bibliography_item*',
21
21
  attrs: {
22
22
  id: { default: '' },
23
23
  contents: { default: '' },
@@ -21,7 +21,7 @@ exports.comment = {
21
21
  id: { default: '' },
22
22
  contents: { default: '' },
23
23
  target: { default: '' },
24
- selector: { default: {} },
24
+ selector: { default: undefined },
25
25
  resolved: { default: false },
26
26
  contributions: { default: [] },
27
27
  originalText: { default: '' },
@@ -7,9 +7,9 @@ exports.contributor = {
7
7
  role: { default: '' },
8
8
  affiliations: { default: [] },
9
9
  bibliographicName: { default: {} },
10
- userID: { default: '' },
11
- invitationID: { default: '' },
10
+ userID: { default: undefined },
11
+ invitationID: { default: undefined },
12
12
  isCorresponding: { default: undefined },
13
- ORCIDIdentifier: { default: '' },
13
+ ORCIDIdentifier: { default: undefined },
14
14
  },
15
15
  };
@@ -140,9 +140,6 @@ class Decoder {
140
140
  return references.push(this.decode(referenceModel));
141
141
  }
142
142
  });
143
- if (!references.length) {
144
- references.push(schema_1.schema.nodes.placeholder.createAndFill());
145
- }
146
143
  return schema_1.schema.nodes.bibliography_element.createChecked({
147
144
  id: model._id,
148
145
  contents: '',
@@ -476,7 +476,7 @@ const encoders = {
476
476
  }),
477
477
  table_element: (node) => ({
478
478
  containedObjectID: attributeOfNodeType(node, 'table', 'id'),
479
- tableElementFooterID: attributeOfNodeType(node, 'table_element_footer', 'id'),
479
+ tableElementFooterID: attributeOfNodeType(node, 'table_element_footer', 'id') || undefined,
480
480
  caption: inlineContentOfChildNodeType(node, node.type.schema.nodes.figcaption, node.type.schema.nodes.caption),
481
481
  title: inlineContentOfChildNodeType(node, node.type.schema.nodes.figcaption, node.type.schema.nodes.caption_title, false),
482
482
  elementType: 'table',
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export const bibliographyElement = {
17
- content: '(bibliography_item | placeholder)+',
17
+ content: 'bibliography_item*',
18
18
  attrs: {
19
19
  id: { default: '' },
20
20
  contents: { default: '' },
@@ -18,7 +18,7 @@ export const comment = {
18
18
  id: { default: '' },
19
19
  contents: { default: '' },
20
20
  target: { default: '' },
21
- selector: { default: {} },
21
+ selector: { default: undefined },
22
22
  resolved: { default: false },
23
23
  contributions: { default: [] },
24
24
  originalText: { default: '' },
@@ -4,9 +4,9 @@ export const contributor = {
4
4
  role: { default: '' },
5
5
  affiliations: { default: [] },
6
6
  bibliographicName: { default: {} },
7
- userID: { default: '' },
8
- invitationID: { default: '' },
7
+ userID: { default: undefined },
8
+ invitationID: { default: undefined },
9
9
  isCorresponding: { default: undefined },
10
- ORCIDIdentifier: { default: '' },
10
+ ORCIDIdentifier: { default: undefined },
11
11
  },
12
12
  };
@@ -130,9 +130,6 @@ export class Decoder {
130
130
  return references.push(this.decode(referenceModel));
131
131
  }
132
132
  });
133
- if (!references.length) {
134
- references.push(schema.nodes.placeholder.createAndFill());
135
- }
136
133
  return schema.nodes.bibliography_element.createChecked({
137
134
  id: model._id,
138
135
  contents: '',
@@ -468,7 +468,7 @@ const encoders = {
468
468
  }),
469
469
  table_element: (node) => ({
470
470
  containedObjectID: attributeOfNodeType(node, 'table', 'id'),
471
- tableElementFooterID: attributeOfNodeType(node, 'table_element_footer', 'id'),
471
+ tableElementFooterID: attributeOfNodeType(node, 'table_element_footer', 'id') || undefined,
472
472
  caption: inlineContentOfChildNodeType(node, node.type.schema.nodes.figcaption, node.type.schema.nodes.caption),
473
473
  title: inlineContentOfChildNodeType(node, node.type.schema.nodes.figcaption, node.type.schema.nodes.caption_title, false),
474
474
  elementType: 'table',
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.1",
4
+ "version": "1.4.3",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",