@elice/material-exercise 1.221028.0 → 1.221028.1
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.
|
@@ -54,22 +54,27 @@ const FileViewer = ({
|
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
const PreviewComponent = React__default["default"].useMemo(() => {
|
|
57
|
-
//
|
|
57
|
+
// CSV file
|
|
58
|
+
if (mimeType === 'text/csv') {
|
|
59
|
+
return AsyncFileViewerCsv;
|
|
60
|
+
} // Text file (or binary file which shows as text)
|
|
61
|
+
|
|
62
|
+
|
|
58
63
|
if (showInTextViewer || mimeType.startsWith('text/')) {
|
|
59
64
|
return AsyncFileViewerText;
|
|
60
65
|
} // Image file
|
|
61
|
-
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if (mimeType.startsWith('image/')) {
|
|
62
69
|
return AsyncFileViewerImage;
|
|
63
|
-
} // CSV file
|
|
64
|
-
else if (mimeType === 'text/csv') {
|
|
65
|
-
return AsyncFileViewerCsv;
|
|
66
70
|
} // ipynb (Jupyter Notebook)
|
|
67
|
-
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
if (mimeType === 'ipynb') {
|
|
68
74
|
return AsyncFileViewerIpynb;
|
|
69
|
-
} // other...
|
|
70
|
-
else {
|
|
71
|
-
return null;
|
|
72
75
|
}
|
|
76
|
+
|
|
77
|
+
return null;
|
|
73
78
|
}, [mimeType, showInTextViewer]);
|
|
74
79
|
/**
|
|
75
80
|
* Handle download button click.
|
|
@@ -43,22 +43,27 @@ const FileViewer = ({
|
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
45
|
const PreviewComponent = React.useMemo(() => {
|
|
46
|
-
//
|
|
46
|
+
// CSV file
|
|
47
|
+
if (mimeType === 'text/csv') {
|
|
48
|
+
return AsyncFileViewerCsv;
|
|
49
|
+
} // Text file (or binary file which shows as text)
|
|
50
|
+
|
|
51
|
+
|
|
47
52
|
if (showInTextViewer || mimeType.startsWith('text/')) {
|
|
48
53
|
return AsyncFileViewerText;
|
|
49
54
|
} // Image file
|
|
50
|
-
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
if (mimeType.startsWith('image/')) {
|
|
51
58
|
return AsyncFileViewerImage;
|
|
52
|
-
} // CSV file
|
|
53
|
-
else if (mimeType === 'text/csv') {
|
|
54
|
-
return AsyncFileViewerCsv;
|
|
55
59
|
} // ipynb (Jupyter Notebook)
|
|
56
|
-
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
if (mimeType === 'ipynb') {
|
|
57
63
|
return AsyncFileViewerIpynb;
|
|
58
|
-
} // other...
|
|
59
|
-
else {
|
|
60
|
-
return null;
|
|
61
64
|
}
|
|
65
|
+
|
|
66
|
+
return null;
|
|
62
67
|
}, [mimeType, showInTextViewer]);
|
|
63
68
|
/**
|
|
64
69
|
* Handle download button click.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-exercise",
|
|
3
|
-
"version": "1.221028.
|
|
3
|
+
"version": "1.221028.1",
|
|
4
4
|
"description": "User view and editing components of Elice material exercise",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
"@elice/design-tokens": "^1.220803.0",
|
|
117
117
|
"@elice/icons": "^1.220803.0",
|
|
118
118
|
"@elice/markdown": "^1.220803.0",
|
|
119
|
-
"@elice/material-shared-types": "1.221028.
|
|
120
|
-
"@elice/material-shared-utils": "1.221028.
|
|
119
|
+
"@elice/material-shared-types": "1.221028.1",
|
|
120
|
+
"@elice/material-shared-utils": "1.221028.1",
|
|
121
121
|
"@elice/types": "^1.221027.0",
|
|
122
122
|
"@elice/websocket": "^1.220803.0",
|
|
123
123
|
"@types/classnames": "^2.3.1",
|
|
@@ -139,5 +139,5 @@
|
|
|
139
139
|
"recoil": "^0.6.1",
|
|
140
140
|
"styled-components": "^5.2.0"
|
|
141
141
|
},
|
|
142
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "817b927e18aea831f69af7b40c23ff6699ab14f9"
|
|
143
143
|
}
|