@elice/material-exercise 1.260910.0 → 1.260915.0-edsmigration.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/_virtual/_rollupPluginBabelHelpers.js +8 -0
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +9 -7
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +6 -4
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +7 -5
- package/cjs/components/material-exercise/exercise-runner/action/ControllerActionCancel.js +2 -2
- package/cjs/components/material-exercise/exercise-runner/action/ControllerActionGrade.js +7 -9
- package/cjs/components/material-exercise/exercise-runner/action/ControllerActionRun.js +5 -6
- package/cjs/components/material-exercise/exercise-runner/action/ControllerActionSyncRequest.js +2 -2
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.js +33 -44
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogNativeMock.js +15 -20
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogSteps.js +15 -19
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoControllerActionCompile.js +5 -6
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoControllerActionUpload.js +5 -6
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoControllerButtonGroup.js +6 -4
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoControllerStatusMessage.js +25 -18
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoErrorDialog.js +7 -21
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoHelpDialog.js +31 -43
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoHelpDialogChecklist.js +14 -18
- package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +40 -28
- package/cjs/components/shared/image-viewer/ImageViewer.d.ts +23 -0
- package/cjs/components/shared/image-viewer/ImageViewer.js +149 -0
- package/cjs/components/shared/image-viewer/ImageViewerContent.d.ts +9 -0
- package/cjs/components/shared/image-viewer/ImageViewerContent.js +94 -0
- package/cjs/components/shared/image-viewer/ImageViewerToolbar.d.ts +11 -0
- package/cjs/components/shared/image-viewer/ImageViewerToolbar.js +80 -0
- package/cjs/components/shared/image-viewer/image-viewer.classes.d.ts +14 -0
- package/cjs/components/shared/image-viewer/image-viewer.classes.js +20 -0
- package/cjs/components/shared/image-viewer/index.d.ts +3 -0
- package/cjs/components/shared/image-viewer/index.js +9 -0
- package/cjs/components/shared/image-viewer/locales/en.json.js +7 -0
- package/cjs/components/shared/image-viewer/locales/ko.json.js +7 -0
- package/es/_virtual/_rollupPluginBabelHelpers.js +8 -1
- package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +6 -4
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +5 -3
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +4 -2
- package/es/components/material-exercise/exercise-runner/action/ControllerActionCancel.js +2 -2
- package/es/components/material-exercise/exercise-runner/action/ControllerActionGrade.js +2 -4
- package/es/components/material-exercise/exercise-runner/action/ControllerActionRun.js +2 -3
- package/es/components/material-exercise/exercise-runner/action/ControllerActionSyncRequest.js +2 -2
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.d.ts +1 -1
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.js +17 -18
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogNativeMock.js +3 -5
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogSteps.js +9 -7
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerActionCompile.js +2 -3
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerActionUpload.js +2 -3
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerButtonGroup.js +5 -3
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerStatusMessage.js +17 -10
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoErrorDialog.js +1 -6
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoHelpDialog.js +16 -18
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoHelpDialogChecklist.js +8 -6
- package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +34 -22
- package/es/components/shared/image-viewer/ImageViewer.d.ts +23 -0
- package/es/components/shared/image-viewer/ImageViewer.js +141 -0
- package/es/components/shared/image-viewer/ImageViewerContent.d.ts +9 -0
- package/es/components/shared/image-viewer/ImageViewerContent.js +85 -0
- package/es/components/shared/image-viewer/ImageViewerToolbar.d.ts +11 -0
- package/es/components/shared/image-viewer/ImageViewerToolbar.js +76 -0
- package/es/components/shared/image-viewer/image-viewer.classes.d.ts +14 -0
- package/es/components/shared/image-viewer/image-viewer.classes.js +18 -0
- package/es/components/shared/image-viewer/index.d.ts +3 -0
- package/es/components/shared/image-viewer/index.js +2 -0
- package/es/components/shared/image-viewer/locales/en.json.js +3 -0
- package/es/components/shared/image-viewer/locales/ko.json.js +3 -0
- package/package.json +15 -16
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import _styled from '@emotion/styled/base';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useTheme, useMediaQuery, Stack, Typography } from '@elice/eds-material';
|
|
6
|
+
import { FormattedMessage } from '@elice/intl';
|
|
7
|
+
import { Error } from '@mui/icons-material';
|
|
8
|
+
import { imageViewerClasses } from './image-viewer.classes.js';
|
|
9
|
+
|
|
10
|
+
//
|
|
11
|
+
//
|
|
12
|
+
//
|
|
13
|
+
var StyledImage = /*#__PURE__*/_styled("img", {
|
|
14
|
+
target: "e14qn5i10"
|
|
15
|
+
})("position:absolute;top:", function (_ref) {
|
|
16
|
+
var isMobileSize = _ref.isMobileSize;
|
|
17
|
+
return "calc(50% + ".concat(isMobileSize ? 1.75 : 2, "rem)");
|
|
18
|
+
}, ";left:50%;height:", function (_ref2) {
|
|
19
|
+
var isZoomIn = _ref2.isZoomIn;
|
|
20
|
+
return isZoomIn ? '100%' : null;
|
|
21
|
+
}, ";max-width:", function (_ref3) {
|
|
22
|
+
var isZoomIn = _ref3.isZoomIn;
|
|
23
|
+
return isZoomIn ? '100%' : null;
|
|
24
|
+
}, ";max-height:", function (_ref4) {
|
|
25
|
+
var isMobileSize = _ref4.isMobileSize;
|
|
26
|
+
return "calc(100% - ".concat(isMobileSize ? 3.5 : 4, "rem)");
|
|
27
|
+
}, ";transform:translate(-50%, -50%);object-fit:contain;cursor:", function (_ref5) {
|
|
28
|
+
var isZoomIn = _ref5.isZoomIn;
|
|
29
|
+
return isZoomIn ? 'zoom-out' : 'zoom-in';
|
|
30
|
+
}, ";");
|
|
31
|
+
//
|
|
32
|
+
//
|
|
33
|
+
//
|
|
34
|
+
var ImageViewerContent = function ImageViewerContent(_ref6) {
|
|
35
|
+
var isZoomIn = _ref6.isZoomIn,
|
|
36
|
+
image = _ref6.image,
|
|
37
|
+
onZoomIn = _ref6.onZoomIn;
|
|
38
|
+
var theme = useTheme();
|
|
39
|
+
var isMobileSize = useMediaQuery(theme.breakpoints.down('sm'));
|
|
40
|
+
var _React$useState = React.useState(false),
|
|
41
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
42
|
+
isError = _React$useState2[0],
|
|
43
|
+
setIsError = _React$useState2[1];
|
|
44
|
+
/**
|
|
45
|
+
* handle when image load is failed.
|
|
46
|
+
*/
|
|
47
|
+
var handleError = function handleError() {
|
|
48
|
+
setIsError(true);
|
|
49
|
+
};
|
|
50
|
+
//
|
|
51
|
+
//
|
|
52
|
+
//
|
|
53
|
+
if (isError) {
|
|
54
|
+
return jsxs(Stack, {
|
|
55
|
+
sx: {
|
|
56
|
+
color: 'white',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
gap: '0.5rem'
|
|
59
|
+
},
|
|
60
|
+
children: [jsx(Error, {
|
|
61
|
+
fontSize: "large",
|
|
62
|
+
color: "inherit"
|
|
63
|
+
}), jsx(Typography, {
|
|
64
|
+
variant: "subtitle1",
|
|
65
|
+
color: "inherit",
|
|
66
|
+
sx: {
|
|
67
|
+
fontWeight: 700
|
|
68
|
+
},
|
|
69
|
+
children: jsx(FormattedMessage, {
|
|
70
|
+
id: "content.error"
|
|
71
|
+
})
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return jsx(StyledImage, Object.assign({}, image, {
|
|
76
|
+
className: imageViewerClasses.content,
|
|
77
|
+
loading: "eager",
|
|
78
|
+
isZoomIn: isZoomIn,
|
|
79
|
+
isMobileSize: isMobileSize,
|
|
80
|
+
onClick: onZoomIn,
|
|
81
|
+
onError: handleError
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export { ImageViewerContent as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ImageProps } from './ImageViewer';
|
|
3
|
+
interface ImageViewerToolbarProps {
|
|
4
|
+
image: ImageProps | null;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
isZoomIn: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onZoomIn: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const ImageViewerToolbar: React.FC<ImageViewerToolbarProps>;
|
|
11
|
+
export default ImageViewerToolbar;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { FaIcon } from '@elice/eds-kit';
|
|
4
|
+
import { styled, Toolbar, Fade, Typography, Stack, Tooltip, IconButton } from '@elice/eds-material';
|
|
5
|
+
import { useIntl } from '@elice/intl';
|
|
6
|
+
import { faMagnifyingGlassMinus, faMagnifyingGlassPlus, faXmarkLarge } from '@fortawesome/pro-regular-svg-icons';
|
|
7
|
+
import { imageViewerClasses } from './image-viewer.classes.js';
|
|
8
|
+
|
|
9
|
+
var _templateObject;
|
|
10
|
+
//
|
|
11
|
+
//
|
|
12
|
+
//
|
|
13
|
+
var StyledToolbar = styled(Toolbar)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n background: ", ";\n z-index: 1;\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])), function (_ref) {
|
|
14
|
+
var theme = _ref.theme;
|
|
15
|
+
return theme.palette.common.black;
|
|
16
|
+
});
|
|
17
|
+
//
|
|
18
|
+
//
|
|
19
|
+
//
|
|
20
|
+
var ImageViewerToolbar = function ImageViewerToolbar(_ref2) {
|
|
21
|
+
var isOpen = _ref2.isOpen,
|
|
22
|
+
isZoomIn = _ref2.isZoomIn,
|
|
23
|
+
image = _ref2.image,
|
|
24
|
+
onClose = _ref2.onClose,
|
|
25
|
+
onZoomIn = _ref2.onZoomIn;
|
|
26
|
+
var intl = useIntl();
|
|
27
|
+
//
|
|
28
|
+
//
|
|
29
|
+
//
|
|
30
|
+
return jsx(Fade, {
|
|
31
|
+
unmountOnExit: true,
|
|
32
|
+
"in": isOpen,
|
|
33
|
+
children: jsxs(StyledToolbar, {
|
|
34
|
+
className: imageViewerClasses.toolbar,
|
|
35
|
+
children: [jsx("div", {
|
|
36
|
+
children: (image === null || image === void 0 ? void 0 : image.alt) && jsx(Typography, {
|
|
37
|
+
color: "white",
|
|
38
|
+
children: image.alt
|
|
39
|
+
})
|
|
40
|
+
}), jsxs(Stack, {
|
|
41
|
+
direction: "row",
|
|
42
|
+
sx: {
|
|
43
|
+
gap: '0.5rem',
|
|
44
|
+
color: 'white'
|
|
45
|
+
},
|
|
46
|
+
children: [jsx(Tooltip, {
|
|
47
|
+
title: intl.formatMessage({
|
|
48
|
+
id: "button.".concat(isZoomIn ? 'zoom_out' : 'zoom_in')
|
|
49
|
+
}),
|
|
50
|
+
children: jsx(IconButton, {
|
|
51
|
+
color: "inherit",
|
|
52
|
+
onClick: onZoomIn,
|
|
53
|
+
children: isZoomIn ? jsx(FaIcon, {
|
|
54
|
+
icon: faMagnifyingGlassMinus
|
|
55
|
+
}) : jsx(FaIcon, {
|
|
56
|
+
icon: faMagnifyingGlassPlus
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
}), jsx(Tooltip, {
|
|
60
|
+
title: intl.formatMessage({
|
|
61
|
+
id: 'button.close'
|
|
62
|
+
}),
|
|
63
|
+
children: jsx(IconButton, {
|
|
64
|
+
color: "inherit",
|
|
65
|
+
onClick: onClose,
|
|
66
|
+
children: jsx(FaIcon, {
|
|
67
|
+
icon: faXmarkLarge
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
})]
|
|
71
|
+
})]
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { ImageViewerToolbar as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ImageViewerClasses {
|
|
2
|
+
/** Styles applied to the viewer modal element. */
|
|
3
|
+
modal: string;
|
|
4
|
+
/** Styles applied to the viewer toolbar element. */
|
|
5
|
+
toolbar: string;
|
|
6
|
+
/** Styles applied to the viewer image element. */
|
|
7
|
+
content: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Cloned from `@elice/mui-elements` (EDS 슬리밍으로 eds-kit 에서 제외된 컴포넌트, PLAT-3580).
|
|
11
|
+
* `generateUtilityClasses('EliceMuiImageViewer', [...])` 산출물과 동일한 문자열을 하드코딩해
|
|
12
|
+
* `@mui/utils` phantom 의존을 제거한다.
|
|
13
|
+
*/
|
|
14
|
+
export declare const imageViewerClasses: ImageViewerClasses;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
//
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
//
|
|
6
|
+
//
|
|
7
|
+
/**
|
|
8
|
+
* Cloned from `@elice/mui-elements` (EDS 슬리밍으로 eds-kit 에서 제외된 컴포넌트, PLAT-3580).
|
|
9
|
+
* `generateUtilityClasses('EliceMuiImageViewer', [...])` 산출물과 동일한 문자열을 하드코딩해
|
|
10
|
+
* `@mui/utils` phantom 의존을 제거한다.
|
|
11
|
+
*/
|
|
12
|
+
var imageViewerClasses = {
|
|
13
|
+
modal: 'EliceMuiImageViewer-modal',
|
|
14
|
+
toolbar: 'EliceMuiImageViewer-toolbar',
|
|
15
|
+
content: 'EliceMuiImageViewer-content'
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { imageViewerClasses };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-exercise",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.260915.0-edsmigration.0",
|
|
4
4
|
"description": "User view and editing components of Elice material exercise",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"@elice/api-client": "^1",
|
|
22
22
|
"@elice/blocks": "^1",
|
|
23
23
|
"@elice/design-tokens": "^1",
|
|
24
|
+
"@elice/eds-kit": "^1.260911.0",
|
|
25
|
+
"@elice/eds-material": "^1.260911.0",
|
|
24
26
|
"@elice/icons": "^1",
|
|
25
27
|
"@elice/intl": "^0",
|
|
26
28
|
"@elice/markdown": "^1",
|
|
27
29
|
"@elice/mcu-bridge": "^1",
|
|
28
|
-
"@elice/mui-elements": "^5",
|
|
29
|
-
"@elice/mui-system": "^5",
|
|
30
30
|
"@elice/types": "^1",
|
|
31
31
|
"@elice/utils": "^1",
|
|
32
32
|
"@elice/websocket": "^1",
|
|
@@ -34,16 +34,15 @@
|
|
|
34
34
|
"@emotion/styled": "^11.10.0",
|
|
35
35
|
"@fortawesome/pro-regular-svg-icons": "^6",
|
|
36
36
|
"@fortawesome/pro-solid-svg-icons": "^6",
|
|
37
|
-
"@mui/icons-material": "^
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/material": "^5.10.16",
|
|
37
|
+
"@mui/icons-material": "^9.1.0",
|
|
38
|
+
"@mui/material": "^9.1.0",
|
|
40
39
|
"humps": "^2.0.1",
|
|
41
40
|
"lodash": "^4.17.21",
|
|
42
41
|
"overlay-kit": "^1.8.0",
|
|
43
|
-
"react": "^
|
|
42
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
44
43
|
"react-use": "^17.0.0",
|
|
45
|
-
"@elice/material-shared-types": "1.
|
|
46
|
-
"@elice/material-shared-utils": "1.
|
|
44
|
+
"@elice/material-shared-types": "1.260915.0-edsmigration.0",
|
|
45
|
+
"@elice/material-shared-utils": "1.260915.0-edsmigration.0"
|
|
47
46
|
},
|
|
48
47
|
"dependencies": {
|
|
49
48
|
"@novnc/novnc": "^1.3.0",
|
|
@@ -76,12 +75,12 @@
|
|
|
76
75
|
"@elice/api-client": "1.260529.0",
|
|
77
76
|
"@elice/blocks": "1.260723.0",
|
|
78
77
|
"@elice/design-tokens": "^1.220803.0",
|
|
78
|
+
"@elice/eds-kit": "1.260911.0",
|
|
79
|
+
"@elice/eds-material": "1.260911.0",
|
|
79
80
|
"@elice/icons": "^1.230814.0",
|
|
80
81
|
"@elice/intl": "0.260526.0",
|
|
81
82
|
"@elice/markdown": "1.241015.0",
|
|
82
83
|
"@elice/mcu-bridge": "^1.260514.0",
|
|
83
|
-
"@elice/mui-elements": "5.251204.0",
|
|
84
|
-
"@elice/mui-system": "5.251204.0",
|
|
85
84
|
"@elice/rollup-config": "^1.260406.0",
|
|
86
85
|
"@elice/types": "1.260608.0",
|
|
87
86
|
"@elice/utils": "^1.250930.0",
|
|
@@ -91,9 +90,9 @@
|
|
|
91
90
|
"@emotion/styled": "^11.10.0",
|
|
92
91
|
"@fortawesome/pro-regular-svg-icons": "^6.4.2",
|
|
93
92
|
"@fortawesome/pro-solid-svg-icons": "^6.4.2",
|
|
94
|
-
"@mui/icons-material": "
|
|
95
|
-
"@mui/
|
|
96
|
-
"@mui/
|
|
93
|
+
"@mui/icons-material": "9.1.0",
|
|
94
|
+
"@mui/material": "9.1.0",
|
|
95
|
+
"@mui/system": "9.1.0",
|
|
97
96
|
"@types/classnames": "^2.3.1",
|
|
98
97
|
"@types/color": "^3.0.3",
|
|
99
98
|
"@types/file-saver": "^2.0.5",
|
|
@@ -118,8 +117,8 @@
|
|
|
118
117
|
"rollup": "^4.0.0",
|
|
119
118
|
"typescript": "~5.9.3",
|
|
120
119
|
"vite": "^4.4.9",
|
|
121
|
-
"@elice/material-shared-types": "1.
|
|
122
|
-
"@elice/material-shared-utils": "1.
|
|
120
|
+
"@elice/material-shared-types": "1.260915.0-edsmigration.0",
|
|
121
|
+
"@elice/material-shared-utils": "1.260915.0-edsmigration.0"
|
|
123
122
|
},
|
|
124
123
|
"scripts": {
|
|
125
124
|
"start": "run-s watch",
|