@elice/material-runbox 1.240401.0 → 1.240508.0-globalization.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/material-runbox/MaterialRunbox.d.ts +3 -2
- package/cjs/components/material-runbox/MaterialRunbox.js +14 -11
- package/cjs/components/material-runbox/MaterialRunboxContent.js +10 -7
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +11 -9
- package/cjs/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +7 -5
- package/cjs/components/material-runbox/actions/MaterialRunboxActionGrade.js +23 -21
- package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.js +15 -13
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +14 -11
- package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.js +8 -6
- package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +6 -4
- package/cjs/components/material-runbox/hooks/useRunboxControl.js +5 -3
- package/cjs/components/material-runbox/locales/en.json.js +2 -2
- package/cjs/components/material-runbox/locales/index.d.ts +3 -2
- package/cjs/components/material-runbox/locales/ko.json.js +2 -2
- package/cjs/components/material-runbox/locales/th.json.js +7 -0
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +8 -5
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +12 -10
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +17 -15
- package/es/components/material-runbox/MaterialRunbox.d.ts +3 -2
- package/es/components/material-runbox/MaterialRunbox.js +14 -11
- package/es/components/material-runbox/MaterialRunboxContent.js +10 -7
- package/es/components/material-runbox/MaterialRunboxHeader.js +11 -9
- package/es/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +4 -2
- package/es/components/material-runbox/actions/MaterialRunboxActionGrade.js +20 -18
- package/es/components/material-runbox/actions/MaterialRunboxActionReset.js +14 -12
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +14 -11
- package/es/components/material-runbox/actions/MaterialRunboxActionShare.js +6 -4
- package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +4 -2
- package/es/components/material-runbox/hooks/useRunboxControl.js +4 -2
- package/es/components/material-runbox/locales/en.json.js +2 -2
- package/es/components/material-runbox/locales/index.d.ts +3 -2
- package/es/components/material-runbox/locales/ko.json.js +2 -2
- package/es/components/material-runbox/locales/th.json.js +3 -0
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +8 -5
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +12 -10
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +10 -8
- package/package.json +7 -7
- package/cjs/components/material-runbox/locales/index.js +0 -9
- package/es/components/material-runbox/locales/index.js +0 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
2
3
|
import type { MaterialRunboxApiContextProps, MaterialRunboxContextProps } from './contexts';
|
|
3
4
|
import type { MaterialRunboxContentProps } from './MaterialRunboxContent';
|
|
4
5
|
export type MaterialRunboxProps = MaterialRunboxContentProps & Omit<MaterialRunboxApiContextProps, 'children'> & Omit<MaterialRunboxContextProps, 'children'>;
|
|
5
|
-
declare const
|
|
6
|
-
export default
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<MaterialRunboxProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
@@ -4,13 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var intl = require('@elice/intl');
|
|
8
8
|
var MaterialRunboxApiContext = require('./contexts/MaterialRunboxApiContext.js');
|
|
9
9
|
require('./contexts/MaterialRunboxCommandContext.js');
|
|
10
10
|
var MaterialRunboxContext = require('./contexts/MaterialRunboxContext.js');
|
|
11
|
-
var index = require('./locales/index.js');
|
|
12
|
-
var MaterialRunboxContent = require('./MaterialRunboxContent.js');
|
|
13
11
|
var en = require('./locales/en.json.js');
|
|
12
|
+
var ko = require('./locales/ko.json.js');
|
|
13
|
+
var th = require('./locales/th.json.js');
|
|
14
|
+
var MaterialRunboxContent = require('./MaterialRunboxContent.js');
|
|
14
15
|
|
|
15
16
|
//
|
|
16
17
|
//
|
|
@@ -24,21 +25,23 @@ const MaterialRunbox = _a => {
|
|
|
24
25
|
enableUrlShare = false,
|
|
25
26
|
locale = 'ko',
|
|
26
27
|
showMessenger,
|
|
27
|
-
eliceMaterialRunboxApiConfiguration
|
|
28
|
+
eliceMaterialRunboxApiConfiguration,
|
|
29
|
+
__intl
|
|
28
30
|
} = _a,
|
|
29
|
-
contentProps = tslib.__rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration"]);
|
|
30
|
-
return React.createElement(
|
|
31
|
+
contentProps = tslib.__rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration", "__intl"]);
|
|
32
|
+
return React.createElement(intl.RawEliceIntlProvider, {
|
|
33
|
+
value: {
|
|
34
|
+
intl: __intl
|
|
35
|
+
}
|
|
36
|
+
}, React.createElement(MaterialRunboxContext.default, {
|
|
31
37
|
enableAutoShutdownToggle: enableAutoShutdownToggle,
|
|
32
38
|
enableUrlShare: enableUrlShare,
|
|
33
39
|
locale: locale,
|
|
34
40
|
showMessenger: showMessenger
|
|
35
41
|
}, React.createElement(MaterialRunboxApiContext.default, {
|
|
36
42
|
eliceMaterialRunboxApiConfiguration: eliceMaterialRunboxApiConfiguration
|
|
37
|
-
}, React.createElement(reactIntl.IntlProvider, {
|
|
38
|
-
locale: locale,
|
|
39
|
-
defaultLocale: "en",
|
|
40
|
-
messages: locale in index ? index[locale] : en.default
|
|
41
43
|
}, React.createElement(MaterialRunboxContent.default, Object.assign({}, contentProps)))));
|
|
42
44
|
};
|
|
45
|
+
var MaterialRunbox$1 = new intl.IntlComponentBuilder(MaterialRunbox).add('en', en.default).add('ko', ko.default).add('th', th.default).build();
|
|
43
46
|
|
|
44
|
-
exports.default = MaterialRunbox;
|
|
47
|
+
exports.default = MaterialRunbox$1;
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _styled = require('@emotion/styled/base');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var reactIntl = require('react-intl');
|
|
8
7
|
var blocks = require('@elice/blocks');
|
|
8
|
+
var intl = require('@elice/intl');
|
|
9
9
|
var runboxClient = require('@elice/runbox-client');
|
|
10
10
|
var iconsMaterial = require('@mui/icons-material');
|
|
11
11
|
var material = require('@mui/material');
|
|
@@ -42,6 +42,9 @@ const MaterialRunboxContent = ({
|
|
|
42
42
|
runboxId,
|
|
43
43
|
courseId
|
|
44
44
|
}) => {
|
|
45
|
+
const {
|
|
46
|
+
intl: intl$1
|
|
47
|
+
} = intl.useRawEliceIntl();
|
|
45
48
|
const {
|
|
46
49
|
locale,
|
|
47
50
|
showMessenger
|
|
@@ -103,20 +106,20 @@ const MaterialRunboxContent = ({
|
|
|
103
106
|
gap: "1.5rem"
|
|
104
107
|
}, React.createElement(material.Typography, {
|
|
105
108
|
variant: "h6"
|
|
106
|
-
},
|
|
107
|
-
id:
|
|
109
|
+
}, intl$1.formatMessage({
|
|
110
|
+
id: 'runbox.runtime.message.startError'
|
|
108
111
|
})), React.createElement(material.Stack, {
|
|
109
112
|
gap: "0.5rem"
|
|
110
113
|
}, React.createElement(material.Button, {
|
|
111
114
|
startIcon: React.createElement(iconsMaterial.Refresh, null),
|
|
112
115
|
onClick: () => refetch()
|
|
113
|
-
},
|
|
114
|
-
id:
|
|
116
|
+
}, intl$1.formatMessage({
|
|
117
|
+
id: 'runbox.common.retry'
|
|
115
118
|
})), typeof showMessenger === 'function' ? React.createElement(material.Button, {
|
|
116
119
|
variant: "outlined",
|
|
117
120
|
onClick: () => showMessenger()
|
|
118
|
-
},
|
|
119
|
-
id:
|
|
121
|
+
}, intl$1.formatMessage({
|
|
122
|
+
id: 'runbox.common.support'
|
|
120
123
|
})) : null)));
|
|
121
124
|
}
|
|
122
125
|
if (!runbox || !runtimeTemplate) {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _styled = require('@emotion/styled/base');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var intl = require('@elice/intl');
|
|
8
8
|
var muiElements = require('@elice/mui-elements');
|
|
9
9
|
var runboxClient = require('@elice/runbox-client');
|
|
10
10
|
var types = require('@elice/types');
|
|
@@ -34,6 +34,9 @@ const MaterialRunboxHeader = ({
|
|
|
34
34
|
courseId,
|
|
35
35
|
refetch
|
|
36
36
|
}) => {
|
|
37
|
+
const {
|
|
38
|
+
intl: intl$1
|
|
39
|
+
} = intl.useRawEliceIntl();
|
|
37
40
|
const {
|
|
38
41
|
enableAutoShutdownToggle
|
|
39
42
|
} = MaterialRunboxContext.useMaterialRunboxContext();
|
|
@@ -81,14 +84,13 @@ const MaterialRunboxHeader = ({
|
|
|
81
84
|
return null;
|
|
82
85
|
}
|
|
83
86
|
return React.createElement(muiElements.Tag, {
|
|
84
|
-
label:
|
|
85
|
-
id:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
87
|
+
label: intl$1.formatMessage({
|
|
88
|
+
id: 'runbox.header.submitInfo'
|
|
89
|
+
}, {
|
|
90
|
+
remainCount: remainSubmitCount,
|
|
91
|
+
totalCount: totalSubmitCount,
|
|
92
|
+
isDailyLimitEnabled,
|
|
93
|
+
isIndividual: isIndividualTypeLeaderboard
|
|
92
94
|
}),
|
|
93
95
|
variant: "muted",
|
|
94
96
|
color: remainSubmitCount ? 'success' : 'secondary'
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _styled = require('@emotion/styled/base');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var intl = require('@elice/intl');
|
|
8
8
|
var material = require('@mui/material');
|
|
9
9
|
var MaterialRunboxApiContext = require('../contexts/MaterialRunboxApiContext.js');
|
|
10
10
|
require('../contexts/MaterialRunboxCommandContext.js');
|
|
@@ -34,7 +34,9 @@ const MaterialRunboxActionAutoShutdown = ({
|
|
|
34
34
|
refetch
|
|
35
35
|
}) => {
|
|
36
36
|
var _a;
|
|
37
|
-
const
|
|
37
|
+
const {
|
|
38
|
+
intl: intl$1
|
|
39
|
+
} = intl.useRawEliceIntl();
|
|
38
40
|
const materialRunboxApi = MaterialRunboxApiContext.useMaterialRunboxApiContext();
|
|
39
41
|
/**
|
|
40
42
|
*
|
|
@@ -57,10 +59,10 @@ const MaterialRunboxActionAutoShutdown = ({
|
|
|
57
59
|
//
|
|
58
60
|
//
|
|
59
61
|
return React.createElement(material.Tooltip, {
|
|
60
|
-
title: intl.formatMessage({
|
|
62
|
+
title: intl$1.formatMessage({
|
|
61
63
|
id: runtimeTemplate.autoShutdown ? 'runbox.action.autoShutdown.tooltip.disabled' : 'runbox.action.autoShutdown.tooltip.enabled'
|
|
62
64
|
}, {
|
|
63
|
-
time: intl.formatNumber((_a = runtimeTemplate.quotaPerSession) !== null && _a !== void 0 ? _a : 2880, {
|
|
65
|
+
time: intl$1.formatNumber((_a = runtimeTemplate.quotaPerSession) !== null && _a !== void 0 ? _a : 2880, {
|
|
64
66
|
style: 'unit',
|
|
65
67
|
unit: 'minute',
|
|
66
68
|
unitDisplay: 'short'
|
|
@@ -72,7 +74,7 @@ const MaterialRunboxActionAutoShutdown = ({
|
|
|
72
74
|
disabled: !runtime || runtimeTemplate.autoShutdown,
|
|
73
75
|
onChange: handleAction
|
|
74
76
|
}),
|
|
75
|
-
label: intl.formatMessage({
|
|
77
|
+
label: intl$1.formatMessage({
|
|
76
78
|
id: 'runbox.action.autoShutdown.title'
|
|
77
79
|
}),
|
|
78
80
|
componentsProps: {
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _styled = require('@emotion/styled/base');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var reactIntl = require('react-intl');
|
|
8
7
|
var reactTransitionGroup = require('react-transition-group');
|
|
8
|
+
var intl = require('@elice/intl');
|
|
9
9
|
var muiXSnackbar = require('@elice/mui-x-snackbar');
|
|
10
10
|
var openapiClientMaterialRunbox = require('@elice/openapi-client-material-runbox');
|
|
11
11
|
var runboxClient = require('@elice/runbox-client');
|
|
@@ -74,7 +74,9 @@ const MaterialRunboxActionGrade = ({
|
|
|
74
74
|
courseId
|
|
75
75
|
}) => {
|
|
76
76
|
var _a;
|
|
77
|
-
const
|
|
77
|
+
const {
|
|
78
|
+
intl: intl$1
|
|
79
|
+
} = intl.useRawEliceIntl();
|
|
78
80
|
const {
|
|
79
81
|
enqueueSnackbar
|
|
80
82
|
} = muiXSnackbar.useSnackbar();
|
|
@@ -154,7 +156,7 @@ const MaterialRunboxActionGrade = ({
|
|
|
154
156
|
});
|
|
155
157
|
setCommandIdToPing(commandId);
|
|
156
158
|
} catch (err) {
|
|
157
|
-
enqueueSnackbar(intl.formatMessage({
|
|
159
|
+
enqueueSnackbar(intl$1.formatMessage({
|
|
158
160
|
id: 'runbox.action.grade.noti.error'
|
|
159
161
|
}), {
|
|
160
162
|
variant: 'error'
|
|
@@ -186,12 +188,12 @@ const MaterialRunboxActionGrade = ({
|
|
|
186
188
|
*/
|
|
187
189
|
const getActionTooltipMessage = () => {
|
|
188
190
|
if (!isSubmitCountRemained) {
|
|
189
|
-
return intl.formatMessage({
|
|
191
|
+
return intl$1.formatMessage({
|
|
190
192
|
id: 'runbox.action.submitCountInfo.tooltip.disabled'
|
|
191
193
|
});
|
|
192
194
|
}
|
|
193
195
|
if (isGrading) {
|
|
194
|
-
return intl.formatMessage({
|
|
196
|
+
return intl$1.formatMessage({
|
|
195
197
|
id: 'runbox.action.grade.tooltip.onProgress'
|
|
196
198
|
});
|
|
197
199
|
}
|
|
@@ -208,8 +210,8 @@ const MaterialRunboxActionGrade = ({
|
|
|
208
210
|
disabled: !isRunboxRunning || isLastCommandRunning || !isSubmitCountRemained,
|
|
209
211
|
size: "small",
|
|
210
212
|
onClick: handleAction
|
|
211
|
-
},
|
|
212
|
-
id:
|
|
213
|
+
}, intl$1.formatMessage({
|
|
214
|
+
id: 'runbox.action.grade.title'
|
|
213
215
|
})), isGradeDoneWithOutput ? React.createElement(reactTransitionGroup.Transition, {
|
|
214
216
|
in: isGradeDoneWithOutput,
|
|
215
217
|
timeout: 0,
|
|
@@ -240,18 +242,18 @@ const MaterialRunboxActionGrade = ({
|
|
|
240
242
|
maxWidth: "md",
|
|
241
243
|
fullWidth: true,
|
|
242
244
|
onClose: handleGradeResultDialogClose
|
|
243
|
-
}, React.createElement(material.DialogTitle, null,
|
|
244
|
-
id:
|
|
245
|
+
}, React.createElement(material.DialogTitle, null, intl$1.formatMessage({
|
|
246
|
+
id: 'runbox.action.grade.dialog.title'
|
|
245
247
|
})), React.createElement(material.DialogContent, null, React.createElement(material.Stack, {
|
|
246
248
|
gap: "0.75rem"
|
|
247
249
|
}, lastCommand.terminatedReason === 'done' ? React.createElement(material.Alert, {
|
|
248
250
|
severity: "success"
|
|
249
|
-
},
|
|
250
|
-
id:
|
|
251
|
+
}, intl$1.formatMessage({
|
|
252
|
+
id: 'runbox.action.grade.dialog.description.success'
|
|
251
253
|
})) : React.createElement(material.Alert, {
|
|
252
254
|
severity: "error"
|
|
253
|
-
},
|
|
254
|
-
id:
|
|
255
|
+
}, intl$1.formatMessage({
|
|
256
|
+
id: 'runbox.action.grade.dialog.description.error'
|
|
255
257
|
})), React.createElement(StyledTerminal, {
|
|
256
258
|
value: lastCommand.output,
|
|
257
259
|
readOnly: true,
|
|
@@ -260,8 +262,8 @@ const MaterialRunboxActionGrade = ({
|
|
|
260
262
|
color: "inherit",
|
|
261
263
|
disabled: isActionLoading,
|
|
262
264
|
onClick: handleGradeResultDialogClose
|
|
263
|
-
},
|
|
264
|
-
id:
|
|
265
|
+
}, intl$1.formatMessage({
|
|
266
|
+
id: 'runbox.common.close'
|
|
265
267
|
}))));
|
|
266
268
|
};
|
|
267
269
|
/**
|
|
@@ -273,15 +275,15 @@ const MaterialRunboxActionGrade = ({
|
|
|
273
275
|
maxWidth: "xs",
|
|
274
276
|
open: isSubmitCountInfoDialogOpen,
|
|
275
277
|
onClick: handleSubmitCountInfoDialogClose
|
|
276
|
-
}, React.createElement(material.DialogTitle, null,
|
|
277
|
-
id:
|
|
278
|
-
})), React.createElement(material.DialogContent, null, React.createElement(material.Typography, null,
|
|
279
|
-
id:
|
|
278
|
+
}, React.createElement(material.DialogTitle, null, intl$1.formatMessage({
|
|
279
|
+
id: 'runbtox.action.submitCountInfo.dialog.title'
|
|
280
|
+
})), React.createElement(material.DialogContent, null, React.createElement(material.Typography, null, intl$1.formatMessage({
|
|
281
|
+
id: 'runbox.action.submitCountInfo.dialog.description'
|
|
280
282
|
}))), React.createElement(material.DialogActions, null, React.createElement(material.Button, {
|
|
281
283
|
color: "inherit",
|
|
282
284
|
onClick: handleSubmitCountInfoDialogClose
|
|
283
|
-
},
|
|
284
|
-
id:
|
|
285
|
+
}, intl$1.formatMessage({
|
|
286
|
+
id: 'runbox.common.close'
|
|
285
287
|
}))));
|
|
286
288
|
};
|
|
287
289
|
//
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var intl = require('@elice/intl');
|
|
7
7
|
var muiElements = require('@elice/mui-elements');
|
|
8
8
|
var muiXSnackbar = require('@elice/mui-x-snackbar');
|
|
9
9
|
var openapiClientMaterialRunbox = require('@elice/openapi-client-material-runbox');
|
|
@@ -22,7 +22,9 @@ const MaterialRunboxActionReset = ({
|
|
|
22
22
|
courseId,
|
|
23
23
|
handleMenuClose
|
|
24
24
|
}) => {
|
|
25
|
-
const
|
|
25
|
+
const {
|
|
26
|
+
intl: intl$1
|
|
27
|
+
} = intl.useRawEliceIntl();
|
|
26
28
|
const {
|
|
27
29
|
enqueueSnackbar
|
|
28
30
|
} = muiXSnackbar.useSnackbar();
|
|
@@ -58,7 +60,7 @@ const MaterialRunboxActionReset = ({
|
|
|
58
60
|
setCommandIdToPing(commentId);
|
|
59
61
|
handleDialogClose();
|
|
60
62
|
} catch (err) {
|
|
61
|
-
enqueueSnackbar(intl.formatMessage({
|
|
63
|
+
enqueueSnackbar(intl$1.formatMessage({
|
|
62
64
|
id: 'runbox.action.reset.noti.error'
|
|
63
65
|
}), {
|
|
64
66
|
variant: 'error'
|
|
@@ -76,8 +78,8 @@ const MaterialRunboxActionReset = ({
|
|
|
76
78
|
disabled: isLastCommandRunning
|
|
77
79
|
}, React.createElement(material.ListItemIcon, null, React.createElement(muiElements.EliceIcon, {
|
|
78
80
|
icon: proSolidSvgIcons.faRefresh
|
|
79
|
-
})), React.createElement(material.ListItemText, null,
|
|
80
|
-
id:
|
|
81
|
+
})), React.createElement(material.ListItemText, null, intl$1.formatMessage({
|
|
82
|
+
id: 'runbox.action.reset.title'
|
|
81
83
|
})));
|
|
82
84
|
};
|
|
83
85
|
/**
|
|
@@ -92,27 +94,27 @@ const MaterialRunboxActionReset = ({
|
|
|
92
94
|
maxWidth: "xs",
|
|
93
95
|
fullWidth: true,
|
|
94
96
|
onClose: handleDialogClose
|
|
95
|
-
}, React.createElement(material.DialogTitle, null,
|
|
96
|
-
id:
|
|
97
|
+
}, React.createElement(material.DialogTitle, null, intl$1.formatMessage({
|
|
98
|
+
id: 'runbox.action.reset.title'
|
|
97
99
|
})), React.createElement(material.DialogContent, null, React.createElement(material.DialogContentText, {
|
|
98
100
|
sx: {
|
|
99
101
|
whiteSpace: 'pre-line'
|
|
100
102
|
}
|
|
101
|
-
},
|
|
102
|
-
id:
|
|
103
|
+
}, intl$1.formatMessage({
|
|
104
|
+
id: 'runbox.action.reset.dialog.description'
|
|
103
105
|
}))), React.createElement(material.DialogActions, null, React.createElement(material.Button, {
|
|
104
106
|
color: "inherit",
|
|
105
107
|
disabled: isLoading,
|
|
106
108
|
onClick: handleDialogClose
|
|
107
|
-
},
|
|
108
|
-
id:
|
|
109
|
+
}, intl$1.formatMessage({
|
|
110
|
+
id: 'runbox.common.close'
|
|
109
111
|
})), React.createElement(lab.LoadingButton, {
|
|
110
112
|
variant: "contained",
|
|
111
113
|
color: "warning",
|
|
112
114
|
loading: isLoading || isLastCommandRunning,
|
|
113
115
|
onClick: handleReset
|
|
114
|
-
},
|
|
115
|
-
id:
|
|
116
|
+
}, intl$1.formatMessage({
|
|
117
|
+
id: 'runbox.action.reset.dialog.actions.confirm'
|
|
116
118
|
}))));
|
|
117
119
|
};
|
|
118
120
|
//
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var intl = require('@elice/intl');
|
|
7
7
|
var muiElements = require('@elice/mui-elements');
|
|
8
8
|
var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
|
|
9
9
|
var lab = require('@mui/lab');
|
|
@@ -19,6 +19,9 @@ const MaterialRunboxActionRestart = ({
|
|
|
19
19
|
refetch,
|
|
20
20
|
handleMenuClose
|
|
21
21
|
}) => {
|
|
22
|
+
const {
|
|
23
|
+
intl: intl$1
|
|
24
|
+
} = intl.useRawEliceIntl();
|
|
22
25
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
23
26
|
const [isDialogOpened, setDialogOpened] = React.useState(false);
|
|
24
27
|
// restart
|
|
@@ -54,8 +57,8 @@ const MaterialRunboxActionRestart = ({
|
|
|
54
57
|
onClick: () => setDialogOpened(true)
|
|
55
58
|
}, React.createElement(material.ListItemIcon, null, React.createElement(muiElements.EliceIcon, {
|
|
56
59
|
icon: proSolidSvgIcons.faRotateRight
|
|
57
|
-
})), React.createElement(material.ListItemText, null,
|
|
58
|
-
id:
|
|
60
|
+
})), React.createElement(material.ListItemText, null, intl$1.formatMessage({
|
|
61
|
+
id: 'runbox.action.restart.title'
|
|
59
62
|
})));
|
|
60
63
|
};
|
|
61
64
|
/**
|
|
@@ -70,27 +73,27 @@ const MaterialRunboxActionRestart = ({
|
|
|
70
73
|
open: true,
|
|
71
74
|
fullWidth: true,
|
|
72
75
|
onClose: handleDialogClose
|
|
73
|
-
}, React.createElement(material.DialogTitle, null,
|
|
74
|
-
id:
|
|
76
|
+
}, React.createElement(material.DialogTitle, null, intl$1.formatMessage({
|
|
77
|
+
id: 'runbox.action.restart.title'
|
|
75
78
|
})), React.createElement(material.DialogContent, null, React.createElement(material.DialogContentText, {
|
|
76
79
|
sx: {
|
|
77
80
|
whiteSpace: 'pre-line'
|
|
78
81
|
}
|
|
79
|
-
},
|
|
80
|
-
id:
|
|
82
|
+
}, intl$1.formatMessage({
|
|
83
|
+
id: 'runbox.action.restart.dialog.description'
|
|
81
84
|
}))), React.createElement(material.DialogActions, null, React.createElement(material.Button, {
|
|
82
85
|
color: "inherit",
|
|
83
86
|
disabled: isLoading,
|
|
84
87
|
onClick: handleDialogClose
|
|
85
|
-
},
|
|
86
|
-
id:
|
|
88
|
+
}, intl$1.formatMessage({
|
|
89
|
+
id: 'runbox.common.close'
|
|
87
90
|
})), React.createElement(lab.LoadingButton, {
|
|
88
91
|
variant: "contained",
|
|
89
92
|
color: "warning",
|
|
90
93
|
loading: isLoading,
|
|
91
94
|
onClick: handleRestartAction
|
|
92
|
-
},
|
|
93
|
-
id:
|
|
95
|
+
}, intl$1.formatMessage({
|
|
96
|
+
id: 'runbox.action.restart.dialog.actions.confirm'
|
|
94
97
|
}))));
|
|
95
98
|
};
|
|
96
99
|
//
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var reactIntl = require('react-intl');
|
|
7
6
|
var reactUse = require('react-use');
|
|
7
|
+
var intl = require('@elice/intl');
|
|
8
8
|
var muiElements = require('@elice/mui-elements');
|
|
9
9
|
var muiXSnackbar = require('@elice/mui-x-snackbar');
|
|
10
10
|
var runboxClient = require('@elice/runbox-client');
|
|
@@ -20,7 +20,9 @@ var MaterialRunboxContext = require('../contexts/MaterialRunboxContext.js');
|
|
|
20
20
|
const MaterialRunboxActionShare = ({
|
|
21
21
|
handleMenuClose
|
|
22
22
|
}) => {
|
|
23
|
-
const
|
|
23
|
+
const {
|
|
24
|
+
intl: intl$1
|
|
25
|
+
} = intl.useRawEliceIntl();
|
|
24
26
|
const {
|
|
25
27
|
enqueueSnackbar
|
|
26
28
|
} = muiXSnackbar.useSnackbar();
|
|
@@ -47,8 +49,8 @@ const MaterialRunboxActionShare = ({
|
|
|
47
49
|
onClick: handleShareAction
|
|
48
50
|
}, React.createElement(material.ListItemIcon, null, React.createElement(muiElements.EliceIcon, {
|
|
49
51
|
icon: proSolidSvgIcons.faLinkSimple
|
|
50
|
-
})), React.createElement(material.ListItemText, null,
|
|
51
|
-
id:
|
|
52
|
+
})), React.createElement(material.ListItemText, null, intl$1.formatMessage({
|
|
53
|
+
id: 'runbox.action.share.title'
|
|
52
54
|
})));
|
|
53
55
|
};
|
|
54
56
|
/**
|
|
@@ -71,13 +73,13 @@ const MaterialRunboxActionShare = ({
|
|
|
71
73
|
return;
|
|
72
74
|
}
|
|
73
75
|
if (clipboardValue && !error) {
|
|
74
|
-
enqueueSnackbar(intl.formatMessage({
|
|
76
|
+
enqueueSnackbar(intl$1.formatMessage({
|
|
75
77
|
id: 'runbox.action.share.snackbar.copied.success'
|
|
76
78
|
}), {
|
|
77
79
|
variant: 'success'
|
|
78
80
|
});
|
|
79
81
|
} else {
|
|
80
|
-
enqueueSnackbar(intl.formatMessage({
|
|
82
|
+
enqueueSnackbar(intl$1.formatMessage({
|
|
81
83
|
id: 'runbox.action.share.snackbar.copied.fail'
|
|
82
84
|
}), {
|
|
83
85
|
variant: 'error'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var intl = require('@elice/intl');
|
|
7
7
|
var muiXSnackbar = require('@elice/mui-x-snackbar');
|
|
8
8
|
var openapiClientMaterialRunbox = require('@elice/openapi-client-material-runbox');
|
|
9
9
|
var rxjs = require('rxjs');
|
|
@@ -31,7 +31,9 @@ const MaterialRunboxCommandContextProvider = ({
|
|
|
31
31
|
runtime,
|
|
32
32
|
courseId
|
|
33
33
|
}) => {
|
|
34
|
-
const
|
|
34
|
+
const {
|
|
35
|
+
intl: intl$1
|
|
36
|
+
} = intl.useRawEliceIntl();
|
|
35
37
|
const {
|
|
36
38
|
enqueueSnackbar
|
|
37
39
|
} = muiXSnackbar.useSnackbar();
|
|
@@ -76,7 +78,7 @@ const MaterialRunboxCommandContextProvider = ({
|
|
|
76
78
|
setLastCommand(res);
|
|
77
79
|
},
|
|
78
80
|
error: () => {
|
|
79
|
-
enqueueSnackbar(intl.formatMessage({
|
|
81
|
+
enqueueSnackbar(intl$1.formatMessage({
|
|
80
82
|
id: 'runbox.context.command.ping.error'
|
|
81
83
|
}), {
|
|
82
84
|
variant: 'error'
|
|
@@ -89,7 +91,7 @@ const MaterialRunboxCommandContextProvider = ({
|
|
|
89
91
|
_pingobj.res.status !== openapiClientMaterialRunbox.CommandStatus.Terminated;
|
|
90
92
|
if (hasError) {
|
|
91
93
|
setLastCommand(null);
|
|
92
|
-
enqueueSnackbar(intl.formatMessage({
|
|
94
|
+
enqueueSnackbar(intl$1.formatMessage({
|
|
93
95
|
id: 'runbox.context.command.ping.error'
|
|
94
96
|
}), {
|
|
95
97
|
variant: 'error'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
4
|
+
var intl = require('@elice/intl');
|
|
5
5
|
var muiXSnackbar = require('@elice/mui-x-snackbar');
|
|
6
6
|
var runboxClient = require('@elice/runbox-client');
|
|
7
7
|
var MaterialRunboxApiContext = require('../contexts/MaterialRunboxApiContext.js');
|
|
@@ -16,7 +16,9 @@ require('../contexts/MaterialRunboxContext.js');
|
|
|
16
16
|
*/
|
|
17
17
|
const useRunboxControl = props => {
|
|
18
18
|
const _return = React.useRef({});
|
|
19
|
-
const
|
|
19
|
+
const {
|
|
20
|
+
intl: intl$1
|
|
21
|
+
} = intl.useRawEliceIntl();
|
|
20
22
|
const {
|
|
21
23
|
enqueueSnackbar
|
|
22
24
|
} = muiXSnackbar.useSnackbar();
|
|
@@ -36,7 +38,7 @@ const useRunboxControl = props => {
|
|
|
36
38
|
signal
|
|
37
39
|
}), force).then(() => void props.refetch()).catch(err => {
|
|
38
40
|
if (err.name !== 'AbortError') {
|
|
39
|
-
enqueueSnackbar(intl.formatMessage({
|
|
41
|
+
enqueueSnackbar(intl$1.formatMessage({
|
|
40
42
|
id: 'runbox.runtime.message.startError'
|
|
41
43
|
}), {
|
|
42
44
|
variant: 'error'
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var messageEn = {"runbox.action.autoShutdown.title":"Always on","runbox.action.autoShutdown.tooltip.disabled":"This runtime automatically shuts down after {time}, which is set as the per-session usage time.","runbox.action.autoShutdown.tooltip.enabled":"If set to always on, the runtime will not shut down even if you leave the learning {_termLibraryLecturePage}. However, it will automatically shut down after {time}, which is set as the session-specific usage time of the runtime.","runbox.action.grade.dialog.description.error":"An error occurred while grading the code.","runbox.action.grade.dialog.description.success":"Grading completed successfully.","runbox.action.grade.dialog.title":"Grading result","runbox.action.grade.noti.error":"An error occurred while grading the code.","runbox.action.grade.title":"Submit","runbox.action.grade.tooltip.onProgress":"Grading is in progress. Please wait for a moment. Depending on the {_termLibraryLecturePage}, grading may take up to 3 minutes.","runbox.action.reset.dialog.actions.confirm":"Reset","runbox.action.reset.dialog.description":"Are you sure you want to reset the runbox code? Your codes will be overwritten to default code of {_termLibraryLecturePage}.\nAfter reset, the runbox session will be refreshed.","runbox.action.reset.noti.error":"An error occurred while initializing the runbox code.","runbox.action.reset.title":"Reset code","runbox.action.restart.dialog.actions.confirm":"Restart","runbox.action.restart.dialog.description":"Are you sure you want to restart the runbox?","runbox.action.restart.title":"Restart runbox","runbox.action.share.title":"Share runbox URL","runbox.action.share.snackbar.copied.fail":"Copying the runbox URL failed, please try again","runbox.action.share.snackbar.copied.success":"The runbox URL was copied successfully.","runbox.action.submitCountInfo.dialog.title":"Limit the number of submissions","runbox.action.submitCountInfo.dialog.description":"You have exceeded the submission count limit","runbox.action.submitCountInfo.tooltip.disabled":"The submission count has been used up","runbox.common.close":"Close","runbox.common.retry":"Retry","runbox.common.support":"Support","runbox.context.command.ping.error":"An error occurred while processing task.","runbox.runtime.message.startError":"There was an error starting the runbox.","runbox.runtime.overlay.assigned.description":"(3 of 3)\nRunbox is running.\nPlease wait!","runbox.runtime.overlay.assigned.description_timeout":"(3 of 3)\nRunning the runbox is taking longer than we expected.\nPlease wait a little longer without refreshing!","runbox.runtime.overlay.queued.description":"(2 of 3)\nCurrently queued {waiters} times...","runbox.runtime.overlay.queued.description_zero":"(2 of 3)\nRunbox will run soon","runbox.runtime.overlay.terminated.description.default":"The runtime terminated due to an unexpected problem.\nClick the button below to reconnect to the runbox.","runbox.runtime.overlay.terminated.description.general":"The runtime connected to the runbox has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Runtime has ended because the disk is full.\nIf you have recently deleted a runbox, it may take some time to reflect.","runbox.runtime.overlay.terminated.description.quota_exceeded":"The runtime has ended because the runtime has expired.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runbox has been running for 24 hours and the runtime has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.unexpected":"If the problem persists, please contact customer service.","runbox.runtime.overlay.terminated.restart":"Reconnect","runbox.runtime.overlay.terminated.title":"Runtime disconnected","runbox.header.submitInfo":"{isIndividual, select, true {} other {Team}} submission count | {remainCount}/{totalCount} times left {isDailyLimitEnabled, select, true {today} other {}}"};
|
|
6
6
|
|
|
7
|
-
exports.default =
|
|
7
|
+
exports.default = messageEn;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as
|
|
1
|
+
export { default as messageEn } from './en.json';
|
|
2
|
+
export { default as messageKo } from './ko.json';
|
|
3
|
+
export { default as messageTh } from './th.json';
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var messageKo = {"runbox.action.autoShutdown.title":"항상 켜두기","runbox.action.autoShutdown.tooltip.disabled":"해당 런타임은 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.action.autoShutdown.tooltip.enabled":"항상 켜두기를 설정하면 학습 {_termLibraryLecturePage} 밖으로 나가도 런타임이 종료되지 않습니다. 다만, 해당 런타임의 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.action.grade.dialog.description.error":"채점 중에 오류가 발생했습니다.","runbox.action.grade.dialog.description.success":"채점이 완료되었습니다.","runbox.action.grade.dialog.title":"채점 결과","runbox.action.grade.noti.error":"코드를 채점하는 도중 오류가 발생했습니다.","runbox.action.grade.title":"제출","runbox.action.grade.tooltip.onProgress":"코드 채점이 진행 중 입니다. 잠시만 기다려 주세요. 실습에 따라 채점이 최대 3분까지 소요될 수 있습니다.","runbox.action.reset.dialog.actions.confirm":"초기화","runbox.action.reset.dialog.description":"런박스 코드를 초기화하시겠습니까? 초기화 시 학습{_termLibraryLecturePage}의 코드가 기본 코드로 덮어씌워집니다.\n초기화 이후 런박스 세션이 새로고침 됩니다.","runbox.action.reset.noti.error":"런박스 코드를 초기화 하는 중에 오류가 발생했습니다.","runbox.action.reset.title":"코드 초기화","runbox.action.restart.dialog.actions.confirm":"재시작","runbox.action.restart.dialog.description":"런박스를 재시작 하시겠습니까?","runbox.action.restart.title":"런박스 재시작","runbox.action.share.title":"런박스 URL 복사","runbox.action.share.snackbar.copied.fail":"런박스 URL을 복사에 실패했습니다. 다시 시도해주세요.","runbox.action.share.snackbar.copied.success":"런박스 URL을 복사하였습니다.","runbox.action.submitCountInfo.dialog.title":"제출 횟수 제한","runbox.action.submitCountInfo.dialog.description":"제출 횟수 제한을 초과했습니다.","runbox.action.submitCountInfo.tooltip.disabled":"제출 횟수를 모두 사용했습니다.","runbox.common.close":"닫기","runbox.common.retry":"재시도","runbox.common.support":"고객센터","runbox.context.command.ping.error":"런박스 작업을 수행하는 도중 오류가 발생했습니다.","runbox.runtime.message.startError":"런박스를 시작하는 중에 오류가 발생했습니다.","runbox.runtime.overlay.assigned.description":"(3 / 3)\n런박스가 실행 중입니다.\n잠시만 기다려주세요!","runbox.runtime.overlay.assigned.description_timeout":"(3 / 3)\n런박스를 실행하는데\n예상보다 시간이 소요되고 있습니다.\n새로고침하지 말고 조금만 더 기다려주세요!","runbox.runtime.overlay.queued.description":"(2 / 3)\n현재 {waiters}번째 대기 중입니다...","runbox.runtime.overlay.queued.description_zero":"(2 / 3)\n곧 런박스가 실행됩니다","runbox.runtime.overlay.terminated.description.default":"예상치 못한 문제로 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.general":"런박스에 연결된 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"디스크가 가득 차서 런타임이 종료되었습니다.\n최근 런박스를 삭제하셨다면 반영까지 시간이 소요될 수 있습니다.","runbox.runtime.overlay.terminated.description.quota_exceeded":"런타임 사용시간이 만료되어 런타임이 종료되었습니다.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"런박스를 실행한지 24시간이 경과하여 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.unexpected":"문제가 지속되면 고객센터에 문의해주세요.","runbox.runtime.overlay.terminated.restart":"재접속","runbox.runtime.overlay.terminated.title":"런타임 연결 해제됨","runbox.header.submitInfo":"{isIndividual, select, true {} other {팀}} 제출 횟수 | {isDailyLimitEnabled, select, true {오늘} other {}} {remainCount}/{totalCount}회 남음"};
|
|
6
6
|
|
|
7
|
-
exports.default =
|
|
7
|
+
exports.default = messageKo;
|