@manuscripts/body-editor 1.7.19 → 1.7.20
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/components/authors/AffiliationButton.js +105 -0
- package/dist/cjs/components/authors/AffiliationForm.js +50 -0
- package/dist/cjs/components/authors/AuthorActions.js +61 -0
- package/dist/cjs/components/authors/AuthorAffiliations.js +116 -0
- package/dist/cjs/components/authors/AuthorDetailsForm.js +97 -0
- package/dist/cjs/components/authors/AuthorFormPlaceholder.js +57 -0
- package/dist/cjs/components/authors/AuthorList.js +40 -0
- package/dist/cjs/components/authors/AuthorsModal.js +226 -0
- package/dist/cjs/components/authors/ChangeHandlingForm.js +37 -0
- package/dist/cjs/components/authors/DeleteAuthorConfirmationDialog.js +23 -0
- package/dist/cjs/components/authors/DraggableAuthor.js +170 -0
- package/dist/cjs/components/authors/SaveAuthorConfirmationDialog.js +21 -0
- package/dist/cjs/lib/array-reducer.js +2 -0
- package/dist/cjs/lib/authors.js +43 -0
- package/dist/cjs/lib/track-changes-utils.js +5 -1
- package/dist/cjs/lib/utils.js +1 -5
- package/dist/cjs/lib/view.js +97 -0
- package/dist/cjs/views/base_node_view.js +0 -19
- package/dist/cjs/views/bibliography_element.js +3 -2
- package/dist/cjs/views/citation_editable.js +3 -2
- package/dist/cjs/views/contributors.js +78 -25
- package/dist/es/components/authors/AffiliationButton.js +75 -0
- package/dist/es/components/authors/AffiliationForm.js +43 -0
- package/dist/es/components/authors/AuthorActions.js +31 -0
- package/dist/es/components/authors/AuthorAffiliations.js +85 -0
- package/dist/es/components/authors/AuthorDetailsForm.js +67 -0
- package/dist/es/components/authors/AuthorFormPlaceholder.js +50 -0
- package/dist/es/components/authors/AuthorList.js +33 -0
- package/dist/es/components/authors/AuthorsModal.js +196 -0
- package/dist/es/components/authors/ChangeHandlingForm.js +10 -0
- package/dist/es/components/authors/DeleteAuthorConfirmationDialog.js +16 -0
- package/dist/es/components/authors/DraggableAuthor.js +140 -0
- package/dist/es/components/authors/SaveAuthorConfirmationDialog.js +14 -0
- package/dist/es/configs/editor-views.js +2 -2
- package/dist/es/lib/array-reducer.js +2 -0
- package/dist/es/lib/authors.js +36 -0
- package/dist/es/lib/track-changes-utils.js +3 -0
- package/dist/es/lib/utils.js +1 -4
- package/dist/es/lib/view.js +64 -0
- package/dist/es/views/base_node_view.js +0 -19
- package/dist/es/views/bibliography_element.js +3 -2
- package/dist/es/views/citation_editable.js +3 -2
- package/dist/es/views/contributors.js +79 -26
- package/dist/types/components/authors/AffiliationButton.d.ts +8 -0
- package/dist/types/components/authors/AffiliationForm.d.ts +7 -0
- package/dist/types/components/authors/AuthorActions.d.ts +9 -0
- package/dist/types/components/authors/AuthorAffiliations.d.ts +11 -0
- package/dist/types/components/authors/AuthorDetailsForm.d.ts +30 -0
- package/dist/types/components/authors/AuthorFormPlaceholder.d.ts +2 -0
- package/dist/types/components/authors/AuthorList.d.ts +25 -0
- package/dist/types/components/authors/AuthorsModal.d.ts +26 -0
- package/dist/types/components/authors/ChangeHandlingForm.d.ts +5 -0
- package/dist/types/components/authors/DeleteAuthorConfirmationDialog.d.ts +9 -0
- package/dist/types/components/authors/DraggableAuthor.d.ts +25 -0
- package/dist/types/components/authors/SaveAuthorConfirmationDialog.d.ts +7 -0
- package/dist/types/components/outline/DraggableTree.d.ts +1 -1
- package/dist/types/configs/ManuscriptsEditor.d.ts +0 -2
- package/dist/types/configs/editor-views.d.ts +0 -28
- package/dist/types/lib/array-reducer.d.ts +5 -1
- package/dist/types/lib/authors.d.ts +23 -0
- package/dist/types/lib/track-changes-utils.d.ts +1 -0
- package/dist/types/lib/utils.d.ts +0 -1
- package/dist/types/lib/view.d.ts +25 -0
- package/dist/types/views/base_node_view.d.ts +1 -4
- package/dist/types/views/bibliography_element_editable.d.ts +0 -2
- package/dist/types/views/blockquote_element_editable.d.ts +0 -2
- package/dist/types/views/bullet_list_editable.d.ts +0 -2
- package/dist/types/views/contributors.d.ts +25 -8
- package/dist/types/views/editable_block.d.ts +0 -2
- package/dist/types/views/equation_element_editable.d.ts +0 -2
- package/dist/types/views/figure_element_editable.d.ts +0 -2
- package/dist/types/views/footnote_editable.d.ts +0 -2
- package/dist/types/views/footnotes_element_editable.d.ts +0 -2
- package/dist/types/views/listing_element_editable.d.ts +0 -2
- package/dist/types/views/ordered_list_editable.d.ts +0 -2
- package/dist/types/views/paragraph_editable.d.ts +0 -2
- package/dist/types/views/placeholder_element_editable.d.ts +0 -2
- package/dist/types/views/pullquote_element_editable.d.ts +0 -2
- package/dist/types/views/section_title_editable.d.ts +0 -2
- package/dist/types/views/table_element_editable.d.ts +0 -2
- package/dist/types/views/toc_element_editable.d.ts +0 -2
- package/package.json +4 -3
- package/styles/AdvancedEditor.css +3 -3
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 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
|
+
*/
|
|
1
16
|
import { Capabilities } from '@manuscripts/style-guide';
|
|
2
17
|
import { ContributorNode } from '@manuscripts/transform';
|
|
18
|
+
import { AffiliationAttrs, ContributorAttrs } from '../lib/authors';
|
|
3
19
|
import BlockView from './block_view';
|
|
4
20
|
import { EditableBlockProps } from './editable_block';
|
|
5
21
|
export interface ContributorsProps extends EditableBlockProps {
|
|
@@ -8,24 +24,25 @@ export interface ContributorsProps extends EditableBlockProps {
|
|
|
8
24
|
selectAuthorForEditing: (authorId: string) => void;
|
|
9
25
|
}
|
|
10
26
|
export declare class ContributorsView<PropsType extends ContributorsProps> extends BlockView<PropsType> {
|
|
27
|
+
container: HTMLElement;
|
|
28
|
+
inner: HTMLElement;
|
|
29
|
+
popper?: HTMLElement;
|
|
11
30
|
initialise: () => void;
|
|
12
31
|
updateContents: () => void;
|
|
13
32
|
buildAuthors: () => void;
|
|
14
|
-
container: HTMLElement;
|
|
15
|
-
inner: HTMLElement;
|
|
16
33
|
buildAuthor: (node: ContributorNode, isJointFirstAuthor: boolean, selectedAuthor?: string) => HTMLButtonElement;
|
|
17
34
|
createNote(text?: string, title?: string): HTMLSpanElement;
|
|
18
|
-
initials: (given: string) => string;
|
|
19
|
-
buildNameLiteral: ({ given, family, suffix }: {
|
|
20
|
-
given?: string | undefined;
|
|
21
|
-
family?: string | undefined;
|
|
22
|
-
suffix?: string | undefined;
|
|
23
|
-
}) => string;
|
|
24
35
|
isJointFirstAuthor: (authors: ContributorNode[], index: number) => boolean;
|
|
25
36
|
createElement: () => void;
|
|
26
37
|
createDOM: () => void;
|
|
27
38
|
createEditButton: () => void;
|
|
28
39
|
createLegend: () => void;
|
|
40
|
+
handleClick: (e: Event) => void;
|
|
41
|
+
handleSaveAuthor: (author: ContributorAttrs) => void;
|
|
42
|
+
handleDeleteAuthor: (author: ContributorAttrs) => void;
|
|
43
|
+
handleSaveAffiliation: (affiliation: AffiliationAttrs) => void;
|
|
44
|
+
insertAuthorNode: (attrs: ContributorAttrs) => void;
|
|
45
|
+
insertAffiliationNode: (attrs: AffiliationAttrs) => void;
|
|
29
46
|
ignoreMutation: () => boolean;
|
|
30
47
|
stopEvent: () => boolean;
|
|
31
48
|
}
|
|
@@ -64,8 +64,6 @@ export declare const EditableBlock: <T extends Constructor<BlockView<EditableBlo
|
|
|
64
64
|
deselectNode: () => void;
|
|
65
65
|
destroy: () => void;
|
|
66
66
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
67
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
68
|
-
deleteNode: (id: string) => void;
|
|
69
67
|
};
|
|
70
68
|
} & T;
|
|
71
69
|
export {};
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & EquationElementView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & FigureElementView>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & FootnoteView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & FootnotesElementView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & ListingElementView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & OrderedListView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & ParagraphView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & PlaceholderElementView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & PullquoteElementView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & SectionTitleView<any>>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & TableElementView>;
|
|
55
53
|
export default _default;
|
|
@@ -49,7 +49,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
49
49
|
deselectNode: () => void;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
52
|
-
updateNodeAttrs: (attrs: import("prosemirror-model").Attrs) => void;
|
|
53
|
-
deleteNode: (id: string) => void;
|
|
54
52
|
} & TOCElementView<any>>;
|
|
55
53
|
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": "1.7.
|
|
4
|
+
"version": "1.7.20",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@manuscripts/assets": "^0.6.4",
|
|
32
32
|
"@manuscripts/json-schema": "^2.2.6",
|
|
33
33
|
"@manuscripts/library": "^1.3.5",
|
|
34
|
-
"@manuscripts/style-guide": "^1.
|
|
34
|
+
"@manuscripts/style-guide": "^1.8.0",
|
|
35
35
|
"@manuscripts/track-changes-plugin": "^1.7.7",
|
|
36
36
|
"@manuscripts/transform": "^2.1.6",
|
|
37
37
|
"astrocite-eutils": "^0.16.4",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"mathjax-full": "^3.2.2",
|
|
40
40
|
"codemirror": "^5.58.1",
|
|
41
41
|
"dompurify": "^2.4.1",
|
|
42
|
+
"formik": "^2.2.9",
|
|
42
43
|
"grapheme-splitter": "^1.0.4",
|
|
43
44
|
"history": "^4.10.1",
|
|
44
45
|
"popper.js": "^1.16.1",
|
|
@@ -110,4 +111,4 @@
|
|
|
110
111
|
"resolutions": {
|
|
111
112
|
"@types/react": "^17.0.2"
|
|
112
113
|
}
|
|
113
|
-
}
|
|
114
|
+
}
|
|
@@ -819,12 +819,12 @@ Next levels are shifted 'up' by 1
|
|
|
819
819
|
display: inline-flex;
|
|
820
820
|
background: transparent;
|
|
821
821
|
border: 0;
|
|
822
|
+
font-family: 'PT Sans', sans-serif;
|
|
822
823
|
font-size: 1rem;
|
|
823
824
|
text-decoration: none;
|
|
824
825
|
color: inherit;
|
|
825
826
|
outline: none;
|
|
826
|
-
padding:
|
|
827
|
-
margin: 0 6px;
|
|
827
|
+
padding: 0;
|
|
828
828
|
}
|
|
829
829
|
|
|
830
830
|
.contributor:not(:disabled):hover {
|
|
@@ -843,7 +843,7 @@ Next levels are shifted 'up' by 1
|
|
|
843
843
|
.contributor:after {
|
|
844
844
|
content: ', ';
|
|
845
845
|
color: #353535;
|
|
846
|
-
margin-right:
|
|
846
|
+
margin-right: 5px;
|
|
847
847
|
}
|
|
848
848
|
.contributor:last-child::after {
|
|
849
849
|
content: '';
|