@manuscripts/style-guide 1.2.0 → 1.2.1-LEAN-2669-v1
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.
- package/dist/cjs/components/EditorHeader/EditorHeader.js +3 -3
- package/dist/cjs/components/FileManager/FileSectionItem/FileInfo.js +25 -3
- package/dist/cjs/components/FileManager/FileSectionItem/FileSectionItem.js +1 -1
- package/dist/cjs/components/FileManager/InlineFilesSection.js +29 -6
- package/dist/es/components/EditorHeader/EditorHeader.js +3 -3
- package/dist/es/components/FileManager/FileSectionItem/FileInfo.js +24 -2
- package/dist/es/components/FileManager/FileSectionItem/FileSectionItem.js +1 -1
- package/dist/es/components/FileManager/InlineFilesSection.js +28 -5
- package/dist/types/components/FileManager/FileSectionItem/FileInfo.d.ts +3 -0
- package/dist/types/components/FileManager/FileSectionItem/FileSectionItem.d.ts +1 -0
- package/dist/types/components/FileManager/InlineFilesSection.d.ts +2 -0
- package/package.json +2 -2
|
@@ -48,13 +48,13 @@ var DialogState;
|
|
|
48
48
|
DialogState[DialogState["SUCCESS"] = 3] = "SUCCESS";
|
|
49
49
|
DialogState[DialogState["CLOSED"] = 4] = "CLOSED";
|
|
50
50
|
})(DialogState = exports.DialogState || (exports.DialogState = {}));
|
|
51
|
-
const Editing = { label: 'Editing
|
|
51
|
+
const Editing = { label: 'Editing', icon: __1.EditIcon };
|
|
52
52
|
const MapUserRole = {
|
|
53
53
|
Editor: Editing,
|
|
54
54
|
Owner: Editing,
|
|
55
55
|
Writer: Editing,
|
|
56
|
-
Annotator: { label: 'Suggesting
|
|
57
|
-
Viewer: { label: 'Reading
|
|
56
|
+
Annotator: { label: 'Suggesting', icon: __1.AnnotatorIcon },
|
|
57
|
+
Viewer: { label: 'Reading', icon: __1.ReadingIcon },
|
|
58
58
|
Proofer: { label: 'Proofing', icon: __1.AnnotatorIcon },
|
|
59
59
|
};
|
|
60
60
|
const EditorHeader = ({ handleSnapshot, submission, hasPendingSuggestions, userRole, canCompleteTask, submitProceed, goBack, status, isAnnotator, isProofer, message, exceptionDialog: ExceptionDialog, disabelProceedNote, }) => {
|
|
@@ -26,11 +26,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.FileDescription = exports.FileName = exports.FileNameContainer = exports.FileTitle = exports.FileNameTitleContainer = exports.FileInfoContainer = exports.FileInfo = void 0;
|
|
29
|
+
exports.FileDescription = exports.FileDate = exports.FileName = exports.FileNameContainer = exports.FileTitle = exports.FileNameTitleContainer = exports.FileInfoContainer = exports.FileDateContainer = exports.FileInfo = void 0;
|
|
30
|
+
const date_fns_1 = require("date-fns");
|
|
30
31
|
const react_1 = __importStar(require("react"));
|
|
32
|
+
const react_tooltip_1 = __importDefault(require("react-tooltip"));
|
|
31
33
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
34
|
const FileManager_1 = require("../FileManager");
|
|
33
|
-
const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension, attachmentId, dispatch, }) => {
|
|
35
|
+
const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension, attachmentId, dispatch, fileCreatedDate, }) => {
|
|
34
36
|
const fileName = fileAttachmentName.substring(0, fileAttachmentName.lastIndexOf('.'));
|
|
35
37
|
const can = (0, react_1.useContext)(FileManager_1.PermissionsContext);
|
|
36
38
|
return (react_1.default.createElement(exports.FileInfoContainer, null,
|
|
@@ -42,9 +44,20 @@ const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension
|
|
|
42
44
|
react_1.default.createElement(exports.FileName, null, fileName),
|
|
43
45
|
react_1.default.createElement("div", null,
|
|
44
46
|
".",
|
|
45
|
-
fileExtension)))
|
|
47
|
+
fileExtension))),
|
|
48
|
+
fileCreatedDate && (react_1.default.createElement(exports.FileDateContainer, { "data-tip": "tooltip-content" },
|
|
49
|
+
react_1.default.createElement(exports.FileDate, null, (0, date_fns_1.format)(new Date(fileCreatedDate), 'M/d/yy, HH:mm')),
|
|
50
|
+
react_1.default.createElement(react_tooltip_1.default, { place: "bottom", offset: { top: 0 }, effect: "solid", className: "tooltip" }, "File Uploaded"))))));
|
|
46
51
|
};
|
|
47
52
|
exports.FileInfo = FileInfo;
|
|
53
|
+
exports.FileDateContainer = styled_components_1.default.div `
|
|
54
|
+
line-height: 20px;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
width: 100%;
|
|
57
|
+
display: none;
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: flex-end;
|
|
60
|
+
`;
|
|
48
61
|
exports.FileInfoContainer = styled_components_1.default.div `
|
|
49
62
|
margin-left: 8px;
|
|
50
63
|
overflow: hidden;
|
|
@@ -53,10 +66,15 @@ exports.FileInfoContainer = styled_components_1.default.div `
|
|
|
53
66
|
justify-content: center;
|
|
54
67
|
align-items: start;
|
|
55
68
|
width: 100%;
|
|
69
|
+
|
|
70
|
+
&:hover ${exports.FileDateContainer} {
|
|
71
|
+
display: flex;
|
|
72
|
+
}
|
|
56
73
|
`;
|
|
57
74
|
exports.FileNameTitleContainer = styled_components_1.default.div `
|
|
58
75
|
display: flex;
|
|
59
76
|
width: 100%;
|
|
77
|
+
align-items: baseline;
|
|
60
78
|
`;
|
|
61
79
|
exports.FileTitle = styled_components_1.default.div `
|
|
62
80
|
color: ${(props) => props.theme.colors.text.primary};
|
|
@@ -79,6 +97,10 @@ exports.FileName = styled_components_1.default.div `
|
|
|
79
97
|
text-overflow: ellipsis;
|
|
80
98
|
white-space: nowrap;
|
|
81
99
|
overflow: hidden;
|
|
100
|
+
width: 50px;
|
|
101
|
+
`;
|
|
102
|
+
exports.FileDate = styled_components_1.default.div `
|
|
103
|
+
font-size: font-size: ${(props) => props.theme.font.size.small};
|
|
82
104
|
`;
|
|
83
105
|
exports.FileDescription = styled_components_1.default.div `
|
|
84
106
|
color: ${(props) => props.theme.colors.text.secondary};
|
|
@@ -27,7 +27,7 @@ const FileSectionItem = ({ fileSection, externalFile, title, showAttachmentName
|
|
|
27
27
|
}
|
|
28
28
|
} },
|
|
29
29
|
react_1.default.createElement(FileTypeIcon_1.FileTypeIcon, { withDot: isMainManuscript, fileExtension: fileExtension, alt: externalFile.name }),
|
|
30
|
-
react_1.default.createElement(FileInfo_1.FileInfo, { fileExtension: fileExtension, showAttachmentName: showAttachmentName, fileAttachmentName: externalFile.name, title: title, attachmentId: externalFile.id, dispatch: dispatch })),
|
|
30
|
+
react_1.default.createElement(FileInfo_1.FileInfo, { fileExtension: fileExtension, fileCreatedDate: externalFile.createdDate, showAttachmentName: showAttachmentName, fileAttachmentName: externalFile.name, title: title, attachmentId: externalFile.id, dispatch: dispatch })),
|
|
31
31
|
onClose && (react_1.default.createElement(IconCloseButton, { onClick: (e) => {
|
|
32
32
|
e.preventDefault();
|
|
33
33
|
onClose();
|
|
@@ -26,7 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.InlineFilesSection = void 0;
|
|
29
|
+
exports.FileDate = exports.FileDateContainer = exports.InlineFilesSection = void 0;
|
|
30
|
+
const date_fns_1 = require("date-fns");
|
|
30
31
|
const react_1 = __importStar(require("react"));
|
|
31
32
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
33
|
const use_dropdown_1 = require("../../hooks/use-dropdown");
|
|
@@ -52,7 +53,8 @@ const InlineFilesSection = ({ handleReplace, handleDownload, handleUpdateInline,
|
|
|
52
53
|
return (react_1.default.createElement("div", null, inlineFiles.map((file, index) => {
|
|
53
54
|
var _a;
|
|
54
55
|
return (react_1.default.createElement(ElementItem, { className: 'item', key: index, id: file.id, onClick: onElementClick },
|
|
55
|
-
react_1.default.createElement(FileReferences, { className: 'refItems' }, (_a = file.attachments) === null || _a === void 0 ? void 0 : _a.map((attachment) => (react_1.default.createElement(
|
|
56
|
+
react_1.default.createElement(FileReferences, { className: 'refItems' }, (_a = file.attachments) === null || _a === void 0 ? void 0 : _a.map((attachment) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
57
|
+
react_1.default.createElement(FileReference, { key: attachment.id, attachment: attachment, handleReplace: handleReplace, handleUpdateInline: handleUpdateInline, handleDetachFile: handleDetachFile, handleDownload: handleDownload, dispatch: dispatch }))))),
|
|
56
58
|
react_1.default.createElement(Element, { className: 'element' },
|
|
57
59
|
util_1.fileTypesWithIconMap.get(file.type),
|
|
58
60
|
react_1.default.createElement(FileInfo_1.FileInfoContainer, null,
|
|
@@ -71,6 +73,8 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
71
73
|
react_1.default.createElement(Container, null,
|
|
72
74
|
util_1.fileTypesWithIconMap.get(util_1.extensionsWithFileTypesMap.get(fileExtension)),
|
|
73
75
|
react_1.default.createElement(FileReferenceName, null, attachment.name)),
|
|
76
|
+
attachment.createdDate && (react_1.default.createElement(exports.FileDateContainer, null,
|
|
77
|
+
react_1.default.createElement(exports.FileDate, null, (0, date_fns_1.format)(new Date(attachment.createdDate), 'M/d/yy, HH:mm')))),
|
|
74
78
|
handleDownload && handleReplace && (react_1.default.createElement(DropdownContainer, { ref: wrapperRef },
|
|
75
79
|
react_1.default.createElement(FileSectionItem_1.ActionsIcon, { onClick: toggleOpen, type: "button", className: 'external_file_dropdown', "aria-label": "Download or Replace or Detach", "aria-pressed": isOpen },
|
|
76
80
|
react_1.default.createElement(dots_icon_1.default, null)),
|
|
@@ -80,6 +84,12 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
80
84
|
attachment.modelId &&
|
|
81
85
|
handleDetachFile(attachment.id, attachment.modelId), downloadAttachmentHandler: handleDownload, attachmentId: attachment.id, fileName: attachment.name, publicUrl: attachment.link, hideActionList: toggleOpen, dispatch: dispatch, dropDownClassName: 'ref_item_dropdown' }))))));
|
|
82
86
|
};
|
|
87
|
+
exports.FileDateContainer = styled_components_1.default.div `
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
display: none;
|
|
90
|
+
width: 50%;
|
|
91
|
+
line-height: 27px;
|
|
92
|
+
`;
|
|
83
93
|
const ElementItem = (0, styled_components_1.default)(FileSectionItem_1.Item) `
|
|
84
94
|
display: flex;
|
|
85
95
|
// this will allow us to select the previous sibling node,
|
|
@@ -94,6 +104,9 @@ const ElementItem = (0, styled_components_1.default)(FileSectionItem_1.Item) `
|
|
|
94
104
|
.refItems:hover ~ .element {
|
|
95
105
|
background: white !important;
|
|
96
106
|
}
|
|
107
|
+
&:hover ${exports.FileDateContainer} {
|
|
108
|
+
display: flex;
|
|
109
|
+
}
|
|
97
110
|
|
|
98
111
|
.refItems:hover {
|
|
99
112
|
background: white !important;
|
|
@@ -107,18 +120,24 @@ const ElementItem = (0, styled_components_1.default)(FileSectionItem_1.Item) `
|
|
|
107
120
|
`;
|
|
108
121
|
const Container = styled_components_1.default.div `
|
|
109
122
|
display: flex;
|
|
123
|
+
width: 100%;
|
|
110
124
|
`;
|
|
111
125
|
const Element = styled_components_1.default.div `
|
|
112
126
|
display: flex;
|
|
113
127
|
padding: 20px 15px;
|
|
114
128
|
`;
|
|
115
|
-
const FileReferences = styled_components_1.default.div
|
|
116
|
-
const FileReferenceItem = styled_components_1.default.div `
|
|
129
|
+
const FileReferences = styled_components_1.default.div `
|
|
117
130
|
display: flex;
|
|
118
131
|
align-items: center;
|
|
119
132
|
justify-content: space-between;
|
|
120
|
-
|
|
121
|
-
|
|
133
|
+
width: 100%;
|
|
134
|
+
`;
|
|
135
|
+
const FileReferenceItem = styled_components_1.default.div `
|
|
136
|
+
display: flex;
|
|
137
|
+
width: 100%;
|
|
138
|
+
align-items: space;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
width: 100% svg {
|
|
122
141
|
width: 14px;
|
|
123
142
|
height: 17px;
|
|
124
143
|
}
|
|
@@ -161,3 +180,7 @@ const FileReferenceName = styled_components_1.default.div `
|
|
|
161
180
|
const DropdownContainer = styled_components_1.default.div `
|
|
162
181
|
position: relative;
|
|
163
182
|
`;
|
|
183
|
+
exports.FileDate = styled_components_1.default.div `
|
|
184
|
+
font-size: ${(props) => props.theme.font.size.small};
|
|
185
|
+
line-height: 27px;
|
|
186
|
+
`;
|
|
@@ -19,13 +19,13 @@ export var DialogState;
|
|
|
19
19
|
DialogState[DialogState["SUCCESS"] = 3] = "SUCCESS";
|
|
20
20
|
DialogState[DialogState["CLOSED"] = 4] = "CLOSED";
|
|
21
21
|
})(DialogState || (DialogState = {}));
|
|
22
|
-
const Editing = { label: 'Editing
|
|
22
|
+
const Editing = { label: 'Editing', icon: EditIcon };
|
|
23
23
|
const MapUserRole = {
|
|
24
24
|
Editor: Editing,
|
|
25
25
|
Owner: Editing,
|
|
26
26
|
Writer: Editing,
|
|
27
|
-
Annotator: { label: 'Suggesting
|
|
28
|
-
Viewer: { label: 'Reading
|
|
27
|
+
Annotator: { label: 'Suggesting', icon: AnnotatorIcon },
|
|
28
|
+
Viewer: { label: 'Reading', icon: ReadingIcon },
|
|
29
29
|
Proofer: { label: 'Proofing', icon: AnnotatorIcon },
|
|
30
30
|
};
|
|
31
31
|
export const EditorHeader = ({ handleSnapshot, submission, hasPendingSuggestions, userRole, canCompleteTask, submitProceed, goBack, status, isAnnotator, isProofer, message, exceptionDialog: ExceptionDialog, disabelProceedNote, }) => {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { format } from 'date-fns';
|
|
1
2
|
import React, { useContext } from 'react';
|
|
3
|
+
import ReactTooltip from 'react-tooltip';
|
|
2
4
|
import styled from 'styled-components';
|
|
3
5
|
import { PermissionsContext } from '../FileManager';
|
|
4
|
-
export const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension, attachmentId, dispatch, }) => {
|
|
6
|
+
export const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension, attachmentId, dispatch, fileCreatedDate, }) => {
|
|
5
7
|
const fileName = fileAttachmentName.substring(0, fileAttachmentName.lastIndexOf('.'));
|
|
6
8
|
const can = useContext(PermissionsContext);
|
|
7
9
|
return (React.createElement(FileInfoContainer, null,
|
|
@@ -13,8 +15,19 @@ export const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileEx
|
|
|
13
15
|
React.createElement(FileName, null, fileName),
|
|
14
16
|
React.createElement("div", null,
|
|
15
17
|
".",
|
|
16
|
-
fileExtension)))
|
|
18
|
+
fileExtension))),
|
|
19
|
+
fileCreatedDate && (React.createElement(FileDateContainer, { "data-tip": "tooltip-content" },
|
|
20
|
+
React.createElement(FileDate, null, format(new Date(fileCreatedDate), 'M/d/yy, HH:mm')),
|
|
21
|
+
React.createElement(ReactTooltip, { place: "bottom", offset: { top: 0 }, effect: "solid", className: "tooltip" }, "File Uploaded"))))));
|
|
17
22
|
};
|
|
23
|
+
export const FileDateContainer = styled.div `
|
|
24
|
+
line-height: 20px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
width: 100%;
|
|
27
|
+
display: none;
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: flex-end;
|
|
30
|
+
`;
|
|
18
31
|
export const FileInfoContainer = styled.div `
|
|
19
32
|
margin-left: 8px;
|
|
20
33
|
overflow: hidden;
|
|
@@ -23,10 +36,15 @@ export const FileInfoContainer = styled.div `
|
|
|
23
36
|
justify-content: center;
|
|
24
37
|
align-items: start;
|
|
25
38
|
width: 100%;
|
|
39
|
+
|
|
40
|
+
&:hover ${FileDateContainer} {
|
|
41
|
+
display: flex;
|
|
42
|
+
}
|
|
26
43
|
`;
|
|
27
44
|
export const FileNameTitleContainer = styled.div `
|
|
28
45
|
display: flex;
|
|
29
46
|
width: 100%;
|
|
47
|
+
align-items: baseline;
|
|
30
48
|
`;
|
|
31
49
|
export const FileTitle = styled.div `
|
|
32
50
|
color: ${(props) => props.theme.colors.text.primary};
|
|
@@ -49,6 +67,10 @@ export const FileName = styled.div `
|
|
|
49
67
|
text-overflow: ellipsis;
|
|
50
68
|
white-space: nowrap;
|
|
51
69
|
overflow: hidden;
|
|
70
|
+
width: 50px;
|
|
71
|
+
`;
|
|
72
|
+
export const FileDate = styled.div `
|
|
73
|
+
font-size: font-size: ${(props) => props.theme.font.size.small};
|
|
52
74
|
`;
|
|
53
75
|
export const FileDescription = styled.div `
|
|
54
76
|
color: ${(props) => props.theme.colors.text.secondary};
|
|
@@ -21,7 +21,7 @@ export const FileSectionItem = ({ fileSection, externalFile, title, showAttachme
|
|
|
21
21
|
}
|
|
22
22
|
} },
|
|
23
23
|
React.createElement(FileTypeIcon, { withDot: isMainManuscript, fileExtension: fileExtension, alt: externalFile.name }),
|
|
24
|
-
React.createElement(FileInfo, { fileExtension: fileExtension, showAttachmentName: showAttachmentName, fileAttachmentName: externalFile.name, title: title, attachmentId: externalFile.id, dispatch: dispatch })),
|
|
24
|
+
React.createElement(FileInfo, { fileExtension: fileExtension, fileCreatedDate: externalFile.createdDate, showAttachmentName: showAttachmentName, fileAttachmentName: externalFile.name, title: title, attachmentId: externalFile.id, dispatch: dispatch })),
|
|
25
25
|
onClose && (React.createElement(IconCloseButton, { onClick: (e) => {
|
|
26
26
|
e.preventDefault();
|
|
27
27
|
onClose();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { format } from 'date-fns';
|
|
1
2
|
import React, { useCallback } from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import { useDropdown } from '../../hooks/use-dropdown';
|
|
@@ -23,7 +24,8 @@ export const InlineFilesSection = ({ handleReplace, handleDownload, handleUpdate
|
|
|
23
24
|
return (React.createElement("div", null, inlineFiles.map((file, index) => {
|
|
24
25
|
var _a;
|
|
25
26
|
return (React.createElement(ElementItem, { className: 'item', key: index, id: file.id, onClick: onElementClick },
|
|
26
|
-
React.createElement(FileReferences, { className: 'refItems' }, (_a = file.attachments) === null || _a === void 0 ? void 0 : _a.map((attachment) => (React.createElement(
|
|
27
|
+
React.createElement(FileReferences, { className: 'refItems' }, (_a = file.attachments) === null || _a === void 0 ? void 0 : _a.map((attachment) => (React.createElement(React.Fragment, null,
|
|
28
|
+
React.createElement(FileReference, { key: attachment.id, attachment: attachment, handleReplace: handleReplace, handleUpdateInline: handleUpdateInline, handleDetachFile: handleDetachFile, handleDownload: handleDownload, dispatch: dispatch }))))),
|
|
27
29
|
React.createElement(Element, { className: 'element' },
|
|
28
30
|
fileTypesWithIconMap.get(file.type),
|
|
29
31
|
React.createElement(FileInfoContainer, null,
|
|
@@ -41,6 +43,8 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
41
43
|
React.createElement(Container, null,
|
|
42
44
|
fileTypesWithIconMap.get(extensionsWithFileTypesMap.get(fileExtension)),
|
|
43
45
|
React.createElement(FileReferenceName, null, attachment.name)),
|
|
46
|
+
attachment.createdDate && (React.createElement(FileDateContainer, null,
|
|
47
|
+
React.createElement(FileDate, null, format(new Date(attachment.createdDate), 'M/d/yy, HH:mm')))),
|
|
44
48
|
handleDownload && handleReplace && (React.createElement(DropdownContainer, { ref: wrapperRef },
|
|
45
49
|
React.createElement(ActionsIcon, { onClick: toggleOpen, type: "button", className: 'external_file_dropdown', "aria-label": "Download or Replace or Detach", "aria-pressed": isOpen },
|
|
46
50
|
React.createElement(DotsIcon, null)),
|
|
@@ -50,6 +54,12 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
50
54
|
attachment.modelId &&
|
|
51
55
|
handleDetachFile(attachment.id, attachment.modelId), downloadAttachmentHandler: handleDownload, attachmentId: attachment.id, fileName: attachment.name, publicUrl: attachment.link, hideActionList: toggleOpen, dispatch: dispatch, dropDownClassName: 'ref_item_dropdown' }))))));
|
|
52
56
|
};
|
|
57
|
+
export const FileDateContainer = styled.div `
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
display: none;
|
|
60
|
+
width: 50%;
|
|
61
|
+
line-height: 27px;
|
|
62
|
+
`;
|
|
53
63
|
const ElementItem = styled(Item) `
|
|
54
64
|
display: flex;
|
|
55
65
|
// this will allow us to select the previous sibling node,
|
|
@@ -64,6 +74,9 @@ const ElementItem = styled(Item) `
|
|
|
64
74
|
.refItems:hover ~ .element {
|
|
65
75
|
background: white !important;
|
|
66
76
|
}
|
|
77
|
+
&:hover ${FileDateContainer} {
|
|
78
|
+
display: flex;
|
|
79
|
+
}
|
|
67
80
|
|
|
68
81
|
.refItems:hover {
|
|
69
82
|
background: white !important;
|
|
@@ -77,18 +90,24 @@ const ElementItem = styled(Item) `
|
|
|
77
90
|
`;
|
|
78
91
|
const Container = styled.div `
|
|
79
92
|
display: flex;
|
|
93
|
+
width: 100%;
|
|
80
94
|
`;
|
|
81
95
|
const Element = styled.div `
|
|
82
96
|
display: flex;
|
|
83
97
|
padding: 20px 15px;
|
|
84
98
|
`;
|
|
85
|
-
const FileReferences = styled.div
|
|
86
|
-
const FileReferenceItem = styled.div `
|
|
99
|
+
const FileReferences = styled.div `
|
|
87
100
|
display: flex;
|
|
88
101
|
align-items: center;
|
|
89
102
|
justify-content: space-between;
|
|
90
|
-
|
|
91
|
-
|
|
103
|
+
width: 100%;
|
|
104
|
+
`;
|
|
105
|
+
const FileReferenceItem = styled.div `
|
|
106
|
+
display: flex;
|
|
107
|
+
width: 100%;
|
|
108
|
+
align-items: space;
|
|
109
|
+
justify-content: space-between;
|
|
110
|
+
width: 100% svg {
|
|
92
111
|
width: 14px;
|
|
93
112
|
height: 17px;
|
|
94
113
|
}
|
|
@@ -131,3 +150,7 @@ const FileReferenceName = styled.div `
|
|
|
131
150
|
const DropdownContainer = styled.div `
|
|
132
151
|
position: relative;
|
|
133
152
|
`;
|
|
153
|
+
export const FileDate = styled.div `
|
|
154
|
+
font-size: ${(props) => props.theme.font.size.small};
|
|
155
|
+
line-height: 27px;
|
|
156
|
+
`;
|
|
@@ -6,11 +6,14 @@ export declare const FileInfo: React.FC<{
|
|
|
6
6
|
fileAttachmentName: string;
|
|
7
7
|
fileExtension: string;
|
|
8
8
|
attachmentId: string;
|
|
9
|
+
fileCreatedDate: Date;
|
|
9
10
|
dispatch?: Dispatch<Action>;
|
|
10
11
|
}>;
|
|
12
|
+
export declare const FileDateContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
11
13
|
export declare const FileInfoContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
12
14
|
export declare const FileNameTitleContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
15
|
export declare const FileTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
16
|
export declare const FileNameContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
15
17
|
export declare const FileName: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
+
export declare const FileDate: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
16
19
|
export declare const FileDescription: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -18,3 +18,5 @@ export declare const InlineFilesSection: React.FC<{
|
|
|
18
18
|
isEditor: boolean;
|
|
19
19
|
dispatch: Dispatch<Action>;
|
|
20
20
|
}>;
|
|
21
|
+
export declare const FileDateContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
22
|
+
export declare const FileDate: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
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.2.
|
|
4
|
+
"version": "1.2.1-LEAN-2669-v1",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -141,4 +141,4 @@
|
|
|
141
141
|
"resolutions": {
|
|
142
142
|
"@types/react": "^17.0.2"
|
|
143
143
|
}
|
|
144
|
-
}
|
|
144
|
+
}
|