@manuscripts/style-guide 1.1.10 → 1.1.11-LEAN-2035

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.
@@ -19,6 +19,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.SaveStatus = void 0;
22
+ const AttentionRed_1 = __importDefault(require("@manuscripts/assets/react/AttentionRed"));
22
23
  const react_1 = __importDefault(require("react"));
23
24
  const styled_components_1 = __importDefault(require("styled-components"));
24
25
  const save_icon_offline_1 = __importDefault(require("./icons/save-icon-offline"));
@@ -40,6 +41,11 @@ const SaveStatus = ({ status }) => {
40
41
  react_1.default.createElement(PopPop, null,
41
42
  react_1.default.createElement(save_icon_saved_1.default, null)),
42
43
  react_1.default.createElement(Text, null, "Saved")));
44
+ case 'failed':
45
+ return (react_1.default.createElement(FailedContainer, null,
46
+ react_1.default.createElement(PopPop, null,
47
+ react_1.default.createElement(AttentionRed_1.default, { width: 20, height: 20 })),
48
+ react_1.default.createElement(FailedText, null, "Failed To Save")));
43
49
  default:
44
50
  return null;
45
51
  }
@@ -61,6 +67,15 @@ const Text = styled_components_1.default.span `
61
67
  font-size: 14px;
62
68
  font-weight: 700;
63
69
  `;
70
+ const FailedContainer = (0, styled_components_1.default)(Container) `
71
+ path {
72
+ stroke: ${(props) => props.theme.colors.text.error};
73
+ stroke-width: 0;
74
+ }
75
+ `;
76
+ const FailedText = (0, styled_components_1.default)(Text) `
77
+ color: ${(props) => props.theme.colors.text.error};
78
+ `;
64
79
  const RotateContinuous = styled_components_1.default.div `
65
80
  svg {
66
81
  animation: saveRotation 2.7s ease-in-out infinite;
@@ -56,6 +56,7 @@ const getCapabilities = (project, profile, role, actions) => {
56
56
  formatArticle: !isViewer(),
57
57
  editArticle: !isViewer(),
58
58
  editMetadata: !(isViewer() || isAnnotator()),
59
+ editCitationsAndRefs: !(isViewer() || isAnnotator()),
59
60
  shareProject: isOwner(),
60
61
  };
61
62
  };
@@ -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
+ import AttentionRed from '@manuscripts/assets/react/AttentionRed';
16
17
  import React from 'react';
17
18
  import styled from 'styled-components';
18
19
  import SaveIconOffline from './icons/save-icon-offline';
@@ -34,6 +35,11 @@ export const SaveStatus = ({ status }) => {
34
35
  React.createElement(PopPop, null,
35
36
  React.createElement(SaveIconSaved, null)),
36
37
  React.createElement(Text, null, "Saved")));
38
+ case 'failed':
39
+ return (React.createElement(FailedContainer, null,
40
+ React.createElement(PopPop, null,
41
+ React.createElement(AttentionRed, { width: 20, height: 20 })),
42
+ React.createElement(FailedText, null, "Failed To Save")));
37
43
  default:
38
44
  return null;
39
45
  }
@@ -54,6 +60,15 @@ const Text = styled.span `
54
60
  font-size: 14px;
55
61
  font-weight: 700;
56
62
  `;
63
+ const FailedContainer = styled(Container) `
64
+ path {
65
+ stroke: ${(props) => props.theme.colors.text.error};
66
+ stroke-width: 0;
67
+ }
68
+ `;
69
+ const FailedText = styled(Text) `
70
+ color: ${(props) => props.theme.colors.text.error};
71
+ `;
57
72
  const RotateContinuous = styled.div `
58
73
  svg {
59
74
  animation: saveRotation 2.7s ease-in-out infinite;
@@ -50,6 +50,7 @@ export const getCapabilities = (project, profile, role, actions) => {
50
50
  formatArticle: !isViewer(),
51
51
  editArticle: !isViewer(),
52
52
  editMetadata: !(isViewer() || isAnnotator()),
53
+ editCitationsAndRefs: !(isViewer() || isAnnotator()),
53
54
  shareProject: isOwner(),
54
55
  };
55
56
  };
@@ -37,6 +37,7 @@ export type Capabilities = {
37
37
  editArticle: boolean;
38
38
  editMetadata: boolean;
39
39
  shareProject: boolean;
40
+ editCitationsAndRefs: boolean;
40
41
  };
41
42
  export interface ProviderProps {
42
43
  project?: Project;
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.1.10",
4
+ "version": "1.1.11-LEAN-2035",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -39,7 +39,7 @@
39
39
  "@manuscripts/transform": "^1.3.0",
40
40
  "@manuscripts/json-schema": "^2.0.2",
41
41
  "@manuscripts/title-editor": "^1.1.0",
42
- "@manuscripts/comment-editor": "^1.0.1",
42
+ "@manuscripts/comment-editor": "1.0.1-LEAN-2035",
43
43
  "@reach/tabs": "^0.11.2",
44
44
  "formik": "^2.2.9",
45
45
  "date-fns": "^2.29.3",
@@ -64,7 +64,7 @@
64
64
  "react-modern-calendar-datepicker": "^3.1.3",
65
65
  "react-popper": "^1.3.11",
66
66
  "react-router-dom": "^5.2.0",
67
- "react-select": "^5.0.1",
67
+ "react-select": "^5.7.3",
68
68
  "react-sizeme": "^2.6.12",
69
69
  "react-tooltip": "^4.2.11",
70
70
  "styled-components": "^5.2.0"
@@ -137,7 +137,6 @@
137
137
  "react-modern-calendar-datepicker": "^3.1.3",
138
138
  "react-popper": "^1.3.11",
139
139
  "react-router-dom": "^5.2.0",
140
- "react-select": "^5.0.1",
141
140
  "react-sizeme": "^2.6.12",
142
141
  "react-tooltip": "^4.2.11"
143
142
  },