@manuscripts/style-guide 1.2.2 → 1.3.0

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.
@@ -32,9 +32,12 @@ const react_1 = __importStar(require("react"));
32
32
  const react_tooltip_1 = __importDefault(require("react-tooltip"));
33
33
  const styled_components_1 = __importDefault(require("styled-components"));
34
34
  const FileManager_1 = require("../FileManager");
35
+ const TooltipDiv_1 = require("../TooltipDiv");
35
36
  const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension, attachmentId, dispatch, fileCreatedDate, }) => {
36
37
  const fileName = fileAttachmentName.substring(0, fileAttachmentName.lastIndexOf('.'));
37
38
  const can = (0, react_1.useContext)(FileManager_1.PermissionsContext);
39
+ fileCreatedDate = new Date();
40
+ console.log(fileCreatedDate);
38
41
  return (react_1.default.createElement(exports.FileInfoContainer, null,
39
42
  react_1.default.createElement(exports.FileNameTitleContainer, null,
40
43
  react_1.default.createElement(exports.FileTitle, null,
@@ -47,7 +50,9 @@ const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension
47
50
  fileExtension))),
48
51
  fileCreatedDate && (react_1.default.createElement(exports.FileDateContainer, { "data-tip": "tooltip-content" },
49
52
  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"))))));
53
+ react_1.default.createElement(TooltipDiv_1.TooltipDiv, null,
54
+ react_1.default.createElement(react_tooltip_1.default, { place: "bottom", offset: { top: 0 }, effect: "solid", className: "tooltip" },
55
+ react_1.default.createElement("div", null, "File uploaded"))))))));
51
56
  };
52
57
  exports.FileInfo = FileInfo;
53
58
  exports.FileDateContainer = styled_components_1.default.div `
@@ -55,7 +60,6 @@ exports.FileDateContainer = styled_components_1.default.div `
55
60
  overflow: hidden;
56
61
  width: 100%;
57
62
  display: none;
58
- display: flex;
59
63
  justify-content: flex-end;
60
64
  `;
61
65
  exports.FileInfoContainer = styled_components_1.default.div `
@@ -3,9 +3,12 @@ import React, { useContext } from 'react';
3
3
  import ReactTooltip from 'react-tooltip';
4
4
  import styled from 'styled-components';
5
5
  import { PermissionsContext } from '../FileManager';
6
+ import { TooltipDiv } from '../TooltipDiv';
6
7
  export const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileExtension, attachmentId, dispatch, fileCreatedDate, }) => {
7
8
  const fileName = fileAttachmentName.substring(0, fileAttachmentName.lastIndexOf('.'));
8
9
  const can = useContext(PermissionsContext);
10
+ fileCreatedDate = new Date();
11
+ console.log(fileCreatedDate);
9
12
  return (React.createElement(FileInfoContainer, null,
10
13
  React.createElement(FileNameTitleContainer, null,
11
14
  React.createElement(FileTitle, null,
@@ -18,14 +21,15 @@ export const FileInfo = ({ showAttachmentName, title, fileAttachmentName, fileEx
18
21
  fileExtension))),
19
22
  fileCreatedDate && (React.createElement(FileDateContainer, { "data-tip": "tooltip-content" },
20
23
  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"))))));
24
+ React.createElement(TooltipDiv, null,
25
+ React.createElement(ReactTooltip, { place: "bottom", offset: { top: 0 }, effect: "solid", className: "tooltip" },
26
+ React.createElement("div", null, "File uploaded"))))))));
22
27
  };
23
28
  export const FileDateContainer = styled.div `
24
29
  line-height: 20px;
25
30
  overflow: hidden;
26
31
  width: 100%;
27
32
  display: none;
28
- display: flex;
29
33
  justify-content: flex-end;
30
34
  `;
31
35
  export const FileInfoContainer = styled.div `
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.2",
4
+ "version": "1.3.0",
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
+ }