@manuscripts/body-editor 1.5.0 → 1.5.1-LEAN-2852-0
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 +1 -1
- package/dist/cjs/components/application-menu/MenuItemContainer.js +2 -0
- package/dist/cjs/components/outline/DraggableTree.js +16 -17
- package/dist/cjs/components/outline/ManuscriptOutline.js +4 -4
- package/dist/cjs/components/outline/OutlineManuscript.js +11 -8
- package/dist/cjs/views/title_editable.js +20 -0
- package/dist/cjs/views/titles.js +49 -0
- package/dist/es/commands.js +1 -1
- package/dist/es/components/application-menu/MenuItemContainer.js +2 -0
- package/dist/es/components/outline/DraggableTree.js +16 -17
- package/dist/es/components/outline/ManuscriptOutline.js +4 -4
- package/dist/es/components/outline/OutlineManuscript.js +11 -8
- package/dist/es/views/title_editable.js +18 -0
- package/dist/es/views/titles.js +45 -0
- package/dist/types/components/outline/OutlineManuscript.d.ts +2 -0
- package/dist/types/views/title_editable.d.ts +18 -0
- package/dist/types/views/titles.d.ts +24 -0
- package/package.json +5 -5
- package/styles/Editor.css +8 -0
package/dist/cjs/commands.js
CHANGED
|
@@ -399,7 +399,7 @@ const insertFootnotesSection = (state, dispatch) => {
|
|
|
399
399
|
};
|
|
400
400
|
exports.insertFootnotesSection = insertFootnotesSection;
|
|
401
401
|
const insertBibliographySection = (state, dispatch) => {
|
|
402
|
-
if ((0, utils_1.
|
|
402
|
+
if ((0, utils_1.getMatchingDescendant)(state.doc, (node) => node.type === state.schema.nodes.bibliography_section)) {
|
|
403
403
|
return false;
|
|
404
404
|
}
|
|
405
405
|
const section = state.schema.nodes.bibliography_section.createAndFill({}, [
|
|
@@ -134,23 +134,22 @@ class Tree extends React.Component {
|
|
|
134
134
|
if (isRejectedItem || node.attrs.id === 'META_SECTION') {
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
return connectDropTarget(React.createElement("div", null,
|
|
138
|
-
React.createElement(Outline_1.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
React.createElement(Outline_1.
|
|
142
|
-
|
|
143
|
-
React.createElement(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
React.createElement(Outline_1.OutlineDropPreview, { depth: depth, style: this.bottomPreviewStyles(mightDrop, dragPosition) }))));
|
|
137
|
+
return connectDropTarget(React.createElement("div", null, node.type.name !== 'titles' && (React.createElement(Outline_1.Outline, { style: this.outlineStyles(isDragging) },
|
|
138
|
+
React.createElement(Outline_1.OutlineDropPreview, { depth: depth, style: this.topPreviewStyles(mightDrop, dragPosition) }),
|
|
139
|
+
!(0, section_title_1.isSpecialSection)(node) && (React.createElement(React.Fragment, null, connectDragSource(React.createElement("div", null,
|
|
140
|
+
React.createElement(Outline_1.OutlineItem, { isSelected: isSelected, depth: depth, onContextMenu: this.handleContextMenu },
|
|
141
|
+
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)),
|
|
142
|
+
React.createElement(Outline_1.OutlineItemLink, { to: `#${node.attrs.id || ''}` },
|
|
143
|
+
connectDragPreview(React.createElement("span", { style: {
|
|
144
|
+
display: 'inline-flex',
|
|
145
|
+
alignItems: 'center',
|
|
146
|
+
} },
|
|
147
|
+
React.createElement(Outline_1.OutlineItemIcon, null, (0, node_type_icons_1.nodeTypeIcon)(node.type)))),
|
|
148
|
+
React.createElement(Outline_1.OutlineItemLinkText, { className: `outline-text-${node.type.name} ${isDeletedItem && 'deleted'}` }, this.itemText(node)))))))),
|
|
149
|
+
items.length ? (React.createElement("div", { style: {
|
|
150
|
+
display: open || (0, section_title_1.isSpecialSection)(node) ? '' : 'none',
|
|
151
|
+
} }, 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,
|
|
152
|
+
React.createElement(Outline_1.OutlineDropPreview, { depth: depth, style: this.bottomPreviewStyles(mightDrop, dragPosition) })))));
|
|
154
153
|
}
|
|
155
154
|
}
|
|
156
155
|
const dragSource = (0, react_dnd_1.DragSource)('outline', {
|
|
@@ -48,8 +48,8 @@ const ManuscriptOutline = (props) => {
|
|
|
48
48
|
const [values, setValues] = (0, react_1.useState)();
|
|
49
49
|
const debouncedProps = (0, use_debounce_1.useDebounce)(props, 500);
|
|
50
50
|
(0, react_1.useEffect)(() => {
|
|
51
|
-
var _a;
|
|
52
|
-
const { doc, view,
|
|
51
|
+
var _a, _b;
|
|
52
|
+
const { doc, view, selected } = debouncedProps;
|
|
53
53
|
if (doc) {
|
|
54
54
|
const { items } = (0, DraggableTree_1.buildTree)({
|
|
55
55
|
node: doc,
|
|
@@ -57,7 +57,7 @@ const ManuscriptOutline = (props) => {
|
|
|
57
57
|
index: 0,
|
|
58
58
|
selected,
|
|
59
59
|
});
|
|
60
|
-
const node = (0, title_editor_1.parse)(
|
|
60
|
+
const node = (0, title_editor_1.parse)(((_a = doc.content.firstChild) === null || _a === void 0 ? void 0 : _a.textContent) || '');
|
|
61
61
|
const tree = {
|
|
62
62
|
node,
|
|
63
63
|
requirementsNode: doc,
|
|
@@ -67,7 +67,7 @@ const ManuscriptOutline = (props) => {
|
|
|
67
67
|
isSelected: !selected,
|
|
68
68
|
items,
|
|
69
69
|
};
|
|
70
|
-
setValues({ tree, view, editArticle: !!((
|
|
70
|
+
setValues({ tree, view, editArticle: !!((_b = props.capabilities) === null || _b === void 0 ? void 0 : _b.editArticle) });
|
|
71
71
|
}
|
|
72
72
|
else {
|
|
73
73
|
setValues(undefined);
|
|
@@ -30,12 +30,15 @@ const titleText = (value) => {
|
|
|
30
30
|
});
|
|
31
31
|
return node.textContent;
|
|
32
32
|
};
|
|
33
|
-
const OutlineManuscript = ({ project, manuscript, }) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
const OutlineManuscript = ({ project, manuscript, doc, }) => {
|
|
34
|
+
var _a;
|
|
35
|
+
return (react_1.default.createElement(Outline_1.Outline, null,
|
|
36
|
+
react_1.default.createElement(Outline_1.OutlineItem, { isSelected: false, depth: 0 },
|
|
37
|
+
react_1.default.createElement(Outline_1.OutlineItemLink, { to: `/projects/${project._id}/manuscripts/${manuscript._id}` },
|
|
38
|
+
react_1.default.createElement(Outline_1.OutlineItemArrow, null,
|
|
39
|
+
react_1.default.createElement(Outline_1.StyledTriangleCollapsed, null)),
|
|
40
|
+
react_1.default.createElement(Outline_1.OutlineItemIcon, null,
|
|
41
|
+
react_1.default.createElement(OutlineIconManuscript_1.default, null)),
|
|
42
|
+
react_1.default.createElement(Outline_1.OutlineItemLinkText, { className: 'outline-text-title' }, ((_a = doc.content.firstChild) === null || _a === void 0 ? void 0 : _a.textContent) ? (titleText(doc.content.firstChild.textContent)) : (react_1.default.createElement(Outline_1.OutlineItemPlaceholder, null, (0, transform_1.nodeTitlePlaceholder)(title_editor_1.schema.nodes.title))))))));
|
|
43
|
+
};
|
|
41
44
|
exports.OutlineManuscript = OutlineManuscript;
|
|
@@ -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 titles_1 = require("./titles");
|
|
20
|
+
exports.default = (0, creators_1.createEditableNodeView)(titles_1.TitlesView);
|
|
@@ -0,0 +1,49 @@
|
|
|
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.TitlesView = void 0;
|
|
19
|
+
const track_changes_utils_1 = require("../lib/track-changes-utils");
|
|
20
|
+
const base_node_view_1 = require("./base_node_view");
|
|
21
|
+
const creators_1 = require("./creators");
|
|
22
|
+
class TitlesView extends base_node_view_1.BaseNodeView {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.initialise = () => {
|
|
26
|
+
this.createDOM();
|
|
27
|
+
this.updateContents();
|
|
28
|
+
};
|
|
29
|
+
this.updateContents = () => {
|
|
30
|
+
const titleText = this.node.attrs.title;
|
|
31
|
+
if (!(0, track_changes_utils_1.isRejectedInsert)(this.node)) {
|
|
32
|
+
const titleElement = document.createElement('div');
|
|
33
|
+
titleElement.textContent = titleText;
|
|
34
|
+
this.dom.innerHTML = '';
|
|
35
|
+
this.dom.appendChild(titleElement);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.dom.innerHTML = '';
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
this.createDOM = () => {
|
|
42
|
+
this.dom = document.createElement('div');
|
|
43
|
+
this.dom.classList.add('article-title');
|
|
44
|
+
this.contentDOM = this.dom;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.TitlesView = TitlesView;
|
|
49
|
+
exports.default = (0, creators_1.createNodeView)(TitlesView);
|
package/dist/es/commands.js
CHANGED
|
@@ -354,7 +354,7 @@ export const insertFootnotesSection = (state, dispatch) => {
|
|
|
354
354
|
return true;
|
|
355
355
|
};
|
|
356
356
|
export const insertBibliographySection = (state, dispatch) => {
|
|
357
|
-
if (
|
|
357
|
+
if (getMatchingDescendant(state.doc, (node) => node.type === state.schema.nodes.bibliography_section)) {
|
|
358
358
|
return false;
|
|
359
359
|
}
|
|
360
360
|
const section = state.schema.nodes.bibliography_section.createAndFill({}, [
|
|
@@ -107,23 +107,22 @@ class Tree extends React.Component {
|
|
|
107
107
|
if (isRejectedItem || node.attrs.id === 'META_SECTION') {
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
|
-
return connectDropTarget(React.createElement("div", null,
|
|
111
|
-
React.createElement(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
React.createElement(
|
|
115
|
-
|
|
116
|
-
React.createElement(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
React.createElement(OutlineDropPreview, { depth: depth, style: this.bottomPreviewStyles(mightDrop, dragPosition) }))));
|
|
110
|
+
return connectDropTarget(React.createElement("div", null, node.type.name !== 'titles' && (React.createElement(Outline, { style: this.outlineStyles(isDragging) },
|
|
111
|
+
React.createElement(OutlineDropPreview, { depth: depth, style: this.topPreviewStyles(mightDrop, dragPosition) }),
|
|
112
|
+
!isSpecialSection(node) && (React.createElement(React.Fragment, null, connectDragSource(React.createElement("div", null,
|
|
113
|
+
React.createElement(OutlineItem, { isSelected: isSelected, depth: depth, onContextMenu: this.handleContextMenu },
|
|
114
|
+
items.length ? (React.createElement(OutlineItemArrow, { onClick: this.toggle }, open ? (React.createElement(StyledTriangleExpanded, null)) : (React.createElement(StyledTriangleCollapsed, null)))) : (React.createElement(OutlineItemNoArrow, null)),
|
|
115
|
+
React.createElement(OutlineItemLink, { to: `#${node.attrs.id || ''}` },
|
|
116
|
+
connectDragPreview(React.createElement("span", { style: {
|
|
117
|
+
display: 'inline-flex',
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
} },
|
|
120
|
+
React.createElement(OutlineItemIcon, null, nodeTypeIcon(node.type)))),
|
|
121
|
+
React.createElement(OutlineItemLinkText, { className: `outline-text-${node.type.name} ${isDeletedItem && 'deleted'}` }, this.itemText(node)))))))),
|
|
122
|
+
items.length ? (React.createElement("div", { style: {
|
|
123
|
+
display: open || isSpecialSection(node) ? '' : 'none',
|
|
124
|
+
} }, 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,
|
|
125
|
+
React.createElement(OutlineDropPreview, { depth: depth, style: this.bottomPreviewStyles(mightDrop, dragPosition) })))));
|
|
127
126
|
}
|
|
128
127
|
}
|
|
129
128
|
const dragSource = DragSource('outline', {
|
|
@@ -22,8 +22,8 @@ export const ManuscriptOutline = (props) => {
|
|
|
22
22
|
const [values, setValues] = useState();
|
|
23
23
|
const debouncedProps = useDebounce(props, 500);
|
|
24
24
|
useEffect(() => {
|
|
25
|
-
var _a;
|
|
26
|
-
const { doc, view,
|
|
25
|
+
var _a, _b;
|
|
26
|
+
const { doc, view, selected } = debouncedProps;
|
|
27
27
|
if (doc) {
|
|
28
28
|
const { items } = buildTree({
|
|
29
29
|
node: doc,
|
|
@@ -31,7 +31,7 @@ export const ManuscriptOutline = (props) => {
|
|
|
31
31
|
index: 0,
|
|
32
32
|
selected,
|
|
33
33
|
});
|
|
34
|
-
const node = parse(
|
|
34
|
+
const node = parse(((_a = doc.content.firstChild) === null || _a === void 0 ? void 0 : _a.textContent) || '');
|
|
35
35
|
const tree = {
|
|
36
36
|
node,
|
|
37
37
|
requirementsNode: doc,
|
|
@@ -41,7 +41,7 @@ export const ManuscriptOutline = (props) => {
|
|
|
41
41
|
isSelected: !selected,
|
|
42
42
|
items,
|
|
43
43
|
};
|
|
44
|
-
setValues({ tree, view, editArticle: !!((
|
|
44
|
+
setValues({ tree, view, editArticle: !!((_b = props.capabilities) === null || _b === void 0 ? void 0 : _b.editArticle) });
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
47
|
setValues(undefined);
|
|
@@ -24,11 +24,14 @@ const titleText = (value) => {
|
|
|
24
24
|
});
|
|
25
25
|
return node.textContent;
|
|
26
26
|
};
|
|
27
|
-
export const OutlineManuscript = ({ project, manuscript, }) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
export const OutlineManuscript = ({ project, manuscript, doc, }) => {
|
|
28
|
+
var _a;
|
|
29
|
+
return (React.createElement(Outline, null,
|
|
30
|
+
React.createElement(OutlineItem, { isSelected: false, depth: 0 },
|
|
31
|
+
React.createElement(OutlineItemLink, { to: `/projects/${project._id}/manuscripts/${manuscript._id}` },
|
|
32
|
+
React.createElement(OutlineItemArrow, null,
|
|
33
|
+
React.createElement(StyledTriangleCollapsed, null)),
|
|
34
|
+
React.createElement(OutlineItemIcon, null,
|
|
35
|
+
React.createElement(OutlineIconManuscript, null)),
|
|
36
|
+
React.createElement(OutlineItemLinkText, { className: 'outline-text-title' }, ((_a = doc.content.firstChild) === null || _a === void 0 ? void 0 : _a.textContent) ? (titleText(doc.content.firstChild.textContent)) : (React.createElement(OutlineItemPlaceholder, null, nodeTitlePlaceholder(schema.nodes.title))))))));
|
|
37
|
+
};
|
|
@@ -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 { TitlesView } from './titles';
|
|
18
|
+
export default createEditableNodeView(TitlesView);
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { isRejectedInsert } from '../lib/track-changes-utils';
|
|
17
|
+
import { BaseNodeView } from './base_node_view';
|
|
18
|
+
import { createNodeView } from './creators';
|
|
19
|
+
export class TitlesView extends BaseNodeView {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.initialise = () => {
|
|
23
|
+
this.createDOM();
|
|
24
|
+
this.updateContents();
|
|
25
|
+
};
|
|
26
|
+
this.updateContents = () => {
|
|
27
|
+
const titleText = this.node.attrs.title;
|
|
28
|
+
if (!isRejectedInsert(this.node)) {
|
|
29
|
+
const titleElement = document.createElement('div');
|
|
30
|
+
titleElement.textContent = titleText;
|
|
31
|
+
this.dom.innerHTML = '';
|
|
32
|
+
this.dom.appendChild(titleElement);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.dom.innerHTML = '';
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
this.createDOM = () => {
|
|
39
|
+
this.dom = document.createElement('div');
|
|
40
|
+
this.dom.classList.add('article-title');
|
|
41
|
+
this.contentDOM = this.dom;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export default createNodeView(TitlesView);
|
|
@@ -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 {};
|
|
@@ -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 { TitlesView } from './titles';
|
|
17
|
+
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<TitlesView<any>>;
|
|
18
|
+
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 TitlesView<PropsType extends BaseNodeProps> extends BaseNodeView<PropsType> implements ManuscriptNodeView {
|
|
19
|
+
initialise: () => void;
|
|
20
|
+
updateContents: () => void;
|
|
21
|
+
protected createDOM: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<TitlesView<any>>;
|
|
24
|
+
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.0",
|
|
4
|
+
"version": "1.5.1-LEAN-2852-0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"@iarna/word-count": "^1.1.2",
|
|
30
30
|
"@manuscripts/assets": "^0.6.4",
|
|
31
31
|
"@manuscripts/comment-editor": "^1.0.3",
|
|
32
|
-
"@manuscripts/json-schema": "
|
|
33
|
-
"@manuscripts/library": "1.
|
|
34
|
-
"@manuscripts/style-guide": "1.4.0",
|
|
32
|
+
"@manuscripts/json-schema": "2.2.0-LEAN-2852-12",
|
|
33
|
+
"@manuscripts/library": "1.1.12-LEAN-2852-13",
|
|
34
|
+
"@manuscripts/style-guide": "1.4.0-LEAN-2852-0",
|
|
35
35
|
"@manuscripts/title-editor": "^1.1.0",
|
|
36
36
|
"@manuscripts/track-changes-plugin": "^1.7.2",
|
|
37
|
-
"@manuscripts/transform": "1.5.0",
|
|
37
|
+
"@manuscripts/transform": "1.5.1-LEAN-2852-0",
|
|
38
38
|
"astrocite-eutils": "^0.16.4",
|
|
39
39
|
"axios": "^1.2.2",
|
|
40
40
|
"codemirror": "^5.58.1",
|
package/styles/Editor.css
CHANGED