@manuscripts/body-editor 2.6.22 → 2.6.23

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.
@@ -45,6 +45,7 @@ exports.FootnotesSelector = void 0;
45
45
  const style_guide_1 = require("@manuscripts/style-guide");
46
46
  const react_1 = __importStar(require("react"));
47
47
  const styled_components_1 = __importDefault(require("styled-components"));
48
+ const track_changes_utils_1 = require("../../lib/track-changes-utils");
48
49
  const NotesContainer = styled_components_1.default.div `
49
50
  height: 90vh;
50
51
  max-height: 400px;
@@ -120,12 +121,11 @@ const FootnotesList = ({ footnotes, inlineFootnote, labels, isSelected, onSelect
120
121
  const remainingNotes = [];
121
122
  footnotes.forEach((footnote) => {
122
123
  const isNoteSelected = rids === null || rids === void 0 ? void 0 : rids.includes(footnote.attrs.id);
123
- if (isNoteSelected) {
124
- selectedNotes.push(footnote);
125
- }
126
- else {
127
- remainingNotes.push(footnote);
128
- }
124
+ if ((0, track_changes_utils_1.isDeleted)(footnote))
125
+ return;
126
+ isNoteSelected
127
+ ? selectedNotes.push(footnote)
128
+ : remainingNotes.push(footnote);
129
129
  });
130
130
  return (react_1.default.createElement(NotesListContainer, null,
131
131
  selectedNotes.map((footnote) => (react_1.default.createElement(FootnoteItem, { key: footnote.attrs.id, footnote: footnote, label: labels.get(footnote.attrs.id), isSelected: isSelected, onSelect: onSelect }))),
@@ -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.6.22';
4
+ exports.VERSION = '2.6.23';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -16,6 +16,7 @@
16
16
  import { AddedIcon, AddIcon, AddNewIcon, ButtonGroup, IconTextButton, PrimaryButton, SecondaryButton, } from '@manuscripts/style-guide';
17
17
  import React, { useState } from 'react';
18
18
  import styled from 'styled-components';
19
+ import { isDeleted } from '../../lib/track-changes-utils';
19
20
  const NotesContainer = styled.div `
20
21
  height: 90vh;
21
22
  max-height: 400px;
@@ -90,12 +91,11 @@ const FootnotesList = ({ footnotes, inlineFootnote, labels, isSelected, onSelect
90
91
  const remainingNotes = [];
91
92
  footnotes.forEach((footnote) => {
92
93
  const isNoteSelected = rids === null || rids === void 0 ? void 0 : rids.includes(footnote.attrs.id);
93
- if (isNoteSelected) {
94
- selectedNotes.push(footnote);
95
- }
96
- else {
97
- remainingNotes.push(footnote);
98
- }
94
+ if (isDeleted(footnote))
95
+ return;
96
+ isNoteSelected
97
+ ? selectedNotes.push(footnote)
98
+ : remainingNotes.push(footnote);
99
99
  });
100
100
  return (React.createElement(NotesListContainer, null,
101
101
  selectedNotes.map((footnote) => (React.createElement(FootnoteItem, { key: footnote.attrs.id, footnote: footnote, label: labels.get(footnote.attrs.id), isSelected: isSelected, onSelect: onSelect }))),
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.6.22';
1
+ export const VERSION = '2.6.23';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.6.22";
1
+ export declare const VERSION = "2.6.23";
2
2
  export declare const MATHJAX_VERSION = "3.2.2";
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.6.22",
4
+ "version": "2.6.23",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",