@manuscripts/style-guide 1.7.11 → 1.8.0-LEAN-3423-5

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 (98) hide show
  1. package/dist/cjs/components/Button.js +12 -1
  2. package/dist/cjs/components/ContextMenu.js +52 -0
  3. package/dist/cjs/components/{FileManager/DragLayer.js → DragLayer.js} +26 -50
  4. package/dist/cjs/components/FileManager/FileManager.js +1 -1
  5. package/dist/cjs/components/Menus/Menus.js +54 -1
  6. package/dist/cjs/components/Menus/Submenu.js +13 -3
  7. package/dist/cjs/components/References/CitationEditor.js +1 -4
  8. package/dist/cjs/components/icons/index.js +3 -1
  9. package/dist/cjs/hooks/use-dropdown.js +1 -2
  10. package/dist/cjs/hooks/use-menus.js +3 -0
  11. package/dist/cjs/index.js +3 -6
  12. package/dist/cjs/lib/capabilities.js +1 -1
  13. package/dist/es/components/Button.js +11 -0
  14. package/dist/es/components/ContextMenu.js +45 -0
  15. package/dist/es/components/{FileManager/DragLayer.js → DragLayer.js} +26 -27
  16. package/dist/es/components/FileManager/FileManager.js +1 -1
  17. package/dist/es/components/Menus/Menus.js +53 -0
  18. package/dist/es/components/Menus/Submenu.js +13 -3
  19. package/dist/es/components/References/CitationEditor.js +1 -4
  20. package/dist/es/components/icons/index.js +1 -0
  21. package/dist/es/hooks/use-dropdown.js +1 -2
  22. package/dist/es/hooks/use-menus.js +3 -0
  23. package/dist/es/index.js +3 -6
  24. package/dist/es/lib/capabilities.js +1 -1
  25. package/dist/types/components/AlertMessage.d.ts +1 -1
  26. package/dist/types/components/Button.d.ts +10 -9
  27. package/dist/types/components/{AuthorName.d.ts → ContextMenu.d.ts} +9 -6
  28. package/dist/types/components/EditorHeader/EditorHeader.d.ts +1 -1
  29. package/dist/types/components/InspectorSection.d.ts +1 -1
  30. package/dist/types/components/Menus/Menus.d.ts +15 -0
  31. package/dist/types/components/NavDropdown.d.ts +1 -1
  32. package/dist/types/components/StyledModal.d.ts +1 -1
  33. package/dist/types/components/icons/index.d.ts +1 -0
  34. package/dist/types/hooks/use-dropdown.d.ts +1 -1
  35. package/dist/types/index.d.ts +3 -6
  36. package/dist/types/lib/capabilities.d.ts +1 -1
  37. package/dist/types/lib/menus.d.ts +5 -0
  38. package/package.json +4 -4
  39. package/dist/cjs/components/AffiliationsEditor/AffiliationsEditor.js +0 -62
  40. package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorItem.js +0 -176
  41. package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorProfile.js +0 -62
  42. package/dist/cjs/components/AffiliationsEditor/AffiliationsEditorView.js +0 -80
  43. package/dist/cjs/components/AffiliationsEditor/index.js +0 -25
  44. package/dist/cjs/components/AffiliationsEditor/styles.js +0 -56
  45. package/dist/cjs/components/AuthorForm/AuthorForm.js +0 -99
  46. package/dist/cjs/components/AuthorForm/AuthorFormComponents.js +0 -63
  47. package/dist/cjs/components/AuthorForm/ContributorRolesSelect.js +0 -100
  48. package/dist/cjs/components/AuthorForm/RemoveAuthorButton.js +0 -45
  49. package/dist/cjs/components/AuthorForm/index.js +0 -32
  50. package/dist/cjs/components/AuthorName.js +0 -52
  51. package/dist/cjs/components/AuthorsDND/AuthorItemComponents.js +0 -22
  52. package/dist/cjs/components/AuthorsDND/AuthorsDND.js +0 -68
  53. package/dist/cjs/components/AuthorsDND/DraggableAuthorItem.js +0 -197
  54. package/dist/cjs/components/AuthorsDND/index.js +0 -23
  55. package/dist/cjs/lib/authors.js +0 -110
  56. package/dist/cjs/lib/formatAddress.js +0 -31
  57. package/dist/cjs/lib/name.js +0 -26
  58. package/dist/cjs/types.js +0 -17
  59. package/dist/es/components/AffiliationsEditor/AffiliationsEditor.js +0 -34
  60. package/dist/es/components/AffiliationsEditor/AffiliationsEditorItem.js +0 -146
  61. package/dist/es/components/AffiliationsEditor/AffiliationsEditorProfile.js +0 -34
  62. package/dist/es/components/AffiliationsEditor/AffiliationsEditorView.js +0 -52
  63. package/dist/es/components/AffiliationsEditor/index.js +0 -17
  64. package/dist/es/components/AffiliationsEditor/styles.js +0 -49
  65. package/dist/es/components/AuthorForm/AuthorForm.js +0 -92
  66. package/dist/es/components/AuthorForm/AuthorFormComponents.js +0 -57
  67. package/dist/es/components/AuthorForm/ContributorRolesSelect.js +0 -70
  68. package/dist/es/components/AuthorForm/RemoveAuthorButton.js +0 -40
  69. package/dist/es/components/AuthorForm/index.js +0 -16
  70. package/dist/es/components/AuthorName.js +0 -23
  71. package/dist/es/components/AuthorsDND/AuthorItemComponents.js +0 -19
  72. package/dist/es/components/AuthorsDND/AuthorsDND.js +0 -40
  73. package/dist/es/components/AuthorsDND/DraggableAuthorItem.js +0 -192
  74. package/dist/es/components/AuthorsDND/index.js +0 -16
  75. package/dist/es/lib/authors.js +0 -98
  76. package/dist/es/lib/formatAddress.js +0 -29
  77. package/dist/es/lib/name.js +0 -22
  78. package/dist/es/types.js +0 -16
  79. package/dist/types/components/AffiliationsEditor/AffiliationsEditor.d.ts +0 -31
  80. package/dist/types/components/AffiliationsEditor/AffiliationsEditorItem.d.ts +0 -26
  81. package/dist/types/components/AffiliationsEditor/AffiliationsEditorProfile.d.ts +0 -30
  82. package/dist/types/components/AffiliationsEditor/AffiliationsEditorView.d.ts +0 -34
  83. package/dist/types/components/AffiliationsEditor/index.d.ts +0 -17
  84. package/dist/types/components/AffiliationsEditor/styles.d.ts +0 -23
  85. package/dist/types/components/AuthorForm/AuthorForm.d.ts +0 -29
  86. package/dist/types/components/AuthorForm/AuthorFormComponents.d.ts +0 -31
  87. package/dist/types/components/AuthorForm/ContributorRolesSelect.d.ts +0 -23
  88. package/dist/types/components/AuthorForm/RemoveAuthorButton.d.ts +0 -27
  89. package/dist/types/components/AuthorForm/index.d.ts +0 -16
  90. package/dist/types/components/AuthorsDND/AuthorItemComponents.d.ts +0 -24
  91. package/dist/types/components/AuthorsDND/AuthorsDND.d.ts +0 -28
  92. package/dist/types/components/AuthorsDND/DraggableAuthorItem.d.ts +0 -50
  93. package/dist/types/components/AuthorsDND/index.d.ts +0 -16
  94. package/dist/types/lib/authors.d.ts +0 -30
  95. package/dist/types/lib/formatAddress.d.ts +0 -18
  96. package/dist/types/lib/name.d.ts +0 -17
  97. package/dist/types/types.d.ts +0 -80
  98. /package/dist/types/components/{FileManager/DragLayer.d.ts → DragLayer.d.ts} +0 -0
@@ -17,6 +17,7 @@ import TriangleCollapsed from '@manuscripts/assets/react/TriangleCollapsed';
17
17
  import React from 'react';
18
18
  import styled from 'styled-components';
19
19
  import { isMenuSeparator } from '../../lib/menus';
20
+ import { Block, BlockItem, bulletListContextMenu, Label, ListContainer, orderedListContextMenu, StyleBlock, } from './Menus';
20
21
  import { Shortcut } from './Shortcut';
21
22
  export const Text = styled.div `
22
23
  flex: 1 0 auto;
@@ -31,8 +32,6 @@ export const SubmenusContainer = styled.div `
31
32
  box-shadow: 0 4px 9px 0 rgba(84, 83, 83, 0.3);
32
33
  color: #353535;
33
34
  min-width: 150px;
34
- max-height: 70vh;
35
- overflow-y: auto;
36
35
  padding: 4px 0;
37
36
  white-space: nowrap;
38
37
  width: auto;
@@ -90,7 +89,7 @@ export const Submenu = ({ menu, handleClick }) => {
90
89
  if (isMenuSeparator(menu)) {
91
90
  return React.createElement(Separator, null);
92
91
  }
93
- if (!menu.submenu) {
92
+ if (!menu.submenu && !menu.options) {
94
93
  return (React.createElement(Container, { isOpen: menu.isOpen, className: menu.isEnabled ? '' : 'disabled', onMouseDown: (e) => {
95
94
  e.preventDefault();
96
95
  handleClick([]);
@@ -99,6 +98,17 @@ export const Submenu = ({ menu, handleClick }) => {
99
98
  React.createElement(Text, null, menu.label),
100
99
  menu.shortcut && React.createElement(Shortcut, { shortcut: menu.shortcut })));
101
100
  }
101
+ if (menu.options) {
102
+ const styles = menu.id === 'bullet-list-context-menu'
103
+ ? bulletListContextMenu
104
+ : orderedListContextMenu;
105
+ return (React.createElement(ListContainer, null, styles.map((style, index) => (React.createElement(StyleBlock, { key: index, onClick: () => {
106
+ menu.options && menu.options[style.type]();
107
+ handleClick([-1, -1]);
108
+ } }, style.items.map((style, index) => (React.createElement(BlockItem, { key: index },
109
+ React.createElement(Label, { hide: style === '-' }, style),
110
+ React.createElement(Block, null)))))))));
111
+ }
102
112
  return (React.createElement(SubmenuContainer, null,
103
113
  React.createElement(Container, { onMouseDown: (e) => {
104
114
  e.preventDefault();
@@ -5,7 +5,6 @@ import React, { useMemo, useState } from 'react';
5
5
  import styled from 'styled-components';
6
6
  import { ButtonGroup, IconButton, IconTextButton, PrimaryButton, SecondaryButton, } from '../Button';
7
7
  import { Category, Dialog } from '../Dialog';
8
- import { AddComment } from '../icons';
9
8
  import { CitedItem, CitedItems } from './CitationViewer';
10
9
  import { ReferenceLine } from './ReferenceLine';
11
10
  import { ReferenceSearch } from './ReferenceSearch';
@@ -107,9 +106,7 @@ export const CitationEditor = ({ query, rids, items, citationCounts, sources, on
107
106
  React.createElement(CloseIconDark, { className: 'remove-icon' }))))))),
108
107
  React.createElement(ReferencesModal, { isOpen: editingForm.show, onCancel: () => setEditingForm({ show: false }), items: items, citationCounts: citationCounts, item: editingForm.item, onSave: onSave, onDelete: onDelete }),
109
108
  React.createElement(Actions, null,
110
- React.createElement(IconTextButton, { onClick: onComment },
111
- React.createElement(AddComment, null),
112
- React.createElement(AddCommentButtonText, null, "Add Comment")),
109
+ React.createElement(IconTextButton, null),
113
110
  React.createElement(ButtonGroup, null,
114
111
  React.createElement(SecondaryButton, { onClick: onCancel }, "Done"),
115
112
  React.createElement(PrimaryButton, { disabled: !canEdit, onClick: () => setSearching(true) }, "Add Citation")))));
@@ -45,3 +45,4 @@ export { default as LeftArrow } from './left-arrow';
45
45
  export { default as BlockQuoteIcon } from './block-quote-icon';
46
46
  export { default as PullQuoteIcon } from './pull-quote-icon';
47
47
  export { default as PlusIcon } from './plus-icon';
48
+ export { DeleteIcon } from './delete-icon';
@@ -16,8 +16,7 @@
16
16
  import { useCallback, useEffect, useRef, useState } from 'react';
17
17
  export const useDropdown = () => {
18
18
  const [isOpen, setOpen] = useState(false);
19
- const toggleOpen = useCallback((e) => {
20
- e === null || e === void 0 ? void 0 : e.stopPropagation();
19
+ const toggleOpen = useCallback(() => {
21
20
  setOpen((open) => !open);
22
21
  }, []);
23
22
  const wrapperRef = useRef(null);
@@ -64,6 +64,9 @@ export const useMenus = (menus) => {
64
64
  const index = indices[depth];
65
65
  setPointer(transformPointer(depth, index));
66
66
  }
67
+ if (menu.options) {
68
+ setPointer([-1, -1, -1]);
69
+ }
67
70
  }, [state]);
68
71
  const ref = useRef(null);
69
72
  useEffect(() => {
package/dist/es/index.js CHANGED
@@ -13,12 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export * from './components/AffiliationsEditor';
17
- export * from './components/AuthorForm';
18
- export * from './components/AuthorName';
19
- export * from './components/AuthorsDND';
20
16
  export * from './components/AlertMessage';
21
17
  export * from './components/Button';
18
+ export * from './components/ContextMenu';
22
19
  export * from './components/RadioButton';
23
20
  export * from './components/AutoSaveInput';
24
21
  export * from './components/Avatar';
@@ -31,6 +28,8 @@ export * from './components/Resizer';
31
28
  export * from './components/SaveStatus';
32
29
  export * from './components/StyledModal';
33
30
  export * from './components/TableFootnotesSelector';
31
+ export * from './components/Sidebar';
32
+ export * from './components/DragLayer';
34
33
  export * from './components/TextField';
35
34
  export * from './components/TextFieldContainer';
36
35
  export * from './components/TextFieldError';
@@ -55,10 +54,8 @@ export * from './hooks/use-dropdown';
55
54
  export * from './hooks/use-files';
56
55
  export * from './hooks/use-menus';
57
56
  export { useDeepCompareMemo, useDeepCompareCallback, } from './hooks/use-deep-compare';
58
- export * from './lib/authors';
59
57
  export * from './lib/capabilities';
60
58
  export * from './lib/files';
61
59
  export * from './lib/comments';
62
60
  export * from './lib/menus';
63
61
  export { default as errorsDecoder } from './lib/errors-decoder';
64
- export * from './types';
@@ -17,6 +17,7 @@ export const getCapabilities = (project, profile, role, actions) => {
17
17
  const allowed = (action) => !!(actions === null || actions === void 0 ? void 0 : actions.includes(action));
18
18
  return {
19
19
  handleSuggestion: isOwner() || isEditor() || isWriter(),
20
+ editWithoutTracking: isWriter(),
20
21
  rejectOwnSuggestion: !isViewer(),
21
22
  createSuggestion: !isViewer(),
22
23
  viewSuggestion: true,
@@ -46,7 +47,6 @@ export const getCapabilities = (project, profile, role, actions) => {
46
47
  putOnHoldTask: isProdEditor(),
47
48
  changeDueDate: isProdEditor() && allowed(Actions.updateDueDate),
48
49
  previewAccess: true,
49
- editNotTracked: false,
50
50
  accessEditor: true,
51
51
  formatArticle: !isViewer(),
52
52
  editArticle: !isViewer(),
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import React from 'react';
17
17
  export declare const TextButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
18
- type: "button" | "reset" | "submit";
18
+ type: "button" | "submit" | "reset";
19
19
  } & {
20
20
  danger?: boolean | undefined;
21
21
  disabled?: boolean | undefined;
@@ -14,35 +14,35 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export declare const SecondaryButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
17
- type: "button" | "reset" | "submit";
17
+ type: "button" | "submit" | "reset";
18
18
  } & {
19
19
  danger?: boolean | undefined;
20
20
  disabled?: boolean | undefined;
21
21
  mini?: boolean | undefined;
22
22
  }, "type">;
23
23
  export declare const PrimaryButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
24
- type: "button" | "reset" | "submit";
24
+ type: "button" | "submit" | "reset";
25
25
  } & {
26
26
  danger?: boolean | undefined;
27
27
  disabled?: boolean | undefined;
28
28
  mini?: boolean | undefined;
29
29
  }, "type">;
30
30
  export declare const TertiaryButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
31
- type: "button" | "reset" | "submit";
31
+ type: "button" | "submit" | "reset";
32
32
  } & {
33
33
  danger?: boolean | undefined;
34
34
  disabled?: boolean | undefined;
35
35
  mini?: boolean | undefined;
36
36
  }, "type">;
37
37
  export declare const IconTextButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
38
- type: "button" | "reset" | "submit";
38
+ type: "button" | "submit" | "reset";
39
39
  } & {
40
40
  danger?: boolean | undefined;
41
41
  disabled?: boolean | undefined;
42
42
  mini?: boolean | undefined;
43
43
  }, "type">;
44
44
  export declare const ToggleButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
45
- type: "button" | "reset" | "submit";
45
+ type: "button" | "submit" | "reset";
46
46
  } & {
47
47
  danger?: boolean | undefined;
48
48
  disabled?: boolean | undefined;
@@ -51,7 +51,7 @@ export declare const ToggleButton: import("styled-components").StyledComponent<"
51
51
  selected?: boolean | undefined;
52
52
  }, "type">;
53
53
  export declare const ToggleButtonAlt: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
54
- type: "button" | "reset" | "submit";
54
+ type: "button" | "submit" | "reset";
55
55
  } & {
56
56
  danger?: boolean | undefined;
57
57
  disabled?: boolean | undefined;
@@ -60,7 +60,7 @@ export declare const ToggleButtonAlt: import("styled-components").StyledComponen
60
60
  selected?: boolean | undefined;
61
61
  }, "type">;
62
62
  export declare const IconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
63
- type: "button" | "reset" | "submit";
63
+ type: "button" | "submit" | "reset";
64
64
  } & {
65
65
  danger?: boolean | undefined;
66
66
  disabled?: boolean | undefined;
@@ -71,7 +71,7 @@ export declare const IconButton: import("styled-components").StyledComponent<"bu
71
71
  iconColor?: string | undefined;
72
72
  }, "type">;
73
73
  export declare const RoundIconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
74
- type: "button" | "reset" | "submit";
74
+ type: "button" | "submit" | "reset";
75
75
  } & {
76
76
  danger?: boolean | undefined;
77
77
  disabled?: boolean | undefined;
@@ -84,7 +84,7 @@ export declare const RoundIconButton: import("styled-components").StyledComponen
84
84
  defaultColor: boolean;
85
85
  }, "type" | "defaultColor">;
86
86
  export declare const SecondaryIconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
87
- type: "button" | "reset" | "submit";
87
+ type: "button" | "submit" | "reset";
88
88
  } & {
89
89
  danger?: boolean | undefined;
90
90
  disabled?: boolean | undefined;
@@ -95,3 +95,4 @@ export declare const SecondaryIconButton: import("styled-components").StyledComp
95
95
  iconColor?: string | undefined;
96
96
  }, "type">;
97
97
  export declare const ButtonGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
98
+ export declare const IconButtonGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * © 2019 Atypon Systems LLC
2
+ * © 2024 Atypon Systems LLC
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -13,10 +13,13 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { BibliographicName } from '@manuscripts/json-schema';
17
16
  import React from 'react';
18
- export interface AuthorNameProps {
19
- name: BibliographicName;
20
- email?: string;
17
+ export interface Actions {
18
+ label: string;
19
+ action: () => void;
20
+ icon: string;
21
21
  }
22
- export declare const AuthorName: React.FC<AuthorNameProps>;
22
+ export interface ContextMenuProps {
23
+ actions: Actions[];
24
+ }
25
+ export declare const ContextMenu: React.FC<ContextMenuProps>;
@@ -60,7 +60,7 @@ export declare const EditorHeader: React.FC<{
60
60
  disabelProceedNote?: boolean;
61
61
  }>;
62
62
  export declare const PrimaryButtonSmall: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
63
- type: "button" | "reset" | "submit";
63
+ type: "button" | "submit" | "reset";
64
64
  } & {
65
65
  danger?: boolean | undefined;
66
66
  disabled?: boolean | undefined;
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import React, { CSSProperties } from 'react';
17
17
  export declare const ExpanderButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
18
- type: "button" | "reset" | "submit";
18
+ type: "button" | "submit" | "reset";
19
19
  } & {
20
20
  danger?: boolean | undefined;
21
21
  disabled?: boolean | undefined;
@@ -21,4 +21,19 @@ interface MenusProps {
21
21
  handleClick: (position: number[]) => void;
22
22
  }
23
23
  export declare const Menus: React.FC<MenusProps>;
24
+ export declare const orderedListContextMenu: {
25
+ items: string[];
26
+ type: string;
27
+ }[];
28
+ export declare const bulletListContextMenu: {
29
+ items: string[];
30
+ type: string;
31
+ }[];
32
+ export declare const ListContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
33
+ export declare const StyleBlock: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
34
+ export declare const BlockItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
35
+ export declare const Block: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
36
+ export declare const Label: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
37
+ hide?: boolean | undefined;
38
+ }, never>;
24
39
  export {};
@@ -36,7 +36,7 @@ interface DropdownProps {
36
36
  export declare const NavDropdownToggle: import("styled-components").StyledComponent<React.SFC<React.SVGAttributes<SVGElement>>, import("styled-components").DefaultTheme, {}, never>;
37
37
  export declare const NotificationsBadge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, DropdownProps, never>;
38
38
  export declare const NavDropdownButtonContainer: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
39
- type: "button" | "reset" | "submit";
39
+ type: "button" | "submit" | "reset";
40
40
  } & {
41
41
  danger?: boolean | undefined;
42
42
  disabled?: boolean | undefined;
@@ -22,7 +22,7 @@ interface Props {
22
22
  export declare const ModalContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
23
23
  export declare const ModalHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
24
24
  export declare const CloseButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
25
- type: "button" | "reset" | "submit";
25
+ type: "button" | "submit" | "reset";
26
26
  } & {
27
27
  danger?: boolean | undefined;
28
28
  disabled?: boolean | undefined;
@@ -45,3 +45,4 @@ export { default as LeftArrow } from './left-arrow';
45
45
  export { default as BlockQuoteIcon } from './block-quote-icon';
46
46
  export { default as PullQuoteIcon } from './pull-quote-icon';
47
47
  export { default as PlusIcon } from './plus-icon';
48
+ export { DeleteIcon } from './delete-icon';
@@ -16,6 +16,6 @@
16
16
  /// <reference types="react" />
17
17
  export declare const useDropdown: () => {
18
18
  isOpen: boolean;
19
- toggleOpen: (e: any) => void;
19
+ toggleOpen: () => void;
20
20
  wrapperRef: import("react").RefObject<HTMLDivElement>;
21
21
  };
@@ -14,12 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export { Theme } from './theme';
17
- export * from './components/AffiliationsEditor';
18
- export * from './components/AuthorForm';
19
- export * from './components/AuthorName';
20
- export * from './components/AuthorsDND';
21
17
  export * from './components/AlertMessage';
22
18
  export * from './components/Button';
19
+ export * from './components/ContextMenu';
23
20
  export * from './components/RadioButton';
24
21
  export * from './components/AutoSaveInput';
25
22
  export * from './components/Avatar';
@@ -32,6 +29,8 @@ export * from './components/Resizer';
32
29
  export * from './components/SaveStatus';
33
30
  export * from './components/StyledModal';
34
31
  export * from './components/TableFootnotesSelector';
32
+ export * from './components/Sidebar';
33
+ export * from './components/DragLayer';
35
34
  export * from './components/TextField';
36
35
  export * from './components/TextFieldContainer';
37
36
  export * from './components/TextFieldError';
@@ -56,10 +55,8 @@ export * from './hooks/use-dropdown';
56
55
  export * from './hooks/use-files';
57
56
  export * from './hooks/use-menus';
58
57
  export { useDeepCompareMemo, useDeepCompareCallback, } from './hooks/use-deep-compare';
59
- export * from './lib/authors';
60
58
  export * from './lib/capabilities';
61
59
  export * from './lib/files';
62
60
  export * from './lib/comments';
63
61
  export * from './lib/menus';
64
62
  export { default as errorsDecoder } from './lib/errors-decoder';
65
- export * from './types';
@@ -30,7 +30,7 @@ export type Capabilities = {
30
30
  putOnHoldTask: boolean;
31
31
  changeDueDate: boolean;
32
32
  previewAccess: boolean;
33
- editNotTracked: boolean;
33
+ editWithoutTracking: boolean;
34
34
  accessEditor: boolean;
35
35
  formatArticle: boolean;
36
36
  editArticle: boolean;
@@ -13,6 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { ManuscriptTransaction } from '@manuscripts/transform';
17
+ export type Dispatch = (tr: ManuscriptTransaction) => void;
16
18
  export interface MenuShortcut {
17
19
  mac: string;
18
20
  pc: string;
@@ -26,6 +28,9 @@ export interface MenuSpec {
26
28
  isEnabled: boolean;
27
29
  run?: () => void;
28
30
  submenu?: (MenuSpec | MenuSeparator)[];
31
+ options?: {
32
+ [key: string]: () => void;
33
+ };
29
34
  }
30
35
  export interface Menu extends MenuSpec {
31
36
  isOpen: boolean;
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.7.11",
4
+ "version": "1.8.0-LEAN-3423-5",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@manuscripts/assets": "^0.6.4",
36
- "@manuscripts/json-schema": "^2.2.6",
37
- "@manuscripts/transform": "^2.1.6",
36
+ "@manuscripts/json-schema": "2.2.6-LEAN-3423-0",
37
+ "@manuscripts/transform": "2.1.8-LEAN-3423-2",
38
38
  "@reach/tabs": "^0.18.0",
39
39
  "date-fns": "^2.29.3",
40
40
  "formik": "^2.2.9",
@@ -103,4 +103,4 @@
103
103
  "@types/react": "^17.0.2",
104
104
  "jackspeak": "2.1.1"
105
105
  }
106
- }
106
+ }
@@ -1,62 +0,0 @@
1
- "use strict";
2
- /*!
3
- * © 2019 Atypon Systems LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
- Object.defineProperty(o, "default", { enumerable: true, value: v });
30
- }) : function(o, v) {
31
- o["default"] = v;
32
- });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- var __importDefault = (this && this.__importDefault) || function (mod) {
41
- return (mod && mod.__esModule) ? mod : { "default": mod };
42
- };
43
- Object.defineProperty(exports, "__esModule", { value: true });
44
- const react_1 = __importStar(require("react"));
45
- const authors_1 = require("../../lib/authors");
46
- const AffiliationsEditorView_1 = __importDefault(require("./AffiliationsEditorView"));
47
- const AffiliationsEditor = ({ affiliations, authorAffiliations, addAuthorAffiliation, updateAffiliation, removeAuthorAffiliation, components, styleOverrides, }) => {
48
- const [searchText, setSearchText] = (0, react_1.useState)('');
49
- const handleChoose = (0, react_1.useCallback)((value) => {
50
- if (value) {
51
- const selectedAffiliation = value;
52
- addAuthorAffiliation(selectedAffiliation.value);
53
- }
54
- setSearchText('');
55
- }, [addAuthorAffiliation]);
56
- const options = (0, authors_1.affiliationsOptions)(affiliations, authorAffiliations);
57
- const active = authorAffiliations
58
- ? authorAffiliations.map((item) => item.data)
59
- : [];
60
- return (react_1.default.createElement(AffiliationsEditorView_1.default, { options: options, selected: active, updateAffiliation: updateAffiliation, removeAuthorAffiliation: removeAuthorAffiliation, components: components, styleOverrides: styleOverrides, handleChoose: handleChoose, handleInputChange: setSearchText, inputValue: searchText }));
61
- };
62
- exports.default = AffiliationsEditor;