@manuscripts/style-guide 0.32.31 → 1.0.0-LEAN-2108
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/AffiliationsEditor/AffiliationsEditor.js +5 -1
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorItem.js +5 -1
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorProfile.js +7 -3
- package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorView.js +5 -1
- package/dist/cjs/components/AlertMessage.js +5 -1
- package/dist/cjs/components/AuthorForm/ContributorRolesSelect.js +5 -1
- package/dist/cjs/components/AuthorForm/index.js +5 -1
- package/dist/cjs/components/AuthorName.js +5 -1
- package/dist/cjs/components/AuthorsContainer.js +5 -1
- package/dist/cjs/components/AuthorsDND/AuthorsDND.js +5 -1
- package/dist/cjs/components/AuthorsList/Author.js +5 -1
- package/dist/cjs/components/AuthorsList/index.js +5 -1
- package/dist/cjs/components/Avatar.js +5 -1
- package/dist/cjs/components/Button.js +5 -1
- package/dist/cjs/components/ColorField/ColorSelector.js +5 -1
- package/dist/cjs/components/ColorField/index.js +5 -1
- package/dist/cjs/components/Comments/CommentActions.js +5 -1
- package/dist/cjs/components/Comments/CommentBody.js +5 -1
- package/dist/cjs/components/Comments/CommentTarget.js +5 -1
- package/dist/cjs/components/Comments/CommentWrapper.js +5 -1
- package/dist/cjs/components/EditorHeader/EditorHeader.js +5 -1
- package/dist/cjs/components/EditorHeader/ProceedView.js +5 -1
- package/dist/cjs/components/FileManager/FileManager.js +12 -20
- package/dist/cjs/components/FileManager/FileSectionItem/DesignationActions.js +5 -1
- package/dist/cjs/components/FileManager/FileSectionItem/DragLayer.js +5 -1
- package/dist/cjs/components/FileManager/FileSectionItem/DraggableFileSectionItem.js +5 -1
- package/dist/cjs/components/FileManager/FileSectionItem/FileInfo.js +5 -1
- package/dist/cjs/components/FileManager/FileSectionItem/ItemActions.js +5 -1
- package/dist/cjs/components/FileManager/FilesSection.js +5 -1
- package/dist/cjs/components/FileManager/InlineFilesSection.js +10 -4
- package/dist/cjs/components/FileManager/SelectDesignationActions.js +5 -1
- package/dist/cjs/components/FileManager/UploadFileArea.js +5 -1
- package/dist/cjs/components/FileManager/index.js +5 -1
- package/dist/cjs/components/InspectorSection.js +5 -1
- package/dist/cjs/components/ManuscriptNoteList.js +10 -6
- package/dist/cjs/components/NavDropdown.js +5 -1
- package/dist/cjs/components/PdfPreview.js +5 -1
- package/dist/cjs/components/Resizer/index.js +5 -1
- package/dist/cjs/components/SubmissionInspector/BaseInformation.js +5 -1
- package/dist/cjs/components/SubmissionInspector/index.js +5 -1
- package/dist/cjs/components/TextField.js +5 -1
- package/dist/cjs/components/Tip.js +5 -1
- package/dist/cjs/hooks/use-files.js +3 -3
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/lib/authors.js +2 -2
- package/dist/cjs/lib/inlineFiles.js +18 -42
- package/dist/es/components/AffiliationsEditor/AffiliationsEditorProfile.js +1 -1
- package/dist/es/components/FileManager/FileManager.js +6 -18
- package/dist/es/components/FileManager/InlineFilesSection.js +5 -3
- package/dist/es/components/ManuscriptNoteList.js +2 -2
- package/dist/es/hooks/use-files.js +2 -2
- package/dist/es/lib/authors.js +1 -1
- package/dist/es/lib/inlineFiles.js +10 -34
- package/dist/types/components/AffiliationsEditor/AffiliationsEditorProfile.d.ts +1 -1
- package/dist/types/components/AuthorForm/AuthorForm.d.ts +1 -1
- package/dist/types/components/AuthorForm/AuthorFormComponents.d.ts +1 -1
- package/dist/types/components/AuthorForm/ContributorRolesSelect.d.ts +1 -1
- package/dist/types/components/AuthorForm/RemoveAuthorButton.d.ts +1 -1
- package/dist/types/components/AuthorName.d.ts +1 -1
- package/dist/types/components/AuthorsContainer.d.ts +1 -1
- package/dist/types/components/AuthorsDND/AuthorItemComponents.d.ts +1 -1
- package/dist/types/components/AuthorsDND/AuthorsDND.d.ts +1 -1
- package/dist/types/components/AuthorsDND/DraggableAuthorItem.d.ts +2 -2
- package/dist/types/components/AuthorsList/Author.d.ts +1 -1
- package/dist/types/components/AuthorsList/AuthorsList.d.ts +1 -1
- package/dist/types/components/ColorField/ColorField.d.ts +2 -2
- package/dist/types/components/Comments/CommentBody.d.ts +1 -1
- package/dist/types/components/Comments/CommentUser.d.ts +2 -2
- package/dist/types/components/Dialog.d.ts +1 -0
- package/dist/types/components/EditorHeader/EditorHeader.d.ts +4 -4
- package/dist/types/components/FileManager/FileManager.d.ts +5 -5
- package/dist/types/components/FileManager/FileSectionItem/FileSectionItem.d.ts +2 -2
- package/dist/types/components/FileManager/InlineFilesSection.d.ts +0 -5
- package/dist/types/components/FileManager/util.d.ts +1 -0
- package/dist/types/components/ManuscriptNoteList.d.ts +2 -2
- package/dist/types/components/Resizer/types.d.ts +2 -2
- package/dist/types/components/SubmissionInspector/types.d.ts +11 -11
- package/dist/types/components/icons/add-author.d.ts +1 -0
- package/dist/types/components/icons/add-comment-icon.d.ts +1 -0
- package/dist/types/components/icons/add-icon-active.d.ts +1 -0
- package/dist/types/components/icons/add-icon-inverted.d.ts +1 -0
- package/dist/types/components/icons/back-arrow.d.ts +1 -0
- package/dist/types/components/icons/bookmark.d.ts +1 -0
- package/dist/types/components/icons/google.d.ts +1 -0
- package/dist/types/components/icons/orcid.d.ts +1 -0
- package/dist/types/components/icons/project-notification.d.ts +1 -0
- package/dist/types/components/icons/project.d.ts +1 -0
- package/dist/types/components/icons/projects-list.d.ts +1 -0
- package/dist/types/components/icons/search.d.ts +1 -0
- package/dist/types/components/icons/tick-mark.d.ts +1 -0
- package/dist/types/components/icons/user.d.ts +1 -0
- package/dist/types/hooks/use-files.d.ts +3 -3
- package/dist/types/lib/authors.d.ts +2 -2
- package/dist/types/lib/capabilities.d.ts +4 -4
- package/dist/types/lib/comments.d.ts +5 -5
- package/dist/types/lib/formatAddress.d.ts +1 -1
- package/dist/types/lib/inlineFiles.d.ts +2 -2
- package/dist/types/lib/name.d.ts +1 -1
- package/dist/types/types.d.ts +4 -4
- package/package.json +98 -76
- package/NOTICE +0 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ApolloError } from '@apollo/client';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type PartialSubmission = {
|
|
4
4
|
id: string;
|
|
5
5
|
currentStep: SubmissionStep;
|
|
6
6
|
nextStep?: SubmissionStep | null | undefined;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type SubmissionStep = {
|
|
9
9
|
type: SubmissionStepType;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type SubmissionStepTransition = {
|
|
12
12
|
status: {
|
|
13
13
|
id: string;
|
|
14
14
|
label: string;
|
|
15
15
|
};
|
|
16
16
|
type: SubmissionStepType;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type SubmissionStepType = {
|
|
19
19
|
id: string;
|
|
20
20
|
label: string;
|
|
21
21
|
description: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Model } from '@manuscripts/json-schema';
|
|
2
|
+
import { Build } from '@manuscripts/transform';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Capabilities } from '../../lib/capabilities';
|
|
5
5
|
import { SubmissionAttachment } from './FileSectionItem/FileSectionItem';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type Upload = (file: File, designation: string) => Promise<boolean | SubmissionAttachment | undefined>;
|
|
7
|
+
export type Replace = (attachmentId: string, name: string, file: File, typeId: string) => Promise<boolean | SubmissionAttachment | undefined>;
|
|
8
|
+
export type ChangeDesignation = (attachmentId: string, typeId: string, name: string) => Promise<boolean>;
|
|
9
9
|
export interface FileManagement {
|
|
10
10
|
getAttachments: () => SubmissionAttachment[];
|
|
11
11
|
upload: Upload;
|
|
@@ -3,13 +3,13 @@ import { DragElementWrapper, DragSourceOptions } from 'react-dnd';
|
|
|
3
3
|
import { Maybe } from '../../SubmissionInspector/types';
|
|
4
4
|
import { ChangeDesignation, Replace } from '../FileManager';
|
|
5
5
|
import { Action } from '../FileSectionState';
|
|
6
|
-
export
|
|
6
|
+
export type SubmissionAttachment = {
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
type: SubmissionAttachmentType;
|
|
10
10
|
link: string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type SubmissionAttachmentType = {
|
|
13
13
|
id: string;
|
|
14
14
|
label?: Maybe<string> | undefined;
|
|
15
15
|
};
|
|
@@ -3,11 +3,6 @@ import { Replace } from './FileManager';
|
|
|
3
3
|
import { SubmissionAttachment } from './FileSectionItem/FileSectionItem';
|
|
4
4
|
import { Action } from './FileSectionState';
|
|
5
5
|
import { FileType } from './util';
|
|
6
|
-
export interface ExternalFileRef {
|
|
7
|
-
url: string;
|
|
8
|
-
kind?: string;
|
|
9
|
-
ref?: SubmissionAttachment;
|
|
10
|
-
}
|
|
11
6
|
export declare const InlineFilesSection: React.FC<{
|
|
12
7
|
inlineFiles: {
|
|
13
8
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Keyword, ManuscriptNote, UserProfile } from '@manuscripts/json-schema';
|
|
2
|
+
import { Selected } from '@manuscripts/transform';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Capabilities } from '../lib/capabilities';
|
|
5
5
|
interface Props {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type ResizerDirection = 'row' | 'column';
|
|
2
|
+
export type ResizerSide = 'start' | 'end';
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type Maybe<T> = T | null;
|
|
17
17
|
export declare enum SubmissionCriticality {
|
|
18
18
|
ON_SCHEDULE = "ON_SCHEDULE",
|
|
19
19
|
DUE_TODAY = "DUE_TODAY",
|
|
20
20
|
OVERDUE = "OVERDUE"
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type Submission = {
|
|
23
23
|
id: string;
|
|
24
24
|
code: string;
|
|
25
25
|
doi: string;
|
|
@@ -35,7 +35,7 @@ export declare type Submission = {
|
|
|
35
35
|
isPublished: boolean;
|
|
36
36
|
publishedDate?: Date;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type Journal = {
|
|
39
39
|
id: string;
|
|
40
40
|
code: string;
|
|
41
41
|
title: string;
|
|
@@ -43,7 +43,7 @@ export declare type Journal = {
|
|
|
43
43
|
issn: string;
|
|
44
44
|
productionEditor: User;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type SubmissionStep = {
|
|
47
47
|
id: string;
|
|
48
48
|
type: SubmissionStepType;
|
|
49
49
|
status: SubmissionStepStatus;
|
|
@@ -51,15 +51,15 @@ export declare type SubmissionStep = {
|
|
|
51
51
|
dueDate: Date;
|
|
52
52
|
criticality: SubmissionCriticality;
|
|
53
53
|
};
|
|
54
|
-
export
|
|
54
|
+
export type ProjectedSubmissionStep = {
|
|
55
55
|
type: SubmissionStepType;
|
|
56
56
|
dueDate: Date;
|
|
57
57
|
};
|
|
58
|
-
export
|
|
58
|
+
export type User = {
|
|
59
59
|
id: string;
|
|
60
60
|
displayName: string;
|
|
61
61
|
};
|
|
62
|
-
export
|
|
62
|
+
export type Person = User & {
|
|
63
63
|
id: string;
|
|
64
64
|
displayName: string;
|
|
65
65
|
email: string;
|
|
@@ -67,22 +67,22 @@ export declare type Person = User & {
|
|
|
67
67
|
lastName?: Maybe<string>;
|
|
68
68
|
role: Role;
|
|
69
69
|
};
|
|
70
|
-
export
|
|
70
|
+
export type Role = {
|
|
71
71
|
id: string;
|
|
72
72
|
label: string;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type SubmissionStepType = {
|
|
75
75
|
id: string;
|
|
76
76
|
label: string;
|
|
77
77
|
description: string;
|
|
78
78
|
stage: SubmissionStepStage;
|
|
79
79
|
role: Role;
|
|
80
80
|
};
|
|
81
|
-
export
|
|
81
|
+
export type SubmissionStepStage = {
|
|
82
82
|
id: string;
|
|
83
83
|
label: string;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type SubmissionStepStatus = {
|
|
86
86
|
id: string;
|
|
87
87
|
label: string;
|
|
88
88
|
};
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const AddAuthor: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default AddAuthor;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const AddIconActive: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default AddIconActive;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const AddIconInverted: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default AddIconInverted;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
export declare const BackArrow: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default BackArrow;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const Bookmark: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default Bookmark;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const Google: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default Google;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const Orcid: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default Orcid;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const ProjectNotification: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default ProjectNotification;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const ProjectIcon: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default ProjectIcon;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const ProjectsList: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default ProjectsList;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const SearchIcon: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default SearchIcon;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const TickMark: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default TickMark;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { IconProps } from './types';
|
|
17
18
|
declare const User: (props: IconProps) => JSX.Element;
|
|
18
19
|
export default User;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Model } from '@manuscripts/
|
|
1
|
+
import { Model } from '@manuscripts/json-schema';
|
|
2
2
|
import { SubmissionAttachment } from '../components/FileManager/FileSectionItem/FileSectionItem';
|
|
3
3
|
import { InlineFile } from '../lib/inlineFiles';
|
|
4
|
-
|
|
5
|
-
export declare const useFiles: (modelMap: Map<string, Model>, attachments: SubmissionAttachment[], filePredicate?: FilePredicate
|
|
4
|
+
type FilePredicate = (fileName: string) => boolean;
|
|
5
|
+
export declare const useFiles: (modelMap: Map<string, Model>, attachments: SubmissionAttachment[], filePredicate?: FilePredicate) => {
|
|
6
6
|
otherFiles: SubmissionAttachment[];
|
|
7
7
|
supplementFiles: SubmissionAttachment[];
|
|
8
8
|
inlineFiles: InlineFile[];
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Affiliation, Contributor, Model, UserProfileAffiliation } from '@manuscripts/
|
|
16
|
+
import { Affiliation, Contributor, Model, UserProfileAffiliation } from '@manuscripts/json-schema';
|
|
17
17
|
import { AffiliationGeneric, AffiliationMap, AffiliationOption, AuthorAffiliation } from '../types';
|
|
18
18
|
export declare const buildSortedAuthors: (modelMap: Map<string, Model>) => Contributor[];
|
|
19
19
|
export declare const buildAuthorPriority: (authors: Contributor[]) => number;
|
|
@@ -27,4 +27,4 @@ export declare const buildAuthorsAndAffiliations: (modelMap: Map<string, Model>)
|
|
|
27
27
|
};
|
|
28
28
|
export declare const isJointFirstAuthor: (authors: Contributor[], index: number) => boolean;
|
|
29
29
|
export declare const affiliationLabel: (affiliation: Affiliation | AffiliationGeneric | UserProfileAffiliation) => string;
|
|
30
|
-
export declare const affiliationsOptions: (affiliations: Map<string, AffiliationGeneric>, authorAffiliations?: AuthorAffiliation[] | null
|
|
30
|
+
export declare const affiliationsOptions: (affiliations: Map<string, AffiliationGeneric>, authorAffiliations?: AuthorAffiliation[] | null) => AffiliationOption[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Project } from '@manuscripts/json-schema';
|
|
2
|
+
import { UserProfileWithAvatar } from '@manuscripts/transform';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export
|
|
4
|
+
export type Capabilities = {
|
|
5
5
|
handleSuggestion: boolean;
|
|
6
6
|
rejectOwnSuggestion: boolean;
|
|
7
7
|
createSuggestion: boolean;
|
|
@@ -44,7 +44,7 @@ export interface ProviderProps {
|
|
|
44
44
|
permittedActions?: string[];
|
|
45
45
|
children?: React.ReactNode;
|
|
46
46
|
}
|
|
47
|
-
export declare const getLWCapabilities: (project?: Project
|
|
47
|
+
export declare const getLWCapabilities: (project?: Project, profile?: UserProfileWithAvatar, lwRole?: ProviderProps['lwRole'], actions?: string[]) => Capabilities;
|
|
48
48
|
export declare const getAllPermitted: () => Capabilities;
|
|
49
49
|
export declare const usePermissions: () => Capabilities;
|
|
50
50
|
export declare const useCalcPermission: ({ project, profile, lwRole, permittedActions, }: ProviderProps) => Capabilities;
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
export
|
|
16
|
+
import { BibliographicName, CommentAnnotation, Contribution, ManuscriptNote } from '@manuscripts/json-schema';
|
|
17
|
+
import { Build, ManuscriptNode } from '@manuscripts/transform';
|
|
18
|
+
export type CommentType = ManuscriptNote | CommentAnnotation;
|
|
19
19
|
export interface UnsavedComment extends Build<CommentAnnotation> {
|
|
20
20
|
contributions: Contribution[];
|
|
21
21
|
}
|
|
@@ -24,7 +24,7 @@ export interface CommentData<T = CommentType> {
|
|
|
24
24
|
children: T[];
|
|
25
25
|
}
|
|
26
26
|
export declare const isSavedComment: (comment: CommentType | UnsavedComment) => comment is CommentType;
|
|
27
|
-
export
|
|
28
|
-
export declare const buildCommentTree: (doc: ManuscriptNode, comments: CommentType[], newComment?: CommentType
|
|
27
|
+
export type CommentsTreeMap<T = CommentType> = Map<string, CommentData<T>[]>;
|
|
28
|
+
export declare const buildCommentTree: (doc: ManuscriptNode, comments: CommentType[], newComment?: CommentType) => CommentsTreeMap<CommentType>;
|
|
29
29
|
export declare const buildNoteTree: (comments: CommentType[]) => CommentsTreeMap<CommentType>;
|
|
30
30
|
export declare const buildName: (name: Pick<BibliographicName, 'given' | 'family'>) => string;
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Affiliation } from '@manuscripts/
|
|
16
|
+
import { Affiliation } from '@manuscripts/json-schema';
|
|
17
17
|
declare const _default: (affiliation: Affiliation) => string;
|
|
18
18
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Model } from '@manuscripts/
|
|
1
|
+
import { Model } from '@manuscripts/json-schema';
|
|
2
2
|
import { SubmissionAttachment } from '../components/FileManager/FileSectionItem/FileSectionItem';
|
|
3
3
|
import { FileType } from '../components/FileManager/util';
|
|
4
|
-
export
|
|
4
|
+
export type InlineFile = {
|
|
5
5
|
id: string;
|
|
6
6
|
label: string;
|
|
7
7
|
type: FileType;
|
package/dist/types/lib/name.d.ts
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { BibliographicName } from '@manuscripts/
|
|
16
|
+
import { BibliographicName } from '@manuscripts/json-schema';
|
|
17
17
|
export declare const initials: (name: BibliographicName) => string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Affiliation, BibliographicName, Contributor } from '@manuscripts/
|
|
16
|
+
import { Affiliation, BibliographicName, Contributor } from '@manuscripts/json-schema';
|
|
17
17
|
import { ConnectDragSource, ConnectDropTarget } from 'react-dnd';
|
|
18
|
-
export
|
|
18
|
+
export type AffiliationMap = Map<string, Affiliation>;
|
|
19
19
|
interface AffiliationData {
|
|
20
20
|
ordinal: number;
|
|
21
21
|
data: Affiliation;
|
|
@@ -30,8 +30,8 @@ export interface AuthorItem {
|
|
|
30
30
|
index: number;
|
|
31
31
|
priority: number | null;
|
|
32
32
|
}
|
|
33
|
-
export
|
|
34
|
-
export
|
|
33
|
+
export type DropSide = 'before' | 'after' | null;
|
|
34
|
+
export type DropHandler = (source: AuthorItem, target: AuthorItem, position: DropSide, authors: Contributor[]) => void;
|
|
35
35
|
export interface DragSourceProps {
|
|
36
36
|
authorItem: AuthorItem;
|
|
37
37
|
position: DropSide;
|