@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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var messageTh = {"runbox.action.autoShutdown.title":"เปิดตลอดเวลา","runbox.action.autoShutdown.tooltip.disabled":"โรงง่ายได้ถูกตั้งค่าเป็นเวลาการใช้งานต่อเซสชัน {time}เมื่อผ่านไปแล้ว โปรแกรมจะถูกปิดอัตโนมัติ ","runbox.action.autoShutdown.tooltip.enabled":"เสมอติดตั้งการเปิดระบบอาจทำให้รันไทม์ไม่จบเมื่อออกจากข้อมูลการเรียนรู้ อย่างไรก็ตาม จะถูกตั้งเวลาการใช้งานต่อเซสชันของรันไทม์ที่นั่ง {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":"การตรวจคำตอบกำลังดำเนินอยู่ โปรดรอสัก{_termCourseRoleEducator}่ค่ะ ตามการปฏิบัติการฝึกปฏิบัติ การตรวจคำตอบอาจใช้เวลาถึง 3 นาทีได้ค่ะ.","runbox.action.reset.dialog.actions.confirm":"เริ่มต้นใหม่","runbox.action.reset.dialog.description":"คุณต้องการรีเซ็ตโค้ดของ Runbox หรือไม่? เมื่อรีเซ็ตแล้วโค้ดของชุดข้อมูลจะถูกเขียนทับด้วยโค้ดเริ่มต้น\nหลังจากรีเซ็ต การเซสชั่นของ Runbox จะถูกรีเฟรชใหม่.","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","runbox.action.share.snackbar.copied.fail":"การคัดลอก URL ของรันบ็อกซ์ล้มเหลว โปรดลองอีกครั้งค่ะ.","runbox.action.share.snackbar.copied.success":"คัดลอก URL ของ Runbox แล้วค่ะ.","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 ผิดพลาดในขณะนี้ โปรดลองอีกครั้งในภายหลัง.","runbox.runtime.message.startError":"เมื่อเริ่มต้นการทำงานของรันบ็อกซ์ พบข้อผิดพลาดในขณะนี้ครับ.","runbox.runtime.overlay.assigned.description":"(3 / 3)\nรันบ็อกซ์กำลังทำงานอยู่\nกรุณารอสักครู่!","runbox.runtime.overlay.assigned.description_timeout":"(3 / 3)\nการทำงานของระบบกำลังใช้เวลามากกว่าที่คาดหวัง\nโปรดรอสัก{_termCourseRoleEducator}่เพิ่มเติมโดยไม่ต้องรีเฟรช!","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":"ดิสก์เต็มเพราะได้ลบแพ็คเกจเร็วเรียบร้อยแล้ว อาจใช้เวลาสัก{_termCourseRoleEducator}่ในการปรับปรุงในกรณีนี้","runbox.runtime.overlay.terminated.description.quota_exceeded":"เวลาการใช้งานของไรมฯหมดลง และไรมฯถูกปิดลงแล้วครับ.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"หลังจากผ่านไป 24 ชั่วโมงหลังจากการเริ่มต้นการเรียกใช้ Runbox ได้สิ้นสุดลงแล้ว\nหากต้องการเชื่อมต่อกับ Runbox อีกครั้ง โปรดคลิกที่ปุ่มด้านล่างนี้.","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
|
+
|
|
7
|
+
exports.default = messageTh;
|
|
@@ -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 material = require('@mui/material');
|
|
9
9
|
var queue = require('../../../assets/queue.gif.js');
|
|
10
10
|
|
|
@@ -16,6 +16,9 @@ const ASSIGNED_NORMAL_TIMEOUT = 30 * 1e3; // 30 sec
|
|
|
16
16
|
//
|
|
17
17
|
//
|
|
18
18
|
const RuntimeOverlayAssigned = () => {
|
|
19
|
+
const {
|
|
20
|
+
intl: intl$1
|
|
21
|
+
} = intl.useRawEliceIntl();
|
|
19
22
|
const [timeout] = reactUse.useTimeout(ASSIGNED_NORMAL_TIMEOUT);
|
|
20
23
|
//
|
|
21
24
|
//
|
|
@@ -45,10 +48,10 @@ const RuntimeOverlayAssigned = () => {
|
|
|
45
48
|
whiteSpace: 'pre-wrap',
|
|
46
49
|
textAlign: 'center'
|
|
47
50
|
}
|
|
48
|
-
}, timeout() ?
|
|
49
|
-
id:
|
|
50
|
-
}) :
|
|
51
|
-
id:
|
|
51
|
+
}, timeout() ? intl$1.formatMessage({
|
|
52
|
+
id: 'runbox.runtime.overlay.assigned.description_timeout'
|
|
53
|
+
}) : intl$1.formatMessage({
|
|
54
|
+
id: 'runbox.runtime.overlay.assigned.description'
|
|
52
55
|
})));
|
|
53
56
|
};
|
|
54
57
|
|
|
@@ -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 iconsMaterial = require('@mui/icons-material');
|
|
8
8
|
var material = require('@mui/material');
|
|
9
9
|
require('../contexts/MaterialRunboxApiContext.js');
|
|
@@ -17,6 +17,9 @@ var queue = require('../../../assets/queue.gif.js');
|
|
|
17
17
|
const RuntimeOverlayQueued = ({
|
|
18
18
|
numWaiters
|
|
19
19
|
}) => {
|
|
20
|
+
const {
|
|
21
|
+
intl: intl$1
|
|
22
|
+
} = intl.useRawEliceIntl();
|
|
20
23
|
const {
|
|
21
24
|
showMessenger
|
|
22
25
|
} = MaterialRunboxContext.useMaterialRunboxContext();
|
|
@@ -48,19 +51,18 @@ const RuntimeOverlayQueued = ({
|
|
|
48
51
|
whiteSpace: 'pre-wrap',
|
|
49
52
|
textAlign: 'center'
|
|
50
53
|
}
|
|
51
|
-
}, numWaiters > 0 ?
|
|
52
|
-
id:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
id: "runbox.runtime.overlay.queued.description_zero"
|
|
54
|
+
}, numWaiters > 0 ? intl$1.formatMessage({
|
|
55
|
+
id: 'runbox.runtime.overlay.queued.description'
|
|
56
|
+
}, {
|
|
57
|
+
waiters: numWaiters
|
|
58
|
+
}) : intl$1.formatMessage({
|
|
59
|
+
id: 'runbox.runtime.overlay.queued.description_zero'
|
|
58
60
|
})), typeof showMessenger === 'function' ? React.createElement(material.Button, {
|
|
59
61
|
variant: "outlined",
|
|
60
62
|
startIcon: React.createElement(iconsMaterial.QuestionAnswer, null),
|
|
61
63
|
onClick: showMessenger
|
|
62
|
-
},
|
|
63
|
-
id:
|
|
64
|
+
}, intl$1.formatMessage({
|
|
65
|
+
id: 'runbox.common.support'
|
|
64
66
|
})) : null);
|
|
65
67
|
};
|
|
66
68
|
|
|
@@ -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 iconsMaterial = require('@mui/icons-material');
|
|
8
8
|
var lab = require('@mui/lab');
|
|
9
9
|
var material = require('@mui/material');
|
|
@@ -19,7 +19,9 @@ const RuntimeOverlayTerminated = ({
|
|
|
19
19
|
reason,
|
|
20
20
|
startRuntime
|
|
21
21
|
}) => {
|
|
22
|
-
const
|
|
22
|
+
const {
|
|
23
|
+
intl: intl$1
|
|
24
|
+
} = intl.useRawEliceIntl();
|
|
23
25
|
const {
|
|
24
26
|
showMessenger
|
|
25
27
|
} = MaterialRunboxContext.useMaterialRunboxContext();
|
|
@@ -42,14 +44,14 @@ const RuntimeOverlayTerminated = ({
|
|
|
42
44
|
case 'stopped_by_user':
|
|
43
45
|
case 'auto_shutdown':
|
|
44
46
|
return {
|
|
45
|
-
description: intl.formatMessage({
|
|
47
|
+
description: intl$1.formatMessage({
|
|
46
48
|
id: 'runbox.runtime.overlay.terminated.description.general'
|
|
47
49
|
}),
|
|
48
50
|
unexpected: false
|
|
49
51
|
};
|
|
50
52
|
case 'quota_exceeded':
|
|
51
53
|
return {
|
|
52
|
-
description: intl.formatMessage({
|
|
54
|
+
description: intl$1.formatMessage({
|
|
53
55
|
id: 'runbox.runtime.overlay.terminated.description.quota_exceeded'
|
|
54
56
|
}),
|
|
55
57
|
unexpected: false
|
|
@@ -57,7 +59,7 @@ const RuntimeOverlayTerminated = ({
|
|
|
57
59
|
// quota exceeded
|
|
58
60
|
case 'quota_per_session_exceeded':
|
|
59
61
|
return {
|
|
60
|
-
description: intl.formatMessage({
|
|
62
|
+
description: intl$1.formatMessage({
|
|
61
63
|
id: 'runbox.runtime.overlay.terminated.description.quota_per_session_exceeded'
|
|
62
64
|
}),
|
|
63
65
|
unexpected: false
|
|
@@ -65,14 +67,14 @@ const RuntimeOverlayTerminated = ({
|
|
|
65
67
|
// disk full
|
|
66
68
|
case 'os_disk_is_full':
|
|
67
69
|
return {
|
|
68
|
-
description: intl.formatMessage({
|
|
70
|
+
description: intl$1.formatMessage({
|
|
69
71
|
id: 'runbox.runtime.overlay.terminated.description.os_disk_is_full'
|
|
70
72
|
}),
|
|
71
73
|
unexpected: true
|
|
72
74
|
};
|
|
73
75
|
default:
|
|
74
76
|
return {
|
|
75
|
-
description: intl.formatMessage({
|
|
77
|
+
description: intl$1.formatMessage({
|
|
76
78
|
id: 'runbox.runtime.overlay.terminated.description.default'
|
|
77
79
|
}),
|
|
78
80
|
unexpected: true
|
|
@@ -80,7 +82,7 @@ const RuntimeOverlayTerminated = ({
|
|
|
80
82
|
}
|
|
81
83
|
},
|
|
82
84
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
|
-
[reason, intl]);
|
|
85
|
+
[reason, intl$1]);
|
|
84
86
|
//
|
|
85
87
|
//
|
|
86
88
|
//
|
|
@@ -108,13 +110,13 @@ const RuntimeOverlayTerminated = ({
|
|
|
108
110
|
}, React.createElement(material.Typography, {
|
|
109
111
|
variant: "h6",
|
|
110
112
|
textAlign: "center"
|
|
111
|
-
},
|
|
112
|
-
id:
|
|
113
|
+
}, intl$1.formatMessage({
|
|
114
|
+
id: 'runbox.runtime.overlay.terminated.title'
|
|
113
115
|
})), React.createElement(material.Typography, {
|
|
114
116
|
variant: "body2",
|
|
115
117
|
textAlign: "center",
|
|
116
118
|
whiteSpace: "pre-line"
|
|
117
|
-
}, runtimeTerminatedAction.unexpected ? runtimeTerminatedAction.description.concat('\n', intl.formatMessage({
|
|
119
|
+
}, runtimeTerminatedAction.unexpected ? runtimeTerminatedAction.description.concat('\n', intl$1.formatMessage({
|
|
118
120
|
id: 'runbox.runtime.overlay.terminated.description.unexpected'
|
|
119
121
|
})) : runtimeTerminatedAction.description)), React.createElement(material.Stack, {
|
|
120
122
|
gap: "0.5rem",
|
|
@@ -127,13 +129,13 @@ const RuntimeOverlayTerminated = ({
|
|
|
127
129
|
loading: isRestarting,
|
|
128
130
|
startIcon: React.createElement(iconsMaterial.PlayArrow, null),
|
|
129
131
|
onClick: handleRestart
|
|
130
|
-
},
|
|
131
|
-
id:
|
|
132
|
+
}, intl$1.formatMessage({
|
|
133
|
+
id: 'runbox.runtime.overlay.terminated.restart'
|
|
132
134
|
})), runtimeTerminatedAction.unexpected && typeof showMessenger === 'function' ? React.createElement(material.Button, {
|
|
133
135
|
variant: "text",
|
|
134
136
|
onClick: showMessenger
|
|
135
|
-
},
|
|
136
|
-
id:
|
|
137
|
+
}, intl$1.formatMessage({
|
|
138
|
+
id: 'runbox.common.support'
|
|
137
139
|
})) : null)));
|
|
138
140
|
};
|
|
139
141
|
|
|
@@ -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;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
4
4
|
import MaterialRunboxApiContextProvider from './contexts/MaterialRunboxApiContext.js';
|
|
5
5
|
import './contexts/MaterialRunboxCommandContext.js';
|
|
6
6
|
import MaterialRunboxContextProvider from './contexts/MaterialRunboxContext.js';
|
|
7
|
-
import
|
|
7
|
+
import messageEn from './locales/en.json.js';
|
|
8
|
+
import messageKo from './locales/ko.json.js';
|
|
9
|
+
import messageTh from './locales/th.json.js';
|
|
8
10
|
import MaterialRunboxContent from './MaterialRunboxContent.js';
|
|
9
|
-
import en from './locales/en.json.js';
|
|
10
11
|
|
|
11
12
|
//
|
|
12
13
|
//
|
|
@@ -20,21 +21,23 @@ const MaterialRunbox = _a => {
|
|
|
20
21
|
enableUrlShare = false,
|
|
21
22
|
locale = 'ko',
|
|
22
23
|
showMessenger,
|
|
23
|
-
eliceMaterialRunboxApiConfiguration
|
|
24
|
+
eliceMaterialRunboxApiConfiguration,
|
|
25
|
+
__intl
|
|
24
26
|
} = _a,
|
|
25
|
-
contentProps = __rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration"]);
|
|
26
|
-
return React.createElement(
|
|
27
|
+
contentProps = __rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration", "__intl"]);
|
|
28
|
+
return React.createElement(RawEliceIntlProvider, {
|
|
29
|
+
value: {
|
|
30
|
+
intl: __intl
|
|
31
|
+
}
|
|
32
|
+
}, React.createElement(MaterialRunboxContextProvider, {
|
|
27
33
|
enableAutoShutdownToggle: enableAutoShutdownToggle,
|
|
28
34
|
enableUrlShare: enableUrlShare,
|
|
29
35
|
locale: locale,
|
|
30
36
|
showMessenger: showMessenger
|
|
31
37
|
}, React.createElement(MaterialRunboxApiContextProvider, {
|
|
32
38
|
eliceMaterialRunboxApiConfiguration: eliceMaterialRunboxApiConfiguration
|
|
33
|
-
}, React.createElement(IntlProvider, {
|
|
34
|
-
locale: locale,
|
|
35
|
-
defaultLocale: "en",
|
|
36
|
-
messages: locale in index ? index[locale] : en
|
|
37
39
|
}, React.createElement(MaterialRunboxContent, Object.assign({}, contentProps)))));
|
|
38
40
|
};
|
|
41
|
+
var MaterialRunbox$1 = new IntlComponentBuilder(MaterialRunbox).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
39
42
|
|
|
40
|
-
export { MaterialRunbox as default };
|
|
43
|
+
export { MaterialRunbox$1 as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { FormattedMessage } from 'react-intl';
|
|
4
3
|
import { Spinner } from '@elice/blocks';
|
|
4
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import { EliceRunboxProvider } from '@elice/runbox-client';
|
|
6
6
|
import { Refresh } from '@mui/icons-material';
|
|
7
7
|
import { Stack, Typography, Button } from '@mui/material';
|
|
@@ -38,6 +38,9 @@ const MaterialRunboxContent = ({
|
|
|
38
38
|
runboxId,
|
|
39
39
|
courseId
|
|
40
40
|
}) => {
|
|
41
|
+
const {
|
|
42
|
+
intl
|
|
43
|
+
} = useRawEliceIntl();
|
|
41
44
|
const {
|
|
42
45
|
locale,
|
|
43
46
|
showMessenger
|
|
@@ -99,20 +102,20 @@ const MaterialRunboxContent = ({
|
|
|
99
102
|
gap: "1.5rem"
|
|
100
103
|
}, React.createElement(Typography, {
|
|
101
104
|
variant: "h6"
|
|
102
|
-
},
|
|
103
|
-
id:
|
|
105
|
+
}, intl.formatMessage({
|
|
106
|
+
id: 'runbox.runtime.message.startError'
|
|
104
107
|
})), React.createElement(Stack, {
|
|
105
108
|
gap: "0.5rem"
|
|
106
109
|
}, React.createElement(Button, {
|
|
107
110
|
startIcon: React.createElement(Refresh, null),
|
|
108
111
|
onClick: () => refetch()
|
|
109
|
-
},
|
|
110
|
-
id:
|
|
112
|
+
}, intl.formatMessage({
|
|
113
|
+
id: 'runbox.common.retry'
|
|
111
114
|
})), typeof showMessenger === 'function' ? React.createElement(Button, {
|
|
112
115
|
variant: "outlined",
|
|
113
116
|
onClick: () => showMessenger()
|
|
114
|
-
},
|
|
115
|
-
id:
|
|
117
|
+
}, intl.formatMessage({
|
|
118
|
+
id: 'runbox.common.support'
|
|
116
119
|
})) : null)));
|
|
117
120
|
}
|
|
118
121
|
if (!runbox || !runtimeTemplate) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
4
4
|
import { Tag, EliceIcon } from '@elice/mui-elements';
|
|
5
5
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
6
6
|
import { enums } from '@elice/types';
|
|
@@ -30,6 +30,9 @@ const MaterialRunboxHeader = ({
|
|
|
30
30
|
courseId,
|
|
31
31
|
refetch
|
|
32
32
|
}) => {
|
|
33
|
+
const {
|
|
34
|
+
intl
|
|
35
|
+
} = useRawEliceIntl();
|
|
33
36
|
const {
|
|
34
37
|
enableAutoShutdownToggle
|
|
35
38
|
} = useMaterialRunboxContext();
|
|
@@ -77,14 +80,13 @@ const MaterialRunboxHeader = ({
|
|
|
77
80
|
return null;
|
|
78
81
|
}
|
|
79
82
|
return React.createElement(Tag, {
|
|
80
|
-
label:
|
|
81
|
-
id:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
83
|
+
label: intl.formatMessage({
|
|
84
|
+
id: 'runbox.header.submitInfo'
|
|
85
|
+
}, {
|
|
86
|
+
remainCount: remainSubmitCount,
|
|
87
|
+
totalCount: totalSubmitCount,
|
|
88
|
+
isDailyLimitEnabled,
|
|
89
|
+
isIndividual: isIndividualTypeLeaderboard
|
|
88
90
|
}),
|
|
89
91
|
variant: "muted",
|
|
90
92
|
color: remainSubmitCount ? 'success' : 'secondary'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
4
4
|
import { FormControlLabel, Tooltip, Switch } from '@mui/material';
|
|
5
5
|
import { useMaterialRunboxApiContext } from '../contexts/MaterialRunboxApiContext.js';
|
|
6
6
|
import '../contexts/MaterialRunboxCommandContext.js';
|
|
@@ -30,7 +30,9 @@ const MaterialRunboxActionAutoShutdown = ({
|
|
|
30
30
|
refetch
|
|
31
31
|
}) => {
|
|
32
32
|
var _a;
|
|
33
|
-
const
|
|
33
|
+
const {
|
|
34
|
+
intl
|
|
35
|
+
} = useRawEliceIntl();
|
|
34
36
|
const materialRunboxApi = useMaterialRunboxApiContext();
|
|
35
37
|
/**
|
|
36
38
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { useIntl, FormattedMessage } from 'react-intl';
|
|
4
3
|
import { Transition } from 'react-transition-group';
|
|
4
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
6
6
|
import { CommandType } from '@elice/openapi-client-material-runbox';
|
|
7
7
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
@@ -70,7 +70,9 @@ const MaterialRunboxActionGrade = ({
|
|
|
70
70
|
courseId
|
|
71
71
|
}) => {
|
|
72
72
|
var _a;
|
|
73
|
-
const
|
|
73
|
+
const {
|
|
74
|
+
intl
|
|
75
|
+
} = useRawEliceIntl();
|
|
74
76
|
const {
|
|
75
77
|
enqueueSnackbar
|
|
76
78
|
} = useSnackbar();
|
|
@@ -204,8 +206,8 @@ const MaterialRunboxActionGrade = ({
|
|
|
204
206
|
disabled: !isRunboxRunning || isLastCommandRunning || !isSubmitCountRemained,
|
|
205
207
|
size: "small",
|
|
206
208
|
onClick: handleAction
|
|
207
|
-
},
|
|
208
|
-
id:
|
|
209
|
+
}, intl.formatMessage({
|
|
210
|
+
id: 'runbox.action.grade.title'
|
|
209
211
|
})), isGradeDoneWithOutput ? React.createElement(Transition, {
|
|
210
212
|
in: isGradeDoneWithOutput,
|
|
211
213
|
timeout: 0,
|
|
@@ -236,18 +238,18 @@ const MaterialRunboxActionGrade = ({
|
|
|
236
238
|
maxWidth: "md",
|
|
237
239
|
fullWidth: true,
|
|
238
240
|
onClose: handleGradeResultDialogClose
|
|
239
|
-
}, React.createElement(DialogTitle, null,
|
|
240
|
-
id:
|
|
241
|
+
}, React.createElement(DialogTitle, null, intl.formatMessage({
|
|
242
|
+
id: 'runbox.action.grade.dialog.title'
|
|
241
243
|
})), React.createElement(DialogContent, null, React.createElement(Stack, {
|
|
242
244
|
gap: "0.75rem"
|
|
243
245
|
}, lastCommand.terminatedReason === 'done' ? React.createElement(Alert, {
|
|
244
246
|
severity: "success"
|
|
245
|
-
},
|
|
246
|
-
id:
|
|
247
|
+
}, intl.formatMessage({
|
|
248
|
+
id: 'runbox.action.grade.dialog.description.success'
|
|
247
249
|
})) : React.createElement(Alert, {
|
|
248
250
|
severity: "error"
|
|
249
|
-
},
|
|
250
|
-
id:
|
|
251
|
+
}, intl.formatMessage({
|
|
252
|
+
id: 'runbox.action.grade.dialog.description.error'
|
|
251
253
|
})), React.createElement(StyledTerminal, {
|
|
252
254
|
value: lastCommand.output,
|
|
253
255
|
readOnly: true,
|
|
@@ -256,8 +258,8 @@ const MaterialRunboxActionGrade = ({
|
|
|
256
258
|
color: "inherit",
|
|
257
259
|
disabled: isActionLoading,
|
|
258
260
|
onClick: handleGradeResultDialogClose
|
|
259
|
-
},
|
|
260
|
-
id:
|
|
261
|
+
}, intl.formatMessage({
|
|
262
|
+
id: 'runbox.common.close'
|
|
261
263
|
}))));
|
|
262
264
|
};
|
|
263
265
|
/**
|
|
@@ -269,15 +271,15 @@ const MaterialRunboxActionGrade = ({
|
|
|
269
271
|
maxWidth: "xs",
|
|
270
272
|
open: isSubmitCountInfoDialogOpen,
|
|
271
273
|
onClick: handleSubmitCountInfoDialogClose
|
|
272
|
-
}, React.createElement(DialogTitle, null,
|
|
273
|
-
id:
|
|
274
|
-
})), React.createElement(DialogContent, null, React.createElement(Typography, null,
|
|
275
|
-
id:
|
|
274
|
+
}, React.createElement(DialogTitle, null, intl.formatMessage({
|
|
275
|
+
id: 'runbtox.action.submitCountInfo.dialog.title'
|
|
276
|
+
})), React.createElement(DialogContent, null, React.createElement(Typography, null, intl.formatMessage({
|
|
277
|
+
id: 'runbox.action.submitCountInfo.dialog.description'
|
|
276
278
|
}))), React.createElement(DialogActions, null, React.createElement(Button, {
|
|
277
279
|
color: "inherit",
|
|
278
280
|
onClick: handleSubmitCountInfoDialogClose
|
|
279
|
-
},
|
|
280
|
-
id:
|
|
281
|
+
}, intl.formatMessage({
|
|
282
|
+
id: 'runbox.common.close'
|
|
281
283
|
}))));
|
|
282
284
|
};
|
|
283
285
|
//
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
3
3
|
import { EliceIcon } from '@elice/mui-elements';
|
|
4
4
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
5
5
|
import { CommandType } from '@elice/openapi-client-material-runbox';
|
|
@@ -18,7 +18,9 @@ const MaterialRunboxActionReset = ({
|
|
|
18
18
|
courseId,
|
|
19
19
|
handleMenuClose
|
|
20
20
|
}) => {
|
|
21
|
-
const
|
|
21
|
+
const {
|
|
22
|
+
intl
|
|
23
|
+
} = useRawEliceIntl();
|
|
22
24
|
const {
|
|
23
25
|
enqueueSnackbar
|
|
24
26
|
} = useSnackbar();
|
|
@@ -72,8 +74,8 @@ const MaterialRunboxActionReset = ({
|
|
|
72
74
|
disabled: isLastCommandRunning
|
|
73
75
|
}, React.createElement(ListItemIcon, null, React.createElement(EliceIcon, {
|
|
74
76
|
icon: faRefresh
|
|
75
|
-
})), React.createElement(ListItemText, null,
|
|
76
|
-
id:
|
|
77
|
+
})), React.createElement(ListItemText, null, intl.formatMessage({
|
|
78
|
+
id: 'runbox.action.reset.title'
|
|
77
79
|
})));
|
|
78
80
|
};
|
|
79
81
|
/**
|
|
@@ -88,27 +90,27 @@ const MaterialRunboxActionReset = ({
|
|
|
88
90
|
maxWidth: "xs",
|
|
89
91
|
fullWidth: true,
|
|
90
92
|
onClose: handleDialogClose
|
|
91
|
-
}, React.createElement(DialogTitle, null,
|
|
92
|
-
id:
|
|
93
|
+
}, React.createElement(DialogTitle, null, intl.formatMessage({
|
|
94
|
+
id: 'runbox.action.reset.title'
|
|
93
95
|
})), React.createElement(DialogContent, null, React.createElement(DialogContentText, {
|
|
94
96
|
sx: {
|
|
95
97
|
whiteSpace: 'pre-line'
|
|
96
98
|
}
|
|
97
|
-
},
|
|
98
|
-
id:
|
|
99
|
+
}, intl.formatMessage({
|
|
100
|
+
id: 'runbox.action.reset.dialog.description'
|
|
99
101
|
}))), React.createElement(DialogActions, null, React.createElement(Button, {
|
|
100
102
|
color: "inherit",
|
|
101
103
|
disabled: isLoading,
|
|
102
104
|
onClick: handleDialogClose
|
|
103
|
-
},
|
|
104
|
-
id:
|
|
105
|
+
}, intl.formatMessage({
|
|
106
|
+
id: 'runbox.common.close'
|
|
105
107
|
})), React.createElement(LoadingButton, {
|
|
106
108
|
variant: "contained",
|
|
107
109
|
color: "warning",
|
|
108
110
|
loading: isLoading || isLastCommandRunning,
|
|
109
111
|
onClick: handleReset
|
|
110
|
-
},
|
|
111
|
-
id:
|
|
112
|
+
}, intl.formatMessage({
|
|
113
|
+
id: 'runbox.action.reset.dialog.actions.confirm'
|
|
112
114
|
}))));
|
|
113
115
|
};
|
|
114
116
|
//
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
3
3
|
import { EliceIcon } from '@elice/mui-elements';
|
|
4
4
|
import { faRotateRight } from '@fortawesome/pro-solid-svg-icons';
|
|
5
5
|
import { LoadingButton } from '@mui/lab';
|
|
@@ -15,6 +15,9 @@ const MaterialRunboxActionRestart = ({
|
|
|
15
15
|
refetch,
|
|
16
16
|
handleMenuClose
|
|
17
17
|
}) => {
|
|
18
|
+
const {
|
|
19
|
+
intl
|
|
20
|
+
} = useRawEliceIntl();
|
|
18
21
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
19
22
|
const [isDialogOpened, setDialogOpened] = React.useState(false);
|
|
20
23
|
// restart
|
|
@@ -50,8 +53,8 @@ const MaterialRunboxActionRestart = ({
|
|
|
50
53
|
onClick: () => setDialogOpened(true)
|
|
51
54
|
}, React.createElement(ListItemIcon, null, React.createElement(EliceIcon, {
|
|
52
55
|
icon: faRotateRight
|
|
53
|
-
})), React.createElement(ListItemText, null,
|
|
54
|
-
id:
|
|
56
|
+
})), React.createElement(ListItemText, null, intl.formatMessage({
|
|
57
|
+
id: 'runbox.action.restart.title'
|
|
55
58
|
})));
|
|
56
59
|
};
|
|
57
60
|
/**
|
|
@@ -66,27 +69,27 @@ const MaterialRunboxActionRestart = ({
|
|
|
66
69
|
open: true,
|
|
67
70
|
fullWidth: true,
|
|
68
71
|
onClose: handleDialogClose
|
|
69
|
-
}, React.createElement(DialogTitle, null,
|
|
70
|
-
id:
|
|
72
|
+
}, React.createElement(DialogTitle, null, intl.formatMessage({
|
|
73
|
+
id: 'runbox.action.restart.title'
|
|
71
74
|
})), React.createElement(DialogContent, null, React.createElement(DialogContentText, {
|
|
72
75
|
sx: {
|
|
73
76
|
whiteSpace: 'pre-line'
|
|
74
77
|
}
|
|
75
|
-
},
|
|
76
|
-
id:
|
|
78
|
+
}, intl.formatMessage({
|
|
79
|
+
id: 'runbox.action.restart.dialog.description'
|
|
77
80
|
}))), React.createElement(DialogActions, null, React.createElement(Button, {
|
|
78
81
|
color: "inherit",
|
|
79
82
|
disabled: isLoading,
|
|
80
83
|
onClick: handleDialogClose
|
|
81
|
-
},
|
|
82
|
-
id:
|
|
84
|
+
}, intl.formatMessage({
|
|
85
|
+
id: 'runbox.common.close'
|
|
83
86
|
})), React.createElement(LoadingButton, {
|
|
84
87
|
variant: "contained",
|
|
85
88
|
color: "warning",
|
|
86
89
|
loading: isLoading,
|
|
87
90
|
onClick: handleRestartAction
|
|
88
|
-
},
|
|
89
|
-
id:
|
|
91
|
+
}, intl.formatMessage({
|
|
92
|
+
id: 'runbox.action.restart.dialog.actions.confirm'
|
|
90
93
|
}))));
|
|
91
94
|
};
|
|
92
95
|
//
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl, FormattedMessage } from 'react-intl';
|
|
3
2
|
import { useCopyToClipboard } from 'react-use';
|
|
3
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
4
4
|
import { EliceIcon } from '@elice/mui-elements';
|
|
5
5
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
6
6
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
@@ -16,7 +16,9 @@ import { useMaterialRunboxContext } from '../contexts/MaterialRunboxContext.js';
|
|
|
16
16
|
const MaterialRunboxActionShare = ({
|
|
17
17
|
handleMenuClose
|
|
18
18
|
}) => {
|
|
19
|
-
const
|
|
19
|
+
const {
|
|
20
|
+
intl
|
|
21
|
+
} = useRawEliceIntl();
|
|
20
22
|
const {
|
|
21
23
|
enqueueSnackbar
|
|
22
24
|
} = useSnackbar();
|
|
@@ -43,8 +45,8 @@ const MaterialRunboxActionShare = ({
|
|
|
43
45
|
onClick: handleShareAction
|
|
44
46
|
}, React.createElement(ListItemIcon, null, React.createElement(EliceIcon, {
|
|
45
47
|
icon: faLinkSimple
|
|
46
|
-
})), React.createElement(ListItemText, null,
|
|
47
|
-
id:
|
|
48
|
+
})), React.createElement(ListItemText, null, intl.formatMessage({
|
|
49
|
+
id: 'runbox.action.share.title'
|
|
48
50
|
})));
|
|
49
51
|
};
|
|
50
52
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
3
3
|
import { useSnackbar } from '@elice/mui-x-snackbar';
|
|
4
4
|
import { CommandStatus } from '@elice/openapi-client-material-runbox';
|
|
5
5
|
import { timer } from 'rxjs';
|
|
@@ -27,7 +27,9 @@ const MaterialRunboxCommandContextProvider = ({
|
|
|
27
27
|
runtime,
|
|
28
28
|
courseId
|
|
29
29
|
}) => {
|
|
30
|
-
const
|
|
30
|
+
const {
|
|
31
|
+
intl
|
|
32
|
+
} = useRawEliceIntl();
|
|
31
33
|
const {
|
|
32
34
|
enqueueSnackbar
|
|
33
35
|
} = useSnackbar();
|