@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
package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { Dialog, DialogTitle, DialogContent, Stack, Typography, DialogActions, Alert, FormControlLabel, Checkbox, Button } from '@elice/eds-material';
|
|
4
5
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
6
|
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
|
6
|
-
import Alert from '@mui/material/Alert';
|
|
7
|
-
import Button from '@mui/material/Button';
|
|
8
|
-
import Checkbox from '@mui/material/Checkbox';
|
|
9
|
-
import Dialog from '@mui/material/Dialog';
|
|
10
|
-
import DialogActions from '@mui/material/DialogActions';
|
|
11
|
-
import DialogContent from '@mui/material/DialogContent';
|
|
12
|
-
import DialogTitle from '@mui/material/DialogTitle';
|
|
13
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
14
|
-
import Stack from '@mui/material/Stack';
|
|
15
|
-
import Typography from '@mui/material/Typography';
|
|
16
7
|
import ArduinoConnectionPreflightDialogNativeMock from './ArduinoConnectionPreflightDialogNativeMock.js';
|
|
17
8
|
import ArduinoConnectionPreflightDialogSteps from './ArduinoConnectionPreflightDialogSteps.js';
|
|
18
9
|
|
|
@@ -74,9 +65,9 @@ var ArduinoConnectionPreflightDialog = function ArduinoConnectionPreflightDialog
|
|
|
74
65
|
*/
|
|
75
66
|
var renderPreview = function renderPreview() {
|
|
76
67
|
return jsxs(Stack, {
|
|
77
|
-
alignItems: "center",
|
|
78
68
|
spacing: 1.25,
|
|
79
69
|
sx: {
|
|
70
|
+
alignItems: 'center',
|
|
80
71
|
bgcolor: function bgcolor(theme) {
|
|
81
72
|
return theme.palette.background.paper;
|
|
82
73
|
},
|
|
@@ -89,14 +80,16 @@ var ArduinoConnectionPreflightDialog = function ArduinoConnectionPreflightDialog
|
|
|
89
80
|
children: [jsxs(Stack, {
|
|
90
81
|
direction: "row",
|
|
91
82
|
spacing: 0.75,
|
|
92
|
-
|
|
83
|
+
sx: {
|
|
84
|
+
alignItems: 'center'
|
|
85
|
+
},
|
|
93
86
|
children: [jsx(ArrowUpwardIcon, {
|
|
94
87
|
sx: {
|
|
95
88
|
fontSize: 11
|
|
96
89
|
}
|
|
97
90
|
}), jsx(Typography, {
|
|
98
|
-
color: "primary.main",
|
|
99
91
|
sx: {
|
|
92
|
+
color: 'primary.main',
|
|
100
93
|
fontSize: 12,
|
|
101
94
|
fontWeight: 700,
|
|
102
95
|
letterSpacing: '-.01em'
|
|
@@ -154,9 +147,11 @@ var ArduinoConnectionPreflightDialog = function ArduinoConnectionPreflightDialog
|
|
|
154
147
|
fullWidth: true,
|
|
155
148
|
maxWidth: "sm",
|
|
156
149
|
open: open,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
150
|
+
slotProps: {
|
|
151
|
+
paper: {
|
|
152
|
+
sx: {
|
|
153
|
+
maxHeight: 'calc(100vh - 32px)'
|
|
154
|
+
}
|
|
160
155
|
}
|
|
161
156
|
},
|
|
162
157
|
onClose: onClose,
|
|
@@ -168,13 +163,17 @@ var ArduinoConnectionPreflightDialog = function ArduinoConnectionPreflightDialog
|
|
|
168
163
|
spacing: 2,
|
|
169
164
|
children: [renderUploadNotice(), jsx(Typography, {
|
|
170
165
|
variant: "body2",
|
|
171
|
-
|
|
166
|
+
sx: {
|
|
167
|
+
color: 'text.secondary'
|
|
168
|
+
},
|
|
172
169
|
children: intl.formatMessage({
|
|
173
170
|
id: 'exerciseRunner.arduino.preflight.body'
|
|
174
171
|
})
|
|
175
172
|
}), renderPreview(), jsx(ArduinoConnectionPreflightDialogSteps, {}), jsx(Typography, {
|
|
176
173
|
variant: "caption",
|
|
177
|
-
|
|
174
|
+
sx: {
|
|
175
|
+
color: 'text.secondary'
|
|
176
|
+
},
|
|
178
177
|
children: intl.formatMessage({
|
|
179
178
|
id: 'exerciseRunner.arduino.preflight.footer'
|
|
180
179
|
})
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Box, Stack, Typography } from '@elice/eds-material';
|
|
2
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
3
4
|
import LockIcon from '@mui/icons-material/Lock';
|
|
4
|
-
import Box from '@mui/material/Box';
|
|
5
|
-
import Stack from '@mui/material/Stack';
|
|
6
|
-
import Typography from '@mui/material/Typography';
|
|
7
5
|
|
|
8
6
|
//
|
|
9
7
|
//
|
|
@@ -35,8 +33,8 @@ var ArduinoConnectionPreflightDialogNativeMock = function ArduinoConnectionPrefl
|
|
|
35
33
|
return jsxs(Stack, {
|
|
36
34
|
direction: "row",
|
|
37
35
|
spacing: 1,
|
|
38
|
-
alignItems: "center",
|
|
39
36
|
sx: {
|
|
37
|
+
alignItems: 'center',
|
|
40
38
|
pt: '11px',
|
|
41
39
|
pb: '9px',
|
|
42
40
|
px: '14px',
|
|
@@ -111,8 +109,8 @@ var ArduinoConnectionPreflightDialogNativeMock = function ArduinoConnectionPrefl
|
|
|
111
109
|
return jsxs(Stack, {
|
|
112
110
|
direction: "row",
|
|
113
111
|
spacing: 1,
|
|
114
|
-
alignItems: "center",
|
|
115
112
|
sx: {
|
|
113
|
+
alignItems: 'center',
|
|
116
114
|
py: '8px',
|
|
117
115
|
px: '12px',
|
|
118
116
|
bgcolor: MOCK_FOOT_BG,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Stack, Typography, Box } from '@elice/eds-material';
|
|
2
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
3
|
-
import Box from '@mui/material/Box';
|
|
4
|
-
import Stack from '@mui/material/Stack';
|
|
5
|
-
import Typography from '@mui/material/Typography';
|
|
6
4
|
|
|
7
5
|
//
|
|
8
6
|
//
|
|
@@ -47,8 +45,10 @@ var ArduinoConnectionPreflightDialogSteps = function ArduinoConnectionPreflightD
|
|
|
47
45
|
return jsx(Typography, {
|
|
48
46
|
component: "span",
|
|
49
47
|
variant: "inherit",
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
sx: {
|
|
49
|
+
color: 'text.primary',
|
|
50
|
+
fontWeight: 700
|
|
51
|
+
},
|
|
52
52
|
children: text
|
|
53
53
|
});
|
|
54
54
|
};
|
|
@@ -86,11 +86,13 @@ var ArduinoConnectionPreflightDialogSteps = function ArduinoConnectionPreflightD
|
|
|
86
86
|
return jsxs(Stack, {
|
|
87
87
|
direction: "row",
|
|
88
88
|
spacing: 1.25,
|
|
89
|
-
|
|
89
|
+
sx: {
|
|
90
|
+
alignItems: 'flex-start'
|
|
91
|
+
},
|
|
90
92
|
children: [renderStepBadge(step), jsx(Typography, {
|
|
91
93
|
variant: "body2",
|
|
92
|
-
color: "text.secondary",
|
|
93
94
|
sx: {
|
|
95
|
+
color: 'text.secondary',
|
|
94
96
|
whiteSpace: 'pre-line'
|
|
95
97
|
},
|
|
96
98
|
children: intl.formatMessage({
|
package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerActionCompile.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { Button, colors } from '@elice/eds-material';
|
|
4
5
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
|
-
import { colors } from '@elice/mui-system';
|
|
6
|
-
import { LoadingButton } from '@mui/lab';
|
|
7
6
|
import { useArduinoBridge } from './_context.js';
|
|
8
7
|
import { useControllerActionRun } from '../action/useControllerActionRun.js';
|
|
9
8
|
import { useExericseShortcut } from '../../../../hooks/useExericseShortcut.js';
|
|
@@ -55,7 +54,7 @@ var ArduinoControllerActionCompile = function ArduinoControllerActionCompile() {
|
|
|
55
54
|
if (isHidden) {
|
|
56
55
|
return null;
|
|
57
56
|
}
|
|
58
|
-
return jsx(
|
|
57
|
+
return jsx(Button, {
|
|
59
58
|
size: "small",
|
|
60
59
|
variant: "contained",
|
|
61
60
|
color: "primary",
|
package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerActionUpload.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { Button, colors } from '@elice/eds-material';
|
|
4
5
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
6
|
import { useConnection, useIsBrowserSupported } from '@elice/mcu-bridge';
|
|
6
|
-
import { colors } from '@elice/mui-system';
|
|
7
|
-
import { LoadingButton } from '@mui/lab';
|
|
8
7
|
import { useArduinoBridge } from './_context.js';
|
|
9
8
|
import { useControllerActionRun } from '../action/useControllerActionRun.js';
|
|
10
9
|
|
|
@@ -69,7 +68,7 @@ var ArduinoControllerActionUpload = function ArduinoControllerActionUpload() {
|
|
|
69
68
|
if (isHidden) {
|
|
70
69
|
return null;
|
|
71
70
|
}
|
|
72
|
-
return jsx(
|
|
71
|
+
return jsx(Button, {
|
|
73
72
|
size: "small",
|
|
74
73
|
variant: "contained",
|
|
75
74
|
loading: isUploadLoading,
|
package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerButtonGroup.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 ArduinoControllerActionCompile from './ArduinoControllerActionCompile.js';
|
|
4
4
|
import ArduinoControllerActionUpload from './ArduinoControllerActionUpload.js';
|
|
5
5
|
import ControllerActionGrade from '../action/ControllerActionGrade.js';
|
|
@@ -11,8 +11,10 @@ import ControllerActionCancel from '../action/ControllerActionCancel.js';
|
|
|
11
11
|
var ArduinoControllerButtonGroup = function ArduinoControllerButtonGroup() {
|
|
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(ArduinoControllerActionCompile, {}), jsx(ArduinoControllerActionUpload, {}), jsx(ControllerActionGrade, {}), jsx(ControllerActionCancel, {})]
|
|
17
19
|
});
|
|
18
20
|
};
|
package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerStatusMessage.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { defineProperty as _defineProperty, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Text } from '@elice/blocks';
|
|
4
|
+
import { Stack, inputBaseClasses, inputLabelClasses, Box, Button } from '@elice/eds-material';
|
|
4
5
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
6
|
import { useConnection, useSession, useIsBrowserSupported, BaudRateSelect } from '@elice/mcu-bridge';
|
|
6
|
-
import { LoadingButton } from '@mui/lab';
|
|
7
|
-
import { Stack, inputBaseClasses, inputLabelClasses, Box } from '@mui/material';
|
|
8
7
|
import ExerciseRunnerControllerStatusMessage from '../ExerciseRunnerControllerStatusMessage.js';
|
|
9
8
|
import { useArduinoBridge } from './_context.js';
|
|
10
9
|
import ArduinoHelpDialogButton from './ArduinoHelpDialogButton.js';
|
|
@@ -132,8 +131,10 @@ var ArduinoControllerStatusMessage = function ArduinoControllerStatusMessage() {
|
|
|
132
131
|
var renderArduinoStatus = function renderArduinoStatus() {
|
|
133
132
|
return jsxs(Stack, {
|
|
134
133
|
direction: "row",
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
sx: {
|
|
135
|
+
alignItems: 'center',
|
|
136
|
+
gap: '0.5rem'
|
|
137
|
+
},
|
|
137
138
|
children: [jsx(Box, {
|
|
138
139
|
sx: {
|
|
139
140
|
width: '6px',
|
|
@@ -155,9 +156,11 @@ var ArduinoControllerStatusMessage = function ArduinoControllerStatusMessage() {
|
|
|
155
156
|
var renderArduinoConnectButton = function renderArduinoConnectButton() {
|
|
156
157
|
return jsxs(Stack, {
|
|
157
158
|
direction: "row",
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
sx: {
|
|
160
|
+
alignItems: 'center',
|
|
161
|
+
gap: '0.5rem'
|
|
162
|
+
},
|
|
163
|
+
children: [jsx(Button, {
|
|
161
164
|
color: isConnected ? 'error' : 'success',
|
|
162
165
|
size: "small",
|
|
163
166
|
disabled: !isBrowserSupported || isTransitioning || isFlashing,
|
|
@@ -176,10 +179,14 @@ var ArduinoControllerStatusMessage = function ArduinoControllerStatusMessage() {
|
|
|
176
179
|
//
|
|
177
180
|
return jsxs(Stack, {
|
|
178
181
|
direction: "row",
|
|
179
|
-
|
|
180
|
-
|
|
182
|
+
sx: {
|
|
183
|
+
alignItems: 'center',
|
|
184
|
+
gap: '1rem'
|
|
185
|
+
},
|
|
181
186
|
children: [renderArduinoBaudRate(), jsxs(Stack, {
|
|
182
|
-
|
|
187
|
+
sx: {
|
|
188
|
+
alignItems: 'flex-end'
|
|
189
|
+
},
|
|
183
190
|
children: [jsx(ExerciseRunnerControllerStatusMessage, {}), renderArduinoStatus()]
|
|
184
191
|
}), renderArduinoConnectButton()]
|
|
185
192
|
});
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Dialog, DialogTitle, DialogContent, Stack, DialogActions, Button } from '@elice/eds-material';
|
|
3
4
|
import { useRawEliceIntl } from '@elice/intl';
|
|
4
5
|
import { useConnection, useMCUBridgeError, usePermissionState, PermissionAlert, MCUBridgeErrorText } from '@elice/mcu-bridge';
|
|
5
|
-
import Button from '@mui/material/Button';
|
|
6
|
-
import Dialog from '@mui/material/Dialog';
|
|
7
|
-
import DialogActions from '@mui/material/DialogActions';
|
|
8
|
-
import DialogContent from '@mui/material/DialogContent';
|
|
9
|
-
import DialogTitle from '@mui/material/DialogTitle';
|
|
10
|
-
import Stack from '@mui/material/Stack';
|
|
11
6
|
|
|
12
7
|
//
|
|
13
8
|
//
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { FaIcon } from '@elice/eds-kit';
|
|
5
|
+
import { Dialog, DialogTitle, DialogContent, Stack, Typography, DialogActions, FormControlLabel, Checkbox, Box, Button, Card, CardActionArea } from '@elice/eds-material';
|
|
4
6
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
|
-
import { EliceIcon } from '@elice/mui-elements';
|
|
6
7
|
import { faBookAlt, faArrowRight } from '@fortawesome/pro-regular-svg-icons';
|
|
7
|
-
import { Card, CardActionArea } from '@mui/material';
|
|
8
|
-
import Box from '@mui/material/Box';
|
|
9
|
-
import Button from '@mui/material/Button';
|
|
10
|
-
import Checkbox from '@mui/material/Checkbox';
|
|
11
|
-
import Dialog from '@mui/material/Dialog';
|
|
12
|
-
import DialogActions from '@mui/material/DialogActions';
|
|
13
|
-
import DialogContent from '@mui/material/DialogContent';
|
|
14
|
-
import DialogTitle from '@mui/material/DialogTitle';
|
|
15
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
16
|
-
import Stack from '@mui/material/Stack';
|
|
17
|
-
import Typography from '@mui/material/Typography';
|
|
18
8
|
import { useArduinoBridge } from './_context.js';
|
|
19
9
|
import ArduinoHelpDialogChecklist from './ArduinoHelpDialogChecklist.js';
|
|
20
10
|
|
|
@@ -81,8 +71,10 @@ var ArduinoHelpDialog = function ArduinoHelpDialog() {
|
|
|
81
71
|
children: jsxs(Stack, {
|
|
82
72
|
direction: "row",
|
|
83
73
|
spacing: 1.5,
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
sx: {
|
|
75
|
+
alignItems: 'center'
|
|
76
|
+
},
|
|
77
|
+
children: [jsx(FaIcon, {
|
|
86
78
|
icon: faBookAlt
|
|
87
79
|
}), jsxs(Box, {
|
|
88
80
|
sx: {
|
|
@@ -91,18 +83,22 @@ var ArduinoHelpDialog = function ArduinoHelpDialog() {
|
|
|
91
83
|
},
|
|
92
84
|
children: [jsx(Typography, {
|
|
93
85
|
variant: "body2",
|
|
94
|
-
|
|
86
|
+
sx: {
|
|
87
|
+
fontWeight: 700
|
|
88
|
+
},
|
|
95
89
|
children: intl.formatMessage({
|
|
96
90
|
id: 'exerciseRunner.arduino.help.manual.title'
|
|
97
91
|
})
|
|
98
92
|
}), jsx(Typography, {
|
|
99
93
|
variant: "caption",
|
|
100
|
-
|
|
94
|
+
sx: {
|
|
95
|
+
color: 'text.secondary'
|
|
96
|
+
},
|
|
101
97
|
children: intl.formatMessage({
|
|
102
98
|
id: 'exerciseRunner.arduino.help.manual.detail'
|
|
103
99
|
})
|
|
104
100
|
})]
|
|
105
|
-
}), jsx(
|
|
101
|
+
}), jsx(FaIcon, {
|
|
106
102
|
icon: faArrowRight
|
|
107
103
|
})]
|
|
108
104
|
})
|
|
@@ -126,7 +122,9 @@ var ArduinoHelpDialog = function ArduinoHelpDialog() {
|
|
|
126
122
|
spacing: 2.5,
|
|
127
123
|
children: [jsx(Typography, {
|
|
128
124
|
variant: "body2",
|
|
129
|
-
|
|
125
|
+
sx: {
|
|
126
|
+
color: 'text.secondary'
|
|
127
|
+
},
|
|
130
128
|
children: intl.formatMessage({
|
|
131
129
|
id: 'exerciseRunner.arduino.help.greeting'
|
|
132
130
|
})
|
package/es/components/material-exercise/exercise-runner/arduino/ArduinoHelpDialogChecklist.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Stack, Box, Typography } from '@elice/eds-material';
|
|
2
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
3
|
-
import Box from '@mui/material/Box';
|
|
4
|
-
import Stack from '@mui/material/Stack';
|
|
5
|
-
import Typography from '@mui/material/Typography';
|
|
6
4
|
|
|
7
5
|
//
|
|
8
6
|
//
|
|
@@ -48,7 +46,9 @@ var ArduinoHelpDialogChecklist = function ArduinoHelpDialogChecklist() {
|
|
|
48
46
|
return jsxs(Stack, {
|
|
49
47
|
direction: "row",
|
|
50
48
|
spacing: 1.5,
|
|
51
|
-
|
|
49
|
+
sx: {
|
|
50
|
+
alignItems: 'flex-start'
|
|
51
|
+
},
|
|
52
52
|
children: [renderStepBadge(step), jsxs(Box, {
|
|
53
53
|
sx: {
|
|
54
54
|
flex: 1,
|
|
@@ -56,12 +56,14 @@ var ArduinoHelpDialogChecklist = function ArduinoHelpDialogChecklist() {
|
|
|
56
56
|
},
|
|
57
57
|
children: [jsx(Typography, {
|
|
58
58
|
variant: "body2",
|
|
59
|
-
|
|
59
|
+
sx: {
|
|
60
|
+
fontWeight: 700
|
|
61
|
+
},
|
|
60
62
|
children: title
|
|
61
63
|
}), jsx(Typography, {
|
|
62
64
|
variant: "caption",
|
|
63
|
-
color: "text.secondary",
|
|
64
65
|
sx: {
|
|
66
|
+
color: 'text.secondary',
|
|
65
67
|
display: 'block',
|
|
66
68
|
mt: 0.25
|
|
67
69
|
},
|
|
@@ -3,9 +3,9 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import React, { useState, useEffect } from 'react';
|
|
4
4
|
import { getOrgMaterialExerciseExerciseRunningList, getOrgMaterialExerciseExerciseRoomUserFileGet, getOrgMaterialExerciseExerciseImageExerciseFileGet, getOrgMaterialExerciseExerciseRunningGet, getOrgMaterialExerciseUsercodeGet } from '@elice/api-client';
|
|
5
5
|
import { Flex, Text, ResizableNext, Spinner } from '@elice/blocks';
|
|
6
|
+
import { Stack, Box, Typography } from '@elice/eds-material';
|
|
6
7
|
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
7
8
|
import { enums } from '@elice/types';
|
|
8
|
-
import { Stack, Box, Typography } from '@mui/material';
|
|
9
9
|
import dayjs from 'dayjs';
|
|
10
10
|
import { camelizeKeys } from 'humps';
|
|
11
11
|
import { useRecoilValue } from 'recoil';
|
|
@@ -438,23 +438,29 @@ var ExerciseSubmitHistory = function ExerciseSubmitHistory(_ref) {
|
|
|
438
438
|
*/
|
|
439
439
|
var renderEmptySubmitHistoryView = function renderEmptySubmitHistoryView() {
|
|
440
440
|
return jsxs(Stack, {
|
|
441
|
-
width: "100%",
|
|
442
|
-
height: "100%",
|
|
443
|
-
overflow: "hidden",
|
|
444
|
-
justifyContent: "center",
|
|
445
|
-
alignItems: "center",
|
|
446
441
|
direction: "column",
|
|
447
|
-
|
|
442
|
+
sx: {
|
|
443
|
+
width: '100%',
|
|
444
|
+
height: '100%',
|
|
445
|
+
overflow: 'hidden',
|
|
446
|
+
justifyContent: 'center',
|
|
447
|
+
alignItems: 'center',
|
|
448
|
+
gap: '1rem'
|
|
449
|
+
},
|
|
448
450
|
children: [jsx(Box, {
|
|
449
451
|
component: "img",
|
|
450
|
-
width: "9.375rem",
|
|
451
|
-
height: "9.375rem",
|
|
452
452
|
src: img,
|
|
453
|
-
alt: "emptyImage"
|
|
453
|
+
alt: "emptyImage",
|
|
454
|
+
sx: {
|
|
455
|
+
width: '9.375rem',
|
|
456
|
+
height: '9.375rem'
|
|
457
|
+
}
|
|
454
458
|
}), jsx(Typography, {
|
|
455
459
|
variant: "body1",
|
|
456
|
-
|
|
457
|
-
|
|
460
|
+
sx: {
|
|
461
|
+
color: function color(theme) {
|
|
462
|
+
return theme.palette.primary.contrastText;
|
|
463
|
+
}
|
|
458
464
|
},
|
|
459
465
|
children: __intl.formatMessage({
|
|
460
466
|
id: 'exerciseSubmitHistory.empty'
|
|
@@ -467,20 +473,26 @@ var ExerciseSubmitHistory = function ExerciseSubmitHistory(_ref) {
|
|
|
467
473
|
*/
|
|
468
474
|
var renderSubmitHistory = function renderSubmitHistory() {
|
|
469
475
|
return jsxs(Stack, {
|
|
470
|
-
width: "100%",
|
|
471
|
-
height: "100%",
|
|
472
|
-
overflow: "hidden",
|
|
473
476
|
direction: "row",
|
|
477
|
+
sx: {
|
|
478
|
+
width: '100%',
|
|
479
|
+
height: '100%',
|
|
480
|
+
overflow: 'hidden'
|
|
481
|
+
},
|
|
474
482
|
children: [jsx(Box, {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
483
|
+
sx: {
|
|
484
|
+
maxWidth: '15rem',
|
|
485
|
+
width: '100%',
|
|
486
|
+
height: '100%',
|
|
487
|
+
overflow: 'hidden'
|
|
488
|
+
},
|
|
479
489
|
children: renderRunningVersionList()
|
|
480
490
|
}), jsxs(Stack, {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
491
|
+
sx: {
|
|
492
|
+
height: '100%',
|
|
493
|
+
overflow: 'hidden',
|
|
494
|
+
width: '100%'
|
|
495
|
+
},
|
|
484
496
|
children: [renderRunningContent(), renderRunningOutput()]
|
|
485
497
|
})]
|
|
486
498
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ModalProps } from '@elice/eds-material';
|
|
3
|
+
export type ImageProps = Partial<Pick<React.ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'onClick'>>;
|
|
4
|
+
export interface ImageViewerSlotProps {
|
|
5
|
+
/** The props used for each slot inside the Modal. */
|
|
6
|
+
modal?: Omit<ModalProps, 'open' | 'onClose' | 'children'>;
|
|
7
|
+
}
|
|
8
|
+
export interface ImageViewerProps extends ImageProps {
|
|
9
|
+
/**
|
|
10
|
+
* Element to open image viewer when clicked.
|
|
11
|
+
* - if `children` is `<img />`, `src` and `alt` props are automatically set.
|
|
12
|
+
* - if `children` is not `<img />`, `src` and `alt` props are required. (otherwise, image viewer will not open)
|
|
13
|
+
*/
|
|
14
|
+
children: React.ReactElement<ImageProps>;
|
|
15
|
+
/** The props used for each slot inside. */
|
|
16
|
+
slotProps?: ImageViewerSlotProps;
|
|
17
|
+
/** Callback fired when the component requests to be closed. */
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<import("@elice/intl").IntlComponentExtraProps & Omit<ImageViewerProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & {
|
|
21
|
+
__intl: import("@elice/intl").EliceIntlShape;
|
|
22
|
+
} & React.RefAttributes<HTMLElement>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { __rest } from 'tslib';
|
|
3
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { Modal, Fade, Stack } from '@elice/eds-material';
|
|
6
|
+
import { RawIntlProvider, IntlComponentBuilder } from '@elice/intl';
|
|
7
|
+
import messagesEn from './locales/en.json.js';
|
|
8
|
+
import messagesKo from './locales/ko.json.js';
|
|
9
|
+
import { imageViewerClasses } from './image-viewer.classes.js';
|
|
10
|
+
import ImageViewerContent from './ImageViewerContent.js';
|
|
11
|
+
import ImageViewerToolbar from './ImageViewerToolbar.js';
|
|
12
|
+
|
|
13
|
+
//
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
var overrideStyle = function overrideStyle(children) {
|
|
17
|
+
return [children.type, children.props.component].includes('img') ? {
|
|
18
|
+
cursor: 'zoom-in'
|
|
19
|
+
} : null;
|
|
20
|
+
};
|
|
21
|
+
//
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
var ImageViewer = forwardRef(function (_a, _ref) {
|
|
25
|
+
var children = _a.children,
|
|
26
|
+
src = _a.src,
|
|
27
|
+
alt = _a.alt,
|
|
28
|
+
slotProps = _a.slotProps,
|
|
29
|
+
onClick = _a.onClick,
|
|
30
|
+
__intl = _a.__intl;
|
|
31
|
+
_a.__locale;
|
|
32
|
+
_a.__timeZone;
|
|
33
|
+
var props = __rest(_a, ["children", "src", "alt", "slotProps", "onClick", "__intl", "__locale", "__timeZone"]);
|
|
34
|
+
var _React$useState = React.useState(null),
|
|
35
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
36
|
+
image = _React$useState2[0],
|
|
37
|
+
setImage = _React$useState2[1];
|
|
38
|
+
var _React$useState3 = React.useState(false),
|
|
39
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
40
|
+
isZoomIn = _React$useState4[0],
|
|
41
|
+
setIsZoomIn = _React$useState4[1];
|
|
42
|
+
var open = Boolean(image);
|
|
43
|
+
/**
|
|
44
|
+
* close image viewer.
|
|
45
|
+
*/
|
|
46
|
+
var handleClose = function handleClose() {
|
|
47
|
+
setImage(null);
|
|
48
|
+
setIsZoomIn(false);
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* toggle image zoom-in flag.
|
|
52
|
+
*/
|
|
53
|
+
var handleZoomIn = function handleZoomIn() {
|
|
54
|
+
setIsZoomIn(function (prevIsZoomIn) {
|
|
55
|
+
return !prevIsZoomIn;
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
var handleImageClick = function handleImageClick(e) {
|
|
62
|
+
if (typeof onClick === 'function') {
|
|
63
|
+
onClick(e);
|
|
64
|
+
}
|
|
65
|
+
var el = e.currentTarget;
|
|
66
|
+
var curImgSrc = src || el.src;
|
|
67
|
+
var curImgAlt = alt || el.alt;
|
|
68
|
+
if (curImgSrc) {
|
|
69
|
+
setImage({
|
|
70
|
+
src: curImgSrc,
|
|
71
|
+
alt: curImgAlt
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
var renderImageViewerChildren = function renderImageViewerChildren() {
|
|
79
|
+
if (!React.isValidElement(children)) {
|
|
80
|
+
return children;
|
|
81
|
+
}
|
|
82
|
+
return React.cloneElement(children, Object.assign(Object.assign({}, props), {
|
|
83
|
+
style: overrideStyle(children),
|
|
84
|
+
onClick: handleImageClick,
|
|
85
|
+
ref: function ref(node) {
|
|
86
|
+
if (typeof _ref === 'function') {
|
|
87
|
+
_ref(node);
|
|
88
|
+
} else if (_ref) {
|
|
89
|
+
_ref.current = node;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
97
|
+
var renderImageViewerModal = function renderImageViewerModal() {
|
|
98
|
+
return jsx(Modal, Object.assign({
|
|
99
|
+
className: imageViewerClasses.modal,
|
|
100
|
+
open: open,
|
|
101
|
+
onClose: handleClose
|
|
102
|
+
}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.modal, {
|
|
103
|
+
children: jsx(Fade, {
|
|
104
|
+
unmountOnExit: true,
|
|
105
|
+
"in": open,
|
|
106
|
+
children: jsxs(Stack, {
|
|
107
|
+
sx: {
|
|
108
|
+
justifyContent: 'center',
|
|
109
|
+
alignItems: 'center'
|
|
110
|
+
},
|
|
111
|
+
children: [jsx(ImageViewerToolbar, {
|
|
112
|
+
isOpen: open,
|
|
113
|
+
isZoomIn: isZoomIn,
|
|
114
|
+
image: image,
|
|
115
|
+
onClose: handleClose,
|
|
116
|
+
onZoomIn: handleZoomIn
|
|
117
|
+
}), jsx(ImageViewerContent, {
|
|
118
|
+
isZoomIn: isZoomIn,
|
|
119
|
+
image: image,
|
|
120
|
+
onZoomIn: handleZoomIn
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
}));
|
|
125
|
+
};
|
|
126
|
+
//
|
|
127
|
+
//
|
|
128
|
+
//
|
|
129
|
+
return jsxs(RawIntlProvider, {
|
|
130
|
+
value: __intl,
|
|
131
|
+
children: [renderImageViewerModal(), jsx(Fragment, {
|
|
132
|
+
children: renderImageViewerChildren()
|
|
133
|
+
})]
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
//
|
|
137
|
+
//
|
|
138
|
+
//
|
|
139
|
+
var ImageViewer$1 = new IntlComponentBuilder(ImageViewer).add('en', messagesEn).add('ko', messagesKo).build();
|
|
140
|
+
|
|
141
|
+
export { ImageViewer$1 as default };
|
|
@@ -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;
|