@manuscripts/style-guide 1.3.5-LEAN-2585-1 → 1.3.5-LEAN-2852-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.
@@ -56,35 +56,27 @@ const LinkSharedStyles = (0, styled_components_1.css) `
56
56
  color: inherit;
57
57
  outline: none;
58
58
 
59
- &:not(:disabled) {
60
- &:hover,
61
- &:focus {
62
- &,
63
- span {
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.button `
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
- &:not(:disabled) {
80
- &:hover {
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, disableEditButton, }) => (react_1.default.createElement("span", { key: author._id },
87
- showEditButton ? (react_1.default.createElement(AuthorsContainer, { disabled: disableEditButton, onClick: (e) => {
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, disableEditButton: disableEditButton }))))),
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() || isProofer()),
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
- &:not(:disabled) {
31
- &:hover,
32
- &:focus {
33
- &,
34
- span {
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.button `
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
- &:not(:disabled) {
51
- &:hover {
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, disableEditButton, }) => (React.createElement("span", { key: author._id },
58
- showEditButton ? (React.createElement(AuthorsContainer, { disabled: disableEditButton, onClick: (e) => {
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, disableEditButton: disableEditButton }))))),
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() || isProofer()),
53
+ editMetadata: !(isViewer() || isAnnotator() || isProofer()),
54
54
  editCitationsAndRefs: !(isViewer() || isAnnotator() || isProofer()),
55
55
  shareProject: isOwner(),
56
56
  };
@@ -21,7 +21,6 @@ interface AuthorProps {
21
21
  affiliations?: AuthorAffiliationT[];
22
22
  jointFirstAuthor: boolean;
23
23
  showEditButton?: boolean;
24
- disableEditButton?: boolean;
25
24
  selectAuthor?: (data: Contributor) => void;
26
25
  startEditing?: () => void;
27
26
  }
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.5-LEAN-2585-1",
4
+ "version": "1.3.5-LEAN-2852-0",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -36,8 +36,8 @@
36
36
  "@formatjs/intl-relativetimeformat": "^4.5.9",
37
37
  "@formatjs/intl-utils": "^2.2.0",
38
38
  "@manuscripts/assets": "^0.6.2",
39
- "@manuscripts/transform": "^1.4.3",
40
- "@manuscripts/json-schema": "^2.1.2",
39
+ "@manuscripts/transform": "1.4.6-LEAN-2852-0",
40
+ "@manuscripts/json-schema": "2.2.0-LEAN-2852-0",
41
41
  "@manuscripts/title-editor": "^1.1.0",
42
42
  "@manuscripts/comment-editor": "^1.0.3",
43
43
  "@reach/tabs": "^0.11.2",