@elice/material-exercise 1.221028.0 → 1.221101.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.
- package/cjs/components/shared/file-viewer/FileViewer.js +14 -9
- package/cjs/components/shared/xterm/locales/en.json.js +1 -1
- package/cjs/components/shared/xterm/locales/ko.json.js +1 -1
- package/es/components/shared/file-viewer/FileViewer.js +14 -9
- package/es/components/shared/xterm/locales/en.json.js +1 -1
- package/es/components/shared/xterm/locales/ko.json.js +1 -1
- package/package.json +4 -4
|
@@ -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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var phrasesEn = {"xterm.systemMessage.runAfter":"\n/* Code running is complete! */
|
|
3
|
+
var phrasesEn = {"xterm.systemMessage.runAfter":"\n/* Code running is complete! */","xterm.systemMessage.runBefore":"/* Code has not run yet. */","xterm.systemMessage.running":"/* Code is running... */"};
|
|
4
4
|
|
|
5
5
|
module.exports = phrasesEn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var phrasesKo = {"xterm.systemMessage.runAfter":"\n/* 코드 실행이 완료되었습니다! */
|
|
3
|
+
var phrasesKo = {"xterm.systemMessage.runAfter":"\n/* 코드 실행이 완료되었습니다! */","xterm.systemMessage.runBefore":"/* 코드가 아직 실행되지 않았습니다. */","xterm.systemMessage.running":"/* 코드가 실행되는 중입니다... */"};
|
|
4
4
|
|
|
5
5
|
module.exports = phrasesKo;
|
|
@@ -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.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var phrasesEn = {"xterm.systemMessage.runAfter":"\n/* Code running is complete! */
|
|
1
|
+
var phrasesEn = {"xterm.systemMessage.runAfter":"\n/* Code running is complete! */","xterm.systemMessage.runBefore":"/* Code has not run yet. */","xterm.systemMessage.running":"/* Code is running... */"};
|
|
2
2
|
|
|
3
3
|
export { phrasesEn as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var phrasesKo = {"xterm.systemMessage.runAfter":"\n/* 코드 실행이 완료되었습니다! */
|
|
1
|
+
var phrasesKo = {"xterm.systemMessage.runAfter":"\n/* 코드 실행이 완료되었습니다! */","xterm.systemMessage.runBefore":"/* 코드가 아직 실행되지 않았습니다. */","xterm.systemMessage.running":"/* 코드가 실행되는 중입니다... */"};
|
|
2
2
|
|
|
3
3
|
export { phrasesKo as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-exercise",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.221101.0",
|
|
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.
|
|
120
|
-
"@elice/material-shared-utils": "1.
|
|
119
|
+
"@elice/material-shared-types": "1.221101.0",
|
|
120
|
+
"@elice/material-shared-utils": "1.221101.0",
|
|
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": "cded816ae289798155765b2f5a0992587e23b00c"
|
|
143
143
|
}
|