@manuscripts/body-editor 3.9.7 → 3.9.8
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 +3 -0
- package/dist/cjs/menus.js +2 -2
- package/dist/cjs/versions.js +1 -1
- package/dist/es/commands.js +3 -0
- package/dist/es/menus.js +2 -2
- package/dist/es/versions.js +1 -1
- package/dist/types/commands.d.ts +1 -1
- package/dist/types/versions.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/commands.js
CHANGED
|
@@ -703,6 +703,9 @@ const findSelectedList = (selection) => (selection instanceof prosemirror_state_
|
|
|
703
703
|
}) ||
|
|
704
704
|
(0, prosemirror_utils_1.findParentNodeOfType)([transform_1.schema.nodes.list])(selection);
|
|
705
705
|
const insertGraphicalAbstract = (category) => (state, dispatch, view) => {
|
|
706
|
+
if (!category) {
|
|
707
|
+
return false;
|
|
708
|
+
}
|
|
706
709
|
const abstracts = (0, doc_1.findAbstractsNode)(state.doc);
|
|
707
710
|
const sections = (0, prosemirror_utils_1.findChildrenByType)(abstracts.node, transform_1.schema.nodes.graphical_abstract_section);
|
|
708
711
|
if (sections.some((s) => s.node.attrs.category === category.id)) {
|
package/dist/cjs/menus.js
CHANGED
|
@@ -533,8 +533,8 @@ const getEditorMenus = (editor) => {
|
|
|
533
533
|
{
|
|
534
534
|
id: 'insert-graphical-abstract',
|
|
535
535
|
label: 'Graphical Abstract',
|
|
536
|
-
isEnabled: isCommandValid((0, commands_1.
|
|
537
|
-
run: doCommand((0, commands_1.
|
|
536
|
+
isEnabled: isCommandValid((0, commands_1.insertGraphicalAbstract)(graphicalAbstractSection)),
|
|
537
|
+
run: doCommand((0, commands_1.insertGraphicalAbstract)(graphicalAbstractSection)),
|
|
538
538
|
isHidden: !graphicalAbstractSection ||
|
|
539
539
|
!(0, template_1.templateAllows)(state, transform_1.schema.nodes.graphical_abstract_section),
|
|
540
540
|
},
|
package/dist/cjs/versions.js
CHANGED
package/dist/es/commands.js
CHANGED
|
@@ -669,6 +669,9 @@ const findSelectedList = (selection) => (selection instanceof NodeSelection &&
|
|
|
669
669
|
}) ||
|
|
670
670
|
findParentNodeOfType([schema.nodes.list])(selection);
|
|
671
671
|
export const insertGraphicalAbstract = (category) => (state, dispatch, view) => {
|
|
672
|
+
if (!category) {
|
|
673
|
+
return false;
|
|
674
|
+
}
|
|
672
675
|
const abstracts = findAbstractsNode(state.doc);
|
|
673
676
|
const sections = findChildrenByType(abstracts.node, schema.nodes.graphical_abstract_section);
|
|
674
677
|
if (sections.some((s) => s.node.attrs.category === category.id)) {
|
package/dist/es/menus.js
CHANGED
|
@@ -530,8 +530,8 @@ export const getEditorMenus = (editor) => {
|
|
|
530
530
|
{
|
|
531
531
|
id: 'insert-graphical-abstract',
|
|
532
532
|
label: 'Graphical Abstract',
|
|
533
|
-
isEnabled: isCommandValid(
|
|
534
|
-
run: doCommand(
|
|
533
|
+
isEnabled: isCommandValid(insertGraphicalAbstract(graphicalAbstractSection)),
|
|
534
|
+
run: doCommand(insertGraphicalAbstract(graphicalAbstractSection)),
|
|
535
535
|
isHidden: !graphicalAbstractSection ||
|
|
536
536
|
!templateAllows(state, schema.nodes.graphical_abstract_section),
|
|
537
537
|
},
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.9.
|
|
1
|
+
export const VERSION = '3.9.8';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
package/dist/types/commands.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare const insertBoxElement: (state: ManuscriptEditorState, dispatch?:
|
|
|
53
53
|
export declare const insertSection: (subsection?: boolean) => (state: ManuscriptEditorState, dispatch?: Dispatch, view?: EditorView) => boolean;
|
|
54
54
|
export declare const insertAbstractSection: (category?: SectionCategory) => (state: ManuscriptEditorState, dispatch?: Dispatch, view?: EditorView) => boolean;
|
|
55
55
|
export declare const insertBackmatterSection: (category: SectionCategory) => (state: ManuscriptEditorState, dispatch?: Dispatch, view?: EditorView) => boolean;
|
|
56
|
-
export declare const insertGraphicalAbstract: (category
|
|
56
|
+
export declare const insertGraphicalAbstract: (category?: SectionCategory) => (state: ManuscriptEditorState, dispatch?: Dispatch, view?: EditorView) => boolean;
|
|
57
57
|
export declare const insertContributors: (state: ManuscriptEditorState, dispatch?: Dispatch, view?: EditorView) => boolean;
|
|
58
58
|
export declare const insertAffiliation: (state: ManuscriptEditorState, dispatch?: Dispatch, view?: EditorView) => boolean;
|
|
59
59
|
export declare const insertAward: (state: ManuscriptEditorState, dispatch?: Dispatch, view?: EditorView) => boolean;
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.9.
|
|
1
|
+
export declare const VERSION = "3.9.8";
|
|
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": "3.9.
|
|
4
|
+
"version": "3.9.8",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|