@manuscripts/body-editor 1.9.12-LEAN-3592.0 → 1.9.12
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/plugins/bibliography/bibliography-utils.js +3 -6
- package/dist/cjs/testing/default-editor-data.js +0 -2
- package/dist/cjs/views/editable_block.js +1 -44
- package/dist/es/plugins/bibliography/bibliography-utils.js +3 -6
- package/dist/es/testing/default-editor-data.js +0 -2
- package/dist/es/views/editable_block.js +2 -45
- package/dist/types/configs/ManuscriptsEditor.d.ts +0 -1
- package/dist/types/configs/editor-views.d.ts +0 -14
- package/dist/types/views/bibliography_element_editable.d.ts +0 -1
- package/dist/types/views/blockquote_element_editable.d.ts +0 -1
- package/dist/types/views/bullet_list_editable.d.ts +0 -1
- package/dist/types/views/editable_block.d.ts +0 -2
- package/dist/types/views/equation_element_editable.d.ts +0 -1
- package/dist/types/views/figure_element_editable.d.ts +0 -1
- package/dist/types/views/footnote_editable.d.ts +0 -1
- package/dist/types/views/footnotes_element_editable.d.ts +0 -1
- package/dist/types/views/listing_element_editable.d.ts +0 -1
- package/dist/types/views/ordered_list_editable.d.ts +0 -1
- package/dist/types/views/paragraph_editable.d.ts +0 -1
- package/dist/types/views/placeholder_element_editable.d.ts +0 -1
- package/dist/types/views/pullquote_element_editable.d.ts +0 -1
- package/dist/types/views/section_title_editable.d.ts +0 -1
- package/dist/types/views/table_element_editable.d.ts +0 -1
- package/dist/types/views/toc_element_editable.d.ts +0 -1
- package/package.json +1 -1
|
@@ -29,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.buildCitations = exports.getEffectiveAttrs = exports.getLatest = exports.buildDecorations = exports.isBibliographyElement = void 0;
|
|
30
30
|
const track_changes_plugin_1 = require("@manuscripts/track-changes-plugin");
|
|
31
31
|
const prosemirror_view_1 = require("prosemirror-view");
|
|
32
|
-
const track_changes_utils_1 = require("../../lib/track-changes-utils");
|
|
33
32
|
const isBibliographyElement = (node) => node.type === node.type.schema.nodes.bibliography_element;
|
|
34
33
|
exports.isBibliographyElement = isBibliographyElement;
|
|
35
34
|
const buildDecorations = (state, doc) => {
|
|
@@ -98,11 +97,9 @@ const getEffectiveAttrs = (node, excludeDeletedNode) => {
|
|
|
98
97
|
return isRejected ? nodeChange === null || nodeChange === void 0 ? void 0 : nodeChange.oldAttrs : attrs;
|
|
99
98
|
};
|
|
100
99
|
exports.getEffectiveAttrs = getEffectiveAttrs;
|
|
101
|
-
const buildCitations = (citations) => citations
|
|
102
|
-
|
|
103
|
-
.map((
|
|
104
|
-
citationID: attrs.id,
|
|
105
|
-
citationItems: attrs.rids.map((rid) => ({
|
|
100
|
+
const buildCitations = (citations) => citations.map((citation) => ({
|
|
101
|
+
citationID: citation[0].attrs.id,
|
|
102
|
+
citationItems: citation[0].attrs.rids.map((rid) => ({
|
|
106
103
|
id: rid,
|
|
107
104
|
})),
|
|
108
105
|
properties: {
|
|
@@ -80,8 +80,6 @@ exports.defaultEditorProps = {
|
|
|
80
80
|
style: '',
|
|
81
81
|
locale: '',
|
|
82
82
|
},
|
|
83
|
-
getCitationProvider: () => undefined,
|
|
84
|
-
retrySync: () => Promise.resolve(),
|
|
85
83
|
setComment: () => undefined,
|
|
86
84
|
setSelectedComment: () => undefined,
|
|
87
85
|
setEditorSelectedSuggestion: () => undefined,
|
|
@@ -14,15 +14,6 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
18
|
exports.EditableBlock = void 0;
|
|
28
19
|
const transform_1 = require("@manuscripts/transform");
|
|
@@ -37,41 +28,7 @@ const EditableBlock = (Base) => {
|
|
|
37
28
|
constructor() {
|
|
38
29
|
super(...arguments);
|
|
39
30
|
this.gutterButtons = () => [this.createAddButton(), this.createEditButton()].filter(isNotNull);
|
|
40
|
-
this.actionGutterButtons = () => [
|
|
41
|
-
this.createSyncWarningButton = () => {
|
|
42
|
-
var _a;
|
|
43
|
-
if (!((_a = this.props.getCapabilities()) === null || _a === void 0 ? void 0 : _a.editArticle)) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const { retrySync } = this.props;
|
|
47
|
-
const warningButton = document.createElement('button');
|
|
48
|
-
warningButton.classList.add('action-button');
|
|
49
|
-
warningButton.classList.add('sync-warning-button');
|
|
50
|
-
warningButton.addEventListener('click', () => __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
const errors = this.syncErrors.map((error) => error._id);
|
|
52
|
-
yield retrySync(errors);
|
|
53
|
-
}));
|
|
54
|
-
warningButton.addEventListener('mouseenter', () => {
|
|
55
|
-
const warning = document.createElement('div');
|
|
56
|
-
warning.className = 'sync-warning';
|
|
57
|
-
warning.appendChild((() => {
|
|
58
|
-
const node = document.createElement('p');
|
|
59
|
-
const humanReadableType = transform_1.nodeNames.get(this.node.type) || 'element';
|
|
60
|
-
node.textContent = `This ${humanReadableType.toLowerCase()} failed to be saved.`;
|
|
61
|
-
return node;
|
|
62
|
-
})());
|
|
63
|
-
warning.appendChild((() => {
|
|
64
|
-
const node = document.createElement('p');
|
|
65
|
-
node.textContent = `Please click to retry, and contact support@manuscriptsapp.com if the failure continues.`;
|
|
66
|
-
return node;
|
|
67
|
-
})());
|
|
68
|
-
this.props.popper.show(warningButton, warning, 'left');
|
|
69
|
-
});
|
|
70
|
-
warningButton.addEventListener('mouseleave', () => {
|
|
71
|
-
this.props.popper.destroy();
|
|
72
|
-
});
|
|
73
|
-
return warningButton;
|
|
74
|
-
};
|
|
31
|
+
this.actionGutterButtons = () => [];
|
|
75
32
|
this.createAddButton = () => {
|
|
76
33
|
var _a;
|
|
77
34
|
const hasAccess = (_a = this.props.getCapabilities()) === null || _a === void 0 ? void 0 : _a.editArticle;
|
|
@@ -26,7 +26,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
26
26
|
};
|
|
27
27
|
import { CHANGE_OPERATION, CHANGE_STATUS, } from '@manuscripts/track-changes-plugin';
|
|
28
28
|
import { Decoration } from 'prosemirror-view';
|
|
29
|
-
import { getActualAttrs } from '../../lib/track-changes-utils';
|
|
30
29
|
export const isBibliographyElement = (node) => node.type === node.type.schema.nodes.bibliography_element;
|
|
31
30
|
export const buildDecorations = (state, doc) => {
|
|
32
31
|
const decorations = [];
|
|
@@ -91,11 +90,9 @@ export const getEffectiveAttrs = (node, excludeDeletedNode) => {
|
|
|
91
90
|
nodeChange.status === CHANGE_STATUS.rejected;
|
|
92
91
|
return isRejected ? nodeChange === null || nodeChange === void 0 ? void 0 : nodeChange.oldAttrs : attrs;
|
|
93
92
|
};
|
|
94
|
-
export const buildCitations = (citations) => citations
|
|
95
|
-
|
|
96
|
-
.map((
|
|
97
|
-
citationID: attrs.id,
|
|
98
|
-
citationItems: attrs.rids.map((rid) => ({
|
|
93
|
+
export const buildCitations = (citations) => citations.map((citation) => ({
|
|
94
|
+
citationID: citation[0].attrs.id,
|
|
95
|
+
citationItems: citation[0].attrs.rids.map((rid) => ({
|
|
99
96
|
id: rid,
|
|
100
97
|
})),
|
|
101
98
|
properties: {
|
|
@@ -74,8 +74,6 @@ export const defaultEditorProps = {
|
|
|
74
74
|
style: '',
|
|
75
75
|
locale: '',
|
|
76
76
|
},
|
|
77
|
-
getCitationProvider: () => undefined,
|
|
78
|
-
retrySync: () => Promise.resolve(),
|
|
79
77
|
setComment: () => undefined,
|
|
80
78
|
setSelectedComment: () => undefined,
|
|
81
79
|
setEditorSelectedSuggestion: () => undefined,
|
|
@@ -13,16 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
import { nodeNames, schema } from '@manuscripts/transform';
|
|
16
|
+
import { schema } from '@manuscripts/transform';
|
|
26
17
|
import { findParentNodeOfTypeClosestToPos } from 'prosemirror-utils';
|
|
27
18
|
import { ContextMenu } from '../lib/context-menu';
|
|
28
19
|
const isNotNull = (a) => a !== null;
|
|
@@ -34,41 +25,7 @@ export const EditableBlock = (Base) => {
|
|
|
34
25
|
constructor() {
|
|
35
26
|
super(...arguments);
|
|
36
27
|
this.gutterButtons = () => [this.createAddButton(), this.createEditButton()].filter(isNotNull);
|
|
37
|
-
this.actionGutterButtons = () => [
|
|
38
|
-
this.createSyncWarningButton = () => {
|
|
39
|
-
var _a;
|
|
40
|
-
if (!((_a = this.props.getCapabilities()) === null || _a === void 0 ? void 0 : _a.editArticle)) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
const { retrySync } = this.props;
|
|
44
|
-
const warningButton = document.createElement('button');
|
|
45
|
-
warningButton.classList.add('action-button');
|
|
46
|
-
warningButton.classList.add('sync-warning-button');
|
|
47
|
-
warningButton.addEventListener('click', () => __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const errors = this.syncErrors.map((error) => error._id);
|
|
49
|
-
yield retrySync(errors);
|
|
50
|
-
}));
|
|
51
|
-
warningButton.addEventListener('mouseenter', () => {
|
|
52
|
-
const warning = document.createElement('div');
|
|
53
|
-
warning.className = 'sync-warning';
|
|
54
|
-
warning.appendChild((() => {
|
|
55
|
-
const node = document.createElement('p');
|
|
56
|
-
const humanReadableType = nodeNames.get(this.node.type) || 'element';
|
|
57
|
-
node.textContent = `This ${humanReadableType.toLowerCase()} failed to be saved.`;
|
|
58
|
-
return node;
|
|
59
|
-
})());
|
|
60
|
-
warning.appendChild((() => {
|
|
61
|
-
const node = document.createElement('p');
|
|
62
|
-
node.textContent = `Please click to retry, and contact support@manuscriptsapp.com if the failure continues.`;
|
|
63
|
-
return node;
|
|
64
|
-
})());
|
|
65
|
-
this.props.popper.show(warningButton, warning, 'left');
|
|
66
|
-
});
|
|
67
|
-
warningButton.addEventListener('mouseleave', () => {
|
|
68
|
-
this.props.popper.destroy();
|
|
69
|
-
});
|
|
70
|
-
return warningButton;
|
|
71
|
-
};
|
|
28
|
+
this.actionGutterButtons = () => [];
|
|
72
29
|
this.createAddButton = () => {
|
|
73
30
|
var _a;
|
|
74
31
|
const hasAccess = (_a = this.props.getCapabilities()) === null || _a === void 0 ? void 0 : _a.editArticle;
|
|
@@ -49,7 +49,6 @@ export interface EditorProps {
|
|
|
49
49
|
setComment: (comment?: CommentAnnotation) => void;
|
|
50
50
|
setSelectedComment: (id?: string) => void;
|
|
51
51
|
setEditorSelectedSuggestion: (id?: string) => void;
|
|
52
|
-
retrySync: (componentIDs: string[]) => Promise<void>;
|
|
53
52
|
collabProvider?: CollabProvider;
|
|
54
53
|
}
|
|
55
54
|
export type ExternalProps = Omit<EditorProps, 'popper'>;
|
|
@@ -25,7 +25,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
25
25
|
bibliography_element: import("../types").NodeViewCreator<{
|
|
26
26
|
gutterButtons: () => HTMLElement[];
|
|
27
27
|
actionGutterButtons: () => HTMLElement[];
|
|
28
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
29
28
|
createAddButton: () => HTMLElement | null;
|
|
30
29
|
createEditButton: () => HTMLElement | null;
|
|
31
30
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -61,7 +60,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
61
60
|
blockquote_element: import("../types").NodeViewCreator<{
|
|
62
61
|
gutterButtons: () => HTMLElement[];
|
|
63
62
|
actionGutterButtons: () => HTMLElement[];
|
|
64
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
65
63
|
createAddButton: () => HTMLElement | null;
|
|
66
64
|
createEditButton: () => HTMLElement | null;
|
|
67
65
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -97,7 +95,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
97
95
|
bullet_list: import("../types").NodeViewCreator<{
|
|
98
96
|
gutterButtons: () => HTMLElement[];
|
|
99
97
|
actionGutterButtons: () => HTMLElement[];
|
|
100
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
101
98
|
createAddButton: () => HTMLElement | null;
|
|
102
99
|
createEditButton: () => HTMLElement | null;
|
|
103
100
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -139,7 +136,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
139
136
|
equation_element: import("../types").NodeViewCreator<{
|
|
140
137
|
gutterButtons: () => HTMLElement[];
|
|
141
138
|
actionGutterButtons: () => HTMLElement[];
|
|
142
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
143
139
|
createAddButton: () => HTMLElement | null;
|
|
144
140
|
createEditButton: () => HTMLElement | null;
|
|
145
141
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -176,7 +172,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
176
172
|
figure_element: import("../types").NodeViewCreator<{
|
|
177
173
|
gutterButtons: () => HTMLElement[];
|
|
178
174
|
actionGutterButtons: () => HTMLElement[];
|
|
179
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
180
175
|
createAddButton: () => HTMLElement | null;
|
|
181
176
|
createEditButton: () => HTMLElement | null;
|
|
182
177
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -212,7 +207,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
212
207
|
footnote: import("../types").NodeViewCreator<{
|
|
213
208
|
gutterButtons: () => HTMLElement[];
|
|
214
209
|
actionGutterButtons: () => HTMLElement[];
|
|
215
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
216
210
|
createAddButton: () => HTMLElement | null;
|
|
217
211
|
createEditButton: () => HTMLElement | null;
|
|
218
212
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -255,7 +249,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
255
249
|
listing_element: import("../types").NodeViewCreator<{
|
|
256
250
|
gutterButtons: () => HTMLElement[];
|
|
257
251
|
actionGutterButtons: () => HTMLElement[];
|
|
258
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
259
252
|
createAddButton: () => HTMLElement | null;
|
|
260
253
|
createEditButton: () => HTMLElement | null;
|
|
261
254
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -291,7 +284,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
291
284
|
ordered_list: import("../types").NodeViewCreator<{
|
|
292
285
|
gutterButtons: () => HTMLElement[];
|
|
293
286
|
actionGutterButtons: () => HTMLElement[];
|
|
294
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
295
287
|
createAddButton: () => HTMLElement | null;
|
|
296
288
|
createEditButton: () => HTMLElement | null;
|
|
297
289
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -327,7 +319,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
327
319
|
paragraph: import("../types").NodeViewCreator<{
|
|
328
320
|
gutterButtons: () => HTMLElement[];
|
|
329
321
|
actionGutterButtons: () => HTMLElement[];
|
|
330
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
331
322
|
createAddButton: () => HTMLElement | null;
|
|
332
323
|
createEditButton: () => HTMLElement | null;
|
|
333
324
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -364,7 +355,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
364
355
|
placeholder_element: import("../types").NodeViewCreator<{
|
|
365
356
|
gutterButtons: () => HTMLElement[];
|
|
366
357
|
actionGutterButtons: () => HTMLElement[];
|
|
367
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
368
358
|
createAddButton: () => HTMLElement | null;
|
|
369
359
|
createEditButton: () => HTMLElement | null;
|
|
370
360
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -400,7 +390,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
400
390
|
pullquote_element: import("../types").NodeViewCreator<{
|
|
401
391
|
gutterButtons: () => HTMLElement[];
|
|
402
392
|
actionGutterButtons: () => HTMLElement[];
|
|
403
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
404
393
|
createAddButton: () => HTMLElement | null;
|
|
405
394
|
createEditButton: () => HTMLElement | null;
|
|
406
395
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -436,7 +425,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
436
425
|
section_title: import("../types").NodeViewCreator<{
|
|
437
426
|
gutterButtons: () => HTMLElement[];
|
|
438
427
|
actionGutterButtons: () => HTMLElement[];
|
|
439
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
440
428
|
createAddButton: () => HTMLElement | null;
|
|
441
429
|
createEditButton: () => HTMLElement | null;
|
|
442
430
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -473,7 +461,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
473
461
|
table_element: import("../types").NodeViewCreator<{
|
|
474
462
|
gutterButtons: () => HTMLElement[];
|
|
475
463
|
actionGutterButtons: () => HTMLElement[];
|
|
476
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
477
464
|
createAddButton: () => HTMLElement | null;
|
|
478
465
|
createEditButton: () => HTMLElement | null;
|
|
479
466
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -510,7 +497,6 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
|
|
|
510
497
|
toc_element: import("../types").NodeViewCreator<{
|
|
511
498
|
gutterButtons: () => HTMLElement[];
|
|
512
499
|
actionGutterButtons: () => HTMLElement[];
|
|
513
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
514
500
|
createAddButton: () => HTMLElement | null;
|
|
515
501
|
createEditButton: () => HTMLElement | null;
|
|
516
502
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { BibliographyElementBlockView } from './bibliography_element';
|
|
|
17
17
|
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { BlockquoteElementView } from './blockquote_element';
|
|
|
17
17
|
declare const _default: (props: import("./base_node_view").BaseNodeProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { BulletListView } from './bullet_list';
|
|
|
17
17
|
declare const _default: (props: import("./base_node_view").BaseNodeProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -23,7 +23,6 @@ import BlockView from './block_view';
|
|
|
23
23
|
type Constructor<T> = new (...args: any[]) => T;
|
|
24
24
|
export interface EditableBlockProps extends BaseNodeProps {
|
|
25
25
|
getCapabilities: () => Capabilities;
|
|
26
|
-
retrySync: (componentIDs: string[]) => Promise<void>;
|
|
27
26
|
setComment: (comment: CommentAnnotation) => void;
|
|
28
27
|
dispatch?: Dispatch;
|
|
29
28
|
theme: DefaultTheme;
|
|
@@ -32,7 +31,6 @@ export declare const EditableBlock: <T extends Constructor<BlockView<EditableBlo
|
|
|
32
31
|
new (...args: any[]): {
|
|
33
32
|
gutterButtons: () => HTMLElement[];
|
|
34
33
|
actionGutterButtons: () => HTMLElement[];
|
|
35
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
36
34
|
createAddButton: () => HTMLElement | null;
|
|
37
35
|
createEditButton: () => HTMLElement | null;
|
|
38
36
|
createMenu: () => ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { EquationElementView } from './equation_element';
|
|
|
17
17
|
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { FigureElementView } from './figure_element';
|
|
|
17
17
|
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { FootnoteView } from './footnote';
|
|
|
17
17
|
declare const _default: (props: import("./base_node_view").BaseNodeProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { FootnotesElementView } from './footnotes_element';
|
|
|
17
17
|
declare const _default: (props: import("./base_node_view").BaseNodeProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { ListingElementView } from './listing_element';
|
|
|
17
17
|
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { OrderedListView } from './ordered_list';
|
|
|
17
17
|
declare const _default: (props: import("./base_node_view").BaseNodeProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { ParagraphView } from './paragraph';
|
|
|
17
17
|
declare const _default: (props: import("./base_node_view").BaseNodeProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { PlaceholderElementView } from './placeholder_element';
|
|
|
17
17
|
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { PullquoteElementView } from './pullquote_element';
|
|
|
17
17
|
declare const _default: (props: import("./base_node_view").BaseNodeProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { SectionTitleView } from './section_title';
|
|
|
17
17
|
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { TableElementView } from './table_element';
|
|
|
17
17
|
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
|
@@ -17,7 +17,6 @@ import { TOCElementView } from './toc_element';
|
|
|
17
17
|
declare const _default: (props: import("./editable_block").EditableBlockProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
|
-
createSyncWarningButton: () => HTMLElement | null;
|
|
21
20
|
createAddButton: () => HTMLElement | null;
|
|
22
21
|
createEditButton: () => HTMLElement | null;
|
|
23
22
|
createMenu: () => import("../lib/context-menu").ContextMenu;
|
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.9.12
|
|
4
|
+
"version": "1.9.12",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|