@manuscripts/style-guide 1.3.6-LEAN-2585-0 → 1.3.6
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/AuthorsList/Author.js +11 -19
- package/dist/cjs/components/AuthorsList/AuthorsList.js +1 -1
- package/dist/cjs/lib/capabilities.js +1 -1
- package/dist/es/components/AuthorsList/Author.js +11 -19
- package/dist/es/components/AuthorsList/AuthorsList.js +1 -1
- package/dist/es/lib/capabilities.js +1 -1
- package/dist/types/components/AuthorsList/Author.d.ts +0 -1
- package/package.json +2 -2
|
@@ -56,35 +56,27 @@ const LinkSharedStyles = (0, styled_components_1.css) `
|
|
|
56
56
|
color: inherit;
|
|
57
57
|
outline: none;
|
|
58
58
|
|
|
59
|
-
&:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
color: ${(props) => props.theme.colors.text.tertiary};
|
|
65
|
-
}
|
|
59
|
+
&:hover,
|
|
60
|
+
&:focus {
|
|
61
|
+
&,
|
|
62
|
+
span {
|
|
63
|
+
color: ${(props) => props.theme.colors.text.tertiary};
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
66
|
`;
|
|
69
67
|
const AuthorAffiliation = styled_components_1.default.span `
|
|
70
68
|
${LinkSharedStyles}
|
|
71
69
|
`;
|
|
72
|
-
const AuthorsContainer = styled_components_1.default.
|
|
70
|
+
const AuthorsContainer = styled_components_1.default.a `
|
|
73
71
|
display: inline-flex;
|
|
74
|
-
background: transparent;
|
|
75
|
-
border: 0;
|
|
76
|
-
font-size: 1rem;
|
|
77
72
|
${LinkSharedStyles}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
text-decoration: underline;
|
|
82
|
-
cursor: pointer !important;
|
|
83
|
-
}
|
|
73
|
+
&:hover {
|
|
74
|
+
text-decoration: underline;
|
|
75
|
+
cursor: pointer;
|
|
84
76
|
}
|
|
85
77
|
`;
|
|
86
|
-
const Author = ({ author, affiliations, jointFirstAuthor, startEditing, selectAuthor, showEditButton,
|
|
87
|
-
showEditButton ? (react_1.default.createElement(AuthorsContainer, {
|
|
78
|
+
const Author = ({ author, affiliations, jointFirstAuthor, startEditing, selectAuthor, showEditButton, }) => (react_1.default.createElement("span", { key: author._id },
|
|
79
|
+
showEditButton ? (react_1.default.createElement(AuthorsContainer, { href: "#", onClick: (e) => {
|
|
88
80
|
e.preventDefault();
|
|
89
81
|
startEditing && startEditing();
|
|
90
82
|
selectAuthor && selectAuthor(author);
|
|
@@ -46,7 +46,7 @@ const AuthorsActions = styled_components_1.default.div `
|
|
|
46
46
|
const AuthorsList = ({ authors, authorAffiliations, startEditing, showEditButton, disableEditButton, selectAuthor, }) => (react_1.default.createElement(AuthorsContainer, { isEmpty: !authors.length },
|
|
47
47
|
react_1.default.createElement("div", null, authors.map((author, index) => (react_1.default.createElement(react_1.default.Fragment, { key: author._id },
|
|
48
48
|
!!index && ', ',
|
|
49
|
-
react_1.default.createElement(Author_1.Author, { author: author, jointFirstAuthor: (0, authors_1.isJointFirstAuthor)(authors, index), affiliations: authorAffiliations.get(author._id), selectAuthor: selectAuthor, startEditing: startEditing, showEditButton: showEditButton
|
|
49
|
+
react_1.default.createElement(Author_1.Author, { author: author, jointFirstAuthor: (0, authors_1.isJointFirstAuthor)(authors, index), affiliations: authorAffiliations.get(author._id), selectAuthor: selectAuthor, startEditing: startEditing, showEditButton: showEditButton }))))),
|
|
50
50
|
showEditButton && startEditing && (react_1.default.createElement(AuthorsActions, null,
|
|
51
51
|
react_1.default.createElement(Button_1.PrimaryButton, { mini: true, onClick: startEditing, className: 'edit_authors_button', disabled: disableEditButton }, "Edit Authors")))));
|
|
52
52
|
exports.AuthorsList = AuthorsList;
|
|
@@ -56,7 +56,7 @@ const getCapabilities = (project, profile, role, actions) => {
|
|
|
56
56
|
accessEditor: true,
|
|
57
57
|
formatArticle: !isViewer(),
|
|
58
58
|
editArticle: !isViewer(),
|
|
59
|
-
editMetadata: !(isViewer() ||
|
|
59
|
+
editMetadata: !(isViewer() || isAnnotator() || isProofer()),
|
|
60
60
|
editCitationsAndRefs: !(isViewer() || isAnnotator() || isProofer()),
|
|
61
61
|
shareProject: isOwner(),
|
|
62
62
|
};
|
|
@@ -27,35 +27,27 @@ const LinkSharedStyles = css `
|
|
|
27
27
|
color: inherit;
|
|
28
28
|
outline: none;
|
|
29
29
|
|
|
30
|
-
&:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
color: ${(props) => props.theme.colors.text.tertiary};
|
|
36
|
-
}
|
|
30
|
+
&:hover,
|
|
31
|
+
&:focus {
|
|
32
|
+
&,
|
|
33
|
+
span {
|
|
34
|
+
color: ${(props) => props.theme.colors.text.tertiary};
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
37
|
`;
|
|
40
38
|
const AuthorAffiliation = styled.span `
|
|
41
39
|
${LinkSharedStyles}
|
|
42
40
|
`;
|
|
43
|
-
const AuthorsContainer = styled.
|
|
41
|
+
const AuthorsContainer = styled.a `
|
|
44
42
|
display: inline-flex;
|
|
45
|
-
background: transparent;
|
|
46
|
-
border: 0;
|
|
47
|
-
font-size: 1rem;
|
|
48
43
|
${LinkSharedStyles}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
text-decoration: underline;
|
|
53
|
-
cursor: pointer !important;
|
|
54
|
-
}
|
|
44
|
+
&:hover {
|
|
45
|
+
text-decoration: underline;
|
|
46
|
+
cursor: pointer;
|
|
55
47
|
}
|
|
56
48
|
`;
|
|
57
|
-
export const Author = ({ author, affiliations, jointFirstAuthor, startEditing, selectAuthor, showEditButton,
|
|
58
|
-
showEditButton ? (React.createElement(AuthorsContainer, {
|
|
49
|
+
export const Author = ({ author, affiliations, jointFirstAuthor, startEditing, selectAuthor, showEditButton, }) => (React.createElement("span", { key: author._id },
|
|
50
|
+
showEditButton ? (React.createElement(AuthorsContainer, { href: "#", onClick: (e) => {
|
|
59
51
|
e.preventDefault();
|
|
60
52
|
startEditing && startEditing();
|
|
61
53
|
selectAuthor && selectAuthor(author);
|
|
@@ -40,6 +40,6 @@ const AuthorsActions = styled.div `
|
|
|
40
40
|
export const AuthorsList = ({ authors, authorAffiliations, startEditing, showEditButton, disableEditButton, selectAuthor, }) => (React.createElement(AuthorsContainer, { isEmpty: !authors.length },
|
|
41
41
|
React.createElement("div", null, authors.map((author, index) => (React.createElement(React.Fragment, { key: author._id },
|
|
42
42
|
!!index && ', ',
|
|
43
|
-
React.createElement(Author, { author: author, jointFirstAuthor: isJointFirstAuthor(authors, index), affiliations: authorAffiliations.get(author._id), selectAuthor: selectAuthor, startEditing: startEditing, showEditButton: showEditButton
|
|
43
|
+
React.createElement(Author, { author: author, jointFirstAuthor: isJointFirstAuthor(authors, index), affiliations: authorAffiliations.get(author._id), selectAuthor: selectAuthor, startEditing: startEditing, showEditButton: showEditButton }))))),
|
|
44
44
|
showEditButton && startEditing && (React.createElement(AuthorsActions, null,
|
|
45
45
|
React.createElement(PrimaryButton, { mini: true, onClick: startEditing, className: 'edit_authors_button', disabled: disableEditButton }, "Edit Authors")))));
|
|
@@ -50,7 +50,7 @@ export const getCapabilities = (project, profile, role, actions) => {
|
|
|
50
50
|
accessEditor: true,
|
|
51
51
|
formatArticle: !isViewer(),
|
|
52
52
|
editArticle: !isViewer(),
|
|
53
|
-
editMetadata: !(isViewer() ||
|
|
53
|
+
editMetadata: !(isViewer() || isAnnotator() || isProofer()),
|
|
54
54
|
editCitationsAndRefs: !(isViewer() || isAnnotator() || isProofer()),
|
|
55
55
|
shareProject: isOwner(),
|
|
56
56
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/style-guide",
|
|
3
3
|
"description": "Shared components for Manuscripts applications",
|
|
4
|
-
"version": "1.3.6
|
|
4
|
+
"version": "1.3.6",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -141,4 +141,4 @@
|
|
|
141
141
|
"resolutions": {
|
|
142
142
|
"@types/react": "^17.0.2"
|
|
143
143
|
}
|
|
144
|
-
}
|
|
144
|
+
}
|