@manuscripts/body-editor 3.9.18 → 3.9.21
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/components/modal-drawer/GenericDrawerGroup.js +1 -1
- package/dist/cjs/plugins/comments.js +11 -5
- package/dist/cjs/versions.js +1 -1
- package/dist/es/components/modal-drawer/GenericDrawerGroup.js +1 -1
- package/dist/es/plugins/comments.js +11 -5
- package/dist/es/versions.js +1 -1
- package/dist/types/versions.d.ts +1 -1
- package/package.json +2 -2
|
@@ -34,7 +34,7 @@ function DrawerGroup({ removeItem, selectedItems, onSelect, items, showDrawer, s
|
|
|
34
34
|
react_1.default.createElement(style_guide_1.SelectedItemsBox, { "data-cy": cy + '-selected-items', items: selectedItems.map((i) => ({
|
|
35
35
|
id: String(i.id),
|
|
36
36
|
label: String(i[labelField] ?? ''),
|
|
37
|
-
})), onRemove: removeItem, placeholder: `No ${title
|
|
37
|
+
})), onRemove: removeItem, placeholder: `No ${title.endsWith('s') ? title : title + 's'} assigned` })),
|
|
38
38
|
showDrawer && (react_1.default.createElement(Drawer, { items: items, selectedItems: selectedItems, title: title, onSelect: onSelect, onBack: () => setShowDrawer(false), width: "100%" }))));
|
|
39
39
|
}
|
|
40
40
|
const DrawerSectionTitle = styled_components_1.default.h3 `
|
|
@@ -5,7 +5,6 @@ const transform_1 = require("@manuscripts/transform");
|
|
|
5
5
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
6
6
|
const prosemirror_utils_1 = require("prosemirror-utils");
|
|
7
7
|
const prosemirror_view_1 = require("prosemirror-view");
|
|
8
|
-
const navigation_utils_1 = require("../lib/navigation-utils");
|
|
9
8
|
const comments_1 = require("../lib/comments");
|
|
10
9
|
exports.commentsKey = new prosemirror_state_1.PluginKey('comments');
|
|
11
10
|
const COMMENT_SELECTION = 'comment-selection';
|
|
@@ -50,10 +49,17 @@ exports.default = () => {
|
|
|
50
49
|
},
|
|
51
50
|
handleDOMEvents: {
|
|
52
51
|
keydown: (view, e) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
if (e.key !== 'Enter') {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
const target = document.activeElement;
|
|
56
|
+
const marker = target?.closest('[data-key]');
|
|
57
|
+
if (!marker) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
handleCommentMarkerInteraction(view, target);
|
|
62
|
+
return true;
|
|
57
63
|
},
|
|
58
64
|
},
|
|
59
65
|
},
|
package/dist/cjs/versions.js
CHANGED
|
@@ -27,7 +27,7 @@ export function DrawerGroup({ removeItem, selectedItems, onSelect, items, showDr
|
|
|
27
27
|
React.createElement(SelectedItemsBox, { "data-cy": cy + '-selected-items', items: selectedItems.map((i) => ({
|
|
28
28
|
id: String(i.id),
|
|
29
29
|
label: String(i[labelField] ?? ''),
|
|
30
|
-
})), onRemove: removeItem, placeholder: `No ${title
|
|
30
|
+
})), onRemove: removeItem, placeholder: `No ${title.endsWith('s') ? title : title + 's'} assigned` })),
|
|
31
31
|
showDrawer && (React.createElement(Drawer, { items: items, selectedItems: selectedItems, title: title, onSelect: onSelect, onBack: () => setShowDrawer(false), width: "100%" }))));
|
|
32
32
|
}
|
|
33
33
|
const DrawerSectionTitle = styled.h3 `
|
|
@@ -2,7 +2,6 @@ import { schema, } from '@manuscripts/transform';
|
|
|
2
2
|
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
3
3
|
import { findChildrenByType } from 'prosemirror-utils';
|
|
4
4
|
import { Decoration, DecorationSet } from 'prosemirror-view';
|
|
5
|
-
import { handleEnterKey } from '../lib/navigation-utils';
|
|
6
5
|
import { createCommentMarker, getCommentKey, isReply, } from '../lib/comments';
|
|
7
6
|
export const commentsKey = new PluginKey('comments');
|
|
8
7
|
const COMMENT_SELECTION = 'comment-selection';
|
|
@@ -47,10 +46,17 @@ export default () => {
|
|
|
47
46
|
},
|
|
48
47
|
handleDOMEvents: {
|
|
49
48
|
keydown: (view, e) => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
if (e.key !== 'Enter') {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const target = document.activeElement;
|
|
53
|
+
const marker = target?.closest('[data-key]');
|
|
54
|
+
if (!marker) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
handleCommentMarkerInteraction(view, target);
|
|
59
|
+
return true;
|
|
54
60
|
},
|
|
55
61
|
},
|
|
56
62
|
},
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.9.
|
|
1
|
+
export const VERSION = '3.9.21';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.9.
|
|
1
|
+
export declare const VERSION = "3.9.21";
|
|
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": "3.9.
|
|
4
|
+
"version": "3.9.21",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@iarna/word-count": "1.1.2",
|
|
40
40
|
"@manuscripts/json-schema": "2.2.12",
|
|
41
41
|
"@manuscripts/style-guide": "3.4.7",
|
|
42
|
-
"@manuscripts/track-changes-plugin": "2.2.
|
|
42
|
+
"@manuscripts/track-changes-plugin": "2.2.12",
|
|
43
43
|
"@manuscripts/transform": "4.3.22",
|
|
44
44
|
"@popperjs/core": "2.11.8",
|
|
45
45
|
"citeproc": "2.4.63",
|