@manuscripts/body-editor 2.7.53 → 2.7.54

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.
@@ -134,7 +134,7 @@ const FootnotesList = ({ footnotes, inlineFootnote, labels, isSelected, onSelect
134
134
  remainingNotes.map((footnote) => (react_1.default.createElement(FootnoteItem, { key: footnote.attrs.id, footnote: footnote, label: labels.get(footnote.attrs.id), isSelected: isSelected, onSelect: onSelect })))));
135
135
  };
136
136
  const FootnoteItem = ({ footnote, label, isSelected, onSelect }) => {
137
- return (react_1.default.createElement(FootnoteItemContainer, { onClick: () => onSelect(footnote) },
137
+ return (react_1.default.createElement(FootnoteItemContainer, { onClick: () => onSelect(footnote), "data-cy": 'footnote-item' },
138
138
  react_1.default.createElement(StatusIcon, null, isSelected(footnote) ? (react_1.default.createElement(style_guide_1.AddedIcon, { "data-cy": 'plus-icon-ok' })) : (react_1.default.createElement(style_guide_1.AddIcon, { "data-cy": 'plus-icon' }))),
139
139
  react_1.default.createElement(NoteText, null, (label ? label + '. ' : '') + footnote.textContent)));
140
140
  };
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MATHJAX_VERSION = exports.VERSION = void 0;
4
- exports.VERSION = '2.7.53';
4
+ exports.VERSION = '2.7.54';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -68,8 +68,8 @@ class FootnoteView extends base_node_view_1.BaseNodeView {
68
68
  }
69
69
  };
70
70
  this.handleDeleteClick = (e) => {
71
- e.preventDefault();
72
- e.stopPropagation();
71
+ e === null || e === void 0 ? void 0 : e.preventDefault();
72
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
73
73
  const componentProps = {
74
74
  header: 'Delete footnote',
75
75
  message: 'This action will entirely remove the footnote from the list because it will no longer be used.',
@@ -154,7 +154,7 @@ class FootnoteView extends base_node_view_1.BaseNodeView {
154
154
  if (can.editArticle && !(0, track_changes_utils_1.isDeleted)(this.node)) {
155
155
  componentProps.actions.push({
156
156
  label: 'Delete',
157
- action: () => this.handleDelete(),
157
+ action: () => this.handleDeleteClick(),
158
158
  icon: 'Delete',
159
159
  });
160
160
  }
@@ -104,7 +104,7 @@ const FootnotesList = ({ footnotes, inlineFootnote, labels, isSelected, onSelect
104
104
  remainingNotes.map((footnote) => (React.createElement(FootnoteItem, { key: footnote.attrs.id, footnote: footnote, label: labels.get(footnote.attrs.id), isSelected: isSelected, onSelect: onSelect })))));
105
105
  };
106
106
  const FootnoteItem = ({ footnote, label, isSelected, onSelect }) => {
107
- return (React.createElement(FootnoteItemContainer, { onClick: () => onSelect(footnote) },
107
+ return (React.createElement(FootnoteItemContainer, { onClick: () => onSelect(footnote), "data-cy": 'footnote-item' },
108
108
  React.createElement(StatusIcon, null, isSelected(footnote) ? (React.createElement(AddedIcon, { "data-cy": 'plus-icon-ok' })) : (React.createElement(AddIcon, { "data-cy": 'plus-icon' }))),
109
109
  React.createElement(NoteText, null, (label ? label + '. ' : '') + footnote.textContent)));
110
110
  };
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.7.53';
1
+ export const VERSION = '2.7.54';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -62,8 +62,8 @@ export class FootnoteView extends BaseNodeView {
62
62
  }
63
63
  };
64
64
  this.handleDeleteClick = (e) => {
65
- e.preventDefault();
66
- e.stopPropagation();
65
+ e === null || e === void 0 ? void 0 : e.preventDefault();
66
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
67
67
  const componentProps = {
68
68
  header: 'Delete footnote',
69
69
  message: 'This action will entirely remove the footnote from the list because it will no longer be used.',
@@ -148,7 +148,7 @@ export class FootnoteView extends BaseNodeView {
148
148
  if (can.editArticle && !isDeleted(this.node)) {
149
149
  componentProps.actions.push({
150
150
  label: 'Delete',
151
- action: () => this.handleDelete(),
151
+ action: () => this.handleDeleteClick(),
152
152
  icon: 'Delete',
153
153
  });
154
154
  }
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.7.53";
1
+ export declare const VERSION = "2.7.54";
2
2
  export declare const MATHJAX_VERSION = "3.2.2";
@@ -29,7 +29,7 @@ export declare class FootnoteView extends BaseNodeView<Trackable<FootnoteNode>>
29
29
  showContextMenu(element: HTMLElement): void;
30
30
  handleClick: (event: Event) => void;
31
31
  handleMarkerClick: (e?: Event) => void;
32
- handleDeleteClick: (e: Event) => void;
32
+ handleDeleteClick: (e?: Event) => void;
33
33
  handleDelete: () => void;
34
34
  deleteInlineFootnotes: (tr: Transaction) => void;
35
35
  deleteFootnote: (tr: Transaction) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/body-editor",
3
3
  "description": "Prosemirror components for editing and viewing manuscripts",
4
- "version": "2.7.53",
4
+ "version": "2.7.54",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",