@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,149 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
|
+
var tslib = require('tslib');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var edsMaterial = require('@elice/eds-material');
|
|
10
|
+
var intl = require('@elice/intl');
|
|
11
|
+
var en = require('./locales/en.json.js');
|
|
12
|
+
var ko = require('./locales/ko.json.js');
|
|
13
|
+
var imageViewer_classes = require('./image-viewer.classes.js');
|
|
14
|
+
var ImageViewerContent = require('./ImageViewerContent.js');
|
|
15
|
+
var ImageViewerToolbar = require('./ImageViewerToolbar.js');
|
|
16
|
+
|
|
17
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
18
|
+
|
|
19
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
20
|
+
|
|
21
|
+
//
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
var overrideStyle = function overrideStyle(children) {
|
|
25
|
+
return [children.type, children.props.component].includes('img') ? {
|
|
26
|
+
cursor: 'zoom-in'
|
|
27
|
+
} : null;
|
|
28
|
+
};
|
|
29
|
+
//
|
|
30
|
+
//
|
|
31
|
+
//
|
|
32
|
+
var ImageViewer = React.forwardRef(function (_a, _ref) {
|
|
33
|
+
var children = _a.children,
|
|
34
|
+
src = _a.src,
|
|
35
|
+
alt = _a.alt,
|
|
36
|
+
slotProps = _a.slotProps,
|
|
37
|
+
onClick = _a.onClick,
|
|
38
|
+
__intl = _a.__intl;
|
|
39
|
+
_a.__locale;
|
|
40
|
+
_a.__timeZone;
|
|
41
|
+
var props = tslib.__rest(_a, ["children", "src", "alt", "slotProps", "onClick", "__intl", "__locale", "__timeZone"]);
|
|
42
|
+
var _React$useState = React__default.default.useState(null),
|
|
43
|
+
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
44
|
+
image = _React$useState2[0],
|
|
45
|
+
setImage = _React$useState2[1];
|
|
46
|
+
var _React$useState3 = React__default.default.useState(false),
|
|
47
|
+
_React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
|
|
48
|
+
isZoomIn = _React$useState4[0],
|
|
49
|
+
setIsZoomIn = _React$useState4[1];
|
|
50
|
+
var open = Boolean(image);
|
|
51
|
+
/**
|
|
52
|
+
* close image viewer.
|
|
53
|
+
*/
|
|
54
|
+
var handleClose = function handleClose() {
|
|
55
|
+
setImage(null);
|
|
56
|
+
setIsZoomIn(false);
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* toggle image zoom-in flag.
|
|
60
|
+
*/
|
|
61
|
+
var handleZoomIn = function handleZoomIn() {
|
|
62
|
+
setIsZoomIn(function (prevIsZoomIn) {
|
|
63
|
+
return !prevIsZoomIn;
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
var handleImageClick = function handleImageClick(e) {
|
|
70
|
+
if (typeof onClick === 'function') {
|
|
71
|
+
onClick(e);
|
|
72
|
+
}
|
|
73
|
+
var el = e.currentTarget;
|
|
74
|
+
var curImgSrc = src || el.src;
|
|
75
|
+
var curImgAlt = alt || el.alt;
|
|
76
|
+
if (curImgSrc) {
|
|
77
|
+
setImage({
|
|
78
|
+
src: curImgSrc,
|
|
79
|
+
alt: curImgAlt
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
var renderImageViewerChildren = function renderImageViewerChildren() {
|
|
87
|
+
if (!React__default.default.isValidElement(children)) {
|
|
88
|
+
return children;
|
|
89
|
+
}
|
|
90
|
+
return React__default.default.cloneElement(children, Object.assign(Object.assign({}, props), {
|
|
91
|
+
style: overrideStyle(children),
|
|
92
|
+
onClick: handleImageClick,
|
|
93
|
+
ref: function ref(node) {
|
|
94
|
+
if (typeof _ref === 'function') {
|
|
95
|
+
_ref(node);
|
|
96
|
+
} else if (_ref) {
|
|
97
|
+
_ref.current = node;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
105
|
+
var renderImageViewerModal = function renderImageViewerModal() {
|
|
106
|
+
return jsxRuntime.jsx(edsMaterial.Modal, Object.assign({
|
|
107
|
+
className: imageViewer_classes.imageViewerClasses.modal,
|
|
108
|
+
open: open,
|
|
109
|
+
onClose: handleClose
|
|
110
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.modal, {
|
|
111
|
+
children: jsxRuntime.jsx(edsMaterial.Fade, {
|
|
112
|
+
unmountOnExit: true,
|
|
113
|
+
"in": open,
|
|
114
|
+
children: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
115
|
+
sx: {
|
|
116
|
+
justifyContent: 'center',
|
|
117
|
+
alignItems: 'center'
|
|
118
|
+
},
|
|
119
|
+
children: [jsxRuntime.jsx(ImageViewerToolbar.default, {
|
|
120
|
+
isOpen: open,
|
|
121
|
+
isZoomIn: isZoomIn,
|
|
122
|
+
image: image,
|
|
123
|
+
onClose: handleClose,
|
|
124
|
+
onZoomIn: handleZoomIn
|
|
125
|
+
}), jsxRuntime.jsx(ImageViewerContent.default, {
|
|
126
|
+
isZoomIn: isZoomIn,
|
|
127
|
+
image: image,
|
|
128
|
+
onZoomIn: handleZoomIn
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
}));
|
|
133
|
+
};
|
|
134
|
+
//
|
|
135
|
+
//
|
|
136
|
+
//
|
|
137
|
+
return jsxRuntime.jsxs(intl.RawIntlProvider, {
|
|
138
|
+
value: __intl,
|
|
139
|
+
children: [renderImageViewerModal(), jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
140
|
+
children: renderImageViewerChildren()
|
|
141
|
+
})]
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
//
|
|
145
|
+
//
|
|
146
|
+
//
|
|
147
|
+
var ImageViewer$1 = new intl.IntlComponentBuilder(ImageViewer).add('en', en.default).add('ko', ko.default).build();
|
|
148
|
+
|
|
149
|
+
exports.default = ImageViewer$1;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ImageProps } from './ImageViewer';
|
|
3
|
+
interface ImageViewerResultProps {
|
|
4
|
+
image: ImageProps | null;
|
|
5
|
+
isZoomIn: boolean;
|
|
6
|
+
onZoomIn: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ImageViewerContent: React.FC<ImageViewerResultProps>;
|
|
9
|
+
export default ImageViewerContent;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
|
+
var _styled = require('@emotion/styled/base');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var edsMaterial = require('@elice/eds-material');
|
|
10
|
+
var intl = require('@elice/intl');
|
|
11
|
+
var iconsMaterial = require('@mui/icons-material');
|
|
12
|
+
var imageViewer_classes = require('./image-viewer.classes.js');
|
|
13
|
+
|
|
14
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
|
+
|
|
16
|
+
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
|
+
|
|
19
|
+
//
|
|
20
|
+
//
|
|
21
|
+
//
|
|
22
|
+
var StyledImage = /*#__PURE__*/_styled__default.default("img", {
|
|
23
|
+
target: "e14qn5i10"
|
|
24
|
+
})("position:absolute;top:", function (_ref) {
|
|
25
|
+
var isMobileSize = _ref.isMobileSize;
|
|
26
|
+
return "calc(50% + ".concat(isMobileSize ? 1.75 : 2, "rem)");
|
|
27
|
+
}, ";left:50%;height:", function (_ref2) {
|
|
28
|
+
var isZoomIn = _ref2.isZoomIn;
|
|
29
|
+
return isZoomIn ? '100%' : null;
|
|
30
|
+
}, ";max-width:", function (_ref3) {
|
|
31
|
+
var isZoomIn = _ref3.isZoomIn;
|
|
32
|
+
return isZoomIn ? '100%' : null;
|
|
33
|
+
}, ";max-height:", function (_ref4) {
|
|
34
|
+
var isMobileSize = _ref4.isMobileSize;
|
|
35
|
+
return "calc(100% - ".concat(isMobileSize ? 3.5 : 4, "rem)");
|
|
36
|
+
}, ";transform:translate(-50%, -50%);object-fit:contain;cursor:", function (_ref5) {
|
|
37
|
+
var isZoomIn = _ref5.isZoomIn;
|
|
38
|
+
return isZoomIn ? 'zoom-out' : 'zoom-in';
|
|
39
|
+
}, ";");
|
|
40
|
+
//
|
|
41
|
+
//
|
|
42
|
+
//
|
|
43
|
+
var ImageViewerContent = function ImageViewerContent(_ref6) {
|
|
44
|
+
var isZoomIn = _ref6.isZoomIn,
|
|
45
|
+
image = _ref6.image,
|
|
46
|
+
onZoomIn = _ref6.onZoomIn;
|
|
47
|
+
var theme = edsMaterial.useTheme();
|
|
48
|
+
var isMobileSize = edsMaterial.useMediaQuery(theme.breakpoints.down('sm'));
|
|
49
|
+
var _React$useState = React__default.default.useState(false),
|
|
50
|
+
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
51
|
+
isError = _React$useState2[0],
|
|
52
|
+
setIsError = _React$useState2[1];
|
|
53
|
+
/**
|
|
54
|
+
* handle when image load is failed.
|
|
55
|
+
*/
|
|
56
|
+
var handleError = function handleError() {
|
|
57
|
+
setIsError(true);
|
|
58
|
+
};
|
|
59
|
+
//
|
|
60
|
+
//
|
|
61
|
+
//
|
|
62
|
+
if (isError) {
|
|
63
|
+
return jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
64
|
+
sx: {
|
|
65
|
+
color: 'white',
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
gap: '0.5rem'
|
|
68
|
+
},
|
|
69
|
+
children: [jsxRuntime.jsx(iconsMaterial.Error, {
|
|
70
|
+
fontSize: "large",
|
|
71
|
+
color: "inherit"
|
|
72
|
+
}), jsxRuntime.jsx(edsMaterial.Typography, {
|
|
73
|
+
variant: "subtitle1",
|
|
74
|
+
color: "inherit",
|
|
75
|
+
sx: {
|
|
76
|
+
fontWeight: 700
|
|
77
|
+
},
|
|
78
|
+
children: jsxRuntime.jsx(intl.FormattedMessage, {
|
|
79
|
+
id: "content.error"
|
|
80
|
+
})
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return jsxRuntime.jsx(StyledImage, Object.assign({}, image, {
|
|
85
|
+
className: imageViewer_classes.imageViewerClasses.content,
|
|
86
|
+
loading: "eager",
|
|
87
|
+
isZoomIn: isZoomIn,
|
|
88
|
+
isMobileSize: isMobileSize,
|
|
89
|
+
onClick: onZoomIn,
|
|
90
|
+
onError: handleError
|
|
91
|
+
}));
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
exports.default = ImageViewerContent;
|
|
@@ -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,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var edsKit = require('@elice/eds-kit');
|
|
8
|
+
var edsMaterial = require('@elice/eds-material');
|
|
9
|
+
var intl = require('@elice/intl');
|
|
10
|
+
var proRegularSvgIcons = require('@fortawesome/pro-regular-svg-icons');
|
|
11
|
+
var imageViewer_classes = require('./image-viewer.classes.js');
|
|
12
|
+
|
|
13
|
+
var _templateObject;
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
var StyledToolbar = edsMaterial.styled(edsMaterial.Toolbar)(_templateObject || (_templateObject = _rollupPluginBabelHelpers.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) {
|
|
18
|
+
var theme = _ref.theme;
|
|
19
|
+
return theme.palette.common.black;
|
|
20
|
+
});
|
|
21
|
+
//
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
var ImageViewerToolbar = function ImageViewerToolbar(_ref2) {
|
|
25
|
+
var isOpen = _ref2.isOpen,
|
|
26
|
+
isZoomIn = _ref2.isZoomIn,
|
|
27
|
+
image = _ref2.image,
|
|
28
|
+
onClose = _ref2.onClose,
|
|
29
|
+
onZoomIn = _ref2.onZoomIn;
|
|
30
|
+
var intl$1 = intl.useIntl();
|
|
31
|
+
//
|
|
32
|
+
//
|
|
33
|
+
//
|
|
34
|
+
return jsxRuntime.jsx(edsMaterial.Fade, {
|
|
35
|
+
unmountOnExit: true,
|
|
36
|
+
"in": isOpen,
|
|
37
|
+
children: jsxRuntime.jsxs(StyledToolbar, {
|
|
38
|
+
className: imageViewer_classes.imageViewerClasses.toolbar,
|
|
39
|
+
children: [jsxRuntime.jsx("div", {
|
|
40
|
+
children: (image === null || image === void 0 ? void 0 : image.alt) && jsxRuntime.jsx(edsMaterial.Typography, {
|
|
41
|
+
color: "white",
|
|
42
|
+
children: image.alt
|
|
43
|
+
})
|
|
44
|
+
}), jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
45
|
+
direction: "row",
|
|
46
|
+
sx: {
|
|
47
|
+
gap: '0.5rem',
|
|
48
|
+
color: 'white'
|
|
49
|
+
},
|
|
50
|
+
children: [jsxRuntime.jsx(edsMaterial.Tooltip, {
|
|
51
|
+
title: intl$1.formatMessage({
|
|
52
|
+
id: "button.".concat(isZoomIn ? 'zoom_out' : 'zoom_in')
|
|
53
|
+
}),
|
|
54
|
+
children: jsxRuntime.jsx(edsMaterial.IconButton, {
|
|
55
|
+
color: "inherit",
|
|
56
|
+
onClick: onZoomIn,
|
|
57
|
+
children: isZoomIn ? jsxRuntime.jsx(edsKit.FaIcon, {
|
|
58
|
+
icon: proRegularSvgIcons.faMagnifyingGlassMinus
|
|
59
|
+
}) : jsxRuntime.jsx(edsKit.FaIcon, {
|
|
60
|
+
icon: proRegularSvgIcons.faMagnifyingGlassPlus
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
}), jsxRuntime.jsx(edsMaterial.Tooltip, {
|
|
64
|
+
title: intl$1.formatMessage({
|
|
65
|
+
id: 'button.close'
|
|
66
|
+
}),
|
|
67
|
+
children: jsxRuntime.jsx(edsMaterial.IconButton, {
|
|
68
|
+
color: "inherit",
|
|
69
|
+
onClick: onClose,
|
|
70
|
+
children: jsxRuntime.jsx(edsKit.FaIcon, {
|
|
71
|
+
icon: proRegularSvgIcons.faXmarkLarge
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
})]
|
|
75
|
+
})]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
exports.default = ImageViewerToolbar;
|
|
@@ -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,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
//
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
//
|
|
9
|
+
/**
|
|
10
|
+
* Cloned from `@elice/mui-elements` (EDS 슬리밍으로 eds-kit 에서 제외된 컴포넌트, PLAT-3580).
|
|
11
|
+
* `generateUtilityClasses('EliceMuiImageViewer', [...])` 산출물과 동일한 문자열을 하드코딩해
|
|
12
|
+
* `@mui/utils` phantom 의존을 제거한다.
|
|
13
|
+
*/
|
|
14
|
+
var imageViewerClasses = {
|
|
15
|
+
modal: 'EliceMuiImageViewer-modal',
|
|
16
|
+
toolbar: 'EliceMuiImageViewer-toolbar',
|
|
17
|
+
content: 'EliceMuiImageViewer-content'
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.imageViewerClasses = imageViewerClasses;
|
|
@@ -251,6 +251,13 @@ function _regeneratorDefine(e, r, n, t) {
|
|
|
251
251
|
function _slicedToArray(r, e) {
|
|
252
252
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
253
253
|
}
|
|
254
|
+
function _taggedTemplateLiteral(e, t) {
|
|
255
|
+
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
256
|
+
raw: {
|
|
257
|
+
value: Object.freeze(t)
|
|
258
|
+
}
|
|
259
|
+
}));
|
|
260
|
+
}
|
|
254
261
|
function _toConsumableArray(r) {
|
|
255
262
|
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
256
263
|
}
|
|
@@ -285,4 +292,4 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
285
292
|
}
|
|
286
293
|
}
|
|
287
294
|
|
|
288
|
-
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _asyncToGenerator as asyncToGenerator, _classCallCheck as classCallCheck, _createClass as createClass, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _regenerator as regenerator, _regeneratorDefine as regeneratorDefine, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
295
|
+
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _asyncToGenerator as asyncToGenerator, _classCallCheck as classCallCheck, _createClass as createClass, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _regenerator as regenerator, _regeneratorDefine as regeneratorDefine, _slicedToArray as slicedToArray, _taggedTemplateLiteral as taggedTemplateLiteral, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
@@ -3,15 +3,15 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Flex, Text, Hspace, NotificationCount, IconButton, Icon, Vspace } from '@elice/blocks';
|
|
5
5
|
import { base } from '@elice/design-tokens';
|
|
6
|
+
import { Stack, Typography } from '@elice/eds-material';
|
|
6
7
|
import { eilAttachment, eilMathsignMultiplyBasic, eilFolder, eilDownload } from '@elice/icons';
|
|
7
8
|
import { useRawEliceIntl } from '@elice/intl';
|
|
8
|
-
import { ImageViewer } from '@elice/mui-elements';
|
|
9
|
-
import { Stack, Typography } from '@mui/material';
|
|
10
9
|
import { useRecoilValue } from 'recoil';
|
|
11
10
|
import { DARK_TEXT_SECONDARY_COLOR } from '../../../constants/color.js';
|
|
12
11
|
import { StyledMenuButtonFileCount, StyledFilePopoverContent, StyledFilePopoverHeader, StyledFilePopoverBody, StyledFilePopoverBodyList, StyledFilePopoverBodyListItem, StyledFilePopoverBodyListItemContentFile, StyledFilePopoverBodyListItemDownloadButton, StyledFilePopoverBodyListItemContentImageWrap, StyledFilePopoverBodyListItemContentImage } from './ExerciseMenuStdioFileBrowser.styled.js';
|
|
13
12
|
import { exerciseRunnerStdioFilesState } from '../context/recoil.js';
|
|
14
13
|
import ExerciseMenuButton from '../../shared/exercise-menu-button/ExerciseMenuButton.js';
|
|
14
|
+
import ImageViewer from '../../shared/image-viewer/ImageViewer.js';
|
|
15
15
|
|
|
16
16
|
var ExerciseMenuStdioFileBrowser = function ExerciseMenuStdioFileBrowser() {
|
|
17
17
|
var intl = useRawEliceIntl();
|
|
@@ -95,9 +95,9 @@ var ExerciseMenuStdioFileBrowser = function ExerciseMenuStdioFileBrowser() {
|
|
|
95
95
|
height: 0.5
|
|
96
96
|
}), jsx(Typography, {
|
|
97
97
|
variant: "body2",
|
|
98
|
-
textAlign: "center",
|
|
99
98
|
color: DARK_TEXT_SECONDARY_COLOR,
|
|
100
99
|
sx: {
|
|
100
|
+
textAlign: 'center',
|
|
101
101
|
whiteSpace: 'pre-wrap'
|
|
102
102
|
},
|
|
103
103
|
children: intl.formatMessage({
|
|
@@ -181,7 +181,9 @@ var ExerciseMenuStdioFileBrowser = function ExerciseMenuStdioFileBrowser() {
|
|
|
181
181
|
//
|
|
182
182
|
//
|
|
183
183
|
return jsxs(Stack, {
|
|
184
|
-
|
|
184
|
+
sx: {
|
|
185
|
+
position: 'relative'
|
|
186
|
+
},
|
|
185
187
|
children: [jsx(ExerciseMenuButton, {
|
|
186
188
|
icon: eilAttachment,
|
|
187
189
|
active: open,
|
package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Stack } from '@
|
|
2
|
+
import { Stack } from '@elice/eds-material';
|
|
3
3
|
import ControllerActionRun from './action/ControllerActionRun.js';
|
|
4
4
|
import ControllerActionGrade from './action/ControllerActionGrade.js';
|
|
5
5
|
import ControllerActionCancel from './action/ControllerActionCancel.js';
|
|
@@ -11,8 +11,10 @@ import ControllerActionSyncRequest from './action/ControllerActionSyncRequest.js
|
|
|
11
11
|
var ExerciseRunnerControllerButtonGroup = function ExerciseRunnerControllerButtonGroup() {
|
|
12
12
|
return jsxs(Stack, {
|
|
13
13
|
direction: "row",
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
sx: {
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
gap: '0.5rem'
|
|
17
|
+
},
|
|
16
18
|
children: [jsx(ControllerActionRun, {}), jsx(ControllerActionGrade, {}), jsx(ControllerActionCancel, {}), jsx(ControllerActionSyncRequest, {})]
|
|
17
19
|
});
|
|
18
20
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button, Typography, Avatar } from '@elice/eds-material';
|
|
2
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
3
4
|
import { useHelpyLogo } from '@elice/material-shared-utils';
|
|
4
|
-
import { Button, Typography, Avatar } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
//
|
|
7
7
|
//
|
|
@@ -32,7 +32,9 @@ var ExerciseRunnerControllerCodeHelpRequestButton = function ExerciseRunnerContr
|
|
|
32
32
|
onClick: onClick,
|
|
33
33
|
children: jsx(Typography, {
|
|
34
34
|
variant: "button",
|
|
35
|
-
|
|
35
|
+
sx: {
|
|
36
|
+
color: 'text.primary'
|
|
37
|
+
},
|
|
36
38
|
children: intl.formatMessage({
|
|
37
39
|
id: 'exerciseRunner.controller.buttonGroup.button.helpRequest'
|
|
38
40
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '@elice/eds-material';
|
|
2
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
3
|
-
import { LoadingButton } from '@mui/lab';
|
|
4
4
|
import { useControllerActionCancel } from './useControllerActionCancel.js';
|
|
5
5
|
import { useExericseShortcut } from '../../../../hooks/useExericseShortcut.js';
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ var ControllerActionCancel = function ControllerActionCancel() {
|
|
|
24
24
|
if (isHidden) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
|
-
return jsx(
|
|
27
|
+
return jsx(Button, {
|
|
28
28
|
size: "small",
|
|
29
29
|
variant: "contained",
|
|
30
30
|
color: "error",
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Tooltip, Box, Button, colors } from '@elice/eds-material';
|
|
2
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
3
|
-
import { colors } from '@elice/mui-system';
|
|
4
|
-
import { LoadingButton } from '@mui/lab';
|
|
5
|
-
import { Tooltip, Box } from '@mui/material';
|
|
6
4
|
import { useControllerActionGrade } from './useControllerActionGrade.js';
|
|
7
5
|
import { useExericseShortcut } from '../../../../hooks/useExericseShortcut.js';
|
|
8
6
|
|
|
@@ -37,7 +35,7 @@ var ControllerActionGrade = function ControllerActionGrade() {
|
|
|
37
35
|
sx: {
|
|
38
36
|
display: 'inline-flex'
|
|
39
37
|
},
|
|
40
|
-
children: jsx(
|
|
38
|
+
children: jsx(Button, {
|
|
41
39
|
size: "small",
|
|
42
40
|
variant: "contained",
|
|
43
41
|
color: "info",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button, colors } from '@elice/eds-material';
|
|
2
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
3
|
-
import { colors } from '@elice/mui-system';
|
|
4
|
-
import { LoadingButton } from '@mui/lab';
|
|
5
4
|
import { useControllerActionRun } from './useControllerActionRun.js';
|
|
6
5
|
import { useExericseShortcut } from '../../../../hooks/useExericseShortcut.js';
|
|
7
6
|
|
|
@@ -25,7 +24,7 @@ var ControllerActionRun = function ControllerActionRun() {
|
|
|
25
24
|
if (isHidden) {
|
|
26
25
|
return null;
|
|
27
26
|
}
|
|
28
|
-
return jsx(
|
|
27
|
+
return jsx(Button, {
|
|
29
28
|
size: "small",
|
|
30
29
|
variant: "contained",
|
|
31
30
|
color: "primary",
|
package/es/components/material-exercise/exercise-runner/action/ControllerActionSyncRequest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '@elice/eds-material';
|
|
2
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
3
|
-
import { LoadingButton } from '@mui/lab';
|
|
4
4
|
import { useControllerActionSyncRequest } from './useControllerActionSyncRequest.js';
|
|
5
5
|
import { useExericseShortcut } from '../../../../hooks/useExericseShortcut.js';
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ var ControllerActionSyncRequest = function ControllerActionSyncRequest() {
|
|
|
24
24
|
if (isHidden) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
|
-
return jsx(
|
|
27
|
+
return jsx(Button, {
|
|
28
28
|
size: "small",
|
|
29
29
|
variant: "contained",
|
|
30
30
|
color: "secondary",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { DialogProps } from '@
|
|
2
|
+
import type { DialogProps } from '@elice/eds-material';
|
|
3
3
|
import type { ArduinoConnectionIntent } from './_context';
|
|
4
4
|
interface ArduinoConnectionPreflightDialogProps extends DialogProps {
|
|
5
5
|
intent: ArduinoConnectionIntent;
|