@manuscripts/style-guide 0.31.22 → 0.31.24

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.
Files changed (40) hide show
  1. package/dist/cjs/components/Badge.js +29 -0
  2. package/dist/cjs/components/Dropdown.js +1 -1
  3. package/dist/cjs/components/EditorHeader/EditorHeader.js +202 -0
  4. package/dist/cjs/components/EditorHeader/ProceedView.js +172 -0
  5. package/dist/cjs/components/LoadingOverlay.js +35 -0
  6. package/dist/cjs/components/NavDropdown.js +162 -0
  7. package/dist/cjs/components/SaveStatus.js +2 -0
  8. package/dist/cjs/components/icons/annotator-icon.js +11 -0
  9. package/dist/cjs/components/icons/edit-icon.js +9 -0
  10. package/dist/cjs/components/icons/index.js +9 -1
  11. package/dist/cjs/components/icons/left-arrow.js +9 -0
  12. package/dist/cjs/components/icons/reading-icon.js +13 -0
  13. package/dist/cjs/index.js +4 -0
  14. package/dist/es/components/Badge.js +23 -0
  15. package/dist/es/components/Dropdown.js +1 -1
  16. package/dist/es/components/EditorHeader/EditorHeader.js +176 -0
  17. package/dist/es/components/EditorHeader/ProceedView.js +146 -0
  18. package/dist/es/components/LoadingOverlay.js +28 -0
  19. package/dist/es/components/NavDropdown.js +136 -0
  20. package/dist/es/components/SaveStatus.js +2 -0
  21. package/dist/es/components/icons/annotator-icon.js +6 -0
  22. package/dist/es/components/icons/edit-icon.js +4 -0
  23. package/dist/es/components/icons/index.js +4 -0
  24. package/dist/es/components/icons/left-arrow.js +4 -0
  25. package/dist/es/components/icons/reading-icon.js +8 -0
  26. package/dist/es/index.js +4 -0
  27. package/dist/types/components/Badge.d.ts +16 -0
  28. package/dist/types/components/Dropdown.d.ts +1 -1
  29. package/dist/types/components/EditorHeader/EditorHeader.d.ts +56 -0
  30. package/dist/types/components/EditorHeader/ProceedView.d.ts +22 -0
  31. package/dist/types/components/LoadingOverlay.d.ts +2 -0
  32. package/dist/types/components/NavDropdown.d.ts +58 -0
  33. package/dist/types/components/SaveStatus.d.ts +1 -1
  34. package/dist/types/components/icons/annotator-icon.d.ts +3 -0
  35. package/dist/types/components/icons/edit-icon.d.ts +3 -0
  36. package/dist/types/components/icons/index.d.ts +4 -0
  37. package/dist/types/components/icons/left-arrow.d.ts +3 -0
  38. package/dist/types/components/icons/reading-icon.d.ts +3 -0
  39. package/dist/types/index.d.ts +4 -0
  40. package/package.json +3 -1
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * © 2019 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare const Badge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,6 +1,6 @@
1
1
  export declare const DropdownList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
2
  direction?: "left" | "right" | undefined;
3
- width: number;
3
+ width?: number | undefined;
4
4
  height?: number | undefined;
5
5
  top?: number | undefined;
6
6
  }, never>;
@@ -0,0 +1,56 @@
1
+ import { ApolloError } from '@apollo/client';
2
+ import React from 'react';
3
+ export declare type PartialSubmission = {
4
+ id: string;
5
+ currentStep: SubmissionStep;
6
+ nextStep?: SubmissionStep | null | undefined;
7
+ };
8
+ export declare type SubmissionStep = {
9
+ type: SubmissionStepType;
10
+ };
11
+ export declare type SubmissionStepTransition = {
12
+ status: {
13
+ id: string;
14
+ label: string;
15
+ };
16
+ type: SubmissionStepType;
17
+ };
18
+ export declare type SubmissionStepType = {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ transitions: Array<SubmissionStepTransition>;
23
+ duration: number;
24
+ role: {
25
+ label: string;
26
+ };
27
+ };
28
+ export declare const EditorHeader: React.FC<{
29
+ handleSnapshot?: () => Promise<void>;
30
+ submission: PartialSubmission;
31
+ hasPendingSuggestions?: boolean;
32
+ canCompleteTask: boolean;
33
+ exceptionDialog: React.FC<{
34
+ errorCode: string;
35
+ }>;
36
+ userRole: string;
37
+ submitProceed: {
38
+ complete: boolean;
39
+ error: string;
40
+ mutationError: ApolloError | undefined;
41
+ submit: (statusId: string, noteValue: string) => Promise<unknown>;
42
+ };
43
+ goBack?: () => void;
44
+ status?: 'saved' | 'saving' | 'offline' | 'failed';
45
+ isAnnotator: boolean;
46
+ message: React.FC;
47
+ disabelProceedNote?: boolean;
48
+ }>;
49
+ export declare const PrimaryButtonSmall: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
50
+ type: "button" | "reset" | "submit";
51
+ } & {
52
+ danger?: boolean | undefined;
53
+ disabled?: boolean | undefined;
54
+ mini?: boolean | undefined;
55
+ }, "type">;
56
+ export declare const MediumTextArea: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, import("../Form").ErrorProps, never>;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { SubmissionStepTransition, SubmissionStepType } from './EditorHeader';
3
+ export declare const ProceedView: React.FC<{
4
+ isAnnotator: boolean;
5
+ disable: boolean;
6
+ onTransitionClick: (event: unknown) => void;
7
+ onNoteChange?: (event: unknown) => void;
8
+ hasPendingSuggestions: boolean;
9
+ loading: boolean;
10
+ showComplete: boolean;
11
+ noteValue: string;
12
+ currentStepTransition: SubmissionStepTransition[];
13
+ error: string | undefined;
14
+ nextStepType: SubmissionStepType;
15
+ currentStepType: SubmissionStepType;
16
+ confirmationDialog: boolean;
17
+ onCancelClick: () => void;
18
+ continueDialogAction: () => Promise<void>;
19
+ message: React.FC<{
20
+ isCentered: boolean;
21
+ }>;
22
+ }>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const LoadingOverlay: React.FC;
@@ -0,0 +1,58 @@
1
+ /*!
2
+ * © 2020 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Title } from '@manuscripts/title-editor';
17
+ import React from 'react';
18
+ import { NavLink } from 'react-router-dom';
19
+ export declare const NavDropdownContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
20
+ export declare const NavDropdown: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
21
+ direction?: "left" | "right" | undefined;
22
+ minWidth?: number | undefined;
23
+ top?: number | undefined;
24
+ }, never>;
25
+ export declare const PlaceholderTitle: import("styled-components").StyledComponent<typeof Title, import("styled-components").DefaultTheme, {}, never>;
26
+ export declare const InvitedBy: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
27
+ export declare const NavDropdownLink: import("styled-components").StyledComponent<typeof NavLink, import("styled-components").DefaultTheme, {
28
+ disabled?: boolean | undefined;
29
+ }, never>;
30
+ export declare const NavDropdownElement: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
31
+ disabled?: boolean | undefined;
32
+ }, never>;
33
+ export declare const NavDropdownSeparator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
34
+ export declare const NavDropdownButtonText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
35
+ interface DropdownProps {
36
+ isOpen: boolean;
37
+ }
38
+ export declare const NavDropdownToggle: import("styled-components").StyledComponent<React.SFC<React.SVGAttributes<SVGElement>>, import("styled-components").DefaultTheme, {}, never>;
39
+ export declare const NotificationsBadge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, DropdownProps, never>;
40
+ export declare const NavDropdownButtonContainer: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
41
+ type: "button" | "reset" | "submit";
42
+ } & {
43
+ danger?: boolean | undefined;
44
+ disabled?: boolean | undefined;
45
+ mini?: boolean | undefined;
46
+ } & {
47
+ selected: boolean;
48
+ } & DropdownProps, "type" | "selected">;
49
+ interface DropdownButtonProps {
50
+ as?: React.FunctionComponent<any>;
51
+ disabled?: boolean;
52
+ isOpen: boolean;
53
+ notificationsCount?: number;
54
+ onClick?: React.MouseEventHandler;
55
+ removeChevron?: boolean;
56
+ }
57
+ export declare const NavDropdownButton: React.FunctionComponent<DropdownButtonProps>;
58
+ export {};
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import React from 'react';
17
17
  interface Props {
18
- status: 'saving' | 'saved' | 'offline';
18
+ status: 'saving' | 'saved' | 'offline' | 'failed';
19
19
  }
20
20
  export declare const SaveStatus: React.FC<Props>;
21
21
  export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AnnotatorIcon: React.FC<React.SVGAttributes<SVGElement>>;
3
+ export default AnnotatorIcon;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const EditIcon: React.FC<React.SVGAttributes<SVGElement>>;
3
+ export default EditIcon;
@@ -37,3 +37,7 @@ export { default as AttachIcon } from './attach';
37
37
  export { default as UploadIcon } from './upload';
38
38
  export { default as MissingImage } from './missing-image';
39
39
  export { default as UnsupportedFormatFileIcon } from './unsupported-format-file-icon';
40
+ export { default as EditIcon } from './edit-icon';
41
+ export { default as ReadingIcon } from './reading-icon';
42
+ export { default as AnnotatorIcon } from './annotator-icon';
43
+ export { default as LeftArrow } from './left-arrow';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const LeftArrow: React.FC;
3
+ export default LeftArrow;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const ReadingIcon: React.FC<React.SVGAttributes<SVGElement>>;
3
+ export default ReadingIcon;
@@ -45,6 +45,8 @@ export * from './components/Tip';
45
45
  export * from './components/icons';
46
46
  export * from './components/Inspector';
47
47
  export * from './components/InspectorSection';
48
+ export * from './components/Badge';
49
+ export * from './components/NavDropdown';
48
50
  export { default as PdfPreview } from './components/PdfPreview';
49
51
  export * from './components/SubmissionInspector';
50
52
  export * from './components/Dropdown';
@@ -56,3 +58,5 @@ export * from './lib/capabilities';
56
58
  export { default as errorsDecoder } from './lib/lw-errors-decoder';
57
59
  export * from './types';
58
60
  export { SelectDialogDesignation } from './components/FileManager/SelectDialogDesignation';
61
+ export * from './components/LoadingOverlay';
62
+ export * from './components/EditorHeader/EditorHeader';
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": "0.31.22",
4
+ "version": "0.31.24",
5
5
  "repository": "gitlab:atypon-opensource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -31,10 +31,12 @@
31
31
  "version": "yarn build"
32
32
  },
33
33
  "dependencies": {
34
+ "@apollo/client": "^3.6.9",
34
35
  "@formatjs/intl-relativetimeformat": "^4.5.9",
35
36
  "@formatjs/intl-utils": "^2.2.0",
36
37
  "@manuscripts/assets": "^0.6.1",
37
38
  "@manuscripts/eslint-config": "^0.4.2",
39
+ "@manuscripts/title-editor": "^0.5.2",
38
40
  "@reach/tabs": "^0.11.2",
39
41
  "@types/prosemirror-model": "~1.13.0",
40
42
  "@types/react-color": "^3.0.4",