@manuscripts/style-guide 1.1.16-LEAN-2669-v6 → 1.1.16-LEAN-2669-v8
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.
|
@@ -50,16 +50,17 @@ const InlineFilesSection = ({ handleReplace, handleDownload, handleUpdateInline,
|
|
|
50
50
|
}
|
|
51
51
|
}, [isEditor]);
|
|
52
52
|
return (react_1.default.createElement("div", null, inlineFiles.map((file, index) => {
|
|
53
|
-
var _a
|
|
53
|
+
var _a;
|
|
54
54
|
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(
|
|
55
|
+
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,
|
|
56
|
+
react_1.default.createElement(FileReference, { key: attachment.id, attachment: attachment, handleReplace: handleReplace, handleUpdateInline: handleUpdateInline, handleDetachFile: handleDetachFile, handleDownload: handleDownload, dispatch: dispatch }),
|
|
57
|
+
react_1.default.createElement(exports.FileDateContainer, null,
|
|
58
|
+
react_1.default.createElement(exports.FileDate, null, attachment.createdDate)))))),
|
|
56
59
|
react_1.default.createElement(Element, { className: 'element' },
|
|
57
60
|
util_1.fileTypesWithIconMap.get(file.type),
|
|
58
61
|
react_1.default.createElement(FileInfo_1.FileInfoContainer, null,
|
|
59
62
|
react_1.default.createElement(FileInfo_1.FileNameTitleContainer, null,
|
|
60
|
-
react_1.default.createElement(FileInfo_1.FileTitle, null, file.label))
|
|
61
|
-
_b.map((attachment) => (react_1.default.createElement(exports.FileDateContainer, { key: attachment.id },
|
|
62
|
-
react_1.default.createElement(exports.FileDate, null, attachment.createdDate))))))));
|
|
63
|
+
react_1.default.createElement(FileInfo_1.FileTitle, null, file.label))))));
|
|
63
64
|
})));
|
|
64
65
|
};
|
|
65
66
|
exports.InlineFilesSection = InlineFilesSection;
|
|
@@ -82,6 +83,11 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
82
83
|
attachment.modelId &&
|
|
83
84
|
handleDetachFile(attachment.id, attachment.modelId), downloadAttachmentHandler: handleDownload, attachmentId: attachment.id, fileName: attachment.name, publicUrl: attachment.link, hideActionList: toggleOpen, dispatch: dispatch, dropDownClassName: 'ref_item_dropdown' }))))));
|
|
84
85
|
};
|
|
86
|
+
exports.FileDateContainer = styled_components_1.default.div `
|
|
87
|
+
line-height: 40px;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
display: none;
|
|
90
|
+
`;
|
|
85
91
|
const ElementItem = (0, styled_components_1.default)(FileSectionItem_1.Item) `
|
|
86
92
|
display: flex;
|
|
87
93
|
// this will allow us to select the previous sibling node,
|
|
@@ -96,6 +102,9 @@ const ElementItem = (0, styled_components_1.default)(FileSectionItem_1.Item) `
|
|
|
96
102
|
.refItems:hover ~ .element {
|
|
97
103
|
background: white !important;
|
|
98
104
|
}
|
|
105
|
+
&:hover ${exports.FileDateContainer} {
|
|
106
|
+
display: flex;
|
|
107
|
+
}
|
|
99
108
|
|
|
100
109
|
.refItems:hover {
|
|
101
110
|
background: white !important;
|
|
@@ -110,27 +119,21 @@ const ElementItem = (0, styled_components_1.default)(FileSectionItem_1.Item) `
|
|
|
110
119
|
const Container = styled_components_1.default.div `
|
|
111
120
|
display: flex;
|
|
112
121
|
`;
|
|
113
|
-
exports.FileDateContainer = styled_components_1.default.div `
|
|
114
|
-
line-height: 20px;
|
|
115
|
-
overflow: hidden;
|
|
116
|
-
width: 100%;
|
|
117
|
-
display: none;
|
|
118
|
-
`;
|
|
119
122
|
const Element = styled_components_1.default.div `
|
|
120
123
|
display: flex;
|
|
121
124
|
padding: 20px 15px;
|
|
122
|
-
|
|
123
|
-
&:hover ${exports.FileDateContainer} {
|
|
124
|
-
display: flex;
|
|
125
|
-
}
|
|
126
125
|
`;
|
|
127
|
-
const FileReferences = styled_components_1.default.div
|
|
126
|
+
const FileReferences = styled_components_1.default.div `
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: space-between;
|
|
130
|
+
width: 100%;
|
|
131
|
+
`;
|
|
128
132
|
const FileReferenceItem = styled_components_1.default.div `
|
|
129
133
|
display: flex;
|
|
130
134
|
align-items: center;
|
|
131
135
|
justify-content: space-between;
|
|
132
|
-
|
|
133
|
-
svg {
|
|
136
|
+
width: 100% svg {
|
|
134
137
|
width: 14px;
|
|
135
138
|
height: 17px;
|
|
136
139
|
}
|
|
@@ -21,16 +21,17 @@ export const InlineFilesSection = ({ handleReplace, handleDownload, handleUpdate
|
|
|
21
21
|
}
|
|
22
22
|
}, [isEditor]);
|
|
23
23
|
return (React.createElement("div", null, inlineFiles.map((file, index) => {
|
|
24
|
-
var _a
|
|
24
|
+
var _a;
|
|
25
25
|
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(
|
|
26
|
+
React.createElement(FileReferences, { className: 'refItems' }, (_a = file.attachments) === null || _a === void 0 ? void 0 : _a.map((attachment) => (React.createElement(React.Fragment, null,
|
|
27
|
+
React.createElement(FileReference, { key: attachment.id, attachment: attachment, handleReplace: handleReplace, handleUpdateInline: handleUpdateInline, handleDetachFile: handleDetachFile, handleDownload: handleDownload, dispatch: dispatch }),
|
|
28
|
+
React.createElement(FileDateContainer, null,
|
|
29
|
+
React.createElement(FileDate, null, attachment.createdDate)))))),
|
|
27
30
|
React.createElement(Element, { className: 'element' },
|
|
28
31
|
fileTypesWithIconMap.get(file.type),
|
|
29
32
|
React.createElement(FileInfoContainer, null,
|
|
30
33
|
React.createElement(FileNameTitleContainer, null,
|
|
31
|
-
React.createElement(FileTitle, null, file.label))
|
|
32
|
-
_b.map((attachment) => (React.createElement(FileDateContainer, { key: attachment.id },
|
|
33
|
-
React.createElement(FileDate, null, attachment.createdDate))))))));
|
|
34
|
+
React.createElement(FileTitle, null, file.label))))));
|
|
34
35
|
})));
|
|
35
36
|
};
|
|
36
37
|
const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdateInline, handleDetachFile, dispatch, }) => {
|
|
@@ -52,6 +53,11 @@ const FileReference = ({ attachment, handleReplace, handleDownload, handleUpdate
|
|
|
52
53
|
attachment.modelId &&
|
|
53
54
|
handleDetachFile(attachment.id, attachment.modelId), downloadAttachmentHandler: handleDownload, attachmentId: attachment.id, fileName: attachment.name, publicUrl: attachment.link, hideActionList: toggleOpen, dispatch: dispatch, dropDownClassName: 'ref_item_dropdown' }))))));
|
|
54
55
|
};
|
|
56
|
+
export const FileDateContainer = styled.div `
|
|
57
|
+
line-height: 40px;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
display: none;
|
|
60
|
+
`;
|
|
55
61
|
const ElementItem = styled(Item) `
|
|
56
62
|
display: flex;
|
|
57
63
|
// this will allow us to select the previous sibling node,
|
|
@@ -66,6 +72,9 @@ const ElementItem = styled(Item) `
|
|
|
66
72
|
.refItems:hover ~ .element {
|
|
67
73
|
background: white !important;
|
|
68
74
|
}
|
|
75
|
+
&:hover ${FileDateContainer} {
|
|
76
|
+
display: flex;
|
|
77
|
+
}
|
|
69
78
|
|
|
70
79
|
.refItems:hover {
|
|
71
80
|
background: white !important;
|
|
@@ -80,27 +89,21 @@ const ElementItem = styled(Item) `
|
|
|
80
89
|
const Container = styled.div `
|
|
81
90
|
display: flex;
|
|
82
91
|
`;
|
|
83
|
-
export const FileDateContainer = styled.div `
|
|
84
|
-
line-height: 20px;
|
|
85
|
-
overflow: hidden;
|
|
86
|
-
width: 100%;
|
|
87
|
-
display: none;
|
|
88
|
-
`;
|
|
89
92
|
const Element = styled.div `
|
|
90
93
|
display: flex;
|
|
91
94
|
padding: 20px 15px;
|
|
92
|
-
|
|
93
|
-
&:hover ${FileDateContainer} {
|
|
94
|
-
display: flex;
|
|
95
|
-
}
|
|
96
95
|
`;
|
|
97
|
-
const FileReferences = styled.div
|
|
96
|
+
const FileReferences = styled.div `
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: space-between;
|
|
100
|
+
width: 100%;
|
|
101
|
+
`;
|
|
98
102
|
const FileReferenceItem = styled.div `
|
|
99
103
|
display: flex;
|
|
100
104
|
align-items: center;
|
|
101
105
|
justify-content: space-between;
|
|
102
|
-
|
|
103
|
-
svg {
|
|
106
|
+
width: 100% svg {
|
|
104
107
|
width: 14px;
|
|
105
108
|
height: 17px;
|
|
106
109
|
}
|
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-
|
|
4
|
+
"version": "1.1.16-LEAN-2669-v8",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|