@manuscripts/style-guide 1.7.1 → 1.7.2

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 (80) hide show
  1. package/dist/cjs/components/Comments/CommentBody.js +3 -3
  2. package/dist/cjs/components/Comments/CommentUser.js +1 -1
  3. package/dist/cjs/components/Comments/ResolveButton.js +3 -3
  4. package/dist/cjs/components/FileManager/FileCreatedDate.js +3 -3
  5. package/dist/cjs/components/FileManager/FileManager.js +7 -7
  6. package/dist/cjs/components/FileManager/OtherFilesSection.js +2 -2
  7. package/dist/cjs/components/FileManager/SupplementsSection.js +1 -2
  8. package/dist/cjs/components/References/CitationEditor.js +2 -2
  9. package/dist/cjs/components/References/ReferenceForm.js +8 -9
  10. package/dist/cjs/components/References/ReferenceSearch.js +2 -2
  11. package/dist/cjs/components/References/ReferencesModal.js +5 -5
  12. package/dist/cjs/components/RelativeDate.js +23 -6
  13. package/dist/cjs/components/{FileManager/Tooltip.js → Tooltip.js} +12 -7
  14. package/dist/cjs/index.js +1 -2
  15. package/dist/cjs/lib/files.js +4 -5
  16. package/dist/es/components/Comments/CommentBody.js +3 -3
  17. package/dist/es/components/Comments/CommentUser.js +1 -1
  18. package/dist/es/components/Comments/ResolveButton.js +3 -3
  19. package/dist/es/components/FileManager/FileCreatedDate.js +3 -3
  20. package/dist/es/components/FileManager/FileManager.js +7 -7
  21. package/dist/es/components/FileManager/OtherFilesSection.js +2 -2
  22. package/dist/es/components/FileManager/SupplementsSection.js +2 -3
  23. package/dist/es/components/References/CitationEditor.js +1 -1
  24. package/dist/es/components/References/ReferenceForm.js +6 -7
  25. package/dist/es/components/References/ReferenceSearch.js +1 -1
  26. package/dist/es/components/References/ReferencesModal.js +5 -5
  27. package/dist/es/components/RelativeDate.js +23 -6
  28. package/dist/es/components/Tooltip.js +25 -0
  29. package/dist/es/index.js +1 -2
  30. package/dist/es/lib/files.js +1 -2
  31. package/dist/types/components/AlertMessage.d.ts +1 -1
  32. package/dist/types/components/AuthorForm/RemoveAuthorButton.d.ts +1 -1
  33. package/dist/types/components/AutoSaveInput.d.ts +1 -1
  34. package/dist/types/components/Comments/CommentUser.d.ts +2 -3
  35. package/dist/types/components/Dialog.d.ts +1 -1
  36. package/dist/types/components/Dropdown.d.ts +1 -1
  37. package/dist/types/components/EditorHeader/EditorHeader.d.ts +1 -2
  38. package/dist/types/components/FileManager/FileActions.d.ts +1 -1
  39. package/dist/types/components/FileManager/FileManager.d.ts +1 -2
  40. package/dist/types/components/FileManager/util.d.ts +1 -0
  41. package/dist/types/components/Form.d.ts +1 -1
  42. package/dist/types/components/Inspector.d.ts +7 -9
  43. package/dist/types/components/NavDropdown.d.ts +1 -1
  44. package/dist/types/components/References/ReferenceForm.d.ts +1 -1
  45. package/dist/types/components/RelativeDate.d.ts +15 -1
  46. package/dist/types/components/Resizer/Resizer.d.ts +1 -1
  47. package/dist/types/components/Resizer/ResizerButton.d.ts +1 -1
  48. package/dist/types/components/Tooltip.d.ts +5 -0
  49. package/dist/types/components/icons/add-author.d.ts +2 -1
  50. package/dist/types/components/icons/add-comment-icon.d.ts +2 -1
  51. package/dist/types/components/icons/add-icon-active.d.ts +2 -1
  52. package/dist/types/components/icons/add-icon-inverted.d.ts +2 -1
  53. package/dist/types/components/icons/back-arrow.d.ts +2 -1
  54. package/dist/types/components/icons/bookmark.d.ts +2 -1
  55. package/dist/types/components/icons/google.d.ts +2 -1
  56. package/dist/types/components/icons/orcid.d.ts +2 -1
  57. package/dist/types/components/icons/project-notification.d.ts +2 -1
  58. package/dist/types/components/icons/project.d.ts +2 -1
  59. package/dist/types/components/icons/projects-list.d.ts +2 -1
  60. package/dist/types/components/icons/search.d.ts +2 -1
  61. package/dist/types/components/icons/tick-mark.d.ts +2 -1
  62. package/dist/types/components/icons/user.d.ts +2 -1
  63. package/dist/types/index.d.ts +1 -2
  64. package/dist/types/lib/capabilities.d.ts +3 -4
  65. package/package.json +30 -41
  66. package/dist/cjs/components/ColorField/ColorField.js +0 -49
  67. package/dist/cjs/components/ColorField/ColorSelector.js +0 -115
  68. package/dist/cjs/components/ColorField/index.js +0 -32
  69. package/dist/cjs/components/Tip.js +0 -83
  70. package/dist/es/components/ColorField/ColorField.js +0 -42
  71. package/dist/es/components/ColorField/ColorSelector.js +0 -85
  72. package/dist/es/components/ColorField/index.js +0 -16
  73. package/dist/es/components/FileManager/Tooltip.js +0 -20
  74. package/dist/es/components/Tip.js +0 -53
  75. package/dist/types/components/ColorField/ColorField.d.ts +0 -27
  76. package/dist/types/components/ColorField/ColorSelector.d.ts +0 -19
  77. package/dist/types/components/ColorField/index.d.ts +0 -16
  78. package/dist/types/components/FileManager/Tooltip.d.ts +0 -2
  79. package/dist/types/components/Tip.d.ts +0 -18
  80. package/styles/tip.css +0 -82
@@ -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 { debounce } from 'lodash-es';
16
+ import { debounce } from 'lodash';
17
17
  import React, { useState } from 'react';
18
18
  import styled from 'styled-components';
19
19
  import { ButtonGroup, IconTextButton, PrimaryButton, SecondaryButton, } from '../Button';
@@ -1,12 +1,12 @@
1
1
  import ReferenceLibraryIcon from '@manuscripts/assets/react/ReferenceLibraryIcon';
2
2
  import { isEqual } from 'lodash';
3
3
  import React, { useEffect, useRef, useState } from 'react';
4
- import ReactTooltip from 'react-tooltip';
5
4
  import styled from 'styled-components';
6
5
  import { useScrollDetection } from '../../hooks/use-scroll-detection';
7
6
  import { Category, Dialog } from '../Dialog';
8
7
  import { SidebarContent } from '../Sidebar';
9
8
  import { CloseButton, ModalBody, ModalContainer, ModalHeader, ModalSidebar, ModalSidebarHeader, ModalSidebarTitle, ScrollableModalContent, StyledModal, } from '../StyledModal';
9
+ import { Tooltip } from '../Tooltip';
10
10
  import { ReferenceForm, } from './ReferenceForm';
11
11
  import { ReferenceLine } from './ReferenceLine';
12
12
  const ReferencesModalContainer = styled(ModalContainer) `
@@ -179,10 +179,10 @@ export const ReferencesModal = ({ isOpen, onCancel, items, item, citationCounts,
179
179
  React.createElement(ModalSidebarTitle, null, "References")),
180
180
  React.createElement(ReferencesSidebarContent, { ref: ref },
181
181
  React.createElement(ReferencesInnerWrapper, null, items.slice(startIndex, endIndex + 1).map((item) => (React.createElement(ReferenceButton, { key: item._id, id: item._id, className: isSelected(item) ? 'selected' : '', onClick: () => handleItemClick(item), ref: isSelected(item) ? selectionRef : null },
182
- React.createElement(IconContainer, { "data-tip": true, "data-for": 'citation-count' },
182
+ React.createElement(IconContainer, null,
183
183
  React.createElement(ReferenceLibraryIcon, null),
184
- React.createElement(CitationCount, { className: citationCounts.get(item._id) ? '' : 'unused' }, citationCounts.get(item._id) || 0),
185
- React.createElement(ReactTooltip, { disable: (citationCounts.get(item._id) || 0) < 1, id: "citation-count", place: "bottom", effect: "solid", offset: { top: 40 }, className: "tooltip" }, "Number of times used in the document")),
186
- React.createElement(ReferenceLine, { item: item }))))))),
184
+ (citationCounts.get(item._id) || 0) > 0 ? (React.createElement(CitationCount, { "data-tooltip-id": "citation-count-tooltip" }, citationCounts.get(item._id))) : (React.createElement(CitationCount, { className: "unused" }, "0"))),
185
+ React.createElement(ReferenceLine, { item: item }))))),
186
+ React.createElement(Tooltip, { id: "citation-count-tooltip", place: "bottom" }, "Number of times used in the document"))),
187
187
  React.createElement(ScrollableModalContent, null, selection && (React.createElement(ReferenceForm, { values: normalize(selection), showDelete: !citationCounts.get(selection._id), onChange: handleChange, onCancel: onCancel, onDelete: () => onDelete(selection), onSave: save, actionsRef: actionsRef })))))));
188
188
  };
@@ -1,12 +1,29 @@
1
- import '@formatjs/intl-relativetimeformat/polyfill-locales';
2
- import { selectUnit } from '@formatjs/intl-utils';
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
+ */
3
16
  import React from 'react';
4
- import { FormattedRelativeTime, IntlProvider } from 'react-intl';
5
17
  export const RelativeDate = ({ createdAt }) => {
6
18
  if (!createdAt) {
7
19
  return null;
8
20
  }
9
- const { value, unit } = selectUnit(createdAt);
10
- return (React.createElement(IntlProvider, { locale: "en" },
11
- React.createElement(FormattedRelativeTime, { value: value, unit: unit })));
21
+ const formatter = new Intl.RelativeTimeFormat('en', { style: 'short' });
22
+ let value = Math.floor((createdAt - Date.now()) / 3600000);
23
+ let unit = 'hour';
24
+ if (Math.abs(value) > 24) {
25
+ value = Math.floor(value / 24);
26
+ unit = 'day';
27
+ }
28
+ return React.createElement("span", null, formatter.format(value, unit));
12
29
  };
@@ -0,0 +1,25 @@
1
+ import { Tooltip as ReactTooltip } from 'react-tooltip';
2
+ import styled from 'styled-components';
3
+ export const Tooltip = styled(ReactTooltip).attrs({
4
+ positionStrategy: 'fixed',
5
+ offset: 10,
6
+ }) `
7
+ &.react-tooltip {
8
+ z-index: 1000;
9
+ font-size: 12px;
10
+ line-height: 16px;
11
+ letter-spacing: -0.2px;
12
+ max-width: 300px;
13
+ font-family: inherit;
14
+ padding: 8px;
15
+ border-radius: 3px;
16
+ background: #353535;
17
+ color: ${(props) => props.theme.colors.text.onDark};
18
+ text-align: center;
19
+ white-space: nowrap;
20
+
21
+ .react-tooltip-arrow {
22
+ background: #353535;
23
+ }
24
+ }
25
+ `;
package/dist/es/index.js CHANGED
@@ -22,7 +22,6 @@ export * from './components/AuthorsDND';
22
22
  export * from './components/AuthorsContainer';
23
23
  export * from './components/AlertMessage';
24
24
  export * from './components/Button';
25
- export * from './components/ColorField';
26
25
  export * from './components/RadioButton';
27
26
  export * from './components/AutoSaveInput';
28
27
  export * from './components/Avatar';
@@ -38,7 +37,7 @@ export * from './components/TextField';
38
37
  export * from './components/TextFieldContainer';
39
38
  export * from './components/TextFieldError';
40
39
  export * from './components/TextFieldGroupContainer';
41
- export * from './components/Tip';
40
+ export * from './components/Tooltip';
42
41
  export * from './components/icons';
43
42
  export * from './components/Inspector';
44
43
  export * from './components/InspectorSection';
@@ -1,5 +1,4 @@
1
- import { ObjectTypes, } from '@manuscripts/json-schema';
2
- import { getModelsByType } from '@manuscripts/transform';
1
+ import { getModelsByType, ObjectTypes, } from '@manuscripts/json-schema';
3
2
  import { FileType } from '../components/FileManager/util';
4
3
  export const isModelFile = (file) => {
5
4
  return file.modelId;
@@ -41,7 +41,7 @@ interface Props {
41
41
  }
42
42
  export declare class AlertMessage extends React.Component<Props, State> {
43
43
  state: State;
44
- render(): false | JSX.Element;
44
+ render(): false | React.JSX.Element;
45
45
  private handleClose;
46
46
  }
47
47
  export {};
@@ -22,6 +22,6 @@ interface Props {
22
22
  handleOpen: () => void;
23
23
  }
24
24
  declare class RemoveAuthorButton extends React.Component<Props> {
25
- render(): JSX.Element;
25
+ render(): React.JSX.Element;
26
26
  }
27
27
  export default RemoveAuthorButton;
@@ -33,7 +33,7 @@ export declare class AutoSaveInput extends React.Component<FieldProps & AutoSave
33
33
  focused: boolean;
34
34
  };
35
35
  componentWillUnmount(): void;
36
- render(): JSX.Element;
36
+ render(): React.JSX.Element;
37
37
  private handleSubmit;
38
38
  private handleFocus;
39
39
  private handleBlur;
@@ -13,12 +13,11 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Contribution } from '@manuscripts/json-schema';
17
- import { UserProfileWithAvatar } from '@manuscripts/transform';
16
+ import { Contribution, UserProfile } from '@manuscripts/json-schema';
18
17
  import React from 'react';
19
18
  export declare const CommentUser: React.FC<{
20
19
  contributions?: Contribution[];
21
- getCollaboratorById: (id: string) => UserProfileWithAvatar | undefined;
20
+ getCollaboratorById: (id: string) => UserProfile | undefined;
22
21
  displayName?: string;
23
22
  createdAt?: number;
24
23
  }>;
@@ -47,7 +47,7 @@ export declare enum Category {
47
47
  export declare class Dialog extends React.Component<DialogProps, DialogState> {
48
48
  state: DialogState;
49
49
  componentDidMount(): void;
50
- render(): JSX.Element;
50
+ render(): React.JSX.Element;
51
51
  private renderButtons;
52
52
  private checkInputValue;
53
53
  private setDisabledBtnState;
@@ -1,5 +1,5 @@
1
1
  export declare const DropdownList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
- direction?: "left" | "right" | undefined;
2
+ direction?: "right" | "left" | undefined;
3
3
  width?: number | undefined;
4
4
  height?: number | undefined;
5
5
  top?: number | undefined;
@@ -1,4 +1,3 @@
1
- import { ApolloError } from '@apollo/client';
2
1
  import React from 'react';
3
2
  export type PartialSubmission = {
4
3
  id: string;
@@ -36,7 +35,7 @@ export declare enum DialogState {
36
35
  export type ProceedDialogData = {
37
36
  state: DialogState;
38
37
  error?: string;
39
- mutationError?: ApolloError | undefined;
38
+ mutationError?: any;
40
39
  updateState: (state: DialogState) => void;
41
40
  clearError: () => void;
42
41
  };
@@ -11,7 +11,7 @@ export declare const FileActions: React.FC<{
11
11
  }>;
12
12
  export declare const ActionsIcon: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
13
13
  export declare const FileActionDropdownList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
14
- direction?: "left" | "right" | undefined;
14
+ direction?: "right" | "left" | undefined;
15
15
  width?: number | undefined;
16
16
  height?: number | undefined;
17
17
  top?: number | undefined;
@@ -1,5 +1,4 @@
1
- import { Model } from '@manuscripts/json-schema';
2
- import { Build } from '@manuscripts/transform';
1
+ import { Build, Model } from '@manuscripts/json-schema';
3
2
  import React from 'react';
4
3
  import { FileSectionType } from '../../index';
5
4
  import { Capabilities } from '../../lib/capabilities';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FileAttachment } from '../../lib/files';
2
3
  export declare enum FileSectionType {
3
4
  Inline = "Inline files",
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /// <reference types="react" />
17
- export declare const CenteredForm: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "name" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoComplete" | "method" | "target" | "acceptCharset" | "action" | "encType" | "noValidate"> & import("react").RefAttributes<HTMLFormElement>>, import("styled-components").DefaultTheme, {}, never>;
17
+ export declare const CenteredForm: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import("react").RefAttributes<HTMLFormElement>>, import("styled-components").DefaultTheme, {}, never>;
18
18
  export declare const FormHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
19
19
  export declare const FormActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
20
20
  export declare const FormError: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -15,13 +15,11 @@
15
15
  */
16
16
  import '@reach/tabs/styles.css';
17
17
  export declare const InspectorContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
18
- export declare const InspectorTabs: import("styled-components").StyledComponent<import("@reach/utils").ForwardRefExoticComponentWithAs<"div", import("@reach/tabs").TabsProps>, import("styled-components").DefaultTheme, {}, never>;
19
- export declare const InspectorTabList: import("styled-components").StyledComponent<import("@reach/utils").MemoExoticComponentWithAs<"div", import("@reach/tabs").TabListProps>, import("styled-components").DefaultTheme, {}, never>;
20
- export declare const InspectorPanelTabList: import("styled-components").StyledComponent<import("@reach/utils").MemoExoticComponentWithAs<"div", import("@reach/tabs").TabListProps>, import("styled-components").DefaultTheme, {}, never>;
21
- export declare const InspectorTabPanels: import("styled-components").StyledComponent<import("@reach/utils").MemoExoticComponentWithAs<"div", import("@reach/tabs").TabListProps>, import("styled-components").DefaultTheme, {}, never>;
22
- export declare const PaddedInspectorTabPanels: import("styled-components").StyledComponent<import("@reach/utils").MemoExoticComponentWithAs<"div", import("@reach/tabs").TabListProps>, import("styled-components").DefaultTheme, {}, never>;
23
- export declare const InspectorTabPanel: import("styled-components").StyledComponent<import("@reach/utils").ForwardRefExoticComponentWithAs<"div", import("@reach/tabs").TabPanelProps>, import("styled-components").DefaultTheme, {}, never>;
24
- export declare const InspectorTab: import("styled-components").StyledComponent<import("@reach/utils").ForwardRefExoticComponentWithAs<"button", import("@reach/tabs").TabProps & {
25
- isSelected?: boolean | undefined;
26
- }>, import("styled-components").DefaultTheme, {}, never>;
18
+ export declare const InspectorTabs: import("styled-components").StyledComponent<import("@reach/polymorphic").ForwardRefComponent<"div", import("@reach/tabs").TabsProps>, import("styled-components").DefaultTheme, {}, never>;
19
+ export declare const InspectorTabList: import("styled-components").StyledComponent<import("@reach/polymorphic").MemoComponent<"div", import("@reach/tabs").TabListProps>, import("styled-components").DefaultTheme, {}, never>;
20
+ export declare const InspectorPanelTabList: import("styled-components").StyledComponent<import("@reach/polymorphic").MemoComponent<"div", import("@reach/tabs").TabListProps>, import("styled-components").DefaultTheme, {}, never>;
21
+ export declare const InspectorTabPanels: import("styled-components").StyledComponent<import("@reach/polymorphic").MemoComponent<"div", import("@reach/tabs").TabPanelsProps>, import("styled-components").DefaultTheme, {}, never>;
22
+ export declare const PaddedInspectorTabPanels: import("styled-components").StyledComponent<import("@reach/polymorphic").MemoComponent<"div", import("@reach/tabs").TabPanelsProps>, import("styled-components").DefaultTheme, {}, never>;
23
+ export declare const InspectorTabPanel: import("styled-components").StyledComponent<import("@reach/polymorphic").ForwardRefComponent<"div", import("@reach/tabs").TabPanelProps>, import("styled-components").DefaultTheme, {}, never>;
24
+ export declare const InspectorTab: import("styled-components").StyledComponent<import("@reach/polymorphic").ForwardRefComponent<"button", import("@reach/tabs").TabProps>, import("styled-components").DefaultTheme, {}, never>;
27
25
  export declare const InspectorTabPanelHeading: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -17,7 +17,7 @@ import React from 'react';
17
17
  import { NavLink } from 'react-router-dom';
18
18
  export declare const NavDropdownContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
19
19
  export declare const NavDropdown: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
20
- direction?: "left" | "right" | undefined;
20
+ direction?: "right" | "left" | undefined;
21
21
  minWidth?: number | undefined;
22
22
  top?: number | undefined;
23
23
  }, never>;
@@ -18,7 +18,7 @@ import React, { MutableRefObject } from 'react';
18
18
  export declare const LabelContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
19
19
  export declare const FormField: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
20
20
  export declare const ReferenceTextArea: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, import("../Form").ErrorProps, never>;
21
- export declare const FlexForm: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "name" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoComplete" | "method" | "target" | "acceptCharset" | "action" | "encType" | "noValidate"> & React.RefAttributes<HTMLFormElement>>, import("styled-components").DefaultTheme, {}, never>;
21
+ export declare const FlexForm: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & React.RefAttributes<HTMLFormElement>>, import("styled-components").DefaultTheme, {}, never>;
22
22
  export declare const FormFields: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
23
23
  export type ReferenceFormValues = Pick<BibliographyItem, '_id' | 'title' | 'author' | 'DOI' | 'issued' | 'type' | 'container-title' | 'URL' | 'issue' | 'volume' | 'supplement' | 'page'>;
24
24
  export interface ReferenceFormActions {
@@ -1,4 +1,18 @@
1
- import '@formatjs/intl-relativetimeformat/polyfill-locales';
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
+ */
2
16
  import React from 'react';
3
17
  export declare const RelativeDate: React.FC<{
4
18
  createdAt?: number;
@@ -22,7 +22,7 @@ export declare class Resizer extends React.Component<Props, State> {
22
22
  isResizing: boolean;
23
23
  startPosition: number;
24
24
  };
25
- render(): JSX.Element;
25
+ render(): React.JSX.Element;
26
26
  private scheduleResize;
27
27
  private mouseDownHandler;
28
28
  private mouseUpHandler;
@@ -13,6 +13,6 @@ export declare class ResizerButton extends React.PureComponent<Props> {
13
13
  isCollapsed: boolean;
14
14
  isVisible: boolean;
15
15
  };
16
- render(): JSX.Element;
16
+ render(): React.JSX.Element;
17
17
  }
18
18
  export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const Tooltip: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react-tooltip").ITooltip & import("react").RefAttributes<import("react-tooltip").TooltipRefProps>>, import("styled-components").DefaultTheme, {
3
+ positionStrategy: "fixed";
4
+ offset: 10;
5
+ }, "offset" | "positionStrategy">;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const AddAuthor: (props: IconProps) => JSX.Element;
18
+ declare const AddAuthor: (props: IconProps) => React.JSX.Element;
18
19
  export default AddAuthor;
@@ -13,5 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- declare const AddComment: () => JSX.Element;
16
+ import React from 'react';
17
+ declare const AddComment: () => React.JSX.Element;
17
18
  export default AddComment;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const AddIconActive: (props: IconProps) => JSX.Element;
18
+ declare const AddIconActive: (props: IconProps) => React.JSX.Element;
18
19
  export default AddIconActive;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const AddIconInverted: (props: IconProps) => JSX.Element;
18
+ declare const AddIconInverted: (props: IconProps) => React.JSX.Element;
18
19
  export default AddIconInverted;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- export declare const BackArrow: (props: IconProps) => JSX.Element;
18
+ export declare const BackArrow: (props: IconProps) => React.JSX.Element;
18
19
  export default BackArrow;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const Bookmark: (props: IconProps) => JSX.Element;
18
+ declare const Bookmark: (props: IconProps) => React.JSX.Element;
18
19
  export default Bookmark;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const Google: (props: IconProps) => JSX.Element;
18
+ declare const Google: (props: IconProps) => React.JSX.Element;
18
19
  export default Google;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const Orcid: (props: IconProps) => JSX.Element;
18
+ declare const Orcid: (props: IconProps) => React.JSX.Element;
18
19
  export default Orcid;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const ProjectNotification: (props: IconProps) => JSX.Element;
18
+ declare const ProjectNotification: (props: IconProps) => React.JSX.Element;
18
19
  export default ProjectNotification;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const ProjectIcon: (props: IconProps) => JSX.Element;
18
+ declare const ProjectIcon: (props: IconProps) => React.JSX.Element;
18
19
  export default ProjectIcon;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const ProjectsList: (props: IconProps) => JSX.Element;
18
+ declare const ProjectsList: (props: IconProps) => React.JSX.Element;
18
19
  export default ProjectsList;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const SearchIcon: (props: IconProps) => JSX.Element;
18
+ declare const SearchIcon: (props: IconProps) => React.JSX.Element;
18
19
  export default SearchIcon;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const TickMark: (props: IconProps) => JSX.Element;
18
+ declare const TickMark: (props: IconProps) => React.JSX.Element;
18
19
  export default TickMark;
@@ -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 React from 'react';
16
17
  import { IconProps } from './types';
17
- declare const User: (props: IconProps) => JSX.Element;
18
+ declare const User: (props: IconProps) => React.JSX.Element;
18
19
  export default User;
@@ -23,7 +23,6 @@ export * from './components/AuthorsDND';
23
23
  export * from './components/AuthorsContainer';
24
24
  export * from './components/AlertMessage';
25
25
  export * from './components/Button';
26
- export * from './components/ColorField';
27
26
  export * from './components/RadioButton';
28
27
  export * from './components/AutoSaveInput';
29
28
  export * from './components/Avatar';
@@ -39,7 +38,7 @@ export * from './components/TextField';
39
38
  export * from './components/TextFieldContainer';
40
39
  export * from './components/TextFieldError';
41
40
  export * from './components/TextFieldGroupContainer';
42
- export * from './components/Tip';
41
+ export * from './components/Tooltip';
43
42
  export * from './components/icons';
44
43
  export * from './components/Inspector';
45
44
  export * from './components/InspectorSection';
@@ -1,5 +1,4 @@
1
- import { Project } from '@manuscripts/json-schema';
2
- import { UserProfileWithAvatar } from '@manuscripts/transform';
1
+ import { Project, UserProfile } from '@manuscripts/json-schema';
3
2
  import React from 'react';
4
3
  export type Capabilities = {
5
4
  handleSuggestion: boolean;
@@ -42,12 +41,12 @@ export type Capabilities = {
42
41
  };
43
42
  export interface ProviderProps {
44
43
  project?: Project;
45
- profile?: UserProfileWithAvatar;
44
+ profile?: UserProfile;
46
45
  role?: string;
47
46
  permittedActions?: string[];
48
47
  children?: React.ReactNode;
49
48
  }
50
- export declare const getCapabilities: (project?: Project, profile?: UserProfileWithAvatar, role?: ProviderProps['role'], actions?: string[]) => Capabilities;
49
+ export declare const getCapabilities: (project?: Project, profile?: UserProfile, role?: ProviderProps['role'], actions?: string[]) => Capabilities;
51
50
  export declare const getAllPermitted: () => Capabilities;
52
51
  export declare const usePermissions: () => Capabilities;
53
52
  export declare const useCalcPermission: ({ project, profile, role, permittedActions, }: ProviderProps) => Capabilities;