@manuscripts/body-editor 2.2.9-LEAN-2827.0 → 2.2.9
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 +10 -10
- package/dist/cjs/components/authors/AuthorsModal.js +4 -0
- package/dist/cjs/components/keywords/AddKeywordInline.js +2 -2
- package/dist/cjs/configs/editor-views.js +2 -2
- package/dist/cjs/plugins/toc.js +1 -2
- package/dist/cjs/versions.js +1 -1
- package/dist/cjs/views/bibliography_element_editable.js +21 -0
- package/dist/es/commands.js +12 -12
- package/dist/es/components/authors/AuthorsModal.js +4 -0
- package/dist/es/components/keywords/AddKeywordInline.js +1 -1
- package/dist/es/configs/editor-views.js +1 -1
- package/dist/es/plugins/toc.js +2 -3
- package/dist/es/versions.js +1 -1
- package/dist/es/views/bibliography_element_editable.js +19 -0
- package/dist/types/configs/editor-views.d.ts +35 -1
- package/dist/types/versions.d.ts +1 -1
- package/dist/types/views/bibliography_element_editable.d.ts +52 -0
- package/package.json +2 -2
package/dist/cjs/commands.js
CHANGED
|
@@ -185,7 +185,7 @@ const insertGeneralFootnote = (tableElementNode, position, view, tableElementFoo
|
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
187
187
|
const tableElementFooter = transform_1.schema.nodes.table_element_footer.create({
|
|
188
|
-
id: (0, transform_1.
|
|
188
|
+
id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.table_element_footer),
|
|
189
189
|
}, [generalNote]);
|
|
190
190
|
tr.insert(pos, tableElementFooter);
|
|
191
191
|
}
|
|
@@ -355,8 +355,8 @@ const insertLink = (state, dispatch) => {
|
|
|
355
355
|
};
|
|
356
356
|
exports.insertLink = insertLink;
|
|
357
357
|
const insertInlineCitation = (state, dispatch) => {
|
|
358
|
-
const node =
|
|
359
|
-
id: (0, transform_1.
|
|
358
|
+
const node = transform_1.schema.nodes.citation.create({
|
|
359
|
+
id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.citation),
|
|
360
360
|
rids: [],
|
|
361
361
|
selectedText: selectedText(),
|
|
362
362
|
});
|
|
@@ -397,8 +397,8 @@ const insertInlineEquation = (state, dispatch) => {
|
|
|
397
397
|
};
|
|
398
398
|
exports.insertInlineEquation = insertInlineEquation;
|
|
399
399
|
const createFootnote = (state, kind) => {
|
|
400
|
-
return
|
|
401
|
-
id: (0, transform_1.
|
|
400
|
+
return transform_1.schema.nodes.footnote.createAndFill({
|
|
401
|
+
id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.footnote),
|
|
402
402
|
kind,
|
|
403
403
|
});
|
|
404
404
|
};
|
|
@@ -937,7 +937,7 @@ const addNodeComment = (node, state, dispatch) => {
|
|
|
937
937
|
const props = (0, editor_props_1.getEditorProps)(state);
|
|
938
938
|
const contribution = (0, json_schema_1.buildContribution)(props.userID);
|
|
939
939
|
const attrs = {
|
|
940
|
-
id: (0, transform_1.
|
|
940
|
+
id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.comment),
|
|
941
941
|
contents: '',
|
|
942
942
|
target: node.attrs.id,
|
|
943
943
|
contributions: [contribution],
|
|
@@ -968,7 +968,7 @@ const addInlineComment = (state, dispatch) => {
|
|
|
968
968
|
const props = (0, editor_props_1.getEditorProps)(state);
|
|
969
969
|
const contribution = (0, json_schema_1.buildContribution)(props.userID);
|
|
970
970
|
const attrs = {
|
|
971
|
-
id: (0, transform_1.
|
|
971
|
+
id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.comment),
|
|
972
972
|
contents: '',
|
|
973
973
|
target: node.attrs.id,
|
|
974
974
|
contributions: [contribution],
|
|
@@ -1013,8 +1013,8 @@ exports.addInlineComment = addInlineComment;
|
|
|
1013
1013
|
const insertTableFootnote = (tableElementNode, position, view, inlineFootnote) => {
|
|
1014
1014
|
const { state, dispatch } = view;
|
|
1015
1015
|
const tr = state.tr;
|
|
1016
|
-
const footnote =
|
|
1017
|
-
id: (0, transform_1.
|
|
1016
|
+
const footnote = transform_1.schema.nodes.footnote.createAndFill({
|
|
1017
|
+
id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.footnote),
|
|
1018
1018
|
kind: 'footnote',
|
|
1019
1019
|
});
|
|
1020
1020
|
const insertedAt = state.selection.to;
|
|
@@ -1064,7 +1064,7 @@ const insertTableFootnote = (tableElementNode, position, view, inlineFootnote) =
|
|
|
1064
1064
|
}
|
|
1065
1065
|
else {
|
|
1066
1066
|
const tableElementFooter = transform_1.schema.nodes.table_element_footer.create({
|
|
1067
|
-
id: (0, transform_1.
|
|
1067
|
+
id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.table_element_footer),
|
|
1068
1068
|
}, [footnoteElement]);
|
|
1069
1069
|
const tableColGroup = (0, prosemirror_utils_1.findChildrenByType)(tableElementNode, transform_1.schema.nodes.table_colgroup)[0];
|
|
1070
1070
|
const table = (0, prosemirror_utils_1.findChildrenByType)(tableElementNode, transform_1.schema.nodes.table)[0];
|
|
@@ -93,6 +93,8 @@ const normalize = (author) => ({
|
|
|
93
93
|
isJointContributor: author.isJointContributor || false,
|
|
94
94
|
userID: '',
|
|
95
95
|
invitationID: '',
|
|
96
|
+
footnote: author.footnote || [],
|
|
97
|
+
corresp: author.corresp || [],
|
|
96
98
|
});
|
|
97
99
|
const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, author, onSaveAuthor, onDeleteAuthor, onSaveAffiliation, }) => {
|
|
98
100
|
const [isOpen, setOpen] = (0, react_1.useState)(true);
|
|
@@ -162,6 +164,8 @@ const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, author,
|
|
|
162
164
|
isJointContributor: false,
|
|
163
165
|
userID: '',
|
|
164
166
|
invitationID: '',
|
|
167
|
+
corresp: [],
|
|
168
|
+
footnote: [],
|
|
165
169
|
};
|
|
166
170
|
onSaveAuthor(author);
|
|
167
171
|
setSelection(author);
|
|
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.AddKeywordInline = void 0;
|
|
30
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
30
31
|
const style_guide_1 = require("@manuscripts/style-guide");
|
|
31
|
-
const transform_1 = require("@manuscripts/transform");
|
|
32
32
|
const react_1 = __importStar(require("react"));
|
|
33
33
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
34
34
|
const track_changes_utils_1 = require("../../lib/track-changes-utils");
|
|
@@ -130,7 +130,7 @@ const AddKeywordInline = ({ viewProps, getUpdatedNode }) => {
|
|
|
130
130
|
setNewKeyword('');
|
|
131
131
|
};
|
|
132
132
|
const handleAddKeyword = () => {
|
|
133
|
-
const keyword = (0,
|
|
133
|
+
const keyword = (0, json_schema_1.buildKeyword)(newKeyword);
|
|
134
134
|
if (!isExistingKeyword() && isValidNewKeyword()) {
|
|
135
135
|
const node = getUpdatedNode();
|
|
136
136
|
const keywordNode = node.type.schema.nodes.keyword.create({
|
|
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
const affiliations_1 = __importDefault(require("../views/affiliations"));
|
|
22
22
|
const author_notes_1 = __importDefault(require("../views/author_notes"));
|
|
23
|
-
const
|
|
23
|
+
const bibliography_element_editable_1 = __importDefault(require("../views/bibliography_element_editable"));
|
|
24
24
|
const blockquote_element_editable_1 = __importDefault(require("../views/blockquote_element_editable"));
|
|
25
25
|
const citation_editable_1 = __importDefault(require("../views/citation_editable"));
|
|
26
26
|
const contributors_1 = __importDefault(require("../views/contributors"));
|
|
@@ -54,7 +54,7 @@ const toc_element_editable_1 = __importDefault(require("../views/toc_element_edi
|
|
|
54
54
|
exports.default = (props, dispatch) => {
|
|
55
55
|
return {
|
|
56
56
|
title: (0, title_editable_1.default)(props, dispatch),
|
|
57
|
-
bibliography_element: (0,
|
|
57
|
+
bibliography_element: (0, bibliography_element_editable_1.default)(props, dispatch),
|
|
58
58
|
blockquote_element: (0, blockquote_element_editable_1.default)(props),
|
|
59
59
|
citation: (0, citation_editable_1.default)(props, dispatch),
|
|
60
60
|
cross_reference: (0, cross_reference_editable_1.default)(props, dispatch),
|
package/dist/cjs/plugins/toc.js
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.tocKey = void 0;
|
|
19
|
-
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
19
|
const transform_1 = require("@manuscripts/transform");
|
|
21
20
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
22
21
|
const utils_1 = require("../lib/utils");
|
|
@@ -67,7 +66,7 @@ exports.default = () => {
|
|
|
67
66
|
nodesToUpdate.push({
|
|
68
67
|
node,
|
|
69
68
|
pos,
|
|
70
|
-
id: node.attrs.id || (0, transform_1.
|
|
69
|
+
id: node.attrs.id || (0, transform_1.generateNodeID)(transform_1.schema.nodes.toc_element),
|
|
71
70
|
contents,
|
|
72
71
|
});
|
|
73
72
|
}
|
package/dist/cjs/versions.js
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
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 bibliography_element_1 = require("./bibliography_element");
|
|
19
|
+
const creators_1 = require("./creators");
|
|
20
|
+
const editable_block_1 = require("./editable_block");
|
|
21
|
+
exports.default = (0, creators_1.createEditableNodeView)((0, editable_block_1.EditableBlock)(bibliography_element_1.BibliographyElementBlockView));
|
package/dist/es/commands.js
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { buildContribution
|
|
16
|
+
import { buildContribution } from '@manuscripts/json-schema';
|
|
17
17
|
import { skipTracking } from '@manuscripts/track-changes-plugin';
|
|
18
|
-
import {
|
|
18
|
+
import { generateNodeID, isElementNodeType, isFootnoteNode, isListNode, isParagraphNode, isSectionNodeType, schema, } from '@manuscripts/transform';
|
|
19
19
|
import { Fragment, NodeRange, } from 'prosemirror-model';
|
|
20
20
|
import { wrapInList } from 'prosemirror-schema-list';
|
|
21
21
|
import { NodeSelection, TextSelection, } from 'prosemirror-state';
|
|
@@ -174,7 +174,7 @@ export const insertGeneralFootnote = (tableElementNode, position, view, tableEle
|
|
|
174
174
|
}
|
|
175
175
|
else {
|
|
176
176
|
const tableElementFooter = schema.nodes.table_element_footer.create({
|
|
177
|
-
id:
|
|
177
|
+
id: generateNodeID(schema.nodes.table_element_footer),
|
|
178
178
|
}, [generalNote]);
|
|
179
179
|
tr.insert(pos, tableElementFooter);
|
|
180
180
|
}
|
|
@@ -334,8 +334,8 @@ export const insertLink = (state, dispatch) => {
|
|
|
334
334
|
return true;
|
|
335
335
|
};
|
|
336
336
|
export const insertInlineCitation = (state, dispatch) => {
|
|
337
|
-
const node =
|
|
338
|
-
id:
|
|
337
|
+
const node = schema.nodes.citation.create({
|
|
338
|
+
id: generateNodeID(schema.nodes.citation),
|
|
339
339
|
rids: [],
|
|
340
340
|
selectedText: selectedText(),
|
|
341
341
|
});
|
|
@@ -373,8 +373,8 @@ export const insertInlineEquation = (state, dispatch) => {
|
|
|
373
373
|
return true;
|
|
374
374
|
};
|
|
375
375
|
export const createFootnote = (state, kind) => {
|
|
376
|
-
return
|
|
377
|
-
id:
|
|
376
|
+
return schema.nodes.footnote.createAndFill({
|
|
377
|
+
id: generateNodeID(schema.nodes.footnote),
|
|
378
378
|
kind,
|
|
379
379
|
});
|
|
380
380
|
};
|
|
@@ -893,7 +893,7 @@ export const addNodeComment = (node, state, dispatch) => {
|
|
|
893
893
|
const props = getEditorProps(state);
|
|
894
894
|
const contribution = buildContribution(props.userID);
|
|
895
895
|
const attrs = {
|
|
896
|
-
id:
|
|
896
|
+
id: generateNodeID(schema.nodes.comment),
|
|
897
897
|
contents: '',
|
|
898
898
|
target: node.attrs.id,
|
|
899
899
|
contributions: [contribution],
|
|
@@ -923,7 +923,7 @@ export const addInlineComment = (state, dispatch) => {
|
|
|
923
923
|
const props = getEditorProps(state);
|
|
924
924
|
const contribution = buildContribution(props.userID);
|
|
925
925
|
const attrs = {
|
|
926
|
-
id:
|
|
926
|
+
id: generateNodeID(schema.nodes.comment),
|
|
927
927
|
contents: '',
|
|
928
928
|
target: node.attrs.id,
|
|
929
929
|
contributions: [contribution],
|
|
@@ -967,8 +967,8 @@ export const addInlineComment = (state, dispatch) => {
|
|
|
967
967
|
export const insertTableFootnote = (tableElementNode, position, view, inlineFootnote) => {
|
|
968
968
|
const { state, dispatch } = view;
|
|
969
969
|
const tr = state.tr;
|
|
970
|
-
const footnote =
|
|
971
|
-
id:
|
|
970
|
+
const footnote = schema.nodes.footnote.createAndFill({
|
|
971
|
+
id: generateNodeID(schema.nodes.footnote),
|
|
972
972
|
kind: 'footnote',
|
|
973
973
|
});
|
|
974
974
|
const insertedAt = state.selection.to;
|
|
@@ -1018,7 +1018,7 @@ export const insertTableFootnote = (tableElementNode, position, view, inlineFoot
|
|
|
1018
1018
|
}
|
|
1019
1019
|
else {
|
|
1020
1020
|
const tableElementFooter = schema.nodes.table_element_footer.create({
|
|
1021
|
-
id:
|
|
1021
|
+
id: generateNodeID(schema.nodes.table_element_footer),
|
|
1022
1022
|
}, [footnoteElement]);
|
|
1023
1023
|
const tableColGroup = findChildrenByType(tableElementNode, schema.nodes.table_colgroup)[0];
|
|
1024
1024
|
const table = findChildrenByType(tableElementNode, schema.nodes.table)[0];
|
|
@@ -64,6 +64,8 @@ const normalize = (author) => ({
|
|
|
64
64
|
isJointContributor: author.isJointContributor || false,
|
|
65
65
|
userID: '',
|
|
66
66
|
invitationID: '',
|
|
67
|
+
footnote: author.footnote || [],
|
|
68
|
+
corresp: author.corresp || [],
|
|
67
69
|
});
|
|
68
70
|
export const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, author, onSaveAuthor, onDeleteAuthor, onSaveAffiliation, }) => {
|
|
69
71
|
const [isOpen, setOpen] = useState(true);
|
|
@@ -133,6 +135,8 @@ export const AuthorsModal = ({ authors: $authors, affiliations: $affiliations, a
|
|
|
133
135
|
isJointContributor: false,
|
|
134
136
|
userID: '',
|
|
135
137
|
invitationID: '',
|
|
138
|
+
corresp: [],
|
|
139
|
+
footnote: [],
|
|
136
140
|
};
|
|
137
141
|
onSaveAuthor(author);
|
|
138
142
|
setSelection(author);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { buildKeyword } from '@manuscripts/json-schema';
|
|
1
2
|
import { Category, Dialog, PlusIcon } from '@manuscripts/style-guide';
|
|
2
|
-
import { buildKeyword, } from '@manuscripts/transform';
|
|
3
3
|
import React, { useCallback, useEffect, useRef, useState, } from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { isDeleted, isRejectedInsert } from '../../lib/track-changes-utils';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import affiliations from '../views/affiliations';
|
|
17
17
|
import authorNotes from '../views/author_notes';
|
|
18
|
-
import bibliographyElement from '../views/
|
|
18
|
+
import bibliographyElement from '../views/bibliography_element_editable';
|
|
19
19
|
import blockquoteElement from '../views/blockquote_element_editable';
|
|
20
20
|
import citation from '../views/citation_editable';
|
|
21
21
|
import contributors from '../views/contributors';
|
package/dist/es/plugins/toc.js
CHANGED
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { generateID, isSectionNodeType, isTOCSectionNode, schema, } from '@manuscripts/transform';
|
|
16
|
+
import { generateNodeID, isSectionNodeType, isTOCSectionNode, schema, } from '@manuscripts/transform';
|
|
18
17
|
import { NodeSelection, Plugin, PluginKey } from 'prosemirror-state';
|
|
19
18
|
import { iterateChildren } from '../lib/utils';
|
|
20
19
|
export const tocKey = new PluginKey('toc');
|
|
@@ -64,7 +63,7 @@ export default () => {
|
|
|
64
63
|
nodesToUpdate.push({
|
|
65
64
|
node,
|
|
66
65
|
pos,
|
|
67
|
-
id: node.attrs.id ||
|
|
66
|
+
id: node.attrs.id || generateNodeID(schema.nodes.toc_element),
|
|
68
67
|
contents,
|
|
69
68
|
});
|
|
70
69
|
}
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.2.9
|
|
1
|
+
export const VERSION = '2.2.9';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { BibliographyElementBlockView } from './bibliography_element';
|
|
17
|
+
import { createEditableNodeView } from './creators';
|
|
18
|
+
import { EditableBlock } from './editable_block';
|
|
19
|
+
export default createEditableNodeView(EditableBlock(BibliographyElementBlockView));
|
|
@@ -17,7 +17,41 @@ import { Dispatch } from '../commands';
|
|
|
17
17
|
import { EditorProps } from './ManuscriptsEditor';
|
|
18
18
|
declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
19
19
|
title: import("../types").NodeViewCreator<import("../views/title").TitleView>;
|
|
20
|
-
bibliography_element: import("../types").NodeViewCreator<
|
|
20
|
+
bibliography_element: import("../types").NodeViewCreator<{
|
|
21
|
+
gutterButtons: () => HTMLElement[];
|
|
22
|
+
actionGutterButtons: () => HTMLElement[];
|
|
23
|
+
createAddButton: () => HTMLElement | null;
|
|
24
|
+
createEditButton: () => HTMLElement | null;
|
|
25
|
+
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
26
|
+
viewAttributes: {
|
|
27
|
+
id: string;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
paragraphStyle: string;
|
|
30
|
+
};
|
|
31
|
+
initialise: () => void;
|
|
32
|
+
updateContents: () => void;
|
|
33
|
+
onUpdateContent(): void;
|
|
34
|
+
updateClasses: () => void;
|
|
35
|
+
updateAttributes: () => void;
|
|
36
|
+
createElement: () => void;
|
|
37
|
+
createDOM: () => void;
|
|
38
|
+
createGutter: (className: string, buttons: HTMLElement[]) => void;
|
|
39
|
+
dom: HTMLElement;
|
|
40
|
+
contentDOM?: HTMLElement | undefined;
|
|
41
|
+
syncErrors: import("../types").SyncError[];
|
|
42
|
+
elementType: string;
|
|
43
|
+
readonly props: EditorProps;
|
|
44
|
+
node: import("prosemirror-model").Node;
|
|
45
|
+
readonly view: import("prosemirror-view").EditorView;
|
|
46
|
+
readonly getPos: () => number;
|
|
47
|
+
decorations: readonly import("prosemirror-view").Decoration[];
|
|
48
|
+
update: (newNode: import("prosemirror-model").Node, decorations: readonly import("prosemirror-view").Decoration[]) => boolean;
|
|
49
|
+
setDomAttrs(node: import("prosemirror-model").Node, element: HTMLElement, omit?: string[]): void;
|
|
50
|
+
selectNode: () => void;
|
|
51
|
+
deselectNode: () => void;
|
|
52
|
+
destroy: () => void;
|
|
53
|
+
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
54
|
+
} & import("../views/bibliography_element").BibliographyElementBlockView>;
|
|
21
55
|
blockquote_element: import("../types").NodeViewCreator<{
|
|
22
56
|
gutterButtons: () => HTMLElement[];
|
|
23
57
|
actionGutterButtons: () => HTMLElement[];
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.2.9
|
|
1
|
+
export declare const VERSION = "2.2.9";
|
|
2
2
|
export declare const MATHJAX_VERSION = "3.2.2";
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { BibliographyElementBlockView } from './bibliography_element';
|
|
17
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
|
+
gutterButtons: () => HTMLElement[];
|
|
19
|
+
actionGutterButtons: () => HTMLElement[];
|
|
20
|
+
createAddButton: () => HTMLElement | null;
|
|
21
|
+
createEditButton: () => HTMLElement | null;
|
|
22
|
+
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
23
|
+
viewAttributes: {
|
|
24
|
+
id: string;
|
|
25
|
+
placeholder: string;
|
|
26
|
+
paragraphStyle: string;
|
|
27
|
+
};
|
|
28
|
+
initialise: () => void;
|
|
29
|
+
updateContents: () => void;
|
|
30
|
+
onUpdateContent(): void;
|
|
31
|
+
updateClasses: () => void;
|
|
32
|
+
updateAttributes: () => void;
|
|
33
|
+
createElement: () => void;
|
|
34
|
+
createDOM: () => void;
|
|
35
|
+
createGutter: (className: string, buttons: HTMLElement[]) => void;
|
|
36
|
+
dom: HTMLElement;
|
|
37
|
+
contentDOM?: HTMLElement | undefined;
|
|
38
|
+
syncErrors: import("../types").SyncError[];
|
|
39
|
+
elementType: string;
|
|
40
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
41
|
+
node: import("prosemirror-model").Node;
|
|
42
|
+
readonly view: import("prosemirror-view").EditorView;
|
|
43
|
+
readonly getPos: () => number;
|
|
44
|
+
decorations: readonly import("prosemirror-view").Decoration[];
|
|
45
|
+
update: (newNode: import("prosemirror-model").Node, decorations: readonly import("prosemirror-view").Decoration[]) => boolean;
|
|
46
|
+
setDomAttrs(node: import("prosemirror-model").Node, element: HTMLElement, omit?: string[]): void;
|
|
47
|
+
selectNode: () => void;
|
|
48
|
+
deselectNode: () => void;
|
|
49
|
+
destroy: () => void;
|
|
50
|
+
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
51
|
+
} & BibliographyElementBlockView>;
|
|
52
|
+
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": "2.2.9
|
|
4
|
+
"version": "2.2.9",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@manuscripts/library": "1.3.11",
|
|
35
35
|
"@manuscripts/style-guide": "2.0.21",
|
|
36
36
|
"@manuscripts/track-changes-plugin": "1.7.23",
|
|
37
|
-
"@manuscripts/transform": "
|
|
37
|
+
"@manuscripts/transform": "3.0.0",
|
|
38
38
|
"@popperjs/core": "^2.11.8",
|
|
39
39
|
"astrocite-eutils": "^0.16.4",
|
|
40
40
|
"codemirror": "^5.58.1",
|