@manuscripts/body-editor 1.10.7 → 1.10.8-LEAN-3589.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
CHANGED
|
@@ -559,8 +559,11 @@ const ignoreMetaNodeBackspaceCommand = (state) => {
|
|
|
559
559
|
return false;
|
|
560
560
|
}
|
|
561
561
|
return (selection.node.type === transform_1.schema.nodes.keyword_group ||
|
|
562
|
+
selection.node.type === transform_1.schema.nodes.keyword ||
|
|
562
563
|
selection.node.type === transform_1.schema.nodes.affiliations ||
|
|
563
|
-
selection.node.type === transform_1.schema.nodes.
|
|
564
|
+
selection.node.type === transform_1.schema.nodes.affiliation ||
|
|
565
|
+
selection.node.type === transform_1.schema.nodes.contributors ||
|
|
566
|
+
selection.node.type === transform_1.schema.nodes.contributor);
|
|
564
567
|
};
|
|
565
568
|
exports.ignoreMetaNodeBackspaceCommand = ignoreMetaNodeBackspaceCommand;
|
|
566
569
|
const findCutAfter = ($pos) => {
|
|
@@ -79,8 +79,12 @@ const orderTableFootnotes = (tr, footnotesElementWithPos, position) => {
|
|
|
79
79
|
})
|
|
80
80
|
.map(({ node }) => node);
|
|
81
81
|
const { node: footnotesElement, pos } = footnotesElementWithPos;
|
|
82
|
-
const footnoteElementPos = position + pos;
|
|
83
|
-
|
|
82
|
+
const footnoteElementPos = position + pos + 1;
|
|
83
|
+
const oldDataTracked = footnotesElement.attrs.dataTracked;
|
|
84
|
+
(0, track_changes_plugin_1.skipTracking)(tr.replaceWith(tr.mapping.map(footnoteElementPos), tr.mapping.map(footnoteElementPos + footnotesElement.nodeSize), prosemirror_model_1.Fragment.fromArray(orderedFootnotes)));
|
|
85
|
+
if (oldDataTracked) {
|
|
86
|
+
tr.setNodeMarkup(footnoteElementPos, transform_1.schema.nodes.footnotes_element, Object.assign(Object.assign({}, footnotesElement.attrs), { dataTracked: oldDataTracked }));
|
|
87
|
+
}
|
|
84
88
|
};
|
|
85
89
|
exports.orderTableFootnotes = orderTableFootnotes;
|
|
86
90
|
const updateTableInlineFootnoteLabels = (tr, table) => {
|
package/dist/es/commands.js
CHANGED
|
@@ -530,8 +530,11 @@ export const ignoreMetaNodeBackspaceCommand = (state) => {
|
|
|
530
530
|
return false;
|
|
531
531
|
}
|
|
532
532
|
return (selection.node.type === schema.nodes.keyword_group ||
|
|
533
|
+
selection.node.type === schema.nodes.keyword ||
|
|
533
534
|
selection.node.type === schema.nodes.affiliations ||
|
|
534
|
-
selection.node.type === schema.nodes.
|
|
535
|
+
selection.node.type === schema.nodes.affiliation ||
|
|
536
|
+
selection.node.type === schema.nodes.contributors ||
|
|
537
|
+
selection.node.type === schema.nodes.contributor);
|
|
535
538
|
};
|
|
536
539
|
const findCutAfter = ($pos) => {
|
|
537
540
|
if (!$pos.parent.type.spec.isolating) {
|
|
@@ -73,8 +73,12 @@ export const orderTableFootnotes = (tr, footnotesElementWithPos, position) => {
|
|
|
73
73
|
})
|
|
74
74
|
.map(({ node }) => node);
|
|
75
75
|
const { node: footnotesElement, pos } = footnotesElementWithPos;
|
|
76
|
-
const footnoteElementPos = position + pos;
|
|
77
|
-
|
|
76
|
+
const footnoteElementPos = position + pos + 1;
|
|
77
|
+
const oldDataTracked = footnotesElement.attrs.dataTracked;
|
|
78
|
+
skipTracking(tr.replaceWith(tr.mapping.map(footnoteElementPos), tr.mapping.map(footnoteElementPos + footnotesElement.nodeSize), Fragment.fromArray(orderedFootnotes)));
|
|
79
|
+
if (oldDataTracked) {
|
|
80
|
+
tr.setNodeMarkup(footnoteElementPos, schema.nodes.footnotes_element, Object.assign(Object.assign({}, footnotesElement.attrs), { dataTracked: oldDataTracked }));
|
|
81
|
+
}
|
|
78
82
|
};
|
|
79
83
|
export const updateTableInlineFootnoteLabels = (tr, table) => {
|
|
80
84
|
const labels = buildTableFootnoteLabels(table.node);
|
|
@@ -20,7 +20,7 @@ import { ContentNodeWithPos, NodeWithPos } from 'prosemirror-utils';
|
|
|
20
20
|
export declare const findTableInlineFootnoteIds: ($pos: ResolvedPos) => Set<string>;
|
|
21
21
|
export declare const getNewFootnotePos: (footnotesElement: NodeWithPos, footnoteIndex: number) => number;
|
|
22
22
|
export declare const buildTableFootnoteLabels: (node: ManuscriptNode) => Map<string, string | undefined>;
|
|
23
|
-
export declare const orderTableFootnotes: (tr: Transaction, footnotesElementWithPos: NodeWithPos, position: number) =>
|
|
23
|
+
export declare const orderTableFootnotes: (tr: Transaction, footnotesElementWithPos: NodeWithPos, position: number) => void;
|
|
24
24
|
export declare const updateTableInlineFootnoteLabels: (tr: Transaction, table: ContentNodeWithPos) => Transaction;
|
|
25
25
|
interface InlineFootnote {
|
|
26
26
|
node: InlineFootnoteNode;
|
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.10.
|
|
4
|
+
"version": "1.10.8-LEAN-3589.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|