@manuscripts/body-editor 2.7.45-LEAN-4377.0 → 2.7.45

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), "data-cy": 'footnote-item' },
137
+ return (react_1.default.createElement(FootnoteItemContainer, { onClick: () => onSelect(footnote) },
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.45-LEAN-4377.0';
4
+ exports.VERSION = '2.7.45';
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 === null || e === void 0 ? void 0 : e.preventDefault();
72
- e === null || e === void 0 ? void 0 : e.stopPropagation();
71
+ e.preventDefault();
72
+ 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.',
@@ -151,10 +151,10 @@ class FootnoteView extends base_node_view_1.BaseNodeView {
151
151
  icon: 'Scroll',
152
152
  });
153
153
  }
154
- if (can.editArticle && !(0, track_changes_utils_1.isDeleted)(this.node)) {
154
+ if (can.editArticle) {
155
155
  componentProps.actions.push({
156
156
  label: 'Delete',
157
- action: () => this.handleDeleteClick(),
157
+ action: () => this.handleDelete(),
158
158
  icon: 'Delete',
159
159
  });
160
160
  }
@@ -86,13 +86,11 @@ class GeneralTableFootnoteView extends base_node_view_1.BaseNodeView {
86
86
  const componentProps = {
87
87
  actions: [],
88
88
  };
89
- if (!(0, track_changes_utils_1.isDeleted)(this.node)) {
90
- componentProps.actions.push({
91
- label: 'Delete',
92
- action: () => this.handleDeleteClick(),
93
- icon: 'Delete',
94
- });
95
- }
89
+ componentProps.actions.push({
90
+ label: 'Delete',
91
+ action: () => this.handleDeleteClick(),
92
+ icon: 'Delete',
93
+ });
96
94
  this.contextMenu = (0, ReactSubView_1.default)(this.props, style_guide_1.ContextMenu, componentProps, this.node, this.getPos, this.view, ['context-menu', 'footnote-context-menu']);
97
95
  this.props.popper.show(element, this.contextMenu, 'right-start');
98
96
  }
@@ -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), "data-cy": 'footnote-item' },
107
+ return (React.createElement(FootnoteItemContainer, { onClick: () => onSelect(footnote) },
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.45-LEAN-4377.0';
1
+ export const VERSION = '2.7.45';
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 === null || e === void 0 ? void 0 : e.preventDefault();
66
- e === null || e === void 0 ? void 0 : e.stopPropagation();
65
+ e.preventDefault();
66
+ 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.',
@@ -145,10 +145,10 @@ export class FootnoteView extends BaseNodeView {
145
145
  icon: 'Scroll',
146
146
  });
147
147
  }
148
- if (can.editArticle && !isDeleted(this.node)) {
148
+ if (can.editArticle) {
149
149
  componentProps.actions.push({
150
150
  label: 'Delete',
151
- action: () => this.handleDeleteClick(),
151
+ action: () => this.handleDelete(),
152
152
  icon: 'Delete',
153
153
  });
154
154
  }
@@ -80,13 +80,11 @@ export class GeneralTableFootnoteView extends BaseNodeView {
80
80
  const componentProps = {
81
81
  actions: [],
82
82
  };
83
- if (!isDeleted(this.node)) {
84
- componentProps.actions.push({
85
- label: 'Delete',
86
- action: () => this.handleDeleteClick(),
87
- icon: 'Delete',
88
- });
89
- }
83
+ componentProps.actions.push({
84
+ label: 'Delete',
85
+ action: () => this.handleDeleteClick(),
86
+ icon: 'Delete',
87
+ });
90
88
  this.contextMenu = ReactSubView(this.props, ContextMenu, componentProps, this.node, this.getPos, this.view, ['context-menu', 'footnote-context-menu']);
91
89
  this.props.popper.show(element, this.contextMenu, 'right-start');
92
90
  }
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.7.45-LEAN-4377.0";
1
+ export declare const VERSION = "2.7.45";
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.45-LEAN-4377.0",
4
+ "version": "2.7.45",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -609,7 +609,7 @@ span.comment-marker {
609
609
 
610
610
  /* Insert */
611
611
  .tracking-visible .ProseMirror .inserted,
612
- .tracking-visible .ProseMirror .block-award[data-track-op='insert'] span {
612
+ .tracking-visible .ProseMirror .block-award[data-track-op='insert'] span, .tracking-visible .ProseMirror a.link[data-track-op='wrap_with_node'] {
613
613
  background: var(--inserted-pending-bg-color);
614
614
  color: var(--inserted-pending-color);
615
615
  text-decoration: underline;
package/styles/Editor.css CHANGED
@@ -1023,6 +1023,9 @@
1023
1023
  .ProseMirror .footnote .delete-icon {
1024
1024
  visibility: hidden;
1025
1025
  }
1026
+ .ProseMirror .footnote.footnote-selected .delete-icon {
1027
+ visibility: visible;
1028
+ }
1026
1029
  .ProseMirror .footnote .scroll-icon {
1027
1030
  cursor: pointer;
1028
1031
  visibility: hidden;