@manuscripts/style-guide 1.1.16-LEAN-2669-v8 → 1.1.16-LEAN-2669-v10

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.
@@ -33,6 +33,11 @@ const FileManager_1 = require("../FileManager");
33
33
  const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension, attachmentId, dispatch, fileCreatedDate, }) => {
34
34
  const fileName = fileAttachmentName.substring(0, fileAttachmentName.lastIndexOf('.'));
35
35
  const can = (0, react_1.useContext)(FileManager_1.PermissionsContext);
36
+ const date = new Date(fileCreatedDate);
37
+ const formattedDate = `${date.getMonth() + 1}/${date.getDate()}/${date
38
+ .getFullYear()
39
+ .toString()
40
+ .slice(2)}, ${date.getHours()}:${date.getMinutes()}`;
36
41
  return (react_1.default.createElement(exports.FileInfoContainer, null,
37
42
  react_1.default.createElement(exports.FileNameTitleContainer, null,
38
43
  react_1.default.createElement(exports.FileTitle, null,
@@ -44,7 +49,7 @@ const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension
44
49
  ".",
45
50
  fileExtension))),
46
51
  fileCreatedDate && (react_1.default.createElement(exports.FileDateContainer, null,
47
- react_1.default.createElement(exports.FileDate, null, fileCreatedDate))))));
52
+ react_1.default.createElement(exports.FileDate, null, formattedDate))))));
48
53
  };
49
54
  exports.FileInfo = FileInfo;
50
55
  exports.FileDateContainer = styled_components_1.default.div `
@@ -4,6 +4,11 @@ import { PermissionsContext } from '../FileManager';
4
4
  export const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension, attachmentId, dispatch, fileCreatedDate, }) => {
5
5
  const fileName = fileAttachmentName.substring(0, fileAttachmentName.lastIndexOf('.'));
6
6
  const can = useContext(PermissionsContext);
7
+ const date = new Date(fileCreatedDate);
8
+ const formattedDate = `${date.getMonth() + 1}/${date.getDate()}/${date
9
+ .getFullYear()
10
+ .toString()
11
+ .slice(2)}, ${date.getHours()}:${date.getMinutes()}`;
7
12
  return (React.createElement(FileInfoContainer, null,
8
13
  React.createElement(FileNameTitleContainer, null,
9
14
  React.createElement(FileTitle, null,
@@ -15,7 +20,7 @@ export const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileEx
15
20
  ".",
16
21
  fileExtension))),
17
22
  fileCreatedDate && (React.createElement(FileDateContainer, null,
18
- React.createElement(FileDate, null, fileCreatedDate))))));
23
+ React.createElement(FileDate, null, formattedDate))))));
19
24
  };
20
25
  export const FileDateContainer = styled.div `
21
26
  line-height: 20px;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/style-guide",
3
3
  "description": "Shared components for Manuscripts applications",
4
- "version": "1.1.16-LEAN-2669-v8",
4
+ "version": "1.1.16-LEAN-2669-v10",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",