@manuscripts/body-editor 2.0.36-LEAN-3840.0 → 2.0.36
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/versions.js +1 -1
- package/dist/cjs/views/footnote.js +0 -1
- package/dist/cjs/views/inline_footnote.js +5 -11
- package/dist/es/versions.js +1 -1
- package/dist/es/views/footnote.js +0 -1
- package/dist/es/views/inline_footnote.js +6 -12
- package/dist/types/versions.d.ts +1 -1
- package/package.json +4 -4
package/dist/cjs/versions.js
CHANGED
|
@@ -35,7 +35,6 @@ const setTCClasses = (node, dom) => {
|
|
|
35
35
|
const lastChange = dataTracked[dataTracked.length - 1];
|
|
36
36
|
const changeClasses = (0, track_changes_utils_1.getChangeClasses)([lastChange]);
|
|
37
37
|
dom.classList.add(...changeClasses);
|
|
38
|
-
dom.setAttribute('id', node.attrs.id);
|
|
39
38
|
}
|
|
40
39
|
};
|
|
41
40
|
exports.setTCClasses = setTCClasses;
|
|
@@ -87,15 +87,9 @@ class InlineFootnoteView extends base_node_view_1.BaseNodeView {
|
|
|
87
87
|
const fnState = footnotes_1.footnotesKey.getState(this.view.state);
|
|
88
88
|
if (fnState) {
|
|
89
89
|
this.activateModal({
|
|
90
|
-
notes: Array.from(fnState.unusedFootnotes.values()).
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
acc.push({
|
|
94
|
-
node,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return acc;
|
|
98
|
-
}, []),
|
|
90
|
+
notes: Array.from(fnState.unusedFootnotes.values()).map((n) => ({
|
|
91
|
+
node: n[0],
|
|
92
|
+
})),
|
|
99
93
|
onCancel: () => {
|
|
100
94
|
const { tr } = this.view.state;
|
|
101
95
|
if (!this.node.attrs.rids.length) {
|
|
@@ -120,12 +114,12 @@ class InlineFootnoteView extends base_node_view_1.BaseNodeView {
|
|
|
120
114
|
return false;
|
|
121
115
|
};
|
|
122
116
|
this.updateContents = () => {
|
|
123
|
-
const attrs =
|
|
117
|
+
const attrs = this.node.attrs;
|
|
124
118
|
this.dom.setAttribute('rids', attrs.rids.join(','));
|
|
125
119
|
this.dom.setAttribute('contents', attrs.contents);
|
|
126
120
|
this.dom.className = [
|
|
127
121
|
'footnote',
|
|
128
|
-
...(0, track_changes_utils_1.getChangeClasses)(
|
|
122
|
+
...(0, track_changes_utils_1.getChangeClasses)(attrs.dataTracked),
|
|
129
123
|
].join(' ');
|
|
130
124
|
if (this.isSelected() &&
|
|
131
125
|
(!attrs.rids || !attrs.rids.length) &&
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.0.36
|
|
1
|
+
export const VERSION = '2.0.36';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
|
@@ -28,7 +28,6 @@ export const setTCClasses = (node, dom) => {
|
|
|
28
28
|
const lastChange = dataTracked[dataTracked.length - 1];
|
|
29
29
|
const changeClasses = getChangeClasses([lastChange]);
|
|
30
30
|
dom.classList.add(...changeClasses);
|
|
31
|
-
dom.setAttribute('id', node.attrs.id);
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
export default createNodeOrElementView(FootnoteView, 'div', setTCClasses);
|
|
@@ -18,7 +18,7 @@ import { schema, } from '@manuscripts/transform';
|
|
|
18
18
|
import { NodeSelection, TextSelection } from 'prosemirror-state';
|
|
19
19
|
import { findChildrenByType, findParentNodeClosestToPos, } from 'prosemirror-utils';
|
|
20
20
|
import { createFootnote, insertFootnote, insertTableFootnote, } from '../commands';
|
|
21
|
-
import {
|
|
21
|
+
import { getChangeClasses, isDeleted, isPendingInsert, isRejectedInsert, } from '../lib/track-changes-utils';
|
|
22
22
|
import { footnotesKey } from '../plugins/footnotes';
|
|
23
23
|
import { buildTableFootnoteLabels } from '../plugins/footnotes/footnotes-utils';
|
|
24
24
|
import { BaseNodeView } from './base_node_view';
|
|
@@ -81,15 +81,9 @@ export class InlineFootnoteView extends BaseNodeView {
|
|
|
81
81
|
const fnState = footnotesKey.getState(this.view.state);
|
|
82
82
|
if (fnState) {
|
|
83
83
|
this.activateModal({
|
|
84
|
-
notes: Array.from(fnState.unusedFootnotes.values()).
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
acc.push({
|
|
88
|
-
node,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
return acc;
|
|
92
|
-
}, []),
|
|
84
|
+
notes: Array.from(fnState.unusedFootnotes.values()).map((n) => ({
|
|
85
|
+
node: n[0],
|
|
86
|
+
})),
|
|
93
87
|
onCancel: () => {
|
|
94
88
|
const { tr } = this.view.state;
|
|
95
89
|
if (!this.node.attrs.rids.length) {
|
|
@@ -114,12 +108,12 @@ export class InlineFootnoteView extends BaseNodeView {
|
|
|
114
108
|
return false;
|
|
115
109
|
};
|
|
116
110
|
this.updateContents = () => {
|
|
117
|
-
const attrs =
|
|
111
|
+
const attrs = this.node.attrs;
|
|
118
112
|
this.dom.setAttribute('rids', attrs.rids.join(','));
|
|
119
113
|
this.dom.setAttribute('contents', attrs.contents);
|
|
120
114
|
this.dom.className = [
|
|
121
115
|
'footnote',
|
|
122
|
-
...getChangeClasses(
|
|
116
|
+
...getChangeClasses(attrs.dataTracked),
|
|
123
117
|
].join(' ');
|
|
124
118
|
if (this.isSelected() &&
|
|
125
119
|
(!attrs.rids || !attrs.rids.length) &&
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.36
|
|
1
|
+
export declare const VERSION = "2.0.36";
|
|
2
2
|
export declare const MATHJAX_VERSION = "3.2.2";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/body-editor",
|
|
3
3
|
"description": "Prosemirror components for editing and viewing manuscripts",
|
|
4
|
-
"version": "2.0.36
|
|
4
|
+
"version": "2.0.36",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"@iarna/word-count": "^1.1.2",
|
|
33
33
|
"@manuscripts/json-schema": "2.2.11",
|
|
34
34
|
"@manuscripts/library": "1.3.11",
|
|
35
|
-
"@manuscripts/style-guide": "2.0.12
|
|
36
|
-
"@manuscripts/track-changes-plugin": "1.7.
|
|
37
|
-
"@manuscripts/transform": "2.3.
|
|
35
|
+
"@manuscripts/style-guide": "2.0.12",
|
|
36
|
+
"@manuscripts/track-changes-plugin": "1.7.17",
|
|
37
|
+
"@manuscripts/transform": "2.3.30",
|
|
38
38
|
"@popperjs/core": "^2.11.8",
|
|
39
39
|
"astrocite-eutils": "^0.16.4",
|
|
40
40
|
"codemirror": "^5.58.1",
|