@elice/material-runbox 1.240718.0-trasncript.2 → 1.240718.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.
Files changed (55) hide show
  1. package/cjs/assets/queue.gif.js +2 -1
  2. package/cjs/assets/runbox_logo.png.js +2 -1
  3. package/cjs/assets/terminated.png.js +2 -1
  4. package/cjs/components/material-runbox/MaterialRunbox.js +20 -24
  5. package/cjs/components/material-runbox/MaterialRunboxBody.js +4 -10
  6. package/cjs/components/material-runbox/MaterialRunboxContent.js +103 -132
  7. package/cjs/components/material-runbox/MaterialRunboxFooter.js +18 -27
  8. package/cjs/components/material-runbox/MaterialRunboxHeader.js +87 -103
  9. package/cjs/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +27 -31
  10. package/cjs/components/material-runbox/actions/MaterialRunboxActionGrade.js +159 -242
  11. package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -32
  12. package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.js +76 -125
  13. package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +53 -84
  14. package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.js +28 -40
  15. package/cjs/components/material-runbox/contexts/MaterialRunboxApiContext.js +15 -27
  16. package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +36 -52
  17. package/cjs/components/material-runbox/contexts/MaterialRunboxContext.js +8 -11
  18. package/cjs/components/material-runbox/hooks/useRunboxControl.js +38 -62
  19. package/cjs/components/material-runbox/runtime/Runtime.js +17 -25
  20. package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +29 -33
  21. package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +39 -40
  22. package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +57 -72
  23. package/es/assets/queue.gif.js +2 -1
  24. package/es/assets/runbox_logo.png.js +2 -1
  25. package/es/assets/terminated.png.js +2 -1
  26. package/es/components/material-runbox/MaterialRunbox.js +20 -24
  27. package/es/components/material-runbox/MaterialRunboxBody.js +4 -6
  28. package/es/components/material-runbox/MaterialRunboxContent.js +103 -128
  29. package/es/components/material-runbox/MaterialRunboxFooter.js +18 -23
  30. package/es/components/material-runbox/MaterialRunboxHeader.js +88 -99
  31. package/es/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +27 -27
  32. package/es/components/material-runbox/actions/MaterialRunboxActionGrade.js +159 -237
  33. package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -28
  34. package/es/components/material-runbox/actions/MaterialRunboxActionReset.js +76 -121
  35. package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +53 -80
  36. package/es/components/material-runbox/actions/MaterialRunboxActionShare.js +28 -36
  37. package/es/components/material-runbox/contexts/MaterialRunboxApiContext.js +14 -22
  38. package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +35 -47
  39. package/es/components/material-runbox/contexts/MaterialRunboxContext.js +7 -6
  40. package/es/components/material-runbox/hooks/useRunboxControl.js +38 -62
  41. package/es/components/material-runbox/runtime/Runtime.js +17 -21
  42. package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +30 -34
  43. package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +40 -41
  44. package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +58 -69
  45. package/package.json +11 -8
  46. package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -386
  47. package/cjs/components/material-runbox/contexts/index.js +0 -17
  48. package/cjs/components/material-runbox/hooks/index.js +0 -7
  49. package/cjs/components/material-runbox/index.js +0 -7
  50. package/cjs/components/material-runbox/locales/index.js +0 -13
  51. package/es/_virtual/_rollupPluginBabelHelpers.js +0 -377
  52. package/es/components/material-runbox/contexts/index.js +0 -3
  53. package/es/components/material-runbox/hooks/index.js +0 -1
  54. package/es/components/material-runbox/index.js +0 -1
  55. package/es/components/material-runbox/locales/index.js +0 -4
@@ -1,6 +1,4 @@
1
- import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import _styled from '@emotion/styled/base';
3
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
4
2
  import React from 'react';
5
3
  import { Transition } from 'react-transition-group';
6
4
  import { useRawEliceIntl } from '@elice/intl';
@@ -19,8 +17,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
19
17
  //
20
18
  //
21
19
  //
22
- var TRANSITION_DURATION = 300;
23
- var TRANSITION_STYLE_MAP = {
20
+ const TRANSITION_DURATION = 300;
21
+ const TRANSITION_STYLE_MAP = {
24
22
  entering: {
25
23
  maxWidth: 0
26
24
  },
@@ -40,7 +38,7 @@ var TRANSITION_STYLE_MAP = {
40
38
  //
41
39
  //
42
40
  //
43
- var StyledMainActionButton = /*#__PURE__*/_styled(LoadingButton, {
41
+ const StyledMainActionButton = /*#__PURE__*/_styled(LoadingButton, {
44
42
  target: "eae460y2"
45
43
  })("production" === "production" ? {
46
44
  name: "tssn5p",
@@ -50,184 +48,139 @@ var StyledMainActionButton = /*#__PURE__*/_styled(LoadingButton, {
50
48
  styles: "min-width:4rem!important",
51
49
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
52
50
  });
53
- var StyledSubActionButton = /*#__PURE__*/_styled(Button, {
51
+ const StyledSubActionButton = /*#__PURE__*/_styled(Button, {
54
52
  target: "eae460y1"
55
53
  })("transition:max-width ", TRANSITION_DURATION, "ms cubic-bezier(0.25, 0.46, 0.45, 1);");
56
- var StyledTerminal = /*#__PURE__*/_styled("textarea", {
54
+ const StyledTerminal = /*#__PURE__*/_styled("textarea", {
57
55
  target: "eae460y0"
58
- })("padding:1rem;width:100%;color:", function (_ref) {
59
- var theme = _ref.theme;
60
- return theme.palette.common.white;
61
- }, ";background-color:", function (_ref2) {
62
- var theme = _ref2.theme;
63
- return theme.palette.common.black;
64
- }, ";border:none;border-radius:0.5rem;font-family:'Elice Digital Coding',monospace;font-size:", function (_ref3) {
65
- var theme = _ref3.theme;
66
- return theme.typography.body2.fontSize;
67
- }, ";line-height:", function (_ref4) {
68
- var theme = _ref4.theme;
69
- return theme.typography.body2.lineHeight;
70
- }, ";outline:none;resize:none;");
56
+ })("padding:1rem;width:100%;color:", ({
57
+ theme
58
+ }) => theme.palette.common.white, ";background-color:", ({
59
+ theme
60
+ }) => theme.palette.common.black, ";border:none;border-radius:0.5rem;font-family:'Elice Digital Coding',monospace;font-size:", ({
61
+ theme
62
+ }) => theme.typography.body2.fontSize, ";line-height:", ({
63
+ theme
64
+ }) => theme.typography.body2.lineHeight, ";outline:none;resize:none;");
71
65
  //
72
66
  //
73
67
  //
74
- var MaterialRunboxActionGrade = function MaterialRunboxActionGrade(_ref5) {
75
- var runtime = _ref5.runtime,
76
- courseId = _ref5.courseId;
68
+ const MaterialRunboxActionGrade = ({
69
+ runtime,
70
+ courseId
71
+ }) => {
77
72
  var _a;
78
- var intl = useRawEliceIntl();
79
- var _useSnackbar = useSnackbar(),
80
- enqueueSnackbar = _useSnackbar.enqueueSnackbar;
81
- var materialRunboxApi = useMaterialRunboxApiContext();
82
- var _useMaterialRunboxCom = useMaterialRunboxCommandContext(),
83
- isLastCommandRunning = _useMaterialRunboxCom.isLastCommandRunning,
84
- lastCommand = _useMaterialRunboxCom.lastCommand,
85
- setCommandIdToPing = _useMaterialRunboxCom.setCommandIdToPing;
86
- var _useEliceRunboxRunnin = useEliceRunboxRunning(),
87
- status = _useEliceRunboxRunnin.status;
88
- var leaderboardSubmitInfoQuery = useQuery({
73
+ const intl = useRawEliceIntl();
74
+ const {
75
+ enqueueSnackbar
76
+ } = useSnackbar();
77
+ const materialRunboxApi = useMaterialRunboxApiContext();
78
+ const {
79
+ isLastCommandRunning,
80
+ lastCommand,
81
+ setCommandIdToPing
82
+ } = useMaterialRunboxCommandContext();
83
+ const {
84
+ status
85
+ } = useEliceRunboxRunning();
86
+ const leaderboardSubmitInfoQuery = useQuery({
89
87
  queryKey: ['eliceMaterialRunboxRunboxApi.runboxRunboxIdSubmitInfoGet', {
90
- courseId: courseId,
91
- runtime: runtime
88
+ courseId,
89
+ runtime
92
90
  }],
93
- queryFn: function queryFn(_ref6) {
94
- var signal = _ref6.signal;
95
- return materialRunboxApi.runbox.runboxRunboxIdSubmitInfoGet({
96
- eliceCourseId: courseId,
97
- runboxId: runtime === null || runtime === void 0 ? void 0 : runtime.runboxId
98
- }, {
99
- signal: signal
100
- });
101
- },
91
+ queryFn: ({
92
+ signal
93
+ }) => materialRunboxApi.runbox.runboxRunboxIdSubmitInfoGet({
94
+ eliceCourseId: courseId,
95
+ runboxId: runtime === null || runtime === void 0 ? void 0 : runtime.runboxId
96
+ }, {
97
+ signal
98
+ }),
102
99
  enabled: Boolean(runtime === null || runtime === void 0 ? void 0 : runtime.runboxId),
103
100
  retry: false
104
101
  });
105
- var isSubmitCountRemained = ((_a = leaderboardSubmitInfoQuery.data) === null || _a === void 0 ? void 0 : _a.remainSubmitCount) !== 0;
106
- var _React$useState = React.useState(false),
107
- _React$useState2 = _slicedToArray(_React$useState, 2),
108
- isActionLoading = _React$useState2[0],
109
- setActionLoading = _React$useState2[1];
110
- var _React$useState3 = React.useState(false),
111
- _React$useState4 = _slicedToArray(_React$useState3, 2),
112
- isGradeResultDialogOpen = _React$useState4[0],
113
- setGradeResultDialogOpen = _React$useState4[1];
114
- var _React$useState5 = React.useState(false),
115
- _React$useState6 = _slicedToArray(_React$useState5, 2),
116
- isSubmitCountInfoDialogOpen = _React$useState6[0],
117
- setSubmitCountInfoDialogOpen = _React$useState6[1];
118
- var _React$useState7 = React.useState(false),
119
- _React$useState8 = _slicedToArray(_React$useState7, 2),
120
- hasUnreadResult = _React$useState8[0],
121
- setHasUnreadResult = _React$useState8[1];
122
- var isRunboxRunning = status === 'running';
123
- var isGradeDoneWithOutput = !isLastCommandRunning && (lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.commandType) === CommandType.Grade && Boolean(lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.output);
102
+ const isSubmitCountRemained = ((_a = leaderboardSubmitInfoQuery.data) === null || _a === void 0 ? void 0 : _a.remainSubmitCount) !== 0;
103
+ const [isActionLoading, setActionLoading] = React.useState(false);
104
+ const [isGradeResultDialogOpen, setGradeResultDialogOpen] = React.useState(false);
105
+ const [isSubmitCountInfoDialogOpen, setSubmitCountInfoDialogOpen] = React.useState(false);
106
+ const [hasUnreadResult, setHasUnreadResult] = React.useState(false);
107
+ const isRunboxRunning = status === 'running';
108
+ const isGradeDoneWithOutput = !isLastCommandRunning && (lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.commandType) === CommandType.Grade && Boolean(lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.output);
124
109
  /**
125
110
  *
126
111
  */
127
- var handleGradeResultDialogOpen = function handleGradeResultDialogOpen() {
112
+ const handleGradeResultDialogOpen = () => {
128
113
  setGradeResultDialogOpen(true);
129
114
  };
130
115
  /**
131
116
  *
132
117
  */
133
- var handleGradeResultDialogClose = function handleGradeResultDialogClose() {
118
+ const handleGradeResultDialogClose = () => {
134
119
  setGradeResultDialogOpen(false);
135
120
  };
136
121
  /**
137
122
  *
138
123
  */
139
- var handleSubmitCountInfoDialogClose = function handleSubmitCountInfoDialogClose() {
124
+ const handleSubmitCountInfoDialogClose = () => {
140
125
  setSubmitCountInfoDialogOpen(false);
141
126
  };
142
127
  /**
143
128
  *
144
129
  */
145
- var handleAction = /*#__PURE__*/function () {
146
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
147
- var _yield$leaderboardSub, currentLeaderboardSubmitInfo, isCurrentSubmitCountEmpty, runtimeId, _yield$materialRunbox, commandId;
148
- return _regeneratorRuntime().wrap(function _callee$(_context) {
149
- while (1) switch (_context.prev = _context.next) {
150
- case 0:
151
- setActionLoading(true);
152
- _context.prev = 1;
153
- _context.next = 4;
154
- return leaderboardSubmitInfoQuery.refetch();
155
- case 4:
156
- _yield$leaderboardSub = _context.sent;
157
- currentLeaderboardSubmitInfo = _yield$leaderboardSub.data;
158
- isCurrentSubmitCountEmpty = (currentLeaderboardSubmitInfo === null || currentLeaderboardSubmitInfo === void 0 ? void 0 : currentLeaderboardSubmitInfo.remainSubmitCount) === 0;
159
- if (!isCurrentSubmitCountEmpty) {
160
- _context.next = 10;
161
- break;
162
- }
163
- setSubmitCountInfoDialogOpen(true);
164
- return _context.abrupt("return");
165
- case 10:
166
- runtimeId = runtime === null || runtime === void 0 ? void 0 : runtime.id;
167
- _context.next = 13;
168
- return materialRunboxApi.runtime.runtimeRuntimeIdCommandPost({
169
- runtimeId: runtimeId,
170
- eliceCourseId: courseId,
171
- runboxCommandPostRequest: {
172
- commandType: CommandType.Grade
173
- }
174
- });
175
- case 13:
176
- _yield$materialRunbox = _context.sent;
177
- commandId = _yield$materialRunbox.id;
178
- setCommandIdToPing(commandId);
179
- _context.next = 21;
180
- break;
181
- case 18:
182
- _context.prev = 18;
183
- _context.t0 = _context["catch"](1);
184
- enqueueSnackbar(intl.formatMessage({
185
- id: 'runbox.action.grade.noti.error'
186
- }), {
187
- variant: 'error'
188
- });
189
- case 21:
190
- _context.prev = 21;
191
- setActionLoading(false);
192
- return _context.finish(21);
193
- case 24:
194
- case "end":
195
- return _context.stop();
130
+ const handleAction = async () => {
131
+ setActionLoading(true);
132
+ try {
133
+ const {
134
+ data: currentLeaderboardSubmitInfo
135
+ } = await leaderboardSubmitInfoQuery.refetch();
136
+ const isCurrentSubmitCountEmpty = (currentLeaderboardSubmitInfo === null || currentLeaderboardSubmitInfo === void 0 ? void 0 : currentLeaderboardSubmitInfo.remainSubmitCount) === 0;
137
+ if (isCurrentSubmitCountEmpty) {
138
+ setSubmitCountInfoDialogOpen(true);
139
+ return;
140
+ }
141
+ const runtimeId = runtime === null || runtime === void 0 ? void 0 : runtime.id;
142
+ const {
143
+ id: commandId
144
+ } = await materialRunboxApi.runtime.runtimeRuntimeIdCommandPost({
145
+ runtimeId,
146
+ eliceCourseId: courseId,
147
+ runboxCommandPostRequest: {
148
+ commandType: CommandType.Grade
196
149
  }
197
- }, _callee, null, [[1, 18, 21, 24]]);
198
- }));
199
- return function handleAction() {
200
- return _ref7.apply(this, arguments);
201
- };
202
- }();
150
+ });
151
+ setCommandIdToPing(commandId);
152
+ } catch (err) {
153
+ enqueueSnackbar(intl.formatMessage({
154
+ id: 'runbox.action.grade.noti.error'
155
+ }), {
156
+ variant: 'error'
157
+ });
158
+ } finally {
159
+ setActionLoading(false);
160
+ }
161
+ };
203
162
  //
204
163
  // set `hasUnreadResult` when last command output exists
205
164
  //
206
- React.useEffect(function () {
207
- return setHasUnreadResult(isGradeDoneWithOutput);
208
- }, [isGradeDoneWithOutput]);
165
+ React.useEffect(() => setHasUnreadResult(isGradeDoneWithOutput), [isGradeDoneWithOutput]);
209
166
  //
210
167
  // reset `hasUnreadResult` when dialog state toggled
211
168
  //
212
- React.useEffect(function () {
213
- return setHasUnreadResult(false);
214
- }, [isGradeResultDialogOpen]);
169
+ React.useEffect(() => setHasUnreadResult(false), [isGradeResultDialogOpen]);
215
170
  //
216
171
  // toggle dialog state when last command output exists
217
172
  //
218
- React.useEffect(function () {
219
- return setGradeResultDialogOpen(isGradeDoneWithOutput);
220
- }, [isGradeDoneWithOutput]);
173
+ React.useEffect(() => setGradeResultDialogOpen(isGradeDoneWithOutput), [isGradeDoneWithOutput]);
221
174
  /**
222
175
  *
223
176
  */
224
- var renderActionButton = function renderActionButton() {
225
- var isGradeType = (lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.commandType) === CommandType.Grade;
226
- var isGrading = isActionLoading || isLastCommandRunning && isGradeType;
177
+ const renderActionButton = () => {
178
+ const isGradeType = (lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.commandType) === CommandType.Grade;
179
+ const isGrading = isActionLoading || isLastCommandRunning && isGradeType;
227
180
  /**
228
181
  *
229
182
  */
230
- var getActionTooltipMessage = function getActionTooltipMessage() {
183
+ const getActionTooltipMessage = () => {
231
184
  if (!isSubmitCountRemained) {
232
185
  return intl.formatMessage({
233
186
  id: 'runbox.action.submitCountInfo.tooltip.disabled'
@@ -240,128 +193,97 @@ var MaterialRunboxActionGrade = function MaterialRunboxActionGrade(_ref5) {
240
193
  }
241
194
  return '';
242
195
  };
243
- return jsx(Tooltip, {
196
+ return React.createElement(Tooltip, {
244
197
  title: getActionTooltipMessage(),
245
- placement: "bottom-end",
246
- children: jsxs(ButtonGroup, {
247
- variant: "contained",
248
- children: [jsx(StyledMainActionButton, {
249
- variant: "contained",
250
- loading: isGrading,
251
- disabled: !isRunboxRunning || isLastCommandRunning || !isSubmitCountRemained,
252
- size: "small",
253
- onClick: handleAction,
254
- children: intl.formatMessage({
255
- id: 'runbox.action.grade.title'
256
- })
257
- }), isGradeDoneWithOutput ? jsx(Transition, {
258
- in: isGradeDoneWithOutput,
259
- timeout: 0,
260
- mountOnEnter: true,
261
- unmountOnExit: true,
262
- children: function children(state) {
263
- return jsx(StyledSubActionButton, {
264
- size: "small",
265
- disabled: isLastCommandRunning,
266
- onClick: handleGradeResultDialogOpen,
267
- style: TRANSITION_STYLE_MAP[state],
268
- children: jsx(Badge, {
269
- color: "error",
270
- variant: "dot",
271
- invisible: !hasUnreadResult,
272
- children: jsx(Terminal, {
273
- fontSize: "small"
274
- })
275
- })
276
- });
277
- }
278
- }) : null]
279
- })
280
- });
198
+ placement: "bottom-end"
199
+ }, React.createElement(ButtonGroup, {
200
+ variant: "contained"
201
+ }, React.createElement(StyledMainActionButton, {
202
+ variant: "contained",
203
+ loading: isGrading,
204
+ disabled: !isRunboxRunning || isLastCommandRunning || !isSubmitCountRemained,
205
+ size: "small",
206
+ onClick: handleAction
207
+ }, intl.formatMessage({
208
+ id: 'runbox.action.grade.title'
209
+ })), isGradeDoneWithOutput ? React.createElement(Transition, {
210
+ in: isGradeDoneWithOutput,
211
+ timeout: 0,
212
+ mountOnEnter: true,
213
+ unmountOnExit: true
214
+ }, state => React.createElement(StyledSubActionButton, {
215
+ size: "small",
216
+ disabled: isLastCommandRunning,
217
+ onClick: handleGradeResultDialogOpen,
218
+ style: TRANSITION_STYLE_MAP[state]
219
+ }, React.createElement(Badge, {
220
+ color: "error",
221
+ variant: "dot",
222
+ invisible: !hasUnreadResult
223
+ }, React.createElement(Terminal, {
224
+ fontSize: "small"
225
+ })))) : null));
281
226
  };
282
227
  /**
283
228
  *
284
229
  */
285
- var renderActionGradeResultDialog = function renderActionGradeResultDialog() {
230
+ const renderActionGradeResultDialog = () => {
286
231
  if ((lastCommand === null || lastCommand === void 0 ? void 0 : lastCommand.commandType) !== CommandType.Grade) {
287
232
  return null;
288
233
  }
289
- return jsxs(Dialog, {
234
+ return React.createElement(Dialog, {
290
235
  open: isGradeResultDialogOpen,
291
236
  maxWidth: "md",
292
237
  fullWidth: true,
293
- onClose: handleGradeResultDialogClose,
294
- children: [jsx(DialogTitle, {
295
- children: intl.formatMessage({
296
- id: 'runbox.action.grade.dialog.title'
297
- })
298
- }), jsx(DialogContent, {
299
- children: jsxs(Stack, {
300
- gap: "0.75rem",
301
- children: [lastCommand.terminatedReason === 'done' ? jsx(Alert, {
302
- severity: "success",
303
- children: intl.formatMessage({
304
- id: 'runbox.action.grade.dialog.description.success'
305
- })
306
- }) : jsx(Alert, {
307
- severity: "error",
308
- children: intl.formatMessage({
309
- id: 'runbox.action.grade.dialog.description.error'
310
- })
311
- }), jsx(StyledTerminal, {
312
- value: lastCommand.output,
313
- readOnly: true,
314
- rows: 20
315
- })]
316
- })
317
- }), jsx(DialogActions, {
318
- children: jsx(Button, {
319
- color: "inherit",
320
- disabled: isActionLoading,
321
- onClick: handleGradeResultDialogClose,
322
- children: intl.formatMessage({
323
- id: 'runbox.common.close'
324
- })
325
- })
326
- })]
327
- });
238
+ onClose: handleGradeResultDialogClose
239
+ }, React.createElement(DialogTitle, null, intl.formatMessage({
240
+ id: 'runbox.action.grade.dialog.title'
241
+ })), React.createElement(DialogContent, null, React.createElement(Stack, {
242
+ gap: "0.75rem"
243
+ }, lastCommand.terminatedReason === 'done' ? React.createElement(Alert, {
244
+ severity: "success"
245
+ }, intl.formatMessage({
246
+ id: 'runbox.action.grade.dialog.description.success'
247
+ })) : React.createElement(Alert, {
248
+ severity: "error"
249
+ }, intl.formatMessage({
250
+ id: 'runbox.action.grade.dialog.description.error'
251
+ })), React.createElement(StyledTerminal, {
252
+ value: lastCommand.output,
253
+ readOnly: true,
254
+ rows: 20
255
+ }))), React.createElement(DialogActions, null, React.createElement(Button, {
256
+ color: "inherit",
257
+ disabled: isActionLoading,
258
+ onClick: handleGradeResultDialogClose
259
+ }, intl.formatMessage({
260
+ id: 'runbox.common.close'
261
+ }))));
328
262
  };
329
263
  /**
330
264
  *
331
265
  */
332
- var renderActionSubmitCountInfoDialog = function renderActionSubmitCountInfoDialog() {
333
- return jsxs(Dialog, {
266
+ const renderActionSubmitCountInfoDialog = () => {
267
+ return React.createElement(Dialog, {
334
268
  fullWidth: true,
335
269
  maxWidth: "xs",
336
270
  open: isSubmitCountInfoDialogOpen,
337
- onClick: handleSubmitCountInfoDialogClose,
338
- children: [jsx(DialogTitle, {
339
- children: intl.formatMessage({
340
- id: 'runbtox.action.submitCountInfo.dialog.title'
341
- })
342
- }), jsx(DialogContent, {
343
- children: jsx(Typography, {
344
- children: intl.formatMessage({
345
- id: 'runbox.action.submitCountInfo.dialog.description'
346
- })
347
- })
348
- }), jsx(DialogActions, {
349
- children: jsx(Button, {
350
- color: "inherit",
351
- onClick: handleSubmitCountInfoDialogClose,
352
- children: intl.formatMessage({
353
- id: 'runbox.common.close'
354
- })
355
- })
356
- })]
357
- });
271
+ onClick: handleSubmitCountInfoDialogClose
272
+ }, React.createElement(DialogTitle, null, intl.formatMessage({
273
+ id: 'runbtox.action.submitCountInfo.dialog.title'
274
+ })), React.createElement(DialogContent, null, React.createElement(Typography, null, intl.formatMessage({
275
+ id: 'runbox.action.submitCountInfo.dialog.description'
276
+ }))), React.createElement(DialogActions, null, React.createElement(Button, {
277
+ color: "inherit",
278
+ onClick: handleSubmitCountInfoDialogClose
279
+ }, intl.formatMessage({
280
+ id: 'runbox.common.close'
281
+ }))));
358
282
  };
359
283
  //
360
284
  //
361
285
  //
362
- return jsxs(Fragment, {
363
- children: [renderActionButton(), renderActionGradeResultDialog(), renderActionSubmitCountInfoDialog()]
364
- });
286
+ return React.createElement(React.Fragment, null, renderActionButton(), renderActionGradeResultDialog(), renderActionSubmitCountInfoDialog());
365
287
  };
366
288
 
367
289
  export { MaterialRunboxActionGrade as default };
@@ -1,4 +1,3 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
1
  import React from 'react';
3
2
  import { useEliceRunboxRunning } from '@elice/runbox-client';
4
3
  import { Menu } from '@mui/material';
@@ -9,20 +8,22 @@ import MaterialRunboxActionShare from './MaterialRunboxActionShare.js';
9
8
  //
10
9
  //
11
10
  //
12
- var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
13
- var runbox = _ref.runbox,
14
- runtime = _ref.runtime,
15
- courseId = _ref.courseId,
16
- menuAnchorEl = _ref.menuAnchorEl,
17
- refetch = _ref.refetch,
18
- handleMenuClose = _ref.handleMenuClose;
19
- var _useEliceRunboxRunnin = useEliceRunboxRunning(),
20
- status = _useEliceRunboxRunnin.status;
21
- var isRunboxRunning = status === 'running';
11
+ const MaterialRunboxActionMenu = ({
12
+ runbox,
13
+ runtime,
14
+ courseId,
15
+ menuAnchorEl,
16
+ refetch,
17
+ handleMenuClose
18
+ }) => {
19
+ const {
20
+ status
21
+ } = useEliceRunboxRunning();
22
+ const isRunboxRunning = status === 'running';
22
23
  //
23
24
  //
24
25
  //
25
- React.useEffect(function () {
26
+ React.useEffect(() => {
26
27
  if (!isRunboxRunning) {
27
28
  handleMenuClose();
28
29
  }
@@ -30,7 +31,7 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
30
31
  //
31
32
  //
32
33
  //
33
- return jsxs(Menu, {
34
+ return React.createElement(Menu, {
34
35
  open: Boolean(menuAnchorEl),
35
36
  anchorEl: menuAnchorEl,
36
37
  anchorOrigin: {
@@ -41,21 +42,20 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
41
42
  vertical: 'top',
42
43
  horizontal: 'right'
43
44
  },
44
- onClose: handleMenuClose,
45
- children: [jsx(MaterialRunboxActionShare, {
46
- handleMenuClose: handleMenuClose
47
- }), jsx(MaterialRunboxActionRestart, {
48
- runbox: runbox,
49
- runtime: runtime,
50
- courseId: courseId,
51
- refetch: refetch,
52
- handleMenuClose: handleMenuClose
53
- }), jsx(MaterialRunboxActionReset, {
54
- runtime: runtime,
55
- courseId: courseId,
56
- handleMenuClose: handleMenuClose
57
- })]
58
- });
45
+ onClose: handleMenuClose
46
+ }, React.createElement(MaterialRunboxActionShare, {
47
+ handleMenuClose: handleMenuClose
48
+ }), React.createElement(MaterialRunboxActionRestart, {
49
+ runbox: runbox,
50
+ runtime: runtime,
51
+ courseId: courseId,
52
+ refetch: refetch,
53
+ handleMenuClose: handleMenuClose
54
+ }), React.createElement(MaterialRunboxActionReset, {
55
+ runtime: runtime,
56
+ courseId: courseId,
57
+ handleMenuClose: handleMenuClose
58
+ }));
59
59
  };
60
60
 
61
61
  export { MaterialRunboxActionMenu as default };