@manuscripts/body-editor 3.12.30 → 3.12.32

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.
@@ -137,7 +137,7 @@ const AuthorDetailsForm = ({ values, onChange, onSave, actionsRef, isEmailRequir
137
137
  (0, formik_1.getIn)(formik.errors, 'ORCID');
138
138
  return (react_1.default.createElement(react_1.default.Fragment, null,
139
139
  react_1.default.createElement(style_guide_1.Label, { htmlFor: "orcid" }, "ORCID"),
140
- react_1.default.createElement(TextFieldWithError, { id: 'orcid', type: "url", placeholder: 'https://orcid.org/...', ...props.field, pattern: ORCID_INPUT_PATTERN, title: "Please enter a valid ORCID URL: https://orcid.org/xxxx-xxxx-xxxx-xxxx", error: hasError }),
140
+ react_1.default.createElement(TextFieldWithError, { id: 'orcid', disabled: values.isAuthenticated, type: "url", placeholder: 'https://orcid.org/...', ...props.field, pattern: ORCID_INPUT_PATTERN, title: "Please enter a valid ORCID URL: https://orcid.org/xxxx-xxxx-xxxx-xxxx", error: hasError }),
141
141
  hasError && (react_1.default.createElement(style_guide_1.InputErrorText, null, (0, formik_1.getIn)(formik.errors, 'ORCID')))));
142
142
  })),
143
143
  react_1.default.createElement(style_guide_1.FormRow, null,
@@ -58,6 +58,7 @@ const react_dnd_1 = require("react-dnd");
58
58
  const styled_components_1 = __importDefault(require("styled-components"));
59
59
  const authors_1 = require("../../lib/authors");
60
60
  const dnd_1 = require("../../lib/dnd");
61
+ const styled_components_2 = require("../references/ReferenceForm/styled-components");
61
62
  const AuthorContainer = (0, style_guide_1.withNavigableListItem)(styled_components_1.default.div `
62
63
  padding: ${(props) => props.theme.grid.unit * 2}px 0
63
64
  ${(props) => props.theme.grid.unit * 2}px;
@@ -125,11 +126,9 @@ const DragHandle = (0, styled_components_1.default)(style_guide_1.DraggableIcon)
125
126
  margin-left: -4px;
126
127
  margin-right: -12px;
127
128
  `;
128
- const RemoveButton = (0, styled_components_1.default)(style_guide_1.SecondaryIconButton) `
129
- svg {
130
- path[fill='white'] {
131
- fill: white;
132
- }
129
+ const RemoveButton = (0, styled_components_1.default)(styled_components_2.DeleteButton) `
130
+ .icon_element {
131
+ fill: ${(props) => (props.disabled && '#c9c9c9') || '#6E6E6E'} !important;
133
132
  }
134
133
  `;
135
134
  const StyledCrclTickAnimation = (0, styled_components_1.default)(style_guide_1.CrclTickAnimation) `
@@ -34,7 +34,7 @@ function DrawerGroup({ removeItem, selectedItems, onSelect, items, showDrawer, s
34
34
  })), onRemove: removeItem, placeholder: `No ${title} assigned` }),
35
35
  showDrawer && (react_1.default.createElement(Drawer, { items: items, selectedItems: selectedItems, title: title, onSelect: onSelect, onBack: () => setShowDrawer(false), width: "100%" }))));
36
36
  }
37
- exports.AssignButton = styled_components_1.default.button `
37
+ exports.AssignButton = (0, styled_components_1.default)(style_guide_1.IconButton) `
38
38
  color: ${(props) => props.theme.colors.brand.default};
39
39
  background: none;
40
40
  border: none;
@@ -43,10 +43,16 @@ exports.AssignButton = styled_components_1.default.button `
43
43
  font: ${(props) => props.theme.font.weight.normal}
44
44
  ${(props) => props.theme.font.size.normal}
45
45
  ${(props) => props.theme.font.family.sans};
46
- display: flex;
47
- align-items: center;
48
46
  gap: 4px;
49
- margin-bottom: ${(props) => props.theme.grid.unit * 2}px;
47
+ width: auto;
48
+ height: 24px;
49
+
50
+ &:disabled {
51
+ color: #c9c9c9 !important;
52
+ background-color: unset !important;
53
+ border: unset;
54
+ }
55
+
50
56
  &:hover {
51
57
  opacity: 0.8;
52
58
  }
@@ -28,6 +28,7 @@ const normalizeAuthor = (author) => {
28
28
  email: trim(author.email),
29
29
  isCorresponding: author.isCorresponding || false,
30
30
  ORCID: trim(author.ORCID),
31
+ isAuthenticated: author.isAuthenticated || false,
31
32
  priority: author.priority,
32
33
  isJointContributor: author.isJointContributor || false,
33
34
  degrees: author.degrees || [],
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MATHJAX_VERSION = exports.VERSION = void 0;
4
- exports.VERSION = '3.12.30';
4
+ exports.VERSION = '3.12.32';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -98,7 +98,7 @@ export const AuthorDetailsForm = ({ values, onChange, onSave, actionsRef, isEmai
98
98
  getIn(formik.errors, 'ORCID');
99
99
  return (React.createElement(React.Fragment, null,
100
100
  React.createElement(Label, { htmlFor: "orcid" }, "ORCID"),
101
- React.createElement(TextFieldWithError, { id: 'orcid', type: "url", placeholder: 'https://orcid.org/...', ...props.field, pattern: ORCID_INPUT_PATTERN, title: "Please enter a valid ORCID URL: https://orcid.org/xxxx-xxxx-xxxx-xxxx", error: hasError }),
101
+ React.createElement(TextFieldWithError, { id: 'orcid', disabled: values.isAuthenticated, type: "url", placeholder: 'https://orcid.org/...', ...props.field, pattern: ORCID_INPUT_PATTERN, title: "Please enter a valid ORCID URL: https://orcid.org/xxxx-xxxx-xxxx-xxxx", error: hasError }),
102
102
  hasError && (React.createElement(InputErrorText, null, getIn(formik.errors, 'ORCID')))));
103
103
  })),
104
104
  React.createElement(FormRow, null,
@@ -13,12 +13,13 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Avatar, CorrespondingAuthorIcon, CrclTickAnimation, DeleteIcon, DraggableIcon, SecondaryIconButton, withNavigableListItem, } from '@manuscripts/style-guide';
16
+ import { Avatar, CorrespondingAuthorIcon, CrclTickAnimation, DeleteIcon, DraggableIcon, withNavigableListItem, } from '@manuscripts/style-guide';
17
17
  import React, { useRef, useState } from 'react';
18
18
  import { useDrag, useDrop } from 'react-dnd';
19
19
  import styled from 'styled-components';
20
20
  import { authorLabel } from '../../lib/authors';
21
21
  import { getDropSide } from '../../lib/dnd';
22
+ import { DeleteButton } from '../references/ReferenceForm/styled-components';
22
23
  const AuthorContainer = withNavigableListItem(styled.div `
23
24
  padding: ${(props) => props.theme.grid.unit * 2}px 0
24
25
  ${(props) => props.theme.grid.unit * 2}px;
@@ -86,11 +87,9 @@ const DragHandle = styled(DraggableIcon) `
86
87
  margin-left: -4px;
87
88
  margin-right: -12px;
88
89
  `;
89
- const RemoveButton = styled(SecondaryIconButton) `
90
- svg {
91
- path[fill='white'] {
92
- fill: white;
93
- }
90
+ const RemoveButton = styled(DeleteButton) `
91
+ .icon_element {
92
+ fill: ${(props) => (props.disabled && '#c9c9c9') || '#6E6E6E'} !important;
94
93
  }
95
94
  `;
96
95
  const StyledCrclTickAnimation = styled(CrclTickAnimation) `
@@ -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 { outlineStyle, SelectedItemsBox, } from '@manuscripts/style-guide';
16
+ import { outlineStyle, SelectedItemsBox, IconButton, } from '@manuscripts/style-guide';
17
17
  import React from 'react';
18
18
  import styled from 'styled-components';
19
19
  export function DrawerGroup({ removeItem, selectedItems, onSelect, items, showDrawer, setShowDrawer, title, labelField, Drawer, cy, Icon, buttonText, }) {
@@ -27,7 +27,7 @@ export function DrawerGroup({ removeItem, selectedItems, onSelect, items, showDr
27
27
  })), onRemove: removeItem, placeholder: `No ${title} assigned` }),
28
28
  showDrawer && (React.createElement(Drawer, { items: items, selectedItems: selectedItems, title: title, onSelect: onSelect, onBack: () => setShowDrawer(false), width: "100%" }))));
29
29
  }
30
- export const AssignButton = styled.button `
30
+ export const AssignButton = styled(IconButton) `
31
31
  color: ${(props) => props.theme.colors.brand.default};
32
32
  background: none;
33
33
  border: none;
@@ -36,10 +36,16 @@ export const AssignButton = styled.button `
36
36
  font: ${(props) => props.theme.font.weight.normal}
37
37
  ${(props) => props.theme.font.size.normal}
38
38
  ${(props) => props.theme.font.family.sans};
39
- display: flex;
40
- align-items: center;
41
39
  gap: 4px;
42
- margin-bottom: ${(props) => props.theme.grid.unit * 2}px;
40
+ width: auto;
41
+ height: 24px;
42
+
43
+ &:disabled {
44
+ color: #c9c9c9 !important;
45
+ background-color: unset !important;
46
+ border: unset;
47
+ }
48
+
43
49
  &:hover {
44
50
  opacity: 0.8;
45
51
  }
@@ -25,6 +25,7 @@ export const normalizeAuthor = (author) => {
25
25
  email: trim(author.email),
26
26
  isCorresponding: author.isCorresponding || false,
27
27
  ORCID: trim(author.ORCID),
28
+ isAuthenticated: author.isAuthenticated || false,
28
29
  priority: author.priority,
29
30
  isJointContributor: author.isJointContributor || false,
30
31
  degrees: author.degrees || [],
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.12.30';
1
+ export const VERSION = '3.12.32';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -39,5 +39,15 @@ interface EmbeddedDrawerProps<T extends Base> {
39
39
  onSelect: (id: string) => void;
40
40
  }
41
41
  export declare function DrawerGroup<T extends Base>({ removeItem, selectedItems, onSelect, items, showDrawer, setShowDrawer, title, labelField, Drawer, cy, Icon, buttonText, }: DrawerGroupProps<T>): React.JSX.Element;
42
- export declare const AssignButton: import("styled-components").StyledComponent<"button", any, {}, never>;
42
+ export declare const AssignButton: import("styled-components").StyledComponent<"button", any, {
43
+ type: "button" | "submit" | "reset";
44
+ } & {
45
+ danger?: boolean;
46
+ disabled?: boolean;
47
+ mini?: boolean;
48
+ } & {
49
+ defaultColor?: boolean;
50
+ size?: number;
51
+ iconColor?: string;
52
+ }, "type">;
43
53
  export {};
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.12.30";
1
+ export declare const VERSION = "3.12.32";
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.12.30",
4
+ "version": "3.12.32",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -37,9 +37,9 @@
37
37
  "@citation-js/plugin-pubmed": "0.3.0",
38
38
  "@citation-js/plugin-ris": "0.7.18",
39
39
  "@iarna/word-count": "1.1.2",
40
- "@manuscripts/style-guide": "3.5.10",
40
+ "@manuscripts/style-guide": "3.5.11",
41
41
  "@manuscripts/track-changes-plugin": "2.3.10",
42
- "@manuscripts/transform": "4.3.36",
42
+ "@manuscripts/transform": "4.3.38",
43
43
  "@popperjs/core": "2.11.8",
44
44
  "citeproc": "2.4.63",
45
45
  "codemirror": "5.65.19",