@manuscripts/body-editor 1.5.8 → 1.5.9-LEAN-2832
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/commands.js +2 -2
- package/dist/cjs/components/outline/DraggableTree.js +31 -30
- package/dist/cjs/components/outline/ManuscriptOutline.js +2 -13
- package/dist/cjs/components/outline/OutlineManuscript.js +2 -9
- package/dist/cjs/configs/editor-views.js +4 -0
- package/dist/cjs/node-type-icons.js +1 -4
- package/dist/cjs/views/contributors_section.js +36 -0
- package/dist/cjs/views/title.js +37 -0
- package/dist/cjs/views/title_editable.js +20 -0
- package/dist/es/commands.js +2 -2
- package/dist/es/components/outline/DraggableTree.js +32 -31
- package/dist/es/components/outline/ManuscriptOutline.js +2 -13
- package/dist/es/components/outline/OutlineManuscript.js +4 -11
- package/dist/es/configs/editor-views.js +4 -0
- package/dist/es/node-type-icons.js +1 -4
- package/dist/es/views/contributors_section.js +29 -0
- package/dist/es/views/title.js +33 -0
- package/dist/es/views/title_editable.js +18 -0
- package/dist/types/components/outline/DraggableTree.d.ts +0 -1
- package/dist/types/components/outline/OutlineManuscript.d.ts +2 -0
- package/dist/types/configs/editor-views.d.ts +2 -0
- package/dist/types/views/contributors_section.d.ts +17 -0
- package/dist/types/views/title.d.ts +24 -0
- package/dist/types/views/title_editable.d.ts +18 -0
- package/package.json +6 -6
- package/styles/AdvancedEditor.css +24 -0
- package/styles/Editor.css +8 -0
package/dist/cjs/commands.js
CHANGED
|
@@ -343,7 +343,7 @@ const insertGraphicalAbstract = (state, dispatch) => {
|
|
|
343
343
|
!(0, transform_1.isInAbstractsSection)(state.selection.$from)) {
|
|
344
344
|
return false;
|
|
345
345
|
}
|
|
346
|
-
if ((0, utils_1.getMatchingDescendant)(state.doc, (node) => node.type === state.schema.nodes.graphical_abstract_section)) {
|
|
346
|
+
if (!(0, utils_1.getMatchingDescendant)(state.doc, (node) => node.type === state.schema.nodes.graphical_abstract_section)) {
|
|
347
347
|
return false;
|
|
348
348
|
}
|
|
349
349
|
const section = state.schema.nodes.graphical_abstract_section.createAndFill({ category: 'MPSectionCategory:abstract-graphical' }, [
|
|
@@ -393,7 +393,7 @@ const insertFootnotesSection = (state, dispatch) => {
|
|
|
393
393
|
};
|
|
394
394
|
exports.insertFootnotesSection = insertFootnotesSection;
|
|
395
395
|
const insertBibliographySection = (state, dispatch) => {
|
|
396
|
-
if ((0, utils_1.
|
|
396
|
+
if ((0, utils_1.getMatchingDescendant)(state.doc, (node) => node.type === state.schema.nodes.bibliography_section)) {
|
|
397
397
|
return false;
|
|
398
398
|
}
|
|
399
399
|
const section = state.schema.nodes.bibliography_section.createAndFill({}, [
|
|
@@ -34,23 +34,25 @@ const track_changes_utils_1 = require("../../lib/track-changes-utils");
|
|
|
34
34
|
const node_type_icons_1 = require("../../node-type-icons");
|
|
35
35
|
const section_title_1 = require("../../views/section_title");
|
|
36
36
|
const Outline_1 = require("./Outline");
|
|
37
|
+
const excludedTypes = [
|
|
38
|
+
transform_1.schema.nodes.table,
|
|
39
|
+
transform_1.schema.nodes.figure,
|
|
40
|
+
transform_1.schema.nodes.footnotes_element,
|
|
41
|
+
transform_1.schema.nodes.bibliography_element,
|
|
42
|
+
transform_1.schema.nodes.keywords_section,
|
|
43
|
+
transform_1.schema.nodes.affiliations_section,
|
|
44
|
+
transform_1.schema.nodes.contributors_section,
|
|
45
|
+
transform_1.schema.nodes.title,
|
|
46
|
+
];
|
|
47
|
+
const childrenExcludedTypes = [
|
|
48
|
+
transform_1.schema.nodes.pullquote_element,
|
|
49
|
+
transform_1.schema.nodes.blockquote_element,
|
|
50
|
+
];
|
|
37
51
|
const isExcluded = (nodeType) => {
|
|
38
|
-
const { nodes } = nodeType.schema;
|
|
39
|
-
const excludedTypes = [
|
|
40
|
-
nodes.table,
|
|
41
|
-
nodes.figure,
|
|
42
|
-
nodes.footnotes_element,
|
|
43
|
-
nodes.bibliography_element,
|
|
44
|
-
nodes.keywords_section,
|
|
45
|
-
nodes.affiliations_section,
|
|
46
|
-
nodes.contributors_section,
|
|
47
|
-
];
|
|
48
52
|
return excludedTypes.includes(nodeType);
|
|
49
53
|
};
|
|
50
54
|
const isChildrenExcluded = (nodeType) => {
|
|
51
|
-
|
|
52
|
-
const excludedTypes = [nodes.pullquote_element, nodes.blockquote_element];
|
|
53
|
-
return excludedTypes.includes(nodeType);
|
|
55
|
+
return childrenExcludedTypes.includes(nodeType);
|
|
54
56
|
};
|
|
55
57
|
const buildTree = ({ node, pos, index, selected, parent, }) => {
|
|
56
58
|
const items = [];
|
|
@@ -136,23 +138,22 @@ class Tree extends React.Component {
|
|
|
136
138
|
if (isRejectedItem || node.attrs.id === 'META_SECTION') {
|
|
137
139
|
return null;
|
|
138
140
|
}
|
|
139
|
-
return connectDropTarget(React.createElement("div", null,
|
|
140
|
-
React.createElement(Outline_1.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
React.createElement(Outline_1.
|
|
144
|
-
|
|
145
|
-
React.createElement(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
React.createElement(Outline_1.OutlineDropPreview, { depth: depth, style: this.bottomPreviewStyles(mightDrop, dragPosition) }))));
|
|
141
|
+
return connectDropTarget(React.createElement("div", null, node.type.name !== 'titles' && (React.createElement(Outline_1.Outline, { style: this.outlineStyles(isDragging) },
|
|
142
|
+
React.createElement(Outline_1.OutlineDropPreview, { depth: depth, style: this.topPreviewStyles(mightDrop, dragPosition) }),
|
|
143
|
+
!(0, section_title_1.isSpecialSection)(node) && (React.createElement(React.Fragment, null, connectDragSource(React.createElement("div", null,
|
|
144
|
+
React.createElement(Outline_1.OutlineItem, { isSelected: isSelected, depth: depth, onContextMenu: this.handleContextMenu },
|
|
145
|
+
items.length ? (React.createElement(Outline_1.OutlineItemArrow, { onClick: this.toggle }, open ? (React.createElement(Outline_1.StyledTriangleExpanded, null)) : (React.createElement(Outline_1.StyledTriangleCollapsed, null)))) : (React.createElement(Outline_1.OutlineItemNoArrow, null)),
|
|
146
|
+
React.createElement(Outline_1.OutlineItemLink, { to: `#${node.attrs.id || ''}` },
|
|
147
|
+
connectDragPreview(React.createElement("span", { style: {
|
|
148
|
+
display: 'inline-flex',
|
|
149
|
+
alignItems: 'center',
|
|
150
|
+
} },
|
|
151
|
+
React.createElement(Outline_1.OutlineItemIcon, null, (0, node_type_icons_1.nodeTypeIcon)(node.type)))),
|
|
152
|
+
React.createElement(Outline_1.OutlineItemLinkText, { className: `outline-text-${node.type.name} ${isDeletedItem && 'deleted'}` }, this.itemText(node)))))))),
|
|
153
|
+
items.length ? (React.createElement("div", { style: {
|
|
154
|
+
display: open || (0, section_title_1.isSpecialSection)(node) ? '' : 'none',
|
|
155
|
+
} }, items.map((subtree) => (React.createElement(DraggableTree, Object.assign({}, this.props, { key: subtree.node.attrs.id, tree: subtree, view: view, depth: (0, section_title_1.isSpecialSection)(node) ? depth : depth + 1 })))))) : null,
|
|
156
|
+
React.createElement(Outline_1.OutlineDropPreview, { depth: depth, style: this.bottomPreviewStyles(mightDrop, dragPosition) })))));
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
159
|
const dragSource = (0, react_dnd_1.DragSource)('outline', {
|
|
@@ -39,7 +39,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
39
39
|
};
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.ManuscriptOutline = void 0;
|
|
42
|
-
const title_editor_1 = require("@manuscripts/title-editor");
|
|
43
42
|
const react_1 = __importStar(require("react"));
|
|
44
43
|
const use_debounce_1 = require("../hooks/use-debounce");
|
|
45
44
|
const DraggableTree_1 = __importStar(require("./DraggableTree"));
|
|
@@ -49,24 +48,14 @@ const ManuscriptOutline = (props) => {
|
|
|
49
48
|
const debouncedProps = (0, use_debounce_1.useDebounce)(props, 500);
|
|
50
49
|
(0, react_1.useEffect)(() => {
|
|
51
50
|
var _a;
|
|
52
|
-
const { doc, view,
|
|
51
|
+
const { doc, view, selected } = debouncedProps;
|
|
53
52
|
if (doc) {
|
|
54
|
-
const
|
|
53
|
+
const tree = (0, DraggableTree_1.buildTree)({
|
|
55
54
|
node: doc,
|
|
56
55
|
pos: 0,
|
|
57
56
|
index: 0,
|
|
58
57
|
selected,
|
|
59
58
|
});
|
|
60
|
-
const node = (0, title_editor_1.parse)(manuscript.title || '');
|
|
61
|
-
const tree = {
|
|
62
|
-
node,
|
|
63
|
-
requirementsNode: doc,
|
|
64
|
-
pos: 0,
|
|
65
|
-
endPos: 0,
|
|
66
|
-
index: 0,
|
|
67
|
-
isSelected: !selected,
|
|
68
|
-
items,
|
|
69
|
-
};
|
|
70
59
|
setValues({ tree, view, editArticle: !!((_a = props.capabilities) === null || _a === void 0 ? void 0 : _a.editArticle) });
|
|
71
60
|
}
|
|
72
61
|
else {
|
|
@@ -20,22 +20,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.OutlineManuscript = void 0;
|
|
22
22
|
const OutlineIconManuscript_1 = __importDefault(require("@manuscripts/assets/react/OutlineIconManuscript"));
|
|
23
|
-
const title_editor_1 = require("@manuscripts/title-editor");
|
|
24
23
|
const transform_1 = require("@manuscripts/transform");
|
|
25
24
|
const react_1 = __importDefault(require("react"));
|
|
26
25
|
const Outline_1 = require("./Outline");
|
|
27
|
-
const
|
|
28
|
-
const node = (0, title_editor_1.parse)(value, {
|
|
29
|
-
topNode: title_editor_1.schema.nodes.title.create(),
|
|
30
|
-
});
|
|
31
|
-
return node.textContent;
|
|
32
|
-
};
|
|
33
|
-
const OutlineManuscript = ({ project, manuscript, }) => (react_1.default.createElement(Outline_1.Outline, null,
|
|
26
|
+
const OutlineManuscript = ({ project, manuscript, doc, }) => (react_1.default.createElement(Outline_1.Outline, null,
|
|
34
27
|
react_1.default.createElement(Outline_1.OutlineItem, { isSelected: false, depth: 0 },
|
|
35
28
|
react_1.default.createElement(Outline_1.OutlineItemLink, { to: `/projects/${project._id}/manuscripts/${manuscript._id}` },
|
|
36
29
|
react_1.default.createElement(Outline_1.OutlineItemArrow, null,
|
|
37
30
|
react_1.default.createElement(Outline_1.StyledTriangleCollapsed, null)),
|
|
38
31
|
react_1.default.createElement(Outline_1.OutlineItemIcon, null,
|
|
39
32
|
react_1.default.createElement(OutlineIconManuscript_1.default, null)),
|
|
40
|
-
react_1.default.createElement(Outline_1.OutlineItemLinkText, { className: 'outline-text-title' },
|
|
33
|
+
react_1.default.createElement(Outline_1.OutlineItemLinkText, { className: 'outline-text-title' }, (0, transform_1.nodeTitle)(doc))))));
|
|
41
34
|
exports.OutlineManuscript = OutlineManuscript;
|
|
@@ -23,6 +23,7 @@ const bibliography_item_editable_1 = __importDefault(require("../views/bibliogra
|
|
|
23
23
|
const blockquote_element_editable_1 = __importDefault(require("../views/blockquote_element_editable"));
|
|
24
24
|
const bullet_list_editable_1 = __importDefault(require("../views/bullet_list_editable"));
|
|
25
25
|
const citation_editable_1 = __importDefault(require("../views/citation_editable"));
|
|
26
|
+
const contributors_section_1 = __importDefault(require("../views/contributors_section"));
|
|
26
27
|
const cross_reference_editable_1 = __importDefault(require("../views/cross_reference_editable"));
|
|
27
28
|
const equation_editable_1 = __importDefault(require("../views/equation_editable"));
|
|
28
29
|
const equation_element_editable_1 = __importDefault(require("../views/equation_element_editable"));
|
|
@@ -46,15 +47,18 @@ const pullquote_element_editable_1 = __importDefault(require("../views/pullquote
|
|
|
46
47
|
const section_label_1 = __importDefault(require("../views/section_label"));
|
|
47
48
|
const section_title_editable_1 = __importDefault(require("../views/section_title_editable"));
|
|
48
49
|
const table_element_editable_1 = __importDefault(require("../views/table_element_editable"));
|
|
50
|
+
const title_editable_1 = __importDefault(require("../views/title_editable"));
|
|
49
51
|
const toc_element_editable_1 = __importDefault(require("../views/toc_element_editable"));
|
|
50
52
|
exports.default = (props, dispatch) => {
|
|
51
53
|
return {
|
|
54
|
+
title: (0, title_editable_1.default)(props, dispatch),
|
|
52
55
|
bibliography_item: (0, bibliography_item_editable_1.default)(props),
|
|
53
56
|
bibliography_element: (0, bibliography_element_editable_1.default)(props),
|
|
54
57
|
blockquote_element: (0, blockquote_element_editable_1.default)(props),
|
|
55
58
|
bullet_list: (0, bullet_list_editable_1.default)(props),
|
|
56
59
|
citation: (0, citation_editable_1.default)(props),
|
|
57
60
|
cross_reference: (0, cross_reference_editable_1.default)(props),
|
|
61
|
+
contributors_section: (0, contributors_section_1.default)(props, dispatch),
|
|
58
62
|
equation: (0, equation_editable_1.default)(props),
|
|
59
63
|
equation_element: (0, equation_element_editable_1.default)(props),
|
|
60
64
|
figure: (0, figure_editable_1.default)(props, dispatch),
|
|
@@ -29,11 +29,11 @@ const OutlineIconSection_1 = __importDefault(require("@manuscripts/assets/react/
|
|
|
29
29
|
const OutlineIconTable_1 = __importDefault(require("@manuscripts/assets/react/OutlineIconTable"));
|
|
30
30
|
const OutlineIconUnorderedList_1 = __importDefault(require("@manuscripts/assets/react/OutlineIconUnorderedList"));
|
|
31
31
|
const style_guide_1 = require("@manuscripts/style-guide");
|
|
32
|
-
const title_editor_1 = require("@manuscripts/title-editor");
|
|
33
32
|
const transform_1 = require("@manuscripts/transform");
|
|
34
33
|
const react_1 = __importDefault(require("react"));
|
|
35
34
|
const { nodes } = transform_1.schema;
|
|
36
35
|
const icons = new Map([
|
|
36
|
+
[nodes.manuscript, OutlineIconManuscript_1.default],
|
|
37
37
|
[nodes.bibliography_section, OutlineIconSection_1.default],
|
|
38
38
|
[nodes.blockquote_element, style_guide_1.BlockQuoteIcon],
|
|
39
39
|
[nodes.bullet_list, OutlineIconUnorderedList_1.default],
|
|
@@ -52,9 +52,6 @@ const icons = new Map([
|
|
|
52
52
|
[nodes.footnotes_section, OutlineIconSection_1.default],
|
|
53
53
|
]);
|
|
54
54
|
const nodeTypeIcon = (nodeType) => {
|
|
55
|
-
if (nodeType === title_editor_1.schema.nodes.title) {
|
|
56
|
-
return react_1.default.createElement(OutlineIconManuscript_1.default, null);
|
|
57
|
-
}
|
|
58
55
|
const Icon = icons.get(nodeType);
|
|
59
56
|
return Icon ? react_1.default.createElement(Icon, null) : null;
|
|
60
57
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ContributorsSectionView = void 0;
|
|
7
|
+
const base_node_view_1 = require("./base_node_view");
|
|
8
|
+
const creators_1 = require("./creators");
|
|
9
|
+
const ReactSubView_1 = __importDefault(require("./ReactSubView"));
|
|
10
|
+
class ContributorsSectionView extends base_node_view_1.BaseNodeView {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.initialise = () => {
|
|
14
|
+
this.createDOM();
|
|
15
|
+
};
|
|
16
|
+
this.createDOM = () => {
|
|
17
|
+
this.dom = document.createElement('div');
|
|
18
|
+
this.dom.classList.add('contributors');
|
|
19
|
+
const can = this.props.getCapabilities();
|
|
20
|
+
const { components: { MetadataContainer }, subscribeStore, } = this.props;
|
|
21
|
+
this.metadata = (0, ReactSubView_1.default)(this.props, MetadataContainer, {
|
|
22
|
+
allowInvitingAuthors: false,
|
|
23
|
+
showAuthorEditButton: true,
|
|
24
|
+
disableEditButton: !can.editMetadata,
|
|
25
|
+
subscribe: subscribeStore,
|
|
26
|
+
}, this.node, this.getPos, this.view, 'metadata-container');
|
|
27
|
+
if (this.metadata) {
|
|
28
|
+
this.dom.appendChild(this.metadata);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
this.ignoreMutation = () => true;
|
|
32
|
+
this.stopEvent = () => true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.ContributorsSectionView = ContributorsSectionView;
|
|
36
|
+
exports.default = (0, creators_1.createNodeView)(ContributorsSectionView);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2019 Atypon Systems LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.TitleView = void 0;
|
|
19
|
+
const base_node_view_1 = require("./base_node_view");
|
|
20
|
+
const creators_1 = require("./creators");
|
|
21
|
+
class TitleView extends base_node_view_1.BaseNodeView {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.initialise = () => {
|
|
25
|
+
this.createDOM();
|
|
26
|
+
};
|
|
27
|
+
this.createDOM = () => {
|
|
28
|
+
this.dom = document.createElement('div');
|
|
29
|
+
this.dom.classList.add('manuscript-title');
|
|
30
|
+
this.contentDOM = document.createElement('div');
|
|
31
|
+
this.contentDOM.classList.add('article-titles');
|
|
32
|
+
this.dom.appendChild(this.contentDOM);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.TitleView = TitleView;
|
|
37
|
+
exports.default = (0, creators_1.createNodeView)(TitleView);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2019 Atypon Systems LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const creators_1 = require("./creators");
|
|
19
|
+
const title_1 = require("./title");
|
|
20
|
+
exports.default = (0, creators_1.createEditableNodeView)(title_1.TitleView);
|
package/dist/es/commands.js
CHANGED
|
@@ -301,7 +301,7 @@ export const insertGraphicalAbstract = (state, dispatch) => {
|
|
|
301
301
|
!isInAbstractsSection(state.selection.$from)) {
|
|
302
302
|
return false;
|
|
303
303
|
}
|
|
304
|
-
if (getMatchingDescendant(state.doc, (node) => node.type === state.schema.nodes.graphical_abstract_section)) {
|
|
304
|
+
if (!getMatchingDescendant(state.doc, (node) => node.type === state.schema.nodes.graphical_abstract_section)) {
|
|
305
305
|
return false;
|
|
306
306
|
}
|
|
307
307
|
const section = state.schema.nodes.graphical_abstract_section.createAndFill({ category: 'MPSectionCategory:abstract-graphical' }, [
|
|
@@ -348,7 +348,7 @@ export const insertFootnotesSection = (state, dispatch) => {
|
|
|
348
348
|
return true;
|
|
349
349
|
};
|
|
350
350
|
export const insertBibliographySection = (state, dispatch) => {
|
|
351
|
-
if (
|
|
351
|
+
if (getMatchingDescendant(state.doc, (node) => node.type === state.schema.nodes.bibliography_section)) {
|
|
352
352
|
return false;
|
|
353
353
|
}
|
|
354
354
|
const section = state.schema.nodes.bibliography_section.createAndFill({}, [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isElementNodeType, nodeTitle, nodeTitlePlaceholder, } from '@manuscripts/transform';
|
|
1
|
+
import { isElementNodeType, nodeTitle, nodeTitlePlaceholder, schema, } from '@manuscripts/transform';
|
|
2
2
|
import { Fragment } from 'prosemirror-model';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { DragSource, DropTarget, } from 'react-dnd';
|
|
@@ -8,23 +8,25 @@ import { isDeleted, isRejectedInsert } from '../../lib/track-changes-utils';
|
|
|
8
8
|
import { nodeTypeIcon } from '../../node-type-icons';
|
|
9
9
|
import { isSpecialSection } from '../../views/section_title';
|
|
10
10
|
import { Outline, OutlineDropPreview, OutlineItem, OutlineItemArrow, OutlineItemIcon, OutlineItemLink, OutlineItemLinkText, OutlineItemNoArrow, OutlineItemPlaceholder, StyledTriangleCollapsed, StyledTriangleExpanded, } from './Outline';
|
|
11
|
+
const excludedTypes = [
|
|
12
|
+
schema.nodes.table,
|
|
13
|
+
schema.nodes.figure,
|
|
14
|
+
schema.nodes.footnotes_element,
|
|
15
|
+
schema.nodes.bibliography_element,
|
|
16
|
+
schema.nodes.keywords_section,
|
|
17
|
+
schema.nodes.affiliations_section,
|
|
18
|
+
schema.nodes.contributors_section,
|
|
19
|
+
schema.nodes.title,
|
|
20
|
+
];
|
|
21
|
+
const childrenExcludedTypes = [
|
|
22
|
+
schema.nodes.pullquote_element,
|
|
23
|
+
schema.nodes.blockquote_element,
|
|
24
|
+
];
|
|
11
25
|
const isExcluded = (nodeType) => {
|
|
12
|
-
const { nodes } = nodeType.schema;
|
|
13
|
-
const excludedTypes = [
|
|
14
|
-
nodes.table,
|
|
15
|
-
nodes.figure,
|
|
16
|
-
nodes.footnotes_element,
|
|
17
|
-
nodes.bibliography_element,
|
|
18
|
-
nodes.keywords_section,
|
|
19
|
-
nodes.affiliations_section,
|
|
20
|
-
nodes.contributors_section,
|
|
21
|
-
];
|
|
22
26
|
return excludedTypes.includes(nodeType);
|
|
23
27
|
};
|
|
24
28
|
const isChildrenExcluded = (nodeType) => {
|
|
25
|
-
|
|
26
|
-
const excludedTypes = [nodes.pullquote_element, nodes.blockquote_element];
|
|
27
|
-
return excludedTypes.includes(nodeType);
|
|
29
|
+
return childrenExcludedTypes.includes(nodeType);
|
|
28
30
|
};
|
|
29
31
|
export const buildTree = ({ node, pos, index, selected, parent, }) => {
|
|
30
32
|
const items = [];
|
|
@@ -109,23 +111,22 @@ class Tree extends React.Component {
|
|
|
109
111
|
if (isRejectedItem || node.attrs.id === 'META_SECTION') {
|
|
110
112
|
return null;
|
|
111
113
|
}
|
|
112
|
-
return connectDropTarget(React.createElement("div", null,
|
|
113
|
-
React.createElement(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
React.createElement(
|
|
117
|
-
|
|
118
|
-
React.createElement(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
React.createElement(OutlineDropPreview, { depth: depth, style: this.bottomPreviewStyles(mightDrop, dragPosition) }))));
|
|
114
|
+
return connectDropTarget(React.createElement("div", null, node.type.name !== 'titles' && (React.createElement(Outline, { style: this.outlineStyles(isDragging) },
|
|
115
|
+
React.createElement(OutlineDropPreview, { depth: depth, style: this.topPreviewStyles(mightDrop, dragPosition) }),
|
|
116
|
+
!isSpecialSection(node) && (React.createElement(React.Fragment, null, connectDragSource(React.createElement("div", null,
|
|
117
|
+
React.createElement(OutlineItem, { isSelected: isSelected, depth: depth, onContextMenu: this.handleContextMenu },
|
|
118
|
+
items.length ? (React.createElement(OutlineItemArrow, { onClick: this.toggle }, open ? (React.createElement(StyledTriangleExpanded, null)) : (React.createElement(StyledTriangleCollapsed, null)))) : (React.createElement(OutlineItemNoArrow, null)),
|
|
119
|
+
React.createElement(OutlineItemLink, { to: `#${node.attrs.id || ''}` },
|
|
120
|
+
connectDragPreview(React.createElement("span", { style: {
|
|
121
|
+
display: 'inline-flex',
|
|
122
|
+
alignItems: 'center',
|
|
123
|
+
} },
|
|
124
|
+
React.createElement(OutlineItemIcon, null, nodeTypeIcon(node.type)))),
|
|
125
|
+
React.createElement(OutlineItemLinkText, { className: `outline-text-${node.type.name} ${isDeletedItem && 'deleted'}` }, this.itemText(node)))))))),
|
|
126
|
+
items.length ? (React.createElement("div", { style: {
|
|
127
|
+
display: open || isSpecialSection(node) ? '' : 'none',
|
|
128
|
+
} }, items.map((subtree) => (React.createElement(DraggableTree, Object.assign({}, this.props, { key: subtree.node.attrs.id, tree: subtree, view: view, depth: isSpecialSection(node) ? depth : depth + 1 })))))) : null,
|
|
129
|
+
React.createElement(OutlineDropPreview, { depth: depth, style: this.bottomPreviewStyles(mightDrop, dragPosition) })))));
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
const dragSource = DragSource('outline', {
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { parse } from '@manuscripts/title-editor';
|
|
17
16
|
import React, { useEffect, useState } from 'react';
|
|
18
17
|
import { useDebounce } from '../hooks/use-debounce';
|
|
19
18
|
import DraggableTree, { buildTree } from './DraggableTree';
|
|
@@ -23,24 +22,14 @@ export const ManuscriptOutline = (props) => {
|
|
|
23
22
|
const debouncedProps = useDebounce(props, 500);
|
|
24
23
|
useEffect(() => {
|
|
25
24
|
var _a;
|
|
26
|
-
const { doc, view,
|
|
25
|
+
const { doc, view, selected } = debouncedProps;
|
|
27
26
|
if (doc) {
|
|
28
|
-
const
|
|
27
|
+
const tree = buildTree({
|
|
29
28
|
node: doc,
|
|
30
29
|
pos: 0,
|
|
31
30
|
index: 0,
|
|
32
31
|
selected,
|
|
33
32
|
});
|
|
34
|
-
const node = parse(manuscript.title || '');
|
|
35
|
-
const tree = {
|
|
36
|
-
node,
|
|
37
|
-
requirementsNode: doc,
|
|
38
|
-
pos: 0,
|
|
39
|
-
endPos: 0,
|
|
40
|
-
index: 0,
|
|
41
|
-
isSelected: !selected,
|
|
42
|
-
items,
|
|
43
|
-
};
|
|
44
33
|
setValues({ tree, view, editArticle: !!((_a = props.capabilities) === null || _a === void 0 ? void 0 : _a.editArticle) });
|
|
45
34
|
}
|
|
46
35
|
else {
|
|
@@ -14,21 +14,14 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import OutlineIconManuscript from '@manuscripts/assets/react/OutlineIconManuscript';
|
|
17
|
-
import {
|
|
18
|
-
import { nodeTitlePlaceholder } from '@manuscripts/transform';
|
|
17
|
+
import { nodeTitle } from '@manuscripts/transform';
|
|
19
18
|
import React from 'react';
|
|
20
|
-
import { Outline, OutlineItem, OutlineItemArrow, OutlineItemIcon, OutlineItemLink, OutlineItemLinkText,
|
|
21
|
-
const
|
|
22
|
-
const node = parse(value, {
|
|
23
|
-
topNode: schema.nodes.title.create(),
|
|
24
|
-
});
|
|
25
|
-
return node.textContent;
|
|
26
|
-
};
|
|
27
|
-
export const OutlineManuscript = ({ project, manuscript, }) => (React.createElement(Outline, null,
|
|
19
|
+
import { Outline, OutlineItem, OutlineItemArrow, OutlineItemIcon, OutlineItemLink, OutlineItemLinkText, StyledTriangleCollapsed, } from './Outline';
|
|
20
|
+
export const OutlineManuscript = ({ project, manuscript, doc, }) => (React.createElement(Outline, null,
|
|
28
21
|
React.createElement(OutlineItem, { isSelected: false, depth: 0 },
|
|
29
22
|
React.createElement(OutlineItemLink, { to: `/projects/${project._id}/manuscripts/${manuscript._id}` },
|
|
30
23
|
React.createElement(OutlineItemArrow, null,
|
|
31
24
|
React.createElement(StyledTriangleCollapsed, null)),
|
|
32
25
|
React.createElement(OutlineItemIcon, null,
|
|
33
26
|
React.createElement(OutlineIconManuscript, null)),
|
|
34
|
-
React.createElement(OutlineItemLinkText, { className: 'outline-text-title' },
|
|
27
|
+
React.createElement(OutlineItemLinkText, { className: 'outline-text-title' }, nodeTitle(doc))))));
|
|
@@ -18,6 +18,7 @@ import bibliographyItem from '../views/bibliography_item_editable';
|
|
|
18
18
|
import blockquoteElement from '../views/blockquote_element_editable';
|
|
19
19
|
import bulletList from '../views/bullet_list_editable';
|
|
20
20
|
import citation from '../views/citation_editable';
|
|
21
|
+
import contributorsSection from '../views/contributors_section';
|
|
21
22
|
import crossReference from '../views/cross_reference_editable';
|
|
22
23
|
import equation from '../views/equation_editable';
|
|
23
24
|
import equationElement from '../views/equation_element_editable';
|
|
@@ -41,15 +42,18 @@ import pullquoteElement from '../views/pullquote_element_editable';
|
|
|
41
42
|
import sectionLabel from '../views/section_label';
|
|
42
43
|
import sectionTitle from '../views/section_title_editable';
|
|
43
44
|
import tableElement from '../views/table_element_editable';
|
|
45
|
+
import title from '../views/title_editable';
|
|
44
46
|
import tocElement from '../views/toc_element_editable';
|
|
45
47
|
export default (props, dispatch) => {
|
|
46
48
|
return {
|
|
49
|
+
title: title(props, dispatch),
|
|
47
50
|
bibliography_item: bibliographyItem(props),
|
|
48
51
|
bibliography_element: bibliographyElement(props),
|
|
49
52
|
blockquote_element: blockquoteElement(props),
|
|
50
53
|
bullet_list: bulletList(props),
|
|
51
54
|
citation: citation(props),
|
|
52
55
|
cross_reference: crossReference(props),
|
|
56
|
+
contributors_section: contributorsSection(props, dispatch),
|
|
53
57
|
equation: equation(props),
|
|
54
58
|
equation_element: equationElement(props),
|
|
55
59
|
figure: figure(props, dispatch),
|
|
@@ -23,11 +23,11 @@ import SectionIcon from '@manuscripts/assets/react/OutlineIconSection';
|
|
|
23
23
|
import TableIcon from '@manuscripts/assets/react/OutlineIconTable';
|
|
24
24
|
import BulletListIcon from '@manuscripts/assets/react/OutlineIconUnorderedList';
|
|
25
25
|
import { BlockQuoteIcon, PullQuoteIcon } from '@manuscripts/style-guide';
|
|
26
|
-
import { schema as titleSchema } from '@manuscripts/title-editor';
|
|
27
26
|
import { schema } from '@manuscripts/transform';
|
|
28
27
|
import React from 'react';
|
|
29
28
|
const { nodes } = schema;
|
|
30
29
|
const icons = new Map([
|
|
30
|
+
[nodes.manuscript, ManuscriptIcon],
|
|
31
31
|
[nodes.bibliography_section, SectionIcon],
|
|
32
32
|
[nodes.blockquote_element, BlockQuoteIcon],
|
|
33
33
|
[nodes.bullet_list, BulletListIcon],
|
|
@@ -46,9 +46,6 @@ const icons = new Map([
|
|
|
46
46
|
[nodes.footnotes_section, SectionIcon],
|
|
47
47
|
]);
|
|
48
48
|
export const nodeTypeIcon = (nodeType) => {
|
|
49
|
-
if (nodeType === titleSchema.nodes.title) {
|
|
50
|
-
return React.createElement(ManuscriptIcon, null);
|
|
51
|
-
}
|
|
52
49
|
const Icon = icons.get(nodeType);
|
|
53
50
|
return Icon ? React.createElement(Icon, null) : null;
|
|
54
51
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseNodeView } from './base_node_view';
|
|
2
|
+
import { createNodeView } from './creators';
|
|
3
|
+
import ReactSubView from './ReactSubView';
|
|
4
|
+
export class ContributorsSectionView extends BaseNodeView {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.initialise = () => {
|
|
8
|
+
this.createDOM();
|
|
9
|
+
};
|
|
10
|
+
this.createDOM = () => {
|
|
11
|
+
this.dom = document.createElement('div');
|
|
12
|
+
this.dom.classList.add('contributors');
|
|
13
|
+
const can = this.props.getCapabilities();
|
|
14
|
+
const { components: { MetadataContainer }, subscribeStore, } = this.props;
|
|
15
|
+
this.metadata = ReactSubView(this.props, MetadataContainer, {
|
|
16
|
+
allowInvitingAuthors: false,
|
|
17
|
+
showAuthorEditButton: true,
|
|
18
|
+
disableEditButton: !can.editMetadata,
|
|
19
|
+
subscribe: subscribeStore,
|
|
20
|
+
}, this.node, this.getPos, this.view, 'metadata-container');
|
|
21
|
+
if (this.metadata) {
|
|
22
|
+
this.dom.appendChild(this.metadata);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
this.ignoreMutation = () => true;
|
|
26
|
+
this.stopEvent = () => true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export default createNodeView(ContributorsSectionView);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { BaseNodeView } from './base_node_view';
|
|
17
|
+
import { createNodeView } from './creators';
|
|
18
|
+
export class TitleView extends BaseNodeView {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.initialise = () => {
|
|
22
|
+
this.createDOM();
|
|
23
|
+
};
|
|
24
|
+
this.createDOM = () => {
|
|
25
|
+
this.dom = document.createElement('div');
|
|
26
|
+
this.dom.classList.add('manuscript-title');
|
|
27
|
+
this.contentDOM = document.createElement('div');
|
|
28
|
+
this.contentDOM.classList.add('article-titles');
|
|
29
|
+
this.dom.appendChild(this.contentDOM);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export default createNodeView(TitleView);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { createEditableNodeView } from './creators';
|
|
17
|
+
import { TitleView } from './title';
|
|
18
|
+
export default createEditableNodeView(TitleView);
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Manuscript, Project } from '@manuscripts/json-schema';
|
|
17
|
+
import { ManuscriptNode } from '@manuscripts/transform';
|
|
17
18
|
import React from 'react';
|
|
18
19
|
interface Props {
|
|
19
20
|
project: Project;
|
|
20
21
|
manuscript: Manuscript;
|
|
22
|
+
doc: ManuscriptNode;
|
|
21
23
|
}
|
|
22
24
|
export declare const OutlineManuscript: React.FunctionComponent<Props>;
|
|
23
25
|
export {};
|
|
@@ -23,6 +23,7 @@ type EditorProps = EditableBlockProps & CitationEditableProps & FigureProps & Ke
|
|
|
23
23
|
theme: DefaultTheme;
|
|
24
24
|
};
|
|
25
25
|
declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
26
|
+
title: import("../types").NodeViewCreator<import("../views/title").TitleView<any>>;
|
|
26
27
|
bibliography_item: import("../types").NodeViewCreator<import("../views/bibliography_item").BibliographyItemView<any>>;
|
|
27
28
|
bibliography_element: import("../types").NodeViewCreator<{
|
|
28
29
|
gutterButtons: () => HTMLElement[];
|
|
@@ -140,6 +141,7 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
140
141
|
} & import("../views/bullet_list").BulletListView<any>>;
|
|
141
142
|
citation: import("../types").NodeViewCreator<import("../views/citation_editable").CitationEditableView>;
|
|
142
143
|
cross_reference: import("../types").NodeViewCreator<import("../views/cross_reference_editable").CrossReferenceEditableView>;
|
|
144
|
+
contributors_section: import("../types").NodeViewCreator<import("../views/contributors_section").ContributorsSectionView<any>>;
|
|
143
145
|
equation: import("../types").NodeViewCreator<import("../views/equation_editable").EquationEditableView>;
|
|
144
146
|
equation_element: import("../types").NodeViewCreator<{
|
|
145
147
|
gutterButtons: () => HTMLElement[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ManuscriptNodeView } from '@manuscripts/transform';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BaseNodeView } from './base_node_view';
|
|
4
|
+
import { EditableBlockProps } from './editable_block';
|
|
5
|
+
export interface ContributorsSectionProps extends EditableBlockProps {
|
|
6
|
+
components: Record<string, React.ComponentType<unknown>>;
|
|
7
|
+
subscribeStore: unknown;
|
|
8
|
+
}
|
|
9
|
+
export declare class ContributorsSectionView<PropsType extends ContributorsSectionProps> extends BaseNodeView<PropsType> implements ManuscriptNodeView {
|
|
10
|
+
private metadata;
|
|
11
|
+
initialise: () => void;
|
|
12
|
+
protected createDOM: () => void;
|
|
13
|
+
ignoreMutation: () => boolean;
|
|
14
|
+
stopEvent: () => boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: (props: import("./base_node_view").BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<ContributorsSectionView<any>>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
+
import { BaseNodeProps, BaseNodeView } from './base_node_view';
|
|
18
|
+
export declare class TitleView<PropsType extends BaseNodeProps> extends BaseNodeView<PropsType> implements ManuscriptNodeView {
|
|
19
|
+
contentDOM: HTMLElement;
|
|
20
|
+
initialise: () => void;
|
|
21
|
+
protected createDOM: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<TitleView<any>>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { TitleView } from './title';
|
|
17
|
+
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<TitleView<any>>;
|
|
18
|
+
export default _default;
|
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": "1.5.
|
|
4
|
+
"version": "1.5.9-LEAN-2832",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@iarna/word-count": "^1.1.2",
|
|
30
30
|
"@manuscripts/assets": "^0.6.4",
|
|
31
|
-
"@manuscripts/json-schema": "
|
|
32
|
-
"@manuscripts/library": "1.2.
|
|
33
|
-
"@manuscripts/style-guide": "
|
|
31
|
+
"@manuscripts/json-schema": "2.2.1",
|
|
32
|
+
"@manuscripts/library": "1.2.2",
|
|
33
|
+
"@manuscripts/style-guide": "1.4.5",
|
|
34
34
|
"@manuscripts/title-editor": "^1.1.0",
|
|
35
|
-
"@manuscripts/track-changes-plugin": "
|
|
36
|
-
"@manuscripts/transform": "1.5.
|
|
35
|
+
"@manuscripts/track-changes-plugin": "1.7.3-LEAN-2832-v4",
|
|
36
|
+
"@manuscripts/transform": "1.5.4",
|
|
37
37
|
"astrocite-eutils": "^0.16.4",
|
|
38
38
|
"axios": "^1.2.2",
|
|
39
39
|
"codemirror": "^5.58.1",
|
|
@@ -730,3 +730,27 @@ Next levels are shifted 'up' by 1
|
|
|
730
730
|
.citation-wrapper:hover .track-changes-review {
|
|
731
731
|
display: inline-block;
|
|
732
732
|
}
|
|
733
|
+
|
|
734
|
+
.contributors {
|
|
735
|
+
white-space: initial;
|
|
736
|
+
margin-bottom: 24px;
|
|
737
|
+
margin-top: 24px;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.contributors .tools-panel {
|
|
741
|
+
position: initial;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.contributors table {
|
|
745
|
+
line-height: initial;
|
|
746
|
+
width: inherit;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.contributors tr th, .contributors tr td {
|
|
750
|
+
border: none !important;
|
|
751
|
+
background: none !important;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.contributors th, .contributors td {
|
|
755
|
+
padding: initial;
|
|
756
|
+
}
|
package/styles/Editor.css
CHANGED