@elice/material-exercise 1.230217.0-sepmatlec.2 → 1.230220.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-exercise/context/ExerciseProvider.js +3 -3
- package/cjs/components/material-exercise/context/recoil.js +1 -11
- package/cjs/components/material-exercise/context/recoilTypes.d.ts +1 -6
- package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +1 -1
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +1 -1
- package/cjs/components/material-exercise/exercise-room/ExerciseRoomDetail.js +6 -6
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunner.js +1 -1
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +7 -23
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.d.ts +6 -0
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +114 -0
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +8 -12
- package/cjs/components/material-exercise/exercise-runner/locales/en.json.js +1 -1
- package/cjs/components/material-exercise/exercise-runner/locales/ko.json.js +1 -1
- package/es/components/material-exercise/context/ExerciseProvider.js +3 -3
- package/es/components/material-exercise/context/recoil.js +2 -12
- package/es/components/material-exercise/context/recoilTypes.d.ts +1 -6
- package/es/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +1 -1
- package/es/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +1 -1
- package/es/components/material-exercise/exercise-room/ExerciseRoomDetail.js +6 -6
- package/es/components/material-exercise/exercise-runner/ExerciseRunner.js +1 -1
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +9 -25
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.d.ts +6 -0
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +107 -0
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +8 -12
- package/es/components/material-exercise/exercise-runner/locales/en.json.js +1 -1
- package/es/components/material-exercise/exercise-runner/locales/ko.json.js +1 -1
- package/package.json +8 -8
|
@@ -44,8 +44,8 @@ const ExerciseProvider = _a => {
|
|
|
44
44
|
const exercise = recoil.useRecoilValue(recoil$1.exerciseState(materialExerciseId));
|
|
45
45
|
const exerciseRoom = recoil.useRecoilValue(recoil$1.exerciseRoomState(exerciseRoomId)); // lecture
|
|
46
46
|
|
|
47
|
-
const lecture = recoil.useRecoilValue(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
48
|
-
const resetLecture = recoil.useResetRecoilState(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
47
|
+
const lecture = recoil.useRecoilValue(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId));
|
|
48
|
+
const resetLecture = recoil.useResetRecoilState(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId)); // multilang languages
|
|
49
49
|
|
|
50
50
|
const exerciseMultilangLanguages = recoil.useRecoilValue(recoil$1.exerciseMultilangLanguagesState(exercise === null || exercise === void 0 ? void 0 : exercise.id));
|
|
51
51
|
const resetExerciseMultilangLanguages = recoil.useResetRecoilState(recoil$1.exerciseMultilangLanguagesState(exercise === null || exercise === void 0 ? void 0 : exercise.id)); // etc
|
|
@@ -83,7 +83,7 @@ const ExerciseProvider = _a => {
|
|
|
83
83
|
//
|
|
84
84
|
|
|
85
85
|
React__default["default"].useEffect(() => {
|
|
86
|
-
if (!(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
86
|
+
if (!(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId)) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -74,17 +74,7 @@ const exerciseState = recoil.atomFamily({
|
|
|
74
74
|
const get = async () => {
|
|
75
75
|
setSelf(await apiClient.getOrgMaterialExerciseGet({
|
|
76
76
|
materialExerciseId
|
|
77
|
-
}).then(res => res.materialExercise).
|
|
78
|
-
materialId: materialExercise.id,
|
|
79
|
-
materialType: types.enums.LectureMaterialType.Exercise
|
|
80
|
-
}).then(res => ({
|
|
81
|
-
_courseId: res.courseId,
|
|
82
|
-
_lectureId: res.lectureId,
|
|
83
|
-
_lecturePageId: res.lecturePageId,
|
|
84
|
-
_orderNo: res.orderNo
|
|
85
|
-
})).catch(err => {
|
|
86
|
-
throw err;
|
|
87
|
-
})])).then(([materialExercise, lecturePageResolve]) => Object.assign(Object.assign({}, materialExercise), lecturePageResolve)).catch(() => null));
|
|
77
|
+
}).then(res => res.materialExercise).catch(() => null));
|
|
88
78
|
};
|
|
89
79
|
|
|
90
80
|
if (trigger === 'get') {
|
|
@@ -10,12 +10,7 @@ export declare type AtomLectureState = GetOrgLectureGetResponses['lecture'] | nu
|
|
|
10
10
|
/**
|
|
11
11
|
* Material exercise.
|
|
12
12
|
*/
|
|
13
|
-
export declare type AtomExerciseState =
|
|
14
|
-
_courseId: number;
|
|
15
|
-
_lectureId: number;
|
|
16
|
-
_lecturePageId: number;
|
|
17
|
-
_orderNo: number;
|
|
18
|
-
}) | null;
|
|
13
|
+
export declare type AtomExerciseState = GetOrgMaterialExerciseGetResponses['materialExercise'] | null;
|
|
19
14
|
/**
|
|
20
15
|
* Material exercise room.
|
|
21
16
|
*/
|
|
@@ -53,7 +53,7 @@ const ExerciseFileEditor = () => {
|
|
|
53
53
|
} = React__default["default"].useContext(context.ExerciseContext);
|
|
54
54
|
const exercise = recoil.useRecoilValue(recoil$1.exerciseState(materialExerciseId));
|
|
55
55
|
const exerciseRoom = recoil.useRecoilValue(recoil$1.exerciseRoomState(exerciseRoomId));
|
|
56
|
-
const lecture = recoil.useRecoilValue(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
56
|
+
const lecture = recoil.useRecoilValue(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId));
|
|
57
57
|
const preference = recoil.useRecoilValue(recoil$1.exerciseEditorPreferenceState);
|
|
58
58
|
const activeFilename = recoil.useRecoilValue(recoil$1.exerciseActiveFilenameState);
|
|
59
59
|
const readOnly = readOnlyEditor || readOnlyActiveFile;
|
|
@@ -27,7 +27,7 @@ const ExerciseMenuDropdown = () => {
|
|
|
27
27
|
} = React__default["default"].useContext(context.ExerciseContext);
|
|
28
28
|
const user = recoil.useRecoilValue(recoil$1.exerciseUserState);
|
|
29
29
|
const exercise = recoil.useRecoilValue(recoil$1.exerciseState(materialExerciseId));
|
|
30
|
-
const lecture = recoil.useRecoilValue(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
30
|
+
const lecture = recoil.useRecoilValue(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId));
|
|
31
31
|
const activeFilename = recoil.useRecoilValue(recoil$1.exerciseActiveFilenameState);
|
|
32
32
|
const setRightpaneActiveState = recoil.useSetRecoilState(recoil$1.exerciseRightpaneActiveState);
|
|
33
33
|
const [isSubmitHistoryModalOpen, setIsSubmitHistoryModalOpen] = React__default["default"].useState(false);
|
|
@@ -34,7 +34,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
34
34
|
goToList,
|
|
35
35
|
onHide
|
|
36
36
|
}) => {
|
|
37
|
-
var _a, _b, _c, _d, _e;
|
|
37
|
+
var _a, _b, _c, _d, _e, _f;
|
|
38
38
|
|
|
39
39
|
const intl = reactIntl.useIntl();
|
|
40
40
|
const {
|
|
@@ -52,7 +52,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
52
52
|
const [isLeaveDialogOpen, setIsLeaveDialogOpen] = React__default["default"].useState(false);
|
|
53
53
|
const [isDeleting, setIsDeleting] = React__default["default"].useState(false);
|
|
54
54
|
const isThisChatRoomOwner = (_b = ((_a = exerciseRoom === null || exerciseRoom === void 0 ? void 0 : exerciseRoom.roomUsers.find(roomUser => roomUser.user.id === (user === null || user === void 0 ? void 0 : user.id))) === null || _a === void 0 ? void 0 : _a.permission) === types.enums.ExerciseRoomPermission.Owner) !== null && _b !== void 0 ? _b : false;
|
|
55
|
-
const shareLink = materialExercise ? `https://${window.location.host}/courses/${materialExercise.
|
|
55
|
+
const shareLink = materialExercise ? `https://${window.location.host}/courses/${materialExercise.courseId}/lectures/${materialExercise.lectureId}/materials/${(_c = materialExercise === null || materialExercise === void 0 ? void 0 : materialExercise.mainOrderNo) !== null && _c !== void 0 ? _c : 0}/projects/${selectedExerciseRoomId}` : '';
|
|
56
56
|
const [, copyToClipboard] = reactUse.useCopyToClipboard();
|
|
57
57
|
const doGetOrgMaterialExerciseExerciseRoomGet = React__default["default"].useCallback(() => {
|
|
58
58
|
return apiClient.getOrgMaterialExerciseExerciseRoomGet({
|
|
@@ -100,7 +100,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
100
100
|
const doGetOrgCourseUserList = React__default["default"].useCallback(() => {
|
|
101
101
|
if (materialExercise) {
|
|
102
102
|
return apiClient.getOrgCourseUserList({
|
|
103
|
-
courseId: materialExercise.
|
|
103
|
+
courseId: materialExercise.courseId,
|
|
104
104
|
isForTutoring: false,
|
|
105
105
|
count: 20,
|
|
106
106
|
offset: 0,
|
|
@@ -174,7 +174,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
174
174
|
return React__default["default"].createElement(StyledModal, {
|
|
175
175
|
theme: "dark",
|
|
176
176
|
onHide: onHide,
|
|
177
|
-
title: (
|
|
177
|
+
title: (_d = exerciseRoom === null || exerciseRoom === void 0 ? void 0 : exerciseRoom.title) !== null && _d !== void 0 ? _d : '',
|
|
178
178
|
headerIcon: icons.eilArrowLeftwardsSingle,
|
|
179
179
|
onHeaderIconClick: goToList,
|
|
180
180
|
footerChild: exerciseRoom ? exerciseRoom.isDefaultRoom ? React__default["default"].createElement(blocks.Flex, {
|
|
@@ -217,7 +217,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
217
217
|
label: intl.formatMessage({
|
|
218
218
|
id: 'materialExerciseExerciseRoom.leave'
|
|
219
219
|
}),
|
|
220
|
-
disabled: (
|
|
220
|
+
disabled: (_e = exerciseRoom === null || exerciseRoom === void 0 ? void 0 : exerciseRoom.isDefaultRoom) !== null && _e !== void 0 ? _e : false,
|
|
221
221
|
role: 'gray6',
|
|
222
222
|
onClick: () => {
|
|
223
223
|
setIsLeaveDialogOpen(true);
|
|
@@ -449,7 +449,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
449
449
|
}), isThisChatRoomOwner ? React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(blocks.Select, {
|
|
450
450
|
size: "small",
|
|
451
451
|
width: "small",
|
|
452
|
-
value: (
|
|
452
|
+
value: (_f = exerciseRoom === null || exerciseRoom === void 0 ? void 0 : exerciseRoom.publicPermission) !== null && _f !== void 0 ? _f : types.enums.ExerciseRoomPermission.Nothing,
|
|
453
453
|
onChange: value => {
|
|
454
454
|
doPostOrgMaterialExerciseExerciseRoomEdit(value);
|
|
455
455
|
},
|
|
@@ -43,7 +43,7 @@ const EXERCISE_RUNNER_HORIZONTAL_RATIO = {
|
|
|
43
43
|
};
|
|
44
44
|
const StyledExerciseRunner = styled__default["default"].div.withConfig({
|
|
45
45
|
componentId: "sc-mp78g-0"
|
|
46
|
-
})(["display:flex;flex-direction:column;width:100%;height:100%;background-color:", ";
|
|
46
|
+
})(["display:flex;flex-direction:column;width:100%;height:100%;background-color:", ";min-height:0;"], designTokens.base.color.navy8);
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
*/
|
package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactIntl = require('react-intl');
|
|
5
5
|
var blocks = require('@elice/blocks');
|
|
6
|
-
var icons = require('@elice/icons');
|
|
7
6
|
var types = require('@elice/types');
|
|
8
7
|
var websocket = require('@elice/websocket');
|
|
9
8
|
var recoil = require('recoil');
|
|
@@ -25,6 +24,7 @@ require('lodash/debounce');
|
|
|
25
24
|
require('random-words');
|
|
26
25
|
require('unicount');
|
|
27
26
|
var ExerciseRunnerContext = require('./ExerciseRunnerContext.js');
|
|
27
|
+
var ExerciseRunnerControllerCodeHelpRequestButton = require('./ExerciseRunnerControllerCodeHelpRequestButton.js');
|
|
28
28
|
|
|
29
29
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
33
33
|
|
|
34
34
|
const StyledControllerButton = styled__default["default"](blocks.Button).withConfig({
|
|
35
35
|
componentId: "sc-d9xhed-0"
|
|
36
|
-
})(["transition:none;"]);
|
|
36
|
+
})(["position:relative;transition:none;"]);
|
|
37
37
|
const StyledControllerButtonWrap = styled__default["default"].div.withConfig({
|
|
38
38
|
componentId: "sc-d9xhed-1"
|
|
39
39
|
})(["display:flex;"]);
|
|
@@ -46,20 +46,18 @@ const ExerciseRunnerControllerButtonGroup = () => {
|
|
|
46
46
|
|
|
47
47
|
const intl = reactIntl.useIntl();
|
|
48
48
|
const {
|
|
49
|
-
materialExerciseId
|
|
50
|
-
onCodeHelpRequest
|
|
49
|
+
materialExerciseId
|
|
51
50
|
} = React__default["default"].useContext(context.ExerciseContext);
|
|
52
51
|
const {
|
|
53
52
|
onSubmit,
|
|
54
53
|
onSyncRequest,
|
|
55
54
|
onCancel
|
|
56
55
|
} = React__default["default"].useContext(ExerciseRunnerContext.ExerciseRunnerContext);
|
|
57
|
-
const editorCursorSelectionValue = recoil.useRecoilValue(recoil$1.exerciseFileEditorCursorSelectionValueState);
|
|
58
56
|
const runnerWebsocketStatus = recoil.useRecoilValue(recoil$1.exerciseRunnerWebSocketStatusQuery);
|
|
59
57
|
const exercise = recoil.useRecoilValue(recoil$1.exerciseState(materialExerciseId));
|
|
60
58
|
const exerciseRunType = recoil.useRecoilValue(recoil$1.exerciseRunnerRunTypeState);
|
|
61
59
|
const exerciseWithNoGrade = Boolean(exercise === null || exercise === void 0 ? void 0 : exercise.isNoSubmitGrade);
|
|
62
|
-
const lecture = recoil.useRecoilValue(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
60
|
+
const lecture = recoil.useRecoilValue(recoil$1.exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId));
|
|
63
61
|
const isTestLecture = (lecture === null || lecture === void 0 ? void 0 : lecture.lectureType) === types.enums.LectureType.Test;
|
|
64
62
|
const isTestLectureCompleted = (lecture === null || lecture === void 0 ? void 0 : lecture.testAdmissionStatus) === types.enums.TestAdmissionStatus.Completed; // runner states
|
|
65
63
|
|
|
@@ -241,23 +239,9 @@ const ExerciseRunnerControllerButtonGroup = () => {
|
|
|
241
239
|
|
|
242
240
|
|
|
243
241
|
const renderCodeHelpRequestButton = () => {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
return React__default["default"].createElement(StyledControllerButton, {
|
|
249
|
-
size: "tiny",
|
|
250
|
-
role: "darkblue",
|
|
251
|
-
icon: React__default["default"].createElement(blocks.Icon, {
|
|
252
|
-
icon: icons.eilArrowRightwardsBasic
|
|
253
|
-
}),
|
|
254
|
-
iconAlign: "right",
|
|
255
|
-
onClick: () => {
|
|
256
|
-
onCodeHelpRequest(editorCursorSelectionValue);
|
|
257
|
-
}
|
|
258
|
-
}, React__default["default"].createElement(reactIntl.FormattedMessage, {
|
|
259
|
-
id: "exerciseRunner.controller.buttonGroup.button.helpRequest"
|
|
260
|
-
}));
|
|
242
|
+
return React__default["default"].createElement(ExerciseRunnerControllerCodeHelpRequestButton, {
|
|
243
|
+
isCodeHelpHidden: isCodeHelpHidden
|
|
244
|
+
});
|
|
261
245
|
}; //
|
|
262
246
|
//
|
|
263
247
|
//
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ExerciseRunnerControllerCodeHelpRequestButtonProps {
|
|
3
|
+
isCodeHelpHidden: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const ExerciseRunnerControllerCodeHelpRequestButton: React.FC<ExerciseRunnerControllerCodeHelpRequestButtonProps>;
|
|
6
|
+
export default ExerciseRunnerControllerCodeHelpRequestButton;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var reactIntl = require('react-intl');
|
|
5
|
+
var apiClient = require('@elice/api-client');
|
|
6
|
+
var blocks = require('@elice/blocks');
|
|
7
|
+
var designTokens = require('@elice/design-tokens');
|
|
8
|
+
var icons = require('@elice/icons');
|
|
9
|
+
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
10
|
+
var recoil = require('recoil');
|
|
11
|
+
var styled = require('styled-components');
|
|
12
|
+
var recoil$1 = require('../context/recoil.js');
|
|
13
|
+
var context = require('../context/context.js');
|
|
14
|
+
require('../context/recoilTypes.js');
|
|
15
|
+
require('../context/subjects.js');
|
|
16
|
+
require('../context/ExerciseProvider.js');
|
|
17
|
+
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
22
|
+
|
|
23
|
+
const IS_TOOLTIP_OPENED_KEY = 'isTooltipOpened';
|
|
24
|
+
const IS_TOOLTIP_OPENED_VALUE = 'true';
|
|
25
|
+
const StyledControllerButton = styled__default["default"](blocks.Button).withConfig({
|
|
26
|
+
componentId: "sc-10grd0k-0"
|
|
27
|
+
})(["position:relative;transition:none;"]);
|
|
28
|
+
const StyledCustomTooltip = styled__default["default"].div.withConfig({
|
|
29
|
+
componentId: "sc-10grd0k-1"
|
|
30
|
+
})(["position:absolute;top:calc(-100% - 1.25rem);left:calc(-100% - 1.5rem);display:flex;align-items:center;gap:0.25rem;padding:0.5rem 0.75rem;border-radius:0.5rem;background-color:", ";"], designTokens.base.color.white);
|
|
31
|
+
const StyledTip = styled__default["default"].svg.withConfig({
|
|
32
|
+
componentId: "sc-10grd0k-2"
|
|
33
|
+
})(["position:absolute;left:50%;bottom:calc(-0.25rem);transform:rotate(225deg);"]);
|
|
34
|
+
const StyledCustomBadge = styled__default["default"].div.withConfig({
|
|
35
|
+
componentId: "sc-10grd0k-3"
|
|
36
|
+
})(["padding:0.0625rem 0.25rem;border-radius:0.25rem;background-color:", ";font-size:0.6875rem;"], designTokens.base.color.red7);
|
|
37
|
+
|
|
38
|
+
const ExerciseRunnerControllerCodeHelpRequestButton = ({
|
|
39
|
+
isCodeHelpHidden
|
|
40
|
+
}) => {
|
|
41
|
+
const {
|
|
42
|
+
onCodeHelpRequest
|
|
43
|
+
} = React__default["default"].useContext(context.ExerciseContext);
|
|
44
|
+
const {
|
|
45
|
+
orgNameShort
|
|
46
|
+
} = materialSharedUtils.useMaterialConfig();
|
|
47
|
+
const editorCursorSelectionValue = recoil.useRecoilValue(recoil$1.exerciseFileEditorCursorSelectionValueState);
|
|
48
|
+
const [isTooltipOpened, setIsTooltipOpened] = React__default["default"].useState(false);
|
|
49
|
+
const [aiInfo, setAiInfo] = React__default["default"].useState(null); //
|
|
50
|
+
//
|
|
51
|
+
// Get ai info from organization and check all resovle below conditions.
|
|
52
|
+
// - isEnable is true
|
|
53
|
+
// - quotaPerDay is upper than zero
|
|
54
|
+
// - tooltipOpenSession is false
|
|
55
|
+
|
|
56
|
+
React__default["default"].useEffect(() => {
|
|
57
|
+
void apiClient.getGlobalOrganizationGet({
|
|
58
|
+
organizationNameShort: orgNameShort
|
|
59
|
+
}).then(res => {
|
|
60
|
+
setAiInfo(res.organization.aibotInfo);
|
|
61
|
+
});
|
|
62
|
+
const isTooltipOpend = sessionStorage.getItem(IS_TOOLTIP_OPENED_KEY);
|
|
63
|
+
|
|
64
|
+
if (isTooltipOpend === IS_TOOLTIP_OPENED_VALUE) {
|
|
65
|
+
setIsTooltipOpened(true);
|
|
66
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
67
|
+
|
|
68
|
+
}, []); //
|
|
69
|
+
//
|
|
70
|
+
//
|
|
71
|
+
|
|
72
|
+
if (isCodeHelpHidden || !editorCursorSelectionValue || typeof onCodeHelpRequest !== 'function') {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return React__default["default"].createElement(StyledControllerButton, {
|
|
77
|
+
size: "tiny",
|
|
78
|
+
role: "darkblue",
|
|
79
|
+
icon: React__default["default"].createElement(blocks.Icon, {
|
|
80
|
+
icon: icons.eilArrowRightwardsBasic
|
|
81
|
+
}),
|
|
82
|
+
iconAlign: "right",
|
|
83
|
+
onClick: () => {
|
|
84
|
+
onCodeHelpRequest(editorCursorSelectionValue);
|
|
85
|
+
}
|
|
86
|
+
}, React__default["default"].createElement(reactIntl.FormattedMessage, {
|
|
87
|
+
id: "exerciseRunner.controller.buttonGroup.button.helpRequest"
|
|
88
|
+
}), aiInfo && aiInfo.isEnabled && aiInfo.quotaPerDay > 0 && !isTooltipOpened ? React__default["default"].createElement(StyledCustomTooltip, null, React__default["default"].createElement(StyledCustomBadge, null, React__default["default"].createElement(blocks.Text, {
|
|
89
|
+
role: "white",
|
|
90
|
+
size: "tiny"
|
|
91
|
+
}, "NEW")), React__default["default"].createElement(blocks.Text, {
|
|
92
|
+
role: "gray7",
|
|
93
|
+
size: "small"
|
|
94
|
+
}, React__default["default"].createElement(reactIntl.FormattedMessage, {
|
|
95
|
+
id: "exerciseRunner.controller.buttonGroup.button.tooltip.aiHelp"
|
|
96
|
+
})), React__default["default"].createElement(blocks.IconButton, {
|
|
97
|
+
size: "tiny",
|
|
98
|
+
hasPadding: false,
|
|
99
|
+
border: false,
|
|
100
|
+
icon: icons.eilMathsignMultiplyBasic,
|
|
101
|
+
onClick: () => {
|
|
102
|
+
sessionStorage.setItem(IS_TOOLTIP_OPENED_KEY, IS_TOOLTIP_OPENED_VALUE);
|
|
103
|
+
setIsTooltipOpened(true);
|
|
104
|
+
}
|
|
105
|
+
}), React__default["default"].createElement(StyledTip, {
|
|
106
|
+
viewBox: "0 0 50 50",
|
|
107
|
+
height: "0.5rem"
|
|
108
|
+
}, React__default["default"].createElement("path", {
|
|
109
|
+
d: "M1 50 V10 Q1 1 10 1 H50z",
|
|
110
|
+
fill: designTokens.base.color.white
|
|
111
|
+
}))) : null);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
module.exports = ExerciseRunnerControllerCodeHelpRequestButton;
|
package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js
CHANGED
|
@@ -104,19 +104,15 @@ const ExerciseRunnerControllerRunningInfo = () => {
|
|
|
104
104
|
//
|
|
105
105
|
|
|
106
106
|
React__default["default"].useEffect(() => {
|
|
107
|
-
if (
|
|
108
|
-
|
|
107
|
+
if (exercise === null || exercise === void 0 ? void 0 : exercise.courseId) {
|
|
108
|
+
apiClient.getOrgCourseGet({
|
|
109
|
+
courseId: exercise.courseId
|
|
110
|
+
}).then(({
|
|
111
|
+
course
|
|
112
|
+
}) => {
|
|
113
|
+
setCourse(course);
|
|
114
|
+
}).catch(console.error);
|
|
109
115
|
}
|
|
110
|
-
|
|
111
|
-
const abortCtrl = new AbortController();
|
|
112
|
-
apiClient.getOrgCourseGet({
|
|
113
|
-
courseId: exercise._courseId
|
|
114
|
-
}, {
|
|
115
|
-
signal: abortCtrl.signal
|
|
116
|
-
}).then(res => res.course).then(setCourse).catch(console.error);
|
|
117
|
-
return () => {
|
|
118
|
-
abortCtrl.abort();
|
|
119
|
-
};
|
|
120
116
|
}, [exercise]);
|
|
121
117
|
/**
|
|
122
118
|
* Last running score.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var phrasesEn = {"exerciseRunner.controller.arduino.connectionStatus.connected":"Connected to Arduino","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"Connected to {device}","exerciseRunner.controller.arduino.connectionStatus.connecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.disconnected":"Disconnected from Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.noDevice":"No connected device","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.uploading":"Uploading...","exerciseRunner.controller.buttonGroup.button.compile":"Compile","exerciseRunner.controller.buttonGroup.button.helpRequest":"Help me","exerciseRunner.controller.buttonGroup.button.run":"Run","exerciseRunner.controller.buttonGroup.button.stop":"Stop","exerciseRunner.controller.buttonGroup.button.submit":"Submit","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"Exercise without submission","exerciseRunner.controller.buttonGroup.button.syncRequest":"Sync code","exerciseRunner.controller.runningInfo.error.fetch":"An error occurred while fetching running info","exerciseRunner.controller.runningInfo.lastRunningDatetime":"Last running datetime","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"Last submit datetime","exerciseRunner.controller.runningInfo.lastSubmitScore":"Last submit score","exerciseRunner.controller.runningInfo.score":"{score}","exerciseRunner.controller.statusMessage.closed":"Editor disconnected","exerciseRunner.controller.statusMessage.connecting":"Connecting to editor...","exerciseRunner.controller.statusMessage.open":"Editor connected","exerciseRunner.controller.timer.runningRemainingTime":"Remaining: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"OK","exerciseRunner.submitErrorDialog.action.reload":"Reload page","exerciseRunner.submitErrorDialog.body.commonError":"An error occurred while running the code.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"You have exceeded the allowed number of lab submissions.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"The exercise image has been updated.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.networkError":"An error occurred while running the code.\nPlease refresh and try again.\nIf the problem persists, please check the network status.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"This exercise is not allowed to be submitted.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"The exercise room is being prepared.\nPlease try again later.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"The exercise room is running.\nPlease wait a moment.","exerciseRunner.submitErrorDialog.body.unknown":"An error occurred while running the code.\nPlease try again later.","exerciseRunner.submitErrorDialog.title":"Unable to run the code"};
|
|
3
|
+
var phrasesEn = {"exerciseRunner.controller.arduino.connectionStatus.connected":"Connected to Arduino","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"Connected to {device}","exerciseRunner.controller.arduino.connectionStatus.connecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.disconnected":"Disconnected from Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.noDevice":"No connected device","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.uploading":"Uploading...","exerciseRunner.controller.buttonGroup.button.compile":"Compile","exerciseRunner.controller.buttonGroup.button.helpRequest":"Help me","exerciseRunner.controller.buttonGroup.button.run":"Run","exerciseRunner.controller.buttonGroup.button.stop":"Stop","exerciseRunner.controller.buttonGroup.button.submit":"Submit","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"Exercise without submission","exerciseRunner.controller.buttonGroup.button.syncRequest":"Sync code","exerciseRunner.controller.buttonGroup.button.tooltip.aiHelp":"A function to get help from AI has been added.","exerciseRunner.controller.runningInfo.error.fetch":"An error occurred while fetching running info","exerciseRunner.controller.runningInfo.lastRunningDatetime":"Last running datetime","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"Last submit datetime","exerciseRunner.controller.runningInfo.lastSubmitScore":"Last submit score","exerciseRunner.controller.runningInfo.score":"{score}","exerciseRunner.controller.statusMessage.closed":"Editor disconnected","exerciseRunner.controller.statusMessage.connecting":"Connecting to editor...","exerciseRunner.controller.statusMessage.open":"Editor connected","exerciseRunner.controller.timer.runningRemainingTime":"Remaining: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"OK","exerciseRunner.submitErrorDialog.action.reload":"Reload page","exerciseRunner.submitErrorDialog.body.commonError":"An error occurred while running the code.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"You have exceeded the allowed number of lab submissions.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"The exercise image has been updated.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.networkError":"An error occurred while running the code.\nPlease refresh and try again.\nIf the problem persists, please check the network status.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"This exercise is not allowed to be submitted.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"The exercise room is being prepared.\nPlease try again later.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"The exercise room is running.\nPlease wait a moment.","exerciseRunner.submitErrorDialog.body.unknown":"An error occurred while running the code.\nPlease try again later.","exerciseRunner.submitErrorDialog.title":"Unable to run the code"};
|
|
4
4
|
|
|
5
5
|
module.exports = phrasesEn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var phrasesKo = {"exerciseRunner.controller.arduino.connectionStatus.connected":"아두이노 기기 연결됨","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"{device} 연결됨","exerciseRunner.controller.arduino.connectionStatus.connecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.disconnected":"엘리스 아두이노 에이전트 연결 끊김","exerciseRunner.controller.arduino.connectionStatus.noDevice":"연결된 기기 없음","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.uploading":"업로드 중","exerciseRunner.controller.buttonGroup.button.compile":"컴파일","exerciseRunner.controller.buttonGroup.button.helpRequest":"도와주세요","exerciseRunner.controller.buttonGroup.button.run":"실행","exerciseRunner.controller.buttonGroup.button.stop":"정지","exerciseRunner.controller.buttonGroup.button.submit":"제출","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"실행만 가능한 실습입니다.","exerciseRunner.controller.buttonGroup.button.syncRequest":"코드 동기화","exerciseRunner.controller.runningInfo.error.fetch":"최종 실행 내역을 가져오는데 문제가 발생하였습니다.","exerciseRunner.controller.runningInfo.lastRunningDatetime":"최종 실행 시간","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"최종 제출 시간","exerciseRunner.controller.runningInfo.lastSubmitScore":"최종 제출 점수","exerciseRunner.controller.runningInfo.score":"{score} 점","exerciseRunner.controller.statusMessage.closed":"에디터 연결 끊김","exerciseRunner.controller.statusMessage.connecting":"에디터 연결 중...","exerciseRunner.controller.statusMessage.open":"에디터 연결됨","exerciseRunner.controller.timer.runningRemainingTime":"실행 제한시간: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"확인","exerciseRunner.submitErrorDialog.action.reload":"새로고침","exerciseRunner.submitErrorDialog.body.commonError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"실습 제출 허용 횟수를 초과했습니다.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"실습환경이 업데이트 되었습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.networkError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.\n문제가 계속되면 네트워크 상태를 확인해주세요.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"제출이 허용되지 않은 실습입니다.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"실습환경이 준비 중입니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"실습을 실행하고 있습니다.\n잠시만 기다려주세요.","exerciseRunner.submitErrorDialog.body.unknown":"코드 실행 중 오류가 발생했습니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.title":"실습을 실행할 수 없습니다"};
|
|
3
|
+
var phrasesKo = {"exerciseRunner.controller.arduino.connectionStatus.connected":"아두이노 기기 연결됨","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"{device} 연결됨","exerciseRunner.controller.arduino.connectionStatus.connecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.disconnected":"엘리스 아두이노 에이전트 연결 끊김","exerciseRunner.controller.arduino.connectionStatus.noDevice":"연결된 기기 없음","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.uploading":"업로드 중","exerciseRunner.controller.buttonGroup.button.compile":"컴파일","exerciseRunner.controller.buttonGroup.button.helpRequest":"도와주세요","exerciseRunner.controller.buttonGroup.button.run":"실행","exerciseRunner.controller.buttonGroup.button.stop":"정지","exerciseRunner.controller.buttonGroup.button.submit":"제출","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"실행만 가능한 실습입니다.","exerciseRunner.controller.buttonGroup.button.syncRequest":"코드 동기화","exerciseRunner.controller.buttonGroup.button.tooltip.aiHelp":"AI에게 도움받기 기능이 추가되었어요.","exerciseRunner.controller.runningInfo.error.fetch":"최종 실행 내역을 가져오는데 문제가 발생하였습니다.","exerciseRunner.controller.runningInfo.lastRunningDatetime":"최종 실행 시간","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"최종 제출 시간","exerciseRunner.controller.runningInfo.lastSubmitScore":"최종 제출 점수","exerciseRunner.controller.runningInfo.score":"{score} 점","exerciseRunner.controller.statusMessage.closed":"에디터 연결 끊김","exerciseRunner.controller.statusMessage.connecting":"에디터 연결 중...","exerciseRunner.controller.statusMessage.open":"에디터 연결됨","exerciseRunner.controller.timer.runningRemainingTime":"실행 제한시간: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"확인","exerciseRunner.submitErrorDialog.action.reload":"새로고침","exerciseRunner.submitErrorDialog.body.commonError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"실습 제출 허용 횟수를 초과했습니다.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"실습환경이 업데이트 되었습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.networkError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.\n문제가 계속되면 네트워크 상태를 확인해주세요.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"제출이 허용되지 않은 실습입니다.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"실습환경이 준비 중입니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"실습을 실행하고 있습니다.\n잠시만 기다려주세요.","exerciseRunner.submitErrorDialog.body.unknown":"코드 실행 중 오류가 발생했습니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.title":"실습을 실행할 수 없습니다"};
|
|
4
4
|
|
|
5
5
|
module.exports = phrasesKo;
|
|
@@ -37,8 +37,8 @@ const ExerciseProvider = _a => {
|
|
|
37
37
|
const exercise = useRecoilValue(exerciseState(materialExerciseId));
|
|
38
38
|
const exerciseRoom = useRecoilValue(exerciseRoomState(exerciseRoomId)); // lecture
|
|
39
39
|
|
|
40
|
-
const lecture = useRecoilValue(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
41
|
-
const resetLecture = useResetRecoilState(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
40
|
+
const lecture = useRecoilValue(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId));
|
|
41
|
+
const resetLecture = useResetRecoilState(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId)); // multilang languages
|
|
42
42
|
|
|
43
43
|
const exerciseMultilangLanguages = useRecoilValue(exerciseMultilangLanguagesState(exercise === null || exercise === void 0 ? void 0 : exercise.id));
|
|
44
44
|
const resetExerciseMultilangLanguages = useResetRecoilState(exerciseMultilangLanguagesState(exercise === null || exercise === void 0 ? void 0 : exercise.id)); // etc
|
|
@@ -76,7 +76,7 @@ const ExerciseProvider = _a => {
|
|
|
76
76
|
//
|
|
77
77
|
|
|
78
78
|
React.useEffect(() => {
|
|
79
|
-
if (!(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
79
|
+
if (!(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId)) {
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { postGlobalAccountPreferenceEdit, postOrgMaterialExerciseExerciseRoomUserFileAdd, getOrgLectureGet, getOrgMaterialExerciseGet,
|
|
1
|
+
import { postGlobalAccountPreferenceEdit, postOrgMaterialExerciseExerciseRoomUserFileAdd, getOrgLectureGet, getOrgMaterialExerciseGet, getOrgMaterialExerciseExerciseRoomGet, getOrgUserGet, getGlobalAccountPreferenceGet, getOrgMaterialExerciseExerciseImageExerciseFileGet, getOrgMaterialExerciseExerciseRoomUserFileGet } from '@elice/api-client';
|
|
2
2
|
import { enums } from '@elice/types';
|
|
3
3
|
import { EliceWebSocket } from '@elice/websocket';
|
|
4
4
|
import { camelizeKeys } from 'humps';
|
|
@@ -66,17 +66,7 @@ const exerciseState = atomFamily({
|
|
|
66
66
|
const get = async () => {
|
|
67
67
|
setSelf(await getOrgMaterialExerciseGet({
|
|
68
68
|
materialExerciseId
|
|
69
|
-
}).then(res => res.materialExercise).
|
|
70
|
-
materialId: materialExercise.id,
|
|
71
|
-
materialType: enums.LectureMaterialType.Exercise
|
|
72
|
-
}).then(res => ({
|
|
73
|
-
_courseId: res.courseId,
|
|
74
|
-
_lectureId: res.lectureId,
|
|
75
|
-
_lecturePageId: res.lecturePageId,
|
|
76
|
-
_orderNo: res.orderNo
|
|
77
|
-
})).catch(err => {
|
|
78
|
-
throw err;
|
|
79
|
-
})])).then(([materialExercise, lecturePageResolve]) => Object.assign(Object.assign({}, materialExercise), lecturePageResolve)).catch(() => null));
|
|
69
|
+
}).then(res => res.materialExercise).catch(() => null));
|
|
80
70
|
};
|
|
81
71
|
|
|
82
72
|
if (trigger === 'get') {
|
|
@@ -10,12 +10,7 @@ export declare type AtomLectureState = GetOrgLectureGetResponses['lecture'] | nu
|
|
|
10
10
|
/**
|
|
11
11
|
* Material exercise.
|
|
12
12
|
*/
|
|
13
|
-
export declare type AtomExerciseState =
|
|
14
|
-
_courseId: number;
|
|
15
|
-
_lectureId: number;
|
|
16
|
-
_lecturePageId: number;
|
|
17
|
-
_orderNo: number;
|
|
18
|
-
}) | null;
|
|
13
|
+
export declare type AtomExerciseState = GetOrgMaterialExerciseGetResponses['materialExercise'] | null;
|
|
19
14
|
/**
|
|
20
15
|
* Material exercise room.
|
|
21
16
|
*/
|
|
@@ -47,7 +47,7 @@ const ExerciseFileEditor = () => {
|
|
|
47
47
|
} = React.useContext(ExerciseContext);
|
|
48
48
|
const exercise = useRecoilValue(exerciseState(materialExerciseId));
|
|
49
49
|
const exerciseRoom = useRecoilValue(exerciseRoomState(exerciseRoomId));
|
|
50
|
-
const lecture = useRecoilValue(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
50
|
+
const lecture = useRecoilValue(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId));
|
|
51
51
|
const preference = useRecoilValue(exerciseEditorPreferenceState);
|
|
52
52
|
const activeFilename = useRecoilValue(exerciseActiveFilenameState);
|
|
53
53
|
const readOnly = readOnlyEditor || readOnlyActiveFile;
|
|
@@ -21,7 +21,7 @@ const ExerciseMenuDropdown = () => {
|
|
|
21
21
|
} = React.useContext(ExerciseContext);
|
|
22
22
|
const user = useRecoilValue(exerciseUserState);
|
|
23
23
|
const exercise = useRecoilValue(exerciseState(materialExerciseId));
|
|
24
|
-
const lecture = useRecoilValue(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
24
|
+
const lecture = useRecoilValue(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId));
|
|
25
25
|
const activeFilename = useRecoilValue(exerciseActiveFilenameState);
|
|
26
26
|
const setRightpaneActiveState = useSetRecoilState(exerciseRightpaneActiveState);
|
|
27
27
|
const [isSubmitHistoryModalOpen, setIsSubmitHistoryModalOpen] = React.useState(false);
|
|
@@ -26,7 +26,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
26
26
|
goToList,
|
|
27
27
|
onHide
|
|
28
28
|
}) => {
|
|
29
|
-
var _a, _b, _c, _d, _e;
|
|
29
|
+
var _a, _b, _c, _d, _e, _f;
|
|
30
30
|
|
|
31
31
|
const intl = useIntl();
|
|
32
32
|
const {
|
|
@@ -44,7 +44,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
44
44
|
const [isLeaveDialogOpen, setIsLeaveDialogOpen] = React.useState(false);
|
|
45
45
|
const [isDeleting, setIsDeleting] = React.useState(false);
|
|
46
46
|
const isThisChatRoomOwner = (_b = ((_a = exerciseRoom === null || exerciseRoom === void 0 ? void 0 : exerciseRoom.roomUsers.find(roomUser => roomUser.user.id === (user === null || user === void 0 ? void 0 : user.id))) === null || _a === void 0 ? void 0 : _a.permission) === enums.ExerciseRoomPermission.Owner) !== null && _b !== void 0 ? _b : false;
|
|
47
|
-
const shareLink = materialExercise ? `https://${window.location.host}/courses/${materialExercise.
|
|
47
|
+
const shareLink = materialExercise ? `https://${window.location.host}/courses/${materialExercise.courseId}/lectures/${materialExercise.lectureId}/materials/${(_c = materialExercise === null || materialExercise === void 0 ? void 0 : materialExercise.mainOrderNo) !== null && _c !== void 0 ? _c : 0}/projects/${selectedExerciseRoomId}` : '';
|
|
48
48
|
const [, copyToClipboard] = useCopyToClipboard();
|
|
49
49
|
const doGetOrgMaterialExerciseExerciseRoomGet = React.useCallback(() => {
|
|
50
50
|
return getOrgMaterialExerciseExerciseRoomGet({
|
|
@@ -92,7 +92,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
92
92
|
const doGetOrgCourseUserList = React.useCallback(() => {
|
|
93
93
|
if (materialExercise) {
|
|
94
94
|
return getOrgCourseUserList({
|
|
95
|
-
courseId: materialExercise.
|
|
95
|
+
courseId: materialExercise.courseId,
|
|
96
96
|
isForTutoring: false,
|
|
97
97
|
count: 20,
|
|
98
98
|
offset: 0,
|
|
@@ -166,7 +166,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
166
166
|
return React.createElement(StyledModal, {
|
|
167
167
|
theme: "dark",
|
|
168
168
|
onHide: onHide,
|
|
169
|
-
title: (
|
|
169
|
+
title: (_d = exerciseRoom === null || exerciseRoom === void 0 ? void 0 : exerciseRoom.title) !== null && _d !== void 0 ? _d : '',
|
|
170
170
|
headerIcon: eilArrowLeftwardsSingle,
|
|
171
171
|
onHeaderIconClick: goToList,
|
|
172
172
|
footerChild: exerciseRoom ? exerciseRoom.isDefaultRoom ? React.createElement(Flex, {
|
|
@@ -209,7 +209,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
209
209
|
label: intl.formatMessage({
|
|
210
210
|
id: 'materialExerciseExerciseRoom.leave'
|
|
211
211
|
}),
|
|
212
|
-
disabled: (
|
|
212
|
+
disabled: (_e = exerciseRoom === null || exerciseRoom === void 0 ? void 0 : exerciseRoom.isDefaultRoom) !== null && _e !== void 0 ? _e : false,
|
|
213
213
|
role: 'gray6',
|
|
214
214
|
onClick: () => {
|
|
215
215
|
setIsLeaveDialogOpen(true);
|
|
@@ -441,7 +441,7 @@ const MaterialExerciseExerciseRoomDetail = ({
|
|
|
441
441
|
}), isThisChatRoomOwner ? React.createElement(React.Fragment, null, React.createElement(Select, {
|
|
442
442
|
size: "small",
|
|
443
443
|
width: "small",
|
|
444
|
-
value: (
|
|
444
|
+
value: (_f = exerciseRoom === null || exerciseRoom === void 0 ? void 0 : exerciseRoom.publicPermission) !== null && _f !== void 0 ? _f : enums.ExerciseRoomPermission.Nothing,
|
|
445
445
|
onChange: value => {
|
|
446
446
|
doPostOrgMaterialExerciseExerciseRoomEdit(value);
|
|
447
447
|
},
|
|
@@ -36,7 +36,7 @@ const EXERCISE_RUNNER_HORIZONTAL_RATIO = {
|
|
|
36
36
|
};
|
|
37
37
|
const StyledExerciseRunner = styled.div.withConfig({
|
|
38
38
|
componentId: "sc-mp78g-0"
|
|
39
|
-
})(["display:flex;flex-direction:column;width:100%;height:100%;background-color:", ";
|
|
39
|
+
})(["display:flex;flex-direction:column;width:100%;height:100%;background-color:", ";min-height:0;"], base.color.navy8);
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
*/
|
package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl, FormattedMessage } from 'react-intl';
|
|
3
|
-
import { Button, Tooltip
|
|
4
|
-
import { eilArrowRightwardsBasic } from '@elice/icons';
|
|
3
|
+
import { Button, Tooltip } from '@elice/blocks';
|
|
5
4
|
import { enums } from '@elice/types';
|
|
6
5
|
import { EliceWebSocket } from '@elice/websocket';
|
|
7
6
|
import { useRecoilValue } from 'recoil';
|
|
8
7
|
import styled from 'styled-components';
|
|
9
8
|
import 'react-use';
|
|
10
9
|
import 'socket.io-client';
|
|
11
|
-
import {
|
|
10
|
+
import { exerciseRunnerWebSocketStatusQuery, exerciseState, exerciseRunnerRunTypeState, exerciseLectureState, exerciseRunnerSubmittingState, exerciseRunnerRunningState, exerciseArduinoUploadProgressState, exerciseArduinoOpenedPortNameState } from '../context/recoil.js';
|
|
12
11
|
import { ExerciseContext } from '../context/context.js';
|
|
13
12
|
import '../context/recoilTypes.js';
|
|
14
13
|
import { exerciseFileEditorSaveAction$ } from '../context/subjects.js';
|
|
@@ -23,10 +22,11 @@ import 'lodash/debounce';
|
|
|
23
22
|
import 'random-words';
|
|
24
23
|
import 'unicount';
|
|
25
24
|
import { ExerciseRunnerContext } from './ExerciseRunnerContext.js';
|
|
25
|
+
import ExerciseRunnerControllerCodeHelpRequestButton from './ExerciseRunnerControllerCodeHelpRequestButton.js';
|
|
26
26
|
|
|
27
27
|
const StyledControllerButton = styled(Button).withConfig({
|
|
28
28
|
componentId: "sc-d9xhed-0"
|
|
29
|
-
})(["transition:none;"]);
|
|
29
|
+
})(["position:relative;transition:none;"]);
|
|
30
30
|
const StyledControllerButtonWrap = styled.div.withConfig({
|
|
31
31
|
componentId: "sc-d9xhed-1"
|
|
32
32
|
})(["display:flex;"]);
|
|
@@ -39,20 +39,18 @@ const ExerciseRunnerControllerButtonGroup = () => {
|
|
|
39
39
|
|
|
40
40
|
const intl = useIntl();
|
|
41
41
|
const {
|
|
42
|
-
materialExerciseId
|
|
43
|
-
onCodeHelpRequest
|
|
42
|
+
materialExerciseId
|
|
44
43
|
} = React.useContext(ExerciseContext);
|
|
45
44
|
const {
|
|
46
45
|
onSubmit,
|
|
47
46
|
onSyncRequest,
|
|
48
47
|
onCancel
|
|
49
48
|
} = React.useContext(ExerciseRunnerContext);
|
|
50
|
-
const editorCursorSelectionValue = useRecoilValue(exerciseFileEditorCursorSelectionValueState);
|
|
51
49
|
const runnerWebsocketStatus = useRecoilValue(exerciseRunnerWebSocketStatusQuery);
|
|
52
50
|
const exercise = useRecoilValue(exerciseState(materialExerciseId));
|
|
53
51
|
const exerciseRunType = useRecoilValue(exerciseRunnerRunTypeState);
|
|
54
52
|
const exerciseWithNoGrade = Boolean(exercise === null || exercise === void 0 ? void 0 : exercise.isNoSubmitGrade);
|
|
55
|
-
const lecture = useRecoilValue(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.
|
|
53
|
+
const lecture = useRecoilValue(exerciseLectureState(exercise === null || exercise === void 0 ? void 0 : exercise.lectureId));
|
|
56
54
|
const isTestLecture = (lecture === null || lecture === void 0 ? void 0 : lecture.lectureType) === enums.LectureType.Test;
|
|
57
55
|
const isTestLectureCompleted = (lecture === null || lecture === void 0 ? void 0 : lecture.testAdmissionStatus) === enums.TestAdmissionStatus.Completed; // runner states
|
|
58
56
|
|
|
@@ -234,23 +232,9 @@ const ExerciseRunnerControllerButtonGroup = () => {
|
|
|
234
232
|
|
|
235
233
|
|
|
236
234
|
const renderCodeHelpRequestButton = () => {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
return React.createElement(StyledControllerButton, {
|
|
242
|
-
size: "tiny",
|
|
243
|
-
role: "darkblue",
|
|
244
|
-
icon: React.createElement(Icon, {
|
|
245
|
-
icon: eilArrowRightwardsBasic
|
|
246
|
-
}),
|
|
247
|
-
iconAlign: "right",
|
|
248
|
-
onClick: () => {
|
|
249
|
-
onCodeHelpRequest(editorCursorSelectionValue);
|
|
250
|
-
}
|
|
251
|
-
}, React.createElement(FormattedMessage, {
|
|
252
|
-
id: "exerciseRunner.controller.buttonGroup.button.helpRequest"
|
|
253
|
-
}));
|
|
235
|
+
return React.createElement(ExerciseRunnerControllerCodeHelpRequestButton, {
|
|
236
|
+
isCodeHelpHidden: isCodeHelpHidden
|
|
237
|
+
});
|
|
254
238
|
}; //
|
|
255
239
|
//
|
|
256
240
|
//
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ExerciseRunnerControllerCodeHelpRequestButtonProps {
|
|
3
|
+
isCodeHelpHidden: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const ExerciseRunnerControllerCodeHelpRequestButton: React.FC<ExerciseRunnerControllerCodeHelpRequestButtonProps>;
|
|
6
|
+
export default ExerciseRunnerControllerCodeHelpRequestButton;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { getGlobalOrganizationGet } from '@elice/api-client';
|
|
4
|
+
import { Button, Icon, Text, IconButton } from '@elice/blocks';
|
|
5
|
+
import { base } from '@elice/design-tokens';
|
|
6
|
+
import { eilArrowRightwardsBasic, eilMathsignMultiplyBasic } from '@elice/icons';
|
|
7
|
+
import { useMaterialConfig } from '@elice/material-shared-utils';
|
|
8
|
+
import { useRecoilValue } from 'recoil';
|
|
9
|
+
import styled from 'styled-components';
|
|
10
|
+
import { exerciseFileEditorCursorSelectionValueState } from '../context/recoil.js';
|
|
11
|
+
import { ExerciseContext } from '../context/context.js';
|
|
12
|
+
import '../context/recoilTypes.js';
|
|
13
|
+
import '../context/subjects.js';
|
|
14
|
+
import '../context/ExerciseProvider.js';
|
|
15
|
+
|
|
16
|
+
const IS_TOOLTIP_OPENED_KEY = 'isTooltipOpened';
|
|
17
|
+
const IS_TOOLTIP_OPENED_VALUE = 'true';
|
|
18
|
+
const StyledControllerButton = styled(Button).withConfig({
|
|
19
|
+
componentId: "sc-10grd0k-0"
|
|
20
|
+
})(["position:relative;transition:none;"]);
|
|
21
|
+
const StyledCustomTooltip = styled.div.withConfig({
|
|
22
|
+
componentId: "sc-10grd0k-1"
|
|
23
|
+
})(["position:absolute;top:calc(-100% - 1.25rem);left:calc(-100% - 1.5rem);display:flex;align-items:center;gap:0.25rem;padding:0.5rem 0.75rem;border-radius:0.5rem;background-color:", ";"], base.color.white);
|
|
24
|
+
const StyledTip = styled.svg.withConfig({
|
|
25
|
+
componentId: "sc-10grd0k-2"
|
|
26
|
+
})(["position:absolute;left:50%;bottom:calc(-0.25rem);transform:rotate(225deg);"]);
|
|
27
|
+
const StyledCustomBadge = styled.div.withConfig({
|
|
28
|
+
componentId: "sc-10grd0k-3"
|
|
29
|
+
})(["padding:0.0625rem 0.25rem;border-radius:0.25rem;background-color:", ";font-size:0.6875rem;"], base.color.red7);
|
|
30
|
+
|
|
31
|
+
const ExerciseRunnerControllerCodeHelpRequestButton = ({
|
|
32
|
+
isCodeHelpHidden
|
|
33
|
+
}) => {
|
|
34
|
+
const {
|
|
35
|
+
onCodeHelpRequest
|
|
36
|
+
} = React.useContext(ExerciseContext);
|
|
37
|
+
const {
|
|
38
|
+
orgNameShort
|
|
39
|
+
} = useMaterialConfig();
|
|
40
|
+
const editorCursorSelectionValue = useRecoilValue(exerciseFileEditorCursorSelectionValueState);
|
|
41
|
+
const [isTooltipOpened, setIsTooltipOpened] = React.useState(false);
|
|
42
|
+
const [aiInfo, setAiInfo] = React.useState(null); //
|
|
43
|
+
//
|
|
44
|
+
// Get ai info from organization and check all resovle below conditions.
|
|
45
|
+
// - isEnable is true
|
|
46
|
+
// - quotaPerDay is upper than zero
|
|
47
|
+
// - tooltipOpenSession is false
|
|
48
|
+
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
void getGlobalOrganizationGet({
|
|
51
|
+
organizationNameShort: orgNameShort
|
|
52
|
+
}).then(res => {
|
|
53
|
+
setAiInfo(res.organization.aibotInfo);
|
|
54
|
+
});
|
|
55
|
+
const isTooltipOpend = sessionStorage.getItem(IS_TOOLTIP_OPENED_KEY);
|
|
56
|
+
|
|
57
|
+
if (isTooltipOpend === IS_TOOLTIP_OPENED_VALUE) {
|
|
58
|
+
setIsTooltipOpened(true);
|
|
59
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
|
+
|
|
61
|
+
}, []); //
|
|
62
|
+
//
|
|
63
|
+
//
|
|
64
|
+
|
|
65
|
+
if (isCodeHelpHidden || !editorCursorSelectionValue || typeof onCodeHelpRequest !== 'function') {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return React.createElement(StyledControllerButton, {
|
|
70
|
+
size: "tiny",
|
|
71
|
+
role: "darkblue",
|
|
72
|
+
icon: React.createElement(Icon, {
|
|
73
|
+
icon: eilArrowRightwardsBasic
|
|
74
|
+
}),
|
|
75
|
+
iconAlign: "right",
|
|
76
|
+
onClick: () => {
|
|
77
|
+
onCodeHelpRequest(editorCursorSelectionValue);
|
|
78
|
+
}
|
|
79
|
+
}, React.createElement(FormattedMessage, {
|
|
80
|
+
id: "exerciseRunner.controller.buttonGroup.button.helpRequest"
|
|
81
|
+
}), aiInfo && aiInfo.isEnabled && aiInfo.quotaPerDay > 0 && !isTooltipOpened ? React.createElement(StyledCustomTooltip, null, React.createElement(StyledCustomBadge, null, React.createElement(Text, {
|
|
82
|
+
role: "white",
|
|
83
|
+
size: "tiny"
|
|
84
|
+
}, "NEW")), React.createElement(Text, {
|
|
85
|
+
role: "gray7",
|
|
86
|
+
size: "small"
|
|
87
|
+
}, React.createElement(FormattedMessage, {
|
|
88
|
+
id: "exerciseRunner.controller.buttonGroup.button.tooltip.aiHelp"
|
|
89
|
+
})), React.createElement(IconButton, {
|
|
90
|
+
size: "tiny",
|
|
91
|
+
hasPadding: false,
|
|
92
|
+
border: false,
|
|
93
|
+
icon: eilMathsignMultiplyBasic,
|
|
94
|
+
onClick: () => {
|
|
95
|
+
sessionStorage.setItem(IS_TOOLTIP_OPENED_KEY, IS_TOOLTIP_OPENED_VALUE);
|
|
96
|
+
setIsTooltipOpened(true);
|
|
97
|
+
}
|
|
98
|
+
}), React.createElement(StyledTip, {
|
|
99
|
+
viewBox: "0 0 50 50",
|
|
100
|
+
height: "0.5rem"
|
|
101
|
+
}, React.createElement("path", {
|
|
102
|
+
d: "M1 50 V10 Q1 1 10 1 H50z",
|
|
103
|
+
fill: base.color.white
|
|
104
|
+
}))) : null);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export { ExerciseRunnerControllerCodeHelpRequestButton as default };
|
package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js
CHANGED
|
@@ -97,19 +97,15 @@ const ExerciseRunnerControllerRunningInfo = () => {
|
|
|
97
97
|
//
|
|
98
98
|
|
|
99
99
|
React.useEffect(() => {
|
|
100
|
-
if (
|
|
101
|
-
|
|
100
|
+
if (exercise === null || exercise === void 0 ? void 0 : exercise.courseId) {
|
|
101
|
+
getOrgCourseGet({
|
|
102
|
+
courseId: exercise.courseId
|
|
103
|
+
}).then(({
|
|
104
|
+
course
|
|
105
|
+
}) => {
|
|
106
|
+
setCourse(course);
|
|
107
|
+
}).catch(console.error);
|
|
102
108
|
}
|
|
103
|
-
|
|
104
|
-
const abortCtrl = new AbortController();
|
|
105
|
-
getOrgCourseGet({
|
|
106
|
-
courseId: exercise._courseId
|
|
107
|
-
}, {
|
|
108
|
-
signal: abortCtrl.signal
|
|
109
|
-
}).then(res => res.course).then(setCourse).catch(console.error);
|
|
110
|
-
return () => {
|
|
111
|
-
abortCtrl.abort();
|
|
112
|
-
};
|
|
113
109
|
}, [exercise]);
|
|
114
110
|
/**
|
|
115
111
|
* Last running score.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var phrasesEn = {"exerciseRunner.controller.arduino.connectionStatus.connected":"Connected to Arduino","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"Connected to {device}","exerciseRunner.controller.arduino.connectionStatus.connecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.disconnected":"Disconnected from Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.noDevice":"No connected device","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.uploading":"Uploading...","exerciseRunner.controller.buttonGroup.button.compile":"Compile","exerciseRunner.controller.buttonGroup.button.helpRequest":"Help me","exerciseRunner.controller.buttonGroup.button.run":"Run","exerciseRunner.controller.buttonGroup.button.stop":"Stop","exerciseRunner.controller.buttonGroup.button.submit":"Submit","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"Exercise without submission","exerciseRunner.controller.buttonGroup.button.syncRequest":"Sync code","exerciseRunner.controller.runningInfo.error.fetch":"An error occurred while fetching running info","exerciseRunner.controller.runningInfo.lastRunningDatetime":"Last running datetime","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"Last submit datetime","exerciseRunner.controller.runningInfo.lastSubmitScore":"Last submit score","exerciseRunner.controller.runningInfo.score":"{score}","exerciseRunner.controller.statusMessage.closed":"Editor disconnected","exerciseRunner.controller.statusMessage.connecting":"Connecting to editor...","exerciseRunner.controller.statusMessage.open":"Editor connected","exerciseRunner.controller.timer.runningRemainingTime":"Remaining: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"OK","exerciseRunner.submitErrorDialog.action.reload":"Reload page","exerciseRunner.submitErrorDialog.body.commonError":"An error occurred while running the code.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"You have exceeded the allowed number of lab submissions.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"The exercise image has been updated.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.networkError":"An error occurred while running the code.\nPlease refresh and try again.\nIf the problem persists, please check the network status.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"This exercise is not allowed to be submitted.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"The exercise room is being prepared.\nPlease try again later.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"The exercise room is running.\nPlease wait a moment.","exerciseRunner.submitErrorDialog.body.unknown":"An error occurred while running the code.\nPlease try again later.","exerciseRunner.submitErrorDialog.title":"Unable to run the code"};
|
|
1
|
+
var phrasesEn = {"exerciseRunner.controller.arduino.connectionStatus.connected":"Connected to Arduino","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"Connected to {device}","exerciseRunner.controller.arduino.connectionStatus.connecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.disconnected":"Disconnected from Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.noDevice":"No connected device","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.uploading":"Uploading...","exerciseRunner.controller.buttonGroup.button.compile":"Compile","exerciseRunner.controller.buttonGroup.button.helpRequest":"Help me","exerciseRunner.controller.buttonGroup.button.run":"Run","exerciseRunner.controller.buttonGroup.button.stop":"Stop","exerciseRunner.controller.buttonGroup.button.submit":"Submit","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"Exercise without submission","exerciseRunner.controller.buttonGroup.button.syncRequest":"Sync code","exerciseRunner.controller.buttonGroup.button.tooltip.aiHelp":"A function to get help from AI has been added.","exerciseRunner.controller.runningInfo.error.fetch":"An error occurred while fetching running info","exerciseRunner.controller.runningInfo.lastRunningDatetime":"Last running datetime","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"Last submit datetime","exerciseRunner.controller.runningInfo.lastSubmitScore":"Last submit score","exerciseRunner.controller.runningInfo.score":"{score}","exerciseRunner.controller.statusMessage.closed":"Editor disconnected","exerciseRunner.controller.statusMessage.connecting":"Connecting to editor...","exerciseRunner.controller.statusMessage.open":"Editor connected","exerciseRunner.controller.timer.runningRemainingTime":"Remaining: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"OK","exerciseRunner.submitErrorDialog.action.reload":"Reload page","exerciseRunner.submitErrorDialog.body.commonError":"An error occurred while running the code.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"You have exceeded the allowed number of lab submissions.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"The exercise image has been updated.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.networkError":"An error occurred while running the code.\nPlease refresh and try again.\nIf the problem persists, please check the network status.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"This exercise is not allowed to be submitted.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"The exercise room is being prepared.\nPlease try again later.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"The exercise room is running.\nPlease wait a moment.","exerciseRunner.submitErrorDialog.body.unknown":"An error occurred while running the code.\nPlease try again later.","exerciseRunner.submitErrorDialog.title":"Unable to run the code"};
|
|
2
2
|
|
|
3
3
|
export { phrasesEn as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var phrasesKo = {"exerciseRunner.controller.arduino.connectionStatus.connected":"아두이노 기기 연결됨","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"{device} 연결됨","exerciseRunner.controller.arduino.connectionStatus.connecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.disconnected":"엘리스 아두이노 에이전트 연결 끊김","exerciseRunner.controller.arduino.connectionStatus.noDevice":"연결된 기기 없음","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.uploading":"업로드 중","exerciseRunner.controller.buttonGroup.button.compile":"컴파일","exerciseRunner.controller.buttonGroup.button.helpRequest":"도와주세요","exerciseRunner.controller.buttonGroup.button.run":"실행","exerciseRunner.controller.buttonGroup.button.stop":"정지","exerciseRunner.controller.buttonGroup.button.submit":"제출","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"실행만 가능한 실습입니다.","exerciseRunner.controller.buttonGroup.button.syncRequest":"코드 동기화","exerciseRunner.controller.runningInfo.error.fetch":"최종 실행 내역을 가져오는데 문제가 발생하였습니다.","exerciseRunner.controller.runningInfo.lastRunningDatetime":"최종 실행 시간","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"최종 제출 시간","exerciseRunner.controller.runningInfo.lastSubmitScore":"최종 제출 점수","exerciseRunner.controller.runningInfo.score":"{score} 점","exerciseRunner.controller.statusMessage.closed":"에디터 연결 끊김","exerciseRunner.controller.statusMessage.connecting":"에디터 연결 중...","exerciseRunner.controller.statusMessage.open":"에디터 연결됨","exerciseRunner.controller.timer.runningRemainingTime":"실행 제한시간: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"확인","exerciseRunner.submitErrorDialog.action.reload":"새로고침","exerciseRunner.submitErrorDialog.body.commonError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"실습 제출 허용 횟수를 초과했습니다.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"실습환경이 업데이트 되었습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.networkError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.\n문제가 계속되면 네트워크 상태를 확인해주세요.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"제출이 허용되지 않은 실습입니다.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"실습환경이 준비 중입니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"실습을 실행하고 있습니다.\n잠시만 기다려주세요.","exerciseRunner.submitErrorDialog.body.unknown":"코드 실행 중 오류가 발생했습니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.title":"실습을 실행할 수 없습니다"};
|
|
1
|
+
var phrasesKo = {"exerciseRunner.controller.arduino.connectionStatus.connected":"아두이노 기기 연결됨","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"{device} 연결됨","exerciseRunner.controller.arduino.connectionStatus.connecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.disconnected":"엘리스 아두이노 에이전트 연결 끊김","exerciseRunner.controller.arduino.connectionStatus.noDevice":"연결된 기기 없음","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.uploading":"업로드 중","exerciseRunner.controller.buttonGroup.button.compile":"컴파일","exerciseRunner.controller.buttonGroup.button.helpRequest":"도와주세요","exerciseRunner.controller.buttonGroup.button.run":"실행","exerciseRunner.controller.buttonGroup.button.stop":"정지","exerciseRunner.controller.buttonGroup.button.submit":"제출","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"실행만 가능한 실습입니다.","exerciseRunner.controller.buttonGroup.button.syncRequest":"코드 동기화","exerciseRunner.controller.buttonGroup.button.tooltip.aiHelp":"AI에게 도움받기 기능이 추가되었어요.","exerciseRunner.controller.runningInfo.error.fetch":"최종 실행 내역을 가져오는데 문제가 발생하였습니다.","exerciseRunner.controller.runningInfo.lastRunningDatetime":"최종 실행 시간","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"최종 제출 시간","exerciseRunner.controller.runningInfo.lastSubmitScore":"최종 제출 점수","exerciseRunner.controller.runningInfo.score":"{score} 점","exerciseRunner.controller.statusMessage.closed":"에디터 연결 끊김","exerciseRunner.controller.statusMessage.connecting":"에디터 연결 중...","exerciseRunner.controller.statusMessage.open":"에디터 연결됨","exerciseRunner.controller.timer.runningRemainingTime":"실행 제한시간: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"확인","exerciseRunner.submitErrorDialog.action.reload":"새로고침","exerciseRunner.submitErrorDialog.body.commonError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"실습 제출 허용 횟수를 초과했습니다.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"실습환경이 업데이트 되었습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.networkError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.\n문제가 계속되면 네트워크 상태를 확인해주세요.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"제출이 허용되지 않은 실습입니다.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"실습환경이 준비 중입니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"실습을 실행하고 있습니다.\n잠시만 기다려주세요.","exerciseRunner.submitErrorDialog.body.unknown":"코드 실행 중 오류가 발생했습니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.title":"실습을 실행할 수 없습니다"};
|
|
2
2
|
|
|
3
3
|
export { phrasesKo as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-exercise",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.230220.0",
|
|
4
4
|
"description": "User view and editing components of Elice material exercise",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@elice/api-client": "1.
|
|
32
|
+
"@elice/api-client": "1.230215.1",
|
|
33
33
|
"@elice/blocks": "^1.220803.0",
|
|
34
34
|
"@elice/design-tokens": "^1.220803.0",
|
|
35
35
|
"@elice/icons": "^1.220803.0",
|
|
36
36
|
"@elice/markdown": "^1.220803.0",
|
|
37
37
|
"@elice/material-shared-types": "*",
|
|
38
38
|
"@elice/material-shared-utils": "*",
|
|
39
|
-
"@elice/types": "1.
|
|
39
|
+
"@elice/types": "1.230215.1",
|
|
40
40
|
"@elice/websocket": "^1.220803.0",
|
|
41
41
|
"humps": "^2.0.1",
|
|
42
42
|
"lodash": "^4.17.21",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"xterm-addon-fit": "^0.5.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@elice/api-client": "1.
|
|
77
|
+
"@elice/api-client": "1.230215.1",
|
|
78
78
|
"@elice/blocks": "^1.220803.0",
|
|
79
79
|
"@elice/design-tokens": "^1.220803.0",
|
|
80
80
|
"@elice/icons": "^1.220803.0",
|
|
81
81
|
"@elice/markdown": "^1.220803.0",
|
|
82
|
-
"@elice/material-shared-types": "1.
|
|
83
|
-
"@elice/material-shared-utils": "1.
|
|
84
|
-
"@elice/types": "1.
|
|
82
|
+
"@elice/material-shared-types": "1.230220.0",
|
|
83
|
+
"@elice/material-shared-utils": "1.230220.0",
|
|
84
|
+
"@elice/types": "1.230215.1",
|
|
85
85
|
"@elice/websocket": "^1.220803.0",
|
|
86
86
|
"@types/classnames": "^2.3.1",
|
|
87
87
|
"@types/color": "^3.0.3",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"recoil": "^0.6.1",
|
|
103
103
|
"styled-components": "^5.2.0"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "11ff1f7b809e77e19752569a5a7c852d180ee140"
|
|
106
106
|
}
|