@elice/material-quiz 1.250310.0 → 1.250313.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-quiz/MaterialQuiz.js +2 -0
- package/cjs/components/material-quiz/MaterialQuizImage.js +7 -4
- package/cjs/components/material-quiz/MaterialQuizSelectMultiple.js +7 -4
- package/cjs/components/material-quiz/MaterialQuizSelectMultipleOrder.js +7 -4
- package/cjs/components/material-quiz/MaterialQuizSelectOne.js +7 -4
- package/cjs/components/material-quiz/MaterialQuizText.js +7 -4
- package/cjs/components/material-quiz/context/MaterialQuizContext.d.ts +3 -1
- package/cjs/components/material-quiz/context/MaterialQuizContext.js +3 -1
- package/cjs/components/material-quiz/locales/en.json.js +1 -1
- package/cjs/components/material-quiz/locales/ja.json.js +1 -1
- package/cjs/components/material-quiz/locales/ko.json.js +1 -1
- package/cjs/components/material-quiz/locales/th.json.js +1 -1
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +5 -2
- package/cjs/components/shared/QuestionBox.d.ts +3 -0
- package/cjs/components/shared/QuestionBox.js +59 -37
- package/es/components/material-quiz/MaterialQuiz.js +2 -0
- package/es/components/material-quiz/MaterialQuizImage.js +7 -4
- package/es/components/material-quiz/MaterialQuizSelectMultiple.js +7 -4
- package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +7 -4
- package/es/components/material-quiz/MaterialQuizSelectOne.js +7 -4
- package/es/components/material-quiz/MaterialQuizText.js +7 -4
- package/es/components/material-quiz/context/MaterialQuizContext.d.ts +3 -1
- package/es/components/material-quiz/context/MaterialQuizContext.js +3 -1
- package/es/components/material-quiz/locales/en.json.js +1 -1
- package/es/components/material-quiz/locales/ja.json.js +1 -1
- package/es/components/material-quiz/locales/ko.json.js +1 -1
- package/es/components/material-quiz/locales/th.json.js +1 -1
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +5 -2
- package/es/components/shared/QuestionBox.d.ts +3 -0
- package/es/components/shared/QuestionBox.js +62 -40
- package/package.json +3 -3
|
@@ -168,6 +168,7 @@ var MaterialQuizContainer = function MaterialQuizContainer(_ref7) {
|
|
|
168
168
|
onDirty = _ref7.onDirty,
|
|
169
169
|
onSubmit = _ref7.onSubmit,
|
|
170
170
|
onNext = _ref7.onNext,
|
|
171
|
+
onHint = _ref7.onHint,
|
|
171
172
|
__intl = _ref7.__intl;
|
|
172
173
|
return jsxRuntime.jsx(intl.RawEliceIntlProvider, {
|
|
173
174
|
value: __intl,
|
|
@@ -181,6 +182,7 @@ var MaterialQuizContainer = function MaterialQuizContainer(_ref7) {
|
|
|
181
182
|
onDirty: onDirty,
|
|
182
183
|
onSubmit: onSubmit,
|
|
183
184
|
onNext: onNext,
|
|
185
|
+
onHint: onHint,
|
|
184
186
|
children: jsxRuntime.jsx(MaterialQuiz, {})
|
|
185
187
|
})
|
|
186
188
|
})
|
|
@@ -49,7 +49,8 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
49
49
|
onNext = _useMaterialQuizDispa.onNext,
|
|
50
50
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
51
51
|
onDirty = _useMaterialQuizDispa.onDirty,
|
|
52
|
-
setIsInitialLoading = _useMaterialQuizDispa.setIsInitialLoading
|
|
52
|
+
setIsInitialLoading = _useMaterialQuizDispa.setIsInitialLoading,
|
|
53
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
53
54
|
//
|
|
54
55
|
var intl$1 = intl.useRawEliceIntl();
|
|
55
56
|
var _React$useState = React__default.default.useState('idle'),
|
|
@@ -282,10 +283,12 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
282
283
|
status: submitStatus
|
|
283
284
|
}),
|
|
284
285
|
isNextActive: isNextActive,
|
|
286
|
+
materialQuizResponse: materialQuizResponse,
|
|
287
|
+
onHint: onHint,
|
|
285
288
|
footerActions: [{
|
|
286
289
|
border: false,
|
|
287
290
|
children: intl$1.formatMessage({
|
|
288
|
-
id:
|
|
291
|
+
id: 'materialQuiz.submit'
|
|
289
292
|
}),
|
|
290
293
|
disabled: isDisabled,
|
|
291
294
|
loading: submitStatus === 'pending',
|
|
@@ -293,8 +296,8 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
293
296
|
transparent: false,
|
|
294
297
|
onClick: handleSubmit,
|
|
295
298
|
customStyles: {
|
|
296
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
297
|
-
color: isNextActive ? theme.palette.
|
|
299
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? designTokens.base.color.gray6 : theme.palette.primary.main,
|
|
300
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
298
301
|
}
|
|
299
302
|
}],
|
|
300
303
|
children: jsxRuntime.jsxs(material.Stack, {
|
|
@@ -44,7 +44,8 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
44
44
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
45
45
|
onNext = _useMaterialQuizDispa.onNext,
|
|
46
46
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
47
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
47
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
48
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
48
49
|
var theme = material.useTheme();
|
|
49
50
|
// state
|
|
50
51
|
var intl$1 = intl.useRawEliceIntl();
|
|
@@ -202,7 +203,9 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
202
203
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
203
204
|
titlePrefix: "Q.",
|
|
204
205
|
onNext: onNext,
|
|
206
|
+
onHint: onHint,
|
|
205
207
|
isNextActive: isNextActive,
|
|
208
|
+
materialQuizResponse: materialQuizResponse,
|
|
206
209
|
submitResult: jsxRuntime.jsx(QuizResultDescription.default, {
|
|
207
210
|
materialQuizResponse: materialQuizResponse
|
|
208
211
|
}),
|
|
@@ -218,11 +221,11 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
218
221
|
transparent: false,
|
|
219
222
|
onClick: handleSubmit,
|
|
220
223
|
children: intl$1.formatMessage({
|
|
221
|
-
id:
|
|
224
|
+
id: 'materialQuiz.submit'
|
|
222
225
|
}),
|
|
223
226
|
customStyles: {
|
|
224
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
225
|
-
color: isNextActive ? theme.palette.
|
|
227
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? designTokens.base.color.gray6 : theme.palette.primary.main,
|
|
228
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
226
229
|
}
|
|
227
230
|
}],
|
|
228
231
|
children: jsxRuntime.jsxs(material.Stack, {
|
|
@@ -77,7 +77,8 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
77
77
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
78
78
|
onNext = _useMaterialQuizDispa.onNext,
|
|
79
79
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
80
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
80
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
81
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
81
82
|
var theme = material.useTheme();
|
|
82
83
|
// state
|
|
83
84
|
var intl$1 = intl.useRawEliceIntl();
|
|
@@ -551,7 +552,9 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
551
552
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
552
553
|
titlePrefix: "Q.",
|
|
553
554
|
onNext: onNext,
|
|
555
|
+
onHint: onHint,
|
|
554
556
|
isNextActive: isNextActive,
|
|
557
|
+
materialQuizResponse: materialQuizResponse,
|
|
555
558
|
submitStatus: jsxRuntime.jsx(QuizSubmitStatusText.default, {
|
|
556
559
|
status: submitStatus
|
|
557
560
|
}),
|
|
@@ -567,11 +570,11 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
567
570
|
transparent: false,
|
|
568
571
|
onClick: handleSubmit,
|
|
569
572
|
children: intl$1.formatMessage({
|
|
570
|
-
id:
|
|
573
|
+
id: 'materialQuiz.submit'
|
|
571
574
|
}),
|
|
572
575
|
customStyles: {
|
|
573
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
574
|
-
color: isNextActive ? theme.palette.
|
|
576
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? designTokens.base.color.gray6 : theme.palette.primary.main,
|
|
577
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
575
578
|
}
|
|
576
579
|
}],
|
|
577
580
|
children: jsxRuntime.jsxs(material.Stack, {
|
|
@@ -44,7 +44,8 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
44
44
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
45
45
|
onNext = _useMaterialQuizDispa.onNext,
|
|
46
46
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
47
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
47
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
48
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
48
49
|
var theme = material.useTheme();
|
|
49
50
|
// state
|
|
50
51
|
var intl$1 = intl.useRawEliceIntl();
|
|
@@ -191,10 +192,12 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
191
192
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
192
193
|
titlePrefix: "Q.",
|
|
193
194
|
onNext: onNext,
|
|
195
|
+
onHint: onHint,
|
|
194
196
|
isNextActive: isNextActive,
|
|
195
197
|
submitStatus: jsxRuntime.jsx(QuizSubmitStatusText.default, {
|
|
196
198
|
status: submitStatus
|
|
197
199
|
}),
|
|
200
|
+
materialQuizResponse: materialQuizResponse,
|
|
198
201
|
submitResult: jsxRuntime.jsx(QuizResultDescription.default, {
|
|
199
202
|
materialQuizResponse: materialQuizResponse
|
|
200
203
|
}),
|
|
@@ -207,11 +210,11 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
207
210
|
transparent: false,
|
|
208
211
|
onClick: handleSubmit,
|
|
209
212
|
children: intl$1.formatMessage({
|
|
210
|
-
id:
|
|
213
|
+
id: 'materialQuiz.submit'
|
|
211
214
|
}),
|
|
212
215
|
customStyles: {
|
|
213
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
214
|
-
color: isNextActive ? theme.palette.
|
|
216
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? designTokens.base.color.gray6 : theme.palette.primary.main,
|
|
217
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
215
218
|
}
|
|
216
219
|
}],
|
|
217
220
|
children: jsxRuntime.jsxs(material.Stack, {
|
|
@@ -46,7 +46,8 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
46
46
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
47
47
|
onNext = _useMaterialQuizDispa.onNext,
|
|
48
48
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
49
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
49
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
50
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
50
51
|
var theme = material.useTheme();
|
|
51
52
|
// state
|
|
52
53
|
var intl$1 = intl.useRawEliceIntl();
|
|
@@ -188,9 +189,11 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
188
189
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
189
190
|
titlePrefix: "Q.",
|
|
190
191
|
onNext: onNext,
|
|
192
|
+
onHint: onHint,
|
|
191
193
|
submitResult: jsxRuntime.jsx(QuizResultDescription.default, {
|
|
192
194
|
materialQuizResponse: materialQuizResponse
|
|
193
195
|
}),
|
|
196
|
+
materialQuizResponse: materialQuizResponse,
|
|
194
197
|
submitStatus: jsxRuntime.jsx(QuizSubmitStatusText.default, {
|
|
195
198
|
status: submitStatus
|
|
196
199
|
}),
|
|
@@ -199,7 +202,7 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
199
202
|
footerActions: [{
|
|
200
203
|
border: false,
|
|
201
204
|
children: intl$1.formatMessage({
|
|
202
|
-
id:
|
|
205
|
+
id: 'materialQuiz.submit'
|
|
203
206
|
}),
|
|
204
207
|
disabled: isDisabled,
|
|
205
208
|
loading: submitStatus === 'pending',
|
|
@@ -207,8 +210,8 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
207
210
|
transparent: false,
|
|
208
211
|
onClick: handleSubmit,
|
|
209
212
|
customStyles: {
|
|
210
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
211
|
-
color: isNextActive ? theme.palette.
|
|
213
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? designTokens.base.color.gray6 : theme.palette.primary.main,
|
|
214
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
212
215
|
}
|
|
213
216
|
}],
|
|
214
217
|
children: jsxRuntime.jsxs(material.Stack, {
|
|
@@ -21,6 +21,7 @@ export type MaterialQuizProps = {
|
|
|
21
21
|
onDirty: (isDirty: boolean) => void;
|
|
22
22
|
onSubmit?: (isSucceeded: boolean, isCorrect?: boolean) => void;
|
|
23
23
|
onNext?: () => void;
|
|
24
|
+
onHint?: () => void;
|
|
24
25
|
};
|
|
25
26
|
interface MaterialQuizProviderProps extends Omit<MaterialQuizProps, 'locale' | 'eliceCourseApiConfiguration'> {
|
|
26
27
|
children: React.ReactNode;
|
|
@@ -33,8 +34,9 @@ interface DispatchContextType {
|
|
|
33
34
|
onNext?: () => void;
|
|
34
35
|
setIsLongPassage: React.Dispatch<React.SetStateAction<boolean>>;
|
|
35
36
|
setIsInitialLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
37
|
+
onHint?: () => void;
|
|
36
38
|
}
|
|
37
|
-
declare function MaterialQuizProvider({ materialQuizId, userId, onSubmit, onDirty, onNext, children, }: MaterialQuizProviderProps): JSX.Element;
|
|
39
|
+
declare function MaterialQuizProvider({ materialQuizId, userId, onSubmit, onDirty, onNext, onHint, children, }: MaterialQuizProviderProps): JSX.Element;
|
|
38
40
|
declare function useMaterialQuizState(): State;
|
|
39
41
|
declare function useMaterialQuizDispatch(): DispatchContextType;
|
|
40
42
|
export { MaterialQuizProvider, useMaterialQuizState, useMaterialQuizDispatch };
|
|
@@ -25,6 +25,7 @@ function MaterialQuizProvider(_ref) {
|
|
|
25
25
|
} : _ref$onSubmit,
|
|
26
26
|
onDirty = _ref.onDirty,
|
|
27
27
|
onNext = _ref.onNext,
|
|
28
|
+
onHint = _ref.onHint,
|
|
28
29
|
children = _ref.children;
|
|
29
30
|
var _React$useState = React__default.default.useState(),
|
|
30
31
|
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
@@ -190,7 +191,8 @@ function MaterialQuizProvider(_ref) {
|
|
|
190
191
|
refreshOrgMaterialQuiz: refreshOrgMaterialQuiz,
|
|
191
192
|
setVertical: setVertical,
|
|
192
193
|
setIsLongPassage: setIsLongPassage,
|
|
193
|
-
setIsInitialLoading: setIsInitialLoading
|
|
194
|
+
setIsInitialLoading: setIsInitialLoading,
|
|
195
|
+
onHint: onHint
|
|
194
196
|
},
|
|
195
197
|
children: children
|
|
196
198
|
})
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var messageEn = {"materialQuiz.anchorLabel.answer":"Answer","materialQuiz.anchorLabel.question":"Passage","materialQuiz.answer":"Answer","materialQuiz.bottomSheet.optionEmpty":"All views have been placed in the group.","materialQuiz.bottomSheet.title":"Options","materialQuiz.dropzone.desktop.answerEmpty":"Drag the view into the area.","materialQuiz.dropzone.mobile.answerEmpty":"Click here to add a view.","materialQuiz.dropzone.optionEmpty":"Option","materialQuiz.dropzone.optionReset":"Answer Reset","materialQuiz.empty.description":"Please check again after quiz posting!","materialQuiz.empty.title":"Quiz is now preparing.","materialQuiz.error":"Failed to fetch quiz","materialQuiz.explanation.close":"close quiz explanations","materialQuiz.explanation.empty":"no explanations","materialQuiz.explanation.show":"show quiz explanations","materialQuiz.next":"Next question >","materialQuiz.no_submit_history":"No submission history.","materialQuiz.order.answerEmpty":"You could move the options back here","materialQuiz.resubmit":"Resubmit","materialQuiz.resultStatus.correct":"Correct","materialQuiz.resultStatus.submitted":"Submitted","materialQuiz.resultStatus.wrong":"Please try solving it again.","materialQuiz.selectMultiple.answer.title":"Choose from the views below. (Redundant selections available)","materialQuiz.selectMultipleOrder.answer.title":"Drag and drop your answers.","materialQuiz.selectOne.answer.title":"Choose from the views below.","materialQuiz.submit":"Submit","materialQuiz.submitStatus.failure":"Failed to submit","materialQuiz.submitStatus.success":"Submitted","materialQuiz.submitted_file":"Submitted File","materialQuiz.submittedAnswer":"Submitted Answer","materialQuiz.submmited_file":"Submitted File","materialQuiz.survey.empty.description":"Please check again after survey posting!","materialQuiz.survey.empty.title":"Survey is now preparing.","materialQuiz.text.answer.title":"Please fill out the answer.","materialQuiz.text.correct":"that's correct!","materialQuiz.text.placeholder":"please fill the answer","materialQuiz.text.wrong":"that's wrong. try it again!","materialQuiz.upload_file":"Upload File"};
|
|
5
|
+
var messageEn = {"materialQuiz.anchorLabel.answer":"Answer","materialQuiz.anchorLabel.question":"Passage","materialQuiz.answer":"Answer","materialQuiz.bottomSheet.optionEmpty":"All views have been placed in the group.","materialQuiz.bottomSheet.title":"Options","materialQuiz.dropzone.desktop.answerEmpty":"Drag the view into the area.","materialQuiz.dropzone.mobile.answerEmpty":"Click here to add a view.","materialQuiz.dropzone.optionEmpty":"Option","materialQuiz.dropzone.optionReset":"Answer Reset","materialQuiz.empty.description":"Please check again after quiz posting!","materialQuiz.empty.title":"Quiz is now preparing.","materialQuiz.error":"Failed to fetch quiz","materialQuiz.explanation.close":"close quiz explanations","materialQuiz.explanation.empty":"no explanations","materialQuiz.explanation.show":"show quiz explanations","materialQuiz.hint":"Get a hint","materialQuiz.next":"Next question >","materialQuiz.no_submit_history":"No submission history.","materialQuiz.order.answerEmpty":"You could move the options back here","materialQuiz.resubmit":"Resubmit","materialQuiz.resultStatus.correct":"Correct","materialQuiz.resultStatus.submitted":"Submitted","materialQuiz.resultStatus.wrong":"Please try solving it again.","materialQuiz.selectMultiple.answer.title":"Choose from the views below. (Redundant selections available)","materialQuiz.selectMultipleOrder.answer.title":"Drag and drop your answers.","materialQuiz.selectOne.answer.title":"Choose from the views below.","materialQuiz.submit":"Submit","materialQuiz.submitStatus.failure":"Failed to submit","materialQuiz.submitStatus.success":"Submitted","materialQuiz.submitted_file":"Submitted File","materialQuiz.submittedAnswer":"Submitted Answer","materialQuiz.submmited_file":"Submitted File","materialQuiz.survey.empty.description":"Please check again after survey posting!","materialQuiz.survey.empty.title":"Survey is now preparing.","materialQuiz.text.answer.title":"Please fill out the answer.","materialQuiz.text.correct":"that's correct!","materialQuiz.text.placeholder":"please fill the answer","materialQuiz.text.wrong":"that's wrong. try it again!","materialQuiz.upload_file":"Upload File"};
|
|
6
6
|
|
|
7
7
|
exports.default = messageEn;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ja = {"materialQuiz.anchorLabel.answer":"回答","materialQuiz.anchorLabel.question":"文章","materialQuiz.answer":"回答","materialQuiz.bottomSheet.optionEmpty":"すべてのビューがグループに配置されました。","materialQuiz.bottomSheet.title":"オプション","materialQuiz.dropzone.desktop.answerEmpty":"ビューをエリアにドラッグしてください。","materialQuiz.dropzone.mobile.answerEmpty":"ここをクリックしてビューを追加してください。","materialQuiz.dropzone.optionEmpty":"オプション","materialQuiz.dropzone.optionReset":"回答をリセットします","materialQuiz.empty.description":"クイズの投稿後にもう一度確認してください!","materialQuiz.empty.title":"クイズは今準備中です。","materialQuiz.error":"クイズの取得に失敗しました。","materialQuiz.explanation.close":"クイズの説明を閉じる","materialQuiz.explanation.empty":"いいです。","materialQuiz.explanation.show":"クイズの説明を表示します","materialQuiz.next":"次の質問 >","materialQuiz.no_submit_history":"提出履歴がありません。","materialQuiz.order.answerEmpty":"オプションをここに戻すことができます。","materialQuiz.resubmit":"再送信","materialQuiz.resultStatus.correct":"正しい","materialQuiz.resultStatus.submitted":"提出済","materialQuiz.resultStatus.wrong":"もう一度解いてみてください。","materialQuiz.selectMultiple.answer.title":"以下から選択してください。 (冗長な選択肢も利用可能)","materialQuiz.selectMultipleOrder.answer.title":"ドラッグして回答をドロップしてください。","materialQuiz.selectOne.answer.title":"以下から選択してください。","materialQuiz.submit":"提出","materialQuiz.submitStatus.failure":"提出に失敗しました。","materialQuiz.submitStatus.success":"提出済","materialQuiz.submitted_file":"提出したファイル","materialQuiz.submittedAnswer":"提出された回答","materialQuiz.submmited_file":"提出したファイル","materialQuiz.survey.empty.description":"調査投稿後にもう一度ご確認ください!","materialQuiz.survey.empty.title":"調査は現在準備中です。","materialQuiz.text.answer.title":"回答を記入してください。","materialQuiz.text.correct":"その通りです!","materialQuiz.text.placeholder":"回答を入力してください","materialQuiz.text.wrong":"それは間違っています。もう一度やってみてください!","materialQuiz.upload_file":"ファイルをアップロード"};
|
|
5
|
+
var ja = {"materialQuiz.anchorLabel.answer":"回答","materialQuiz.anchorLabel.question":"文章","materialQuiz.answer":"回答","materialQuiz.bottomSheet.optionEmpty":"すべてのビューがグループに配置されました。","materialQuiz.bottomSheet.title":"オプション","materialQuiz.dropzone.desktop.answerEmpty":"ビューをエリアにドラッグしてください。","materialQuiz.dropzone.mobile.answerEmpty":"ここをクリックしてビューを追加してください。","materialQuiz.dropzone.optionEmpty":"オプション","materialQuiz.dropzone.optionReset":"回答をリセットします","materialQuiz.empty.description":"クイズの投稿後にもう一度確認してください!","materialQuiz.empty.title":"クイズは今準備中です。","materialQuiz.error":"クイズの取得に失敗しました。","materialQuiz.explanation.close":"クイズの説明を閉じる","materialQuiz.explanation.empty":"いいです。","materialQuiz.explanation.show":"クイズの説明を表示します","materialQuiz.hint":"ヒントをもらう","materialQuiz.next":"次の質問 >","materialQuiz.no_submit_history":"提出履歴がありません。","materialQuiz.order.answerEmpty":"オプションをここに戻すことができます。","materialQuiz.resubmit":"再送信","materialQuiz.resultStatus.correct":"正しい","materialQuiz.resultStatus.submitted":"提出済","materialQuiz.resultStatus.wrong":"もう一度解いてみてください。","materialQuiz.selectMultiple.answer.title":"以下から選択してください。 (冗長な選択肢も利用可能)","materialQuiz.selectMultipleOrder.answer.title":"ドラッグして回答をドロップしてください。","materialQuiz.selectOne.answer.title":"以下から選択してください。","materialQuiz.submit":"提出","materialQuiz.submitStatus.failure":"提出に失敗しました。","materialQuiz.submitStatus.success":"提出済","materialQuiz.submitted_file":"提出したファイル","materialQuiz.submittedAnswer":"提出された回答","materialQuiz.submmited_file":"提出したファイル","materialQuiz.survey.empty.description":"調査投稿後にもう一度ご確認ください!","materialQuiz.survey.empty.title":"調査は現在準備中です。","materialQuiz.text.answer.title":"回答を記入してください。","materialQuiz.text.correct":"その通りです!","materialQuiz.text.placeholder":"回答を入力してください","materialQuiz.text.wrong":"それは間違っています。もう一度やってみてください!","materialQuiz.upload_file":"ファイルをアップロード"};
|
|
6
6
|
|
|
7
7
|
exports.default = ja;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var messageKo = {"materialQuiz.anchorLabel.answer":"답안","materialQuiz.anchorLabel.question":"지문","materialQuiz.answer":"정답","materialQuiz.bottomSheet.optionEmpty":"모든 보기를 그룹에 배치하였습니다.","materialQuiz.bottomSheet.title":"보기","materialQuiz.dropzone.desktop.answerEmpty":"보기를 영역에 끌어 넣어 주세요.","materialQuiz.dropzone.mobile.answerEmpty":"이곳을 클릭하여 보기를 넣어 주세요.","materialQuiz.dropzone.optionEmpty":"보기","materialQuiz.dropzone.optionReset":"답안 초기화","materialQuiz.empty.description":"퀴즈 게시 후 다시 확인해주세요!","materialQuiz.empty.title":"퀴즈가 준비 중 입니다.","materialQuiz.error":"퀴즈를 불러오는데 실패했습니다.\n잠시 후 다시 시도해주세요.","materialQuiz.explanation.close":"퀴즈해설 닫기","materialQuiz.explanation.empty":"작성된 해설이 없습니다.","materialQuiz.explanation.show":"퀴즈 해설 보기","materialQuiz.next":"다음 문제로 이동 >","materialQuiz.no_submit_history":"제출한 내역이 없습니다.","materialQuiz.order.answerEmpty":"항목을 다시 이곳으로 옮길 수 있습니다.","materialQuiz.resubmit":"다시 제출","materialQuiz.resultStatus.correct":"정답","materialQuiz.resultStatus.submitted":"제출완료","materialQuiz.resultStatus.wrong":"다시 한번 풀어보세요.","materialQuiz.selectMultiple.answer.title":"아래 보기에서 골라주세요. (중복 선택 가능)","materialQuiz.selectMultipleOrder.answer.title":"답안을 드래그 앤 드롭하세요.","materialQuiz.selectOne.answer.title":"아래 보기에서 골라주세요.","materialQuiz.submit":"제출","materialQuiz.submitStatus.failure":"제출에 실패하였습니다.","materialQuiz.submitStatus.success":"제출되었습니다.","materialQuiz.submitted_file":"제출한 파일","materialQuiz.submittedAnswer":"제출한 답","materialQuiz.submmited_file":"제출한 파일","materialQuiz.survey.empty.description":"설문지 게시 후 다시 확인해주세요!","materialQuiz.survey.empty.title":"설문조사 준비 중 입니다.","materialQuiz.text.answer.title":"답안을 작성해 주세요.","materialQuiz.text.correct":"정답입니다.","materialQuiz.text.placeholder":"답안을 작성해 주세요.","materialQuiz.text.wrong":"오답입니다. 다시 답안을 제출해보세요.","materialQuiz.upload_file":"파일 업로드"};
|
|
5
|
+
var messageKo = {"materialQuiz.anchorLabel.answer":"답안","materialQuiz.anchorLabel.question":"지문","materialQuiz.answer":"정답","materialQuiz.bottomSheet.optionEmpty":"모든 보기를 그룹에 배치하였습니다.","materialQuiz.bottomSheet.title":"보기","materialQuiz.dropzone.desktop.answerEmpty":"보기를 영역에 끌어 넣어 주세요.","materialQuiz.dropzone.mobile.answerEmpty":"이곳을 클릭하여 보기를 넣어 주세요.","materialQuiz.dropzone.optionEmpty":"보기","materialQuiz.dropzone.optionReset":"답안 초기화","materialQuiz.empty.description":"퀴즈 게시 후 다시 확인해주세요!","materialQuiz.empty.title":"퀴즈가 준비 중 입니다.","materialQuiz.error":"퀴즈를 불러오는데 실패했습니다.\n잠시 후 다시 시도해주세요.","materialQuiz.explanation.close":"퀴즈해설 닫기","materialQuiz.explanation.empty":"작성된 해설이 없습니다.","materialQuiz.explanation.show":"퀴즈 해설 보기","materialQuiz.hint":"힌트 받기","materialQuiz.next":"다음 문제로 이동 >","materialQuiz.no_submit_history":"제출한 내역이 없습니다.","materialQuiz.order.answerEmpty":"항목을 다시 이곳으로 옮길 수 있습니다.","materialQuiz.resubmit":"다시 제출","materialQuiz.resultStatus.correct":"정답","materialQuiz.resultStatus.submitted":"제출완료","materialQuiz.resultStatus.wrong":"다시 한번 풀어보세요.","materialQuiz.selectMultiple.answer.title":"아래 보기에서 골라주세요. (중복 선택 가능)","materialQuiz.selectMultipleOrder.answer.title":"답안을 드래그 앤 드롭하세요.","materialQuiz.selectOne.answer.title":"아래 보기에서 골라주세요.","materialQuiz.submit":"제출","materialQuiz.submitStatus.failure":"제출에 실패하였습니다.","materialQuiz.submitStatus.success":"제출되었습니다.","materialQuiz.submitted_file":"제출한 파일","materialQuiz.submittedAnswer":"제출한 답","materialQuiz.submmited_file":"제출한 파일","materialQuiz.survey.empty.description":"설문지 게시 후 다시 확인해주세요!","materialQuiz.survey.empty.title":"설문조사 준비 중 입니다.","materialQuiz.text.answer.title":"답안을 작성해 주세요.","materialQuiz.text.correct":"정답입니다.","materialQuiz.text.placeholder":"답안을 작성해 주세요.","materialQuiz.text.wrong":"오답입니다. 다시 답안을 제출해보세요.","materialQuiz.upload_file":"파일 업로드"};
|
|
6
6
|
|
|
7
7
|
exports.default = messageKo;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var th = {"materialQuiz.anchorLabel.answer":"ดคำตอบ","materialQuiz.anchorLabel.question":"ทางเดิน","materialQuiz.answer":"ตอบ","materialQuiz.bottomSheet.optionEmpty":"คุณได้จัดเรียงตัวเลือกทั้งหมดลงในกลุ่มแล้ว","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.dropzone.desktop.answerEmpty":"ลากและวางตัวเลือกของคุณลงในพื้นที่นี้","materialQuiz.dropzone.mobile.answerEmpty":"แตะที่นี่เพื่อใส่ตัวเลือก","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ","materialQuiz.empty.description":"กรุณาลองอีกครั้งหลังจากเผยแพร่ข้อสอบ!","materialQuiz.empty.title":"ข้อสอบยังไม่พร้อมใช้งาน","materialQuiz.error":"เกิดข้อผิดพลาดในการโหลดข้อสอบ กรุณาลองอีกครั้งในภายหลัง","materialQuiz.explanation.close":"ปิดคำอธิบาย","materialQuiz.explanation.empty":"ไม่มีคำอธิบาย","materialQuiz.explanation.show":"ดูคำอธิบาย","materialQuiz.next":"ไปยังข้อถัดไป >","materialQuiz.no_submit_history":"ไม่มีประวัติการส่ง","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.resubmit":"ส่งอีกครั้ง","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.submitted":"ส่งคำตอบแล้ว","materialQuiz.resultStatus.wrong":"กรุณาลองแก้ปัญหาอีกครั้ง","materialQuiz.selectMultiple.answer.title":"เลือกคำตอบจากตัวเลือกด้านล่าง (สามารถเลือกได้หลายข้อ)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.selectOne.answer.title":"เลือกคำตอบจากตัวเลือกด้านล่าง","materialQuiz.submit":"ส่ง","materialQuiz.submitStatus.failure":"ส่งล้มเหลว","materialQuiz.submitStatus.success":"ส่งเรียบร้อยแล้ว","materialQuiz.submitted_file":"ไฟล์ที่ส่ง","materialQuiz.submittedAnswer":"คำตอบที่ส่ง","materialQuiz.submmited_file":"ไฟล์ที่ส่งแล้ว","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.survey.empty.title":"แบบสำรวจยังไม่พร้อมใช้งาน","materialQuiz.text.answer.title":"กรุณาเขียนคำตอบของคุณ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.upload_file":"อัปโหลดไฟล์"};
|
|
5
|
+
var th = {"materialQuiz.anchorLabel.answer":"ดคำตอบ","materialQuiz.anchorLabel.question":"ทางเดิน","materialQuiz.answer":"ตอบ","materialQuiz.bottomSheet.optionEmpty":"คุณได้จัดเรียงตัวเลือกทั้งหมดลงในกลุ่มแล้ว","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.dropzone.desktop.answerEmpty":"ลากและวางตัวเลือกของคุณลงในพื้นที่นี้","materialQuiz.dropzone.mobile.answerEmpty":"แตะที่นี่เพื่อใส่ตัวเลือก","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ","materialQuiz.empty.description":"กรุณาลองอีกครั้งหลังจากเผยแพร่ข้อสอบ!","materialQuiz.empty.title":"ข้อสอบยังไม่พร้อมใช้งาน","materialQuiz.error":"เกิดข้อผิดพลาดในการโหลดข้อสอบ กรุณาลองอีกครั้งในภายหลัง","materialQuiz.explanation.close":"ปิดคำอธิบาย","materialQuiz.explanation.empty":"ไม่มีคำอธิบาย","materialQuiz.explanation.show":"ดูคำอธิบาย","materialQuiz.hint":"รับคำใบ้","materialQuiz.next":"ไปยังข้อถัดไป >","materialQuiz.no_submit_history":"ไม่มีประวัติการส่ง","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.resubmit":"ส่งอีกครั้ง","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.submitted":"ส่งคำตอบแล้ว","materialQuiz.resultStatus.wrong":"กรุณาลองแก้ปัญหาอีกครั้ง","materialQuiz.selectMultiple.answer.title":"เลือกคำตอบจากตัวเลือกด้านล่าง (สามารถเลือกได้หลายข้อ)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.selectOne.answer.title":"เลือกคำตอบจากตัวเลือกด้านล่าง","materialQuiz.submit":"ส่ง","materialQuiz.submitStatus.failure":"ส่งล้มเหลว","materialQuiz.submitStatus.success":"ส่งเรียบร้อยแล้ว","materialQuiz.submitted_file":"ไฟล์ที่ส่ง","materialQuiz.submittedAnswer":"คำตอบที่ส่ง","materialQuiz.submmited_file":"ไฟล์ที่ส่งแล้ว","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.survey.empty.title":"แบบสำรวจยังไม่พร้อมใช้งาน","materialQuiz.text.answer.title":"กรุณาเขียนคำตอบของคุณ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.upload_file":"อัปโหลดไฟล์"};
|
|
6
6
|
|
|
7
7
|
exports.default = th;
|
|
@@ -47,7 +47,8 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
47
47
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
48
48
|
onNext = _useMaterialQuizDispa.onNext,
|
|
49
49
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
50
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
50
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
51
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
51
52
|
var theme = material.useTheme();
|
|
52
53
|
var _React$useState = React__default.default.useState([]),
|
|
53
54
|
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
@@ -373,6 +374,7 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
373
374
|
titlePrefix: "Q.",
|
|
374
375
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
375
376
|
onNext: onNext,
|
|
377
|
+
onHint: onHint,
|
|
376
378
|
isNextActive: isNextActive,
|
|
377
379
|
submitStatus: jsxRuntime.jsx(QuizSubmitStatusText.default, {
|
|
378
380
|
status: submitStatus
|
|
@@ -380,6 +382,7 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
380
382
|
submitResult: jsxRuntime.jsx(QuizResultDescription.default, {
|
|
381
383
|
materialQuizResponse: materialQuizResponse
|
|
382
384
|
}),
|
|
385
|
+
materialQuizResponse: materialQuizResponse,
|
|
383
386
|
bodyContainerRef: containerRef,
|
|
384
387
|
footerActions: [{
|
|
385
388
|
border: false,
|
|
@@ -389,7 +392,7 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
389
392
|
transparent: false,
|
|
390
393
|
onClick: handleSubmit,
|
|
391
394
|
children: intl$1.formatMessage({
|
|
392
|
-
id:
|
|
395
|
+
id: 'materialQuiz.submit'
|
|
393
396
|
}),
|
|
394
397
|
customStyles: {
|
|
395
398
|
backgroundColor: isNextActive ? theme.palette.secondary.main : isDisabled ? designTokens.base.color.gray6 : theme.palette.primary.main,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ButtonProps } from '@elice/blocks';
|
|
3
|
+
import type { GetOrgMaterialQuizResponseGetResponses } from '@elice/types';
|
|
3
4
|
import type { UseMeasureRef } from 'react-use/lib/useMeasure';
|
|
4
5
|
interface QuestionBoxProps {
|
|
5
6
|
footerActions?: ButtonProps[];
|
|
@@ -7,7 +8,9 @@ interface QuestionBoxProps {
|
|
|
7
8
|
titlePrefix?: string;
|
|
8
9
|
submitResult?: React.ReactNode;
|
|
9
10
|
submitStatus?: React.ReactNode;
|
|
11
|
+
materialQuizResponse?: GetOrgMaterialQuizResponseGetResponses['quizResponse'] | null;
|
|
10
12
|
onNext?: () => void;
|
|
13
|
+
onHint?: () => void;
|
|
11
14
|
isNextActive?: boolean;
|
|
12
15
|
bodyContainerRef?: UseMeasureRef<HTMLDivElement>;
|
|
13
16
|
}
|
|
@@ -14,9 +14,11 @@ var markdown = require('@elice/markdown');
|
|
|
14
14
|
var material = require('@mui/material');
|
|
15
15
|
var animateScrollTo = require('animated-scroll-to');
|
|
16
16
|
var styled = require('styled-components');
|
|
17
|
+
var index = require('../../helpers/index.js');
|
|
17
18
|
var element = require('../../constant/element.js');
|
|
18
19
|
var MaterialQuizContext = require('../material-quiz/context/MaterialQuizContext.js');
|
|
19
20
|
var mergeRefs = require('./utils/mergeRefs.js');
|
|
21
|
+
var ai_helpy = require('../../assets/imgs/ai_helpy.png.js');
|
|
20
22
|
|
|
21
23
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
22
24
|
|
|
@@ -85,16 +87,17 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
85
87
|
titlePrefix = _a.titlePrefix,
|
|
86
88
|
submitResult = _a.submitResult;
|
|
87
89
|
_a.submitStatus;
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
var materialQuizResponse = _a.materialQuizResponse;
|
|
91
|
+
_a.onNext;
|
|
92
|
+
var onHint = _a.onHint;
|
|
93
|
+
_a.isNextActive;
|
|
94
|
+
var bodyContainerRef = _a.bodyContainerRef,
|
|
95
|
+
props = tslib.__rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "materialQuizResponse", "onNext", "onHint", "isNextActive", "bodyContainerRef"]);
|
|
92
96
|
var theme = material.useTheme();
|
|
93
97
|
var intl$1 = intl.useRawEliceIntl();
|
|
94
98
|
var _useMaterialQuizState = MaterialQuizContext.useMaterialQuizState(),
|
|
95
99
|
vertical = _useMaterialQuizState.vertical,
|
|
96
100
|
isLongPassage = _useMaterialQuizState.isLongPassage,
|
|
97
|
-
isRecommendLecture = _useMaterialQuizState.isRecommendLecture,
|
|
98
101
|
course = _useMaterialQuizState.course;
|
|
99
102
|
var intersectionRef = React__default.default.useRef(null);
|
|
100
103
|
var headerRef = React__default.default.useRef(null);
|
|
@@ -145,24 +148,57 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
145
148
|
var header = title ? jsxRuntime.jsx(StyledQuestionBoxHeader, {
|
|
146
149
|
vertical: vertical,
|
|
147
150
|
ref: headerRef,
|
|
148
|
-
children: jsxRuntime.jsxs(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
children: jsxRuntime.jsxs(material.Stack, {
|
|
152
|
+
width: "100%",
|
|
153
|
+
direction: "row",
|
|
154
|
+
justifyContent: "space-between",
|
|
155
|
+
flexWrap: "wrap",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
gap: "1.25rem",
|
|
158
|
+
children: [jsxRuntime.jsxs(material.Box, {
|
|
159
|
+
display: "flex",
|
|
160
|
+
alignItems: "center",
|
|
161
|
+
children: [titlePrefix ? jsxRuntime.jsx(blocks.Text, {
|
|
162
|
+
bold: true,
|
|
163
|
+
size: "large",
|
|
164
|
+
customStyles: {
|
|
165
|
+
color: designTokens.base.color.primary3,
|
|
166
|
+
marginRight: '0.5rem'
|
|
167
|
+
},
|
|
168
|
+
children: titlePrefix
|
|
169
|
+
}) : null, ((_b = course === null || course === void 0 ? void 0 : course.preference) === null || _b === void 0 ? void 0 : _b.renderMarkdownInQuizOptions) ? jsxRuntime.jsx(StyledMarkdownTypography, {
|
|
170
|
+
color: "text.primary",
|
|
171
|
+
variant: "subtitle2",
|
|
172
|
+
children: title
|
|
173
|
+
}) : jsxRuntime.jsx(material.Typography, {
|
|
174
|
+
color: "text.primary",
|
|
175
|
+
variant: "subtitle2",
|
|
176
|
+
children: title
|
|
177
|
+
})]
|
|
178
|
+
}), index.getQuizResultStatus(materialQuizResponse) === index.QuizResultStatus.Wrong ? jsxRuntime.jsx(material.Button, {
|
|
179
|
+
size: "small",
|
|
180
|
+
variant: "text",
|
|
181
|
+
sx: {
|
|
182
|
+
backgroundColor: function backgroundColor(theme) {
|
|
183
|
+
return theme.palette.primary.opacity02;
|
|
184
|
+
}
|
|
155
185
|
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
children:
|
|
165
|
-
|
|
186
|
+
startIcon: jsxRuntime.jsx(material.Avatar, {
|
|
187
|
+
src: ai_helpy.default,
|
|
188
|
+
sx: {
|
|
189
|
+
width: '2rem',
|
|
190
|
+
height: '2rem'
|
|
191
|
+
}
|
|
192
|
+
}),
|
|
193
|
+
onClick: onHint,
|
|
194
|
+
children: jsxRuntime.jsx(material.Typography, {
|
|
195
|
+
variant: "button",
|
|
196
|
+
color: "text.primary",
|
|
197
|
+
children: intl$1.formatMessage({
|
|
198
|
+
id: 'materialQuiz.hint'
|
|
199
|
+
})
|
|
200
|
+
})
|
|
201
|
+
}) : null]
|
|
166
202
|
})
|
|
167
203
|
}) : null;
|
|
168
204
|
var body = jsxRuntime.jsx(StyledQuestionBoxBody, {
|
|
@@ -185,21 +221,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
185
221
|
}, action, {
|
|
186
222
|
children: action.children
|
|
187
223
|
}), index);
|
|
188
|
-
})
|
|
189
|
-
isFluid: vertical,
|
|
190
|
-
size: "small",
|
|
191
|
-
border: false,
|
|
192
|
-
tabIndex: 0,
|
|
193
|
-
transparent: false,
|
|
194
|
-
onClick: onNext,
|
|
195
|
-
customStyles: {
|
|
196
|
-
backgroundColor: theme.palette.primary.main,
|
|
197
|
-
color: theme.palette.primary.contrastText
|
|
198
|
-
},
|
|
199
|
-
children: intl$1.formatMessage({
|
|
200
|
-
id: 'materialQuiz.next'
|
|
201
|
-
})
|
|
202
|
-
}) : null]
|
|
224
|
+
})]
|
|
203
225
|
})
|
|
204
226
|
});
|
|
205
227
|
var _renderAnchorSection = function _renderAnchorSection() {
|
|
@@ -159,6 +159,7 @@ var MaterialQuizContainer = function MaterialQuizContainer(_ref7) {
|
|
|
159
159
|
onDirty = _ref7.onDirty,
|
|
160
160
|
onSubmit = _ref7.onSubmit,
|
|
161
161
|
onNext = _ref7.onNext,
|
|
162
|
+
onHint = _ref7.onHint,
|
|
162
163
|
__intl = _ref7.__intl;
|
|
163
164
|
return jsx(RawEliceIntlProvider, {
|
|
164
165
|
value: __intl,
|
|
@@ -172,6 +173,7 @@ var MaterialQuizContainer = function MaterialQuizContainer(_ref7) {
|
|
|
172
173
|
onDirty: onDirty,
|
|
173
174
|
onSubmit: onSubmit,
|
|
174
175
|
onNext: onNext,
|
|
176
|
+
onHint: onHint,
|
|
175
177
|
children: jsx(MaterialQuiz, {})
|
|
176
178
|
})
|
|
177
179
|
})
|
|
@@ -41,7 +41,8 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
41
41
|
onNext = _useMaterialQuizDispa.onNext,
|
|
42
42
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
43
43
|
onDirty = _useMaterialQuizDispa.onDirty,
|
|
44
|
-
setIsInitialLoading = _useMaterialQuizDispa.setIsInitialLoading
|
|
44
|
+
setIsInitialLoading = _useMaterialQuizDispa.setIsInitialLoading,
|
|
45
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
45
46
|
//
|
|
46
47
|
var intl = useRawEliceIntl();
|
|
47
48
|
var _React$useState = React.useState('idle'),
|
|
@@ -274,10 +275,12 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
274
275
|
status: submitStatus
|
|
275
276
|
}),
|
|
276
277
|
isNextActive: isNextActive,
|
|
278
|
+
materialQuizResponse: materialQuizResponse,
|
|
279
|
+
onHint: onHint,
|
|
277
280
|
footerActions: [{
|
|
278
281
|
border: false,
|
|
279
282
|
children: intl.formatMessage({
|
|
280
|
-
id:
|
|
283
|
+
id: 'materialQuiz.submit'
|
|
281
284
|
}),
|
|
282
285
|
disabled: isDisabled,
|
|
283
286
|
loading: submitStatus === 'pending',
|
|
@@ -285,8 +288,8 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
285
288
|
transparent: false,
|
|
286
289
|
onClick: handleSubmit,
|
|
287
290
|
customStyles: {
|
|
288
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
289
|
-
color: isNextActive ? theme.palette.
|
|
291
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? base.color.gray6 : theme.palette.primary.main,
|
|
292
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? base.color.gray3 : theme.palette.primary.contrastText
|
|
290
293
|
}
|
|
291
294
|
}],
|
|
292
295
|
children: jsxs(Stack, {
|
|
@@ -36,7 +36,8 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
36
36
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
37
37
|
onNext = _useMaterialQuizDispa.onNext,
|
|
38
38
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
39
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
39
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
40
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
40
41
|
var theme = useTheme();
|
|
41
42
|
// state
|
|
42
43
|
var intl = useRawEliceIntl();
|
|
@@ -194,7 +195,9 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
194
195
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
195
196
|
titlePrefix: "Q.",
|
|
196
197
|
onNext: onNext,
|
|
198
|
+
onHint: onHint,
|
|
197
199
|
isNextActive: isNextActive,
|
|
200
|
+
materialQuizResponse: materialQuizResponse,
|
|
198
201
|
submitResult: jsx(QuizResultDescription, {
|
|
199
202
|
materialQuizResponse: materialQuizResponse
|
|
200
203
|
}),
|
|
@@ -210,11 +213,11 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
210
213
|
transparent: false,
|
|
211
214
|
onClick: handleSubmit,
|
|
212
215
|
children: intl.formatMessage({
|
|
213
|
-
id:
|
|
216
|
+
id: 'materialQuiz.submit'
|
|
214
217
|
}),
|
|
215
218
|
customStyles: {
|
|
216
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
217
|
-
color: isNextActive ? theme.palette.
|
|
219
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? base.color.gray6 : theme.palette.primary.main,
|
|
220
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? base.color.gray3 : theme.palette.primary.contrastText
|
|
218
221
|
}
|
|
219
222
|
}],
|
|
220
223
|
children: jsxs(Stack, {
|
|
@@ -68,7 +68,8 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
68
68
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
69
69
|
onNext = _useMaterialQuizDispa.onNext,
|
|
70
70
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
71
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
71
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
72
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
72
73
|
var theme = useTheme();
|
|
73
74
|
// state
|
|
74
75
|
var intl = useRawEliceIntl();
|
|
@@ -542,7 +543,9 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
542
543
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
543
544
|
titlePrefix: "Q.",
|
|
544
545
|
onNext: onNext,
|
|
546
|
+
onHint: onHint,
|
|
545
547
|
isNextActive: isNextActive,
|
|
548
|
+
materialQuizResponse: materialQuizResponse,
|
|
546
549
|
submitStatus: jsx(QuizSubmitStatusText, {
|
|
547
550
|
status: submitStatus
|
|
548
551
|
}),
|
|
@@ -558,11 +561,11 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
558
561
|
transparent: false,
|
|
559
562
|
onClick: handleSubmit,
|
|
560
563
|
children: intl.formatMessage({
|
|
561
|
-
id:
|
|
564
|
+
id: 'materialQuiz.submit'
|
|
562
565
|
}),
|
|
563
566
|
customStyles: {
|
|
564
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
565
|
-
color: isNextActive ? theme.palette.
|
|
567
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? base.color.gray6 : theme.palette.primary.main,
|
|
568
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? base.color.gray3 : theme.palette.primary.contrastText
|
|
566
569
|
}
|
|
567
570
|
}],
|
|
568
571
|
children: jsxs(Stack, {
|
|
@@ -36,7 +36,8 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
36
36
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
37
37
|
onNext = _useMaterialQuizDispa.onNext,
|
|
38
38
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
39
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
39
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
40
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
40
41
|
var theme = useTheme();
|
|
41
42
|
// state
|
|
42
43
|
var intl = useRawEliceIntl();
|
|
@@ -183,10 +184,12 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
183
184
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
184
185
|
titlePrefix: "Q.",
|
|
185
186
|
onNext: onNext,
|
|
187
|
+
onHint: onHint,
|
|
186
188
|
isNextActive: isNextActive,
|
|
187
189
|
submitStatus: jsx(QuizSubmitStatusText, {
|
|
188
190
|
status: submitStatus
|
|
189
191
|
}),
|
|
192
|
+
materialQuizResponse: materialQuizResponse,
|
|
190
193
|
submitResult: jsx(QuizResultDescription, {
|
|
191
194
|
materialQuizResponse: materialQuizResponse
|
|
192
195
|
}),
|
|
@@ -199,11 +202,11 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
199
202
|
transparent: false,
|
|
200
203
|
onClick: handleSubmit,
|
|
201
204
|
children: intl.formatMessage({
|
|
202
|
-
id:
|
|
205
|
+
id: 'materialQuiz.submit'
|
|
203
206
|
}),
|
|
204
207
|
customStyles: {
|
|
205
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
206
|
-
color: isNextActive ? theme.palette.
|
|
208
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? base.color.gray6 : theme.palette.primary.main,
|
|
209
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? base.color.gray3 : theme.palette.primary.contrastText
|
|
207
210
|
}
|
|
208
211
|
}],
|
|
209
212
|
children: jsxs(Stack, {
|
|
@@ -37,7 +37,8 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
37
37
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
38
38
|
onNext = _useMaterialQuizDispa.onNext,
|
|
39
39
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
40
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
40
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
41
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
41
42
|
var theme = useTheme();
|
|
42
43
|
// state
|
|
43
44
|
var intl = useRawEliceIntl();
|
|
@@ -179,9 +180,11 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
179
180
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
180
181
|
titlePrefix: "Q.",
|
|
181
182
|
onNext: onNext,
|
|
183
|
+
onHint: onHint,
|
|
182
184
|
submitResult: jsx(QuizResultDescription, {
|
|
183
185
|
materialQuizResponse: materialQuizResponse
|
|
184
186
|
}),
|
|
187
|
+
materialQuizResponse: materialQuizResponse,
|
|
185
188
|
submitStatus: jsx(QuizSubmitStatusText, {
|
|
186
189
|
status: submitStatus
|
|
187
190
|
}),
|
|
@@ -190,7 +193,7 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
190
193
|
footerActions: [{
|
|
191
194
|
border: false,
|
|
192
195
|
children: intl.formatMessage({
|
|
193
|
-
id:
|
|
196
|
+
id: 'materialQuiz.submit'
|
|
194
197
|
}),
|
|
195
198
|
disabled: isDisabled,
|
|
196
199
|
loading: submitStatus === 'pending',
|
|
@@ -198,8 +201,8 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
198
201
|
transparent: false,
|
|
199
202
|
onClick: handleSubmit,
|
|
200
203
|
customStyles: {
|
|
201
|
-
backgroundColor: isNextActive ? theme.palette.
|
|
202
|
-
color: isNextActive ? theme.palette.
|
|
204
|
+
backgroundColor: isNextActive ? theme.palette.primary.main : isDisabled ? base.color.gray6 : theme.palette.primary.main,
|
|
205
|
+
color: isNextActive ? theme.palette.primary.contrastText : isDisabled ? base.color.gray3 : theme.palette.primary.contrastText
|
|
203
206
|
}
|
|
204
207
|
}],
|
|
205
208
|
children: jsxs(Stack, {
|
|
@@ -21,6 +21,7 @@ export type MaterialQuizProps = {
|
|
|
21
21
|
onDirty: (isDirty: boolean) => void;
|
|
22
22
|
onSubmit?: (isSucceeded: boolean, isCorrect?: boolean) => void;
|
|
23
23
|
onNext?: () => void;
|
|
24
|
+
onHint?: () => void;
|
|
24
25
|
};
|
|
25
26
|
interface MaterialQuizProviderProps extends Omit<MaterialQuizProps, 'locale' | 'eliceCourseApiConfiguration'> {
|
|
26
27
|
children: React.ReactNode;
|
|
@@ -33,8 +34,9 @@ interface DispatchContextType {
|
|
|
33
34
|
onNext?: () => void;
|
|
34
35
|
setIsLongPassage: React.Dispatch<React.SetStateAction<boolean>>;
|
|
35
36
|
setIsInitialLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
37
|
+
onHint?: () => void;
|
|
36
38
|
}
|
|
37
|
-
declare function MaterialQuizProvider({ materialQuizId, userId, onSubmit, onDirty, onNext, children, }: MaterialQuizProviderProps): JSX.Element;
|
|
39
|
+
declare function MaterialQuizProvider({ materialQuizId, userId, onSubmit, onDirty, onNext, onHint, children, }: MaterialQuizProviderProps): JSX.Element;
|
|
38
40
|
declare function useMaterialQuizState(): State;
|
|
39
41
|
declare function useMaterialQuizDispatch(): DispatchContextType;
|
|
40
42
|
export { MaterialQuizProvider, useMaterialQuizState, useMaterialQuizDispatch };
|
|
@@ -19,6 +19,7 @@ function MaterialQuizProvider(_ref) {
|
|
|
19
19
|
} : _ref$onSubmit,
|
|
20
20
|
onDirty = _ref.onDirty,
|
|
21
21
|
onNext = _ref.onNext,
|
|
22
|
+
onHint = _ref.onHint,
|
|
22
23
|
children = _ref.children;
|
|
23
24
|
var _React$useState = React.useState(),
|
|
24
25
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -184,7 +185,8 @@ function MaterialQuizProvider(_ref) {
|
|
|
184
185
|
refreshOrgMaterialQuiz: refreshOrgMaterialQuiz,
|
|
185
186
|
setVertical: setVertical,
|
|
186
187
|
setIsLongPassage: setIsLongPassage,
|
|
187
|
-
setIsInitialLoading: setIsInitialLoading
|
|
188
|
+
setIsInitialLoading: setIsInitialLoading,
|
|
189
|
+
onHint: onHint
|
|
188
190
|
},
|
|
189
191
|
children: children
|
|
190
192
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var messageEn = {"materialQuiz.anchorLabel.answer":"Answer","materialQuiz.anchorLabel.question":"Passage","materialQuiz.answer":"Answer","materialQuiz.bottomSheet.optionEmpty":"All views have been placed in the group.","materialQuiz.bottomSheet.title":"Options","materialQuiz.dropzone.desktop.answerEmpty":"Drag the view into the area.","materialQuiz.dropzone.mobile.answerEmpty":"Click here to add a view.","materialQuiz.dropzone.optionEmpty":"Option","materialQuiz.dropzone.optionReset":"Answer Reset","materialQuiz.empty.description":"Please check again after quiz posting!","materialQuiz.empty.title":"Quiz is now preparing.","materialQuiz.error":"Failed to fetch quiz","materialQuiz.explanation.close":"close quiz explanations","materialQuiz.explanation.empty":"no explanations","materialQuiz.explanation.show":"show quiz explanations","materialQuiz.next":"Next question >","materialQuiz.no_submit_history":"No submission history.","materialQuiz.order.answerEmpty":"You could move the options back here","materialQuiz.resubmit":"Resubmit","materialQuiz.resultStatus.correct":"Correct","materialQuiz.resultStatus.submitted":"Submitted","materialQuiz.resultStatus.wrong":"Please try solving it again.","materialQuiz.selectMultiple.answer.title":"Choose from the views below. (Redundant selections available)","materialQuiz.selectMultipleOrder.answer.title":"Drag and drop your answers.","materialQuiz.selectOne.answer.title":"Choose from the views below.","materialQuiz.submit":"Submit","materialQuiz.submitStatus.failure":"Failed to submit","materialQuiz.submitStatus.success":"Submitted","materialQuiz.submitted_file":"Submitted File","materialQuiz.submittedAnswer":"Submitted Answer","materialQuiz.submmited_file":"Submitted File","materialQuiz.survey.empty.description":"Please check again after survey posting!","materialQuiz.survey.empty.title":"Survey is now preparing.","materialQuiz.text.answer.title":"Please fill out the answer.","materialQuiz.text.correct":"that's correct!","materialQuiz.text.placeholder":"please fill the answer","materialQuiz.text.wrong":"that's wrong. try it again!","materialQuiz.upload_file":"Upload File"};
|
|
1
|
+
var messageEn = {"materialQuiz.anchorLabel.answer":"Answer","materialQuiz.anchorLabel.question":"Passage","materialQuiz.answer":"Answer","materialQuiz.bottomSheet.optionEmpty":"All views have been placed in the group.","materialQuiz.bottomSheet.title":"Options","materialQuiz.dropzone.desktop.answerEmpty":"Drag the view into the area.","materialQuiz.dropzone.mobile.answerEmpty":"Click here to add a view.","materialQuiz.dropzone.optionEmpty":"Option","materialQuiz.dropzone.optionReset":"Answer Reset","materialQuiz.empty.description":"Please check again after quiz posting!","materialQuiz.empty.title":"Quiz is now preparing.","materialQuiz.error":"Failed to fetch quiz","materialQuiz.explanation.close":"close quiz explanations","materialQuiz.explanation.empty":"no explanations","materialQuiz.explanation.show":"show quiz explanations","materialQuiz.hint":"Get a hint","materialQuiz.next":"Next question >","materialQuiz.no_submit_history":"No submission history.","materialQuiz.order.answerEmpty":"You could move the options back here","materialQuiz.resubmit":"Resubmit","materialQuiz.resultStatus.correct":"Correct","materialQuiz.resultStatus.submitted":"Submitted","materialQuiz.resultStatus.wrong":"Please try solving it again.","materialQuiz.selectMultiple.answer.title":"Choose from the views below. (Redundant selections available)","materialQuiz.selectMultipleOrder.answer.title":"Drag and drop your answers.","materialQuiz.selectOne.answer.title":"Choose from the views below.","materialQuiz.submit":"Submit","materialQuiz.submitStatus.failure":"Failed to submit","materialQuiz.submitStatus.success":"Submitted","materialQuiz.submitted_file":"Submitted File","materialQuiz.submittedAnswer":"Submitted Answer","materialQuiz.submmited_file":"Submitted File","materialQuiz.survey.empty.description":"Please check again after survey posting!","materialQuiz.survey.empty.title":"Survey is now preparing.","materialQuiz.text.answer.title":"Please fill out the answer.","materialQuiz.text.correct":"that's correct!","materialQuiz.text.placeholder":"please fill the answer","materialQuiz.text.wrong":"that's wrong. try it again!","materialQuiz.upload_file":"Upload File"};
|
|
2
2
|
|
|
3
3
|
export { messageEn as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var ja = {"materialQuiz.anchorLabel.answer":"回答","materialQuiz.anchorLabel.question":"文章","materialQuiz.answer":"回答","materialQuiz.bottomSheet.optionEmpty":"すべてのビューがグループに配置されました。","materialQuiz.bottomSheet.title":"オプション","materialQuiz.dropzone.desktop.answerEmpty":"ビューをエリアにドラッグしてください。","materialQuiz.dropzone.mobile.answerEmpty":"ここをクリックしてビューを追加してください。","materialQuiz.dropzone.optionEmpty":"オプション","materialQuiz.dropzone.optionReset":"回答をリセットします","materialQuiz.empty.description":"クイズの投稿後にもう一度確認してください!","materialQuiz.empty.title":"クイズは今準備中です。","materialQuiz.error":"クイズの取得に失敗しました。","materialQuiz.explanation.close":"クイズの説明を閉じる","materialQuiz.explanation.empty":"いいです。","materialQuiz.explanation.show":"クイズの説明を表示します","materialQuiz.next":"次の質問 >","materialQuiz.no_submit_history":"提出履歴がありません。","materialQuiz.order.answerEmpty":"オプションをここに戻すことができます。","materialQuiz.resubmit":"再送信","materialQuiz.resultStatus.correct":"正しい","materialQuiz.resultStatus.submitted":"提出済","materialQuiz.resultStatus.wrong":"もう一度解いてみてください。","materialQuiz.selectMultiple.answer.title":"以下から選択してください。 (冗長な選択肢も利用可能)","materialQuiz.selectMultipleOrder.answer.title":"ドラッグして回答をドロップしてください。","materialQuiz.selectOne.answer.title":"以下から選択してください。","materialQuiz.submit":"提出","materialQuiz.submitStatus.failure":"提出に失敗しました。","materialQuiz.submitStatus.success":"提出済","materialQuiz.submitted_file":"提出したファイル","materialQuiz.submittedAnswer":"提出された回答","materialQuiz.submmited_file":"提出したファイル","materialQuiz.survey.empty.description":"調査投稿後にもう一度ご確認ください!","materialQuiz.survey.empty.title":"調査は現在準備中です。","materialQuiz.text.answer.title":"回答を記入してください。","materialQuiz.text.correct":"その通りです!","materialQuiz.text.placeholder":"回答を入力してください","materialQuiz.text.wrong":"それは間違っています。もう一度やってみてください!","materialQuiz.upload_file":"ファイルをアップロード"};
|
|
1
|
+
var ja = {"materialQuiz.anchorLabel.answer":"回答","materialQuiz.anchorLabel.question":"文章","materialQuiz.answer":"回答","materialQuiz.bottomSheet.optionEmpty":"すべてのビューがグループに配置されました。","materialQuiz.bottomSheet.title":"オプション","materialQuiz.dropzone.desktop.answerEmpty":"ビューをエリアにドラッグしてください。","materialQuiz.dropzone.mobile.answerEmpty":"ここをクリックしてビューを追加してください。","materialQuiz.dropzone.optionEmpty":"オプション","materialQuiz.dropzone.optionReset":"回答をリセットします","materialQuiz.empty.description":"クイズの投稿後にもう一度確認してください!","materialQuiz.empty.title":"クイズは今準備中です。","materialQuiz.error":"クイズの取得に失敗しました。","materialQuiz.explanation.close":"クイズの説明を閉じる","materialQuiz.explanation.empty":"いいです。","materialQuiz.explanation.show":"クイズの説明を表示します","materialQuiz.hint":"ヒントをもらう","materialQuiz.next":"次の質問 >","materialQuiz.no_submit_history":"提出履歴がありません。","materialQuiz.order.answerEmpty":"オプションをここに戻すことができます。","materialQuiz.resubmit":"再送信","materialQuiz.resultStatus.correct":"正しい","materialQuiz.resultStatus.submitted":"提出済","materialQuiz.resultStatus.wrong":"もう一度解いてみてください。","materialQuiz.selectMultiple.answer.title":"以下から選択してください。 (冗長な選択肢も利用可能)","materialQuiz.selectMultipleOrder.answer.title":"ドラッグして回答をドロップしてください。","materialQuiz.selectOne.answer.title":"以下から選択してください。","materialQuiz.submit":"提出","materialQuiz.submitStatus.failure":"提出に失敗しました。","materialQuiz.submitStatus.success":"提出済","materialQuiz.submitted_file":"提出したファイル","materialQuiz.submittedAnswer":"提出された回答","materialQuiz.submmited_file":"提出したファイル","materialQuiz.survey.empty.description":"調査投稿後にもう一度ご確認ください!","materialQuiz.survey.empty.title":"調査は現在準備中です。","materialQuiz.text.answer.title":"回答を記入してください。","materialQuiz.text.correct":"その通りです!","materialQuiz.text.placeholder":"回答を入力してください","materialQuiz.text.wrong":"それは間違っています。もう一度やってみてください!","materialQuiz.upload_file":"ファイルをアップロード"};
|
|
2
2
|
|
|
3
3
|
export { ja as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var messageKo = {"materialQuiz.anchorLabel.answer":"답안","materialQuiz.anchorLabel.question":"지문","materialQuiz.answer":"정답","materialQuiz.bottomSheet.optionEmpty":"모든 보기를 그룹에 배치하였습니다.","materialQuiz.bottomSheet.title":"보기","materialQuiz.dropzone.desktop.answerEmpty":"보기를 영역에 끌어 넣어 주세요.","materialQuiz.dropzone.mobile.answerEmpty":"이곳을 클릭하여 보기를 넣어 주세요.","materialQuiz.dropzone.optionEmpty":"보기","materialQuiz.dropzone.optionReset":"답안 초기화","materialQuiz.empty.description":"퀴즈 게시 후 다시 확인해주세요!","materialQuiz.empty.title":"퀴즈가 준비 중 입니다.","materialQuiz.error":"퀴즈를 불러오는데 실패했습니다.\n잠시 후 다시 시도해주세요.","materialQuiz.explanation.close":"퀴즈해설 닫기","materialQuiz.explanation.empty":"작성된 해설이 없습니다.","materialQuiz.explanation.show":"퀴즈 해설 보기","materialQuiz.next":"다음 문제로 이동 >","materialQuiz.no_submit_history":"제출한 내역이 없습니다.","materialQuiz.order.answerEmpty":"항목을 다시 이곳으로 옮길 수 있습니다.","materialQuiz.resubmit":"다시 제출","materialQuiz.resultStatus.correct":"정답","materialQuiz.resultStatus.submitted":"제출완료","materialQuiz.resultStatus.wrong":"다시 한번 풀어보세요.","materialQuiz.selectMultiple.answer.title":"아래 보기에서 골라주세요. (중복 선택 가능)","materialQuiz.selectMultipleOrder.answer.title":"답안을 드래그 앤 드롭하세요.","materialQuiz.selectOne.answer.title":"아래 보기에서 골라주세요.","materialQuiz.submit":"제출","materialQuiz.submitStatus.failure":"제출에 실패하였습니다.","materialQuiz.submitStatus.success":"제출되었습니다.","materialQuiz.submitted_file":"제출한 파일","materialQuiz.submittedAnswer":"제출한 답","materialQuiz.submmited_file":"제출한 파일","materialQuiz.survey.empty.description":"설문지 게시 후 다시 확인해주세요!","materialQuiz.survey.empty.title":"설문조사 준비 중 입니다.","materialQuiz.text.answer.title":"답안을 작성해 주세요.","materialQuiz.text.correct":"정답입니다.","materialQuiz.text.placeholder":"답안을 작성해 주세요.","materialQuiz.text.wrong":"오답입니다. 다시 답안을 제출해보세요.","materialQuiz.upload_file":"파일 업로드"};
|
|
1
|
+
var messageKo = {"materialQuiz.anchorLabel.answer":"답안","materialQuiz.anchorLabel.question":"지문","materialQuiz.answer":"정답","materialQuiz.bottomSheet.optionEmpty":"모든 보기를 그룹에 배치하였습니다.","materialQuiz.bottomSheet.title":"보기","materialQuiz.dropzone.desktop.answerEmpty":"보기를 영역에 끌어 넣어 주세요.","materialQuiz.dropzone.mobile.answerEmpty":"이곳을 클릭하여 보기를 넣어 주세요.","materialQuiz.dropzone.optionEmpty":"보기","materialQuiz.dropzone.optionReset":"답안 초기화","materialQuiz.empty.description":"퀴즈 게시 후 다시 확인해주세요!","materialQuiz.empty.title":"퀴즈가 준비 중 입니다.","materialQuiz.error":"퀴즈를 불러오는데 실패했습니다.\n잠시 후 다시 시도해주세요.","materialQuiz.explanation.close":"퀴즈해설 닫기","materialQuiz.explanation.empty":"작성된 해설이 없습니다.","materialQuiz.explanation.show":"퀴즈 해설 보기","materialQuiz.hint":"힌트 받기","materialQuiz.next":"다음 문제로 이동 >","materialQuiz.no_submit_history":"제출한 내역이 없습니다.","materialQuiz.order.answerEmpty":"항목을 다시 이곳으로 옮길 수 있습니다.","materialQuiz.resubmit":"다시 제출","materialQuiz.resultStatus.correct":"정답","materialQuiz.resultStatus.submitted":"제출완료","materialQuiz.resultStatus.wrong":"다시 한번 풀어보세요.","materialQuiz.selectMultiple.answer.title":"아래 보기에서 골라주세요. (중복 선택 가능)","materialQuiz.selectMultipleOrder.answer.title":"답안을 드래그 앤 드롭하세요.","materialQuiz.selectOne.answer.title":"아래 보기에서 골라주세요.","materialQuiz.submit":"제출","materialQuiz.submitStatus.failure":"제출에 실패하였습니다.","materialQuiz.submitStatus.success":"제출되었습니다.","materialQuiz.submitted_file":"제출한 파일","materialQuiz.submittedAnswer":"제출한 답","materialQuiz.submmited_file":"제출한 파일","materialQuiz.survey.empty.description":"설문지 게시 후 다시 확인해주세요!","materialQuiz.survey.empty.title":"설문조사 준비 중 입니다.","materialQuiz.text.answer.title":"답안을 작성해 주세요.","materialQuiz.text.correct":"정답입니다.","materialQuiz.text.placeholder":"답안을 작성해 주세요.","materialQuiz.text.wrong":"오답입니다. 다시 답안을 제출해보세요.","materialQuiz.upload_file":"파일 업로드"};
|
|
2
2
|
|
|
3
3
|
export { messageKo as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var th = {"materialQuiz.anchorLabel.answer":"ดคำตอบ","materialQuiz.anchorLabel.question":"ทางเดิน","materialQuiz.answer":"ตอบ","materialQuiz.bottomSheet.optionEmpty":"คุณได้จัดเรียงตัวเลือกทั้งหมดลงในกลุ่มแล้ว","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.dropzone.desktop.answerEmpty":"ลากและวางตัวเลือกของคุณลงในพื้นที่นี้","materialQuiz.dropzone.mobile.answerEmpty":"แตะที่นี่เพื่อใส่ตัวเลือก","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ","materialQuiz.empty.description":"กรุณาลองอีกครั้งหลังจากเผยแพร่ข้อสอบ!","materialQuiz.empty.title":"ข้อสอบยังไม่พร้อมใช้งาน","materialQuiz.error":"เกิดข้อผิดพลาดในการโหลดข้อสอบ กรุณาลองอีกครั้งในภายหลัง","materialQuiz.explanation.close":"ปิดคำอธิบาย","materialQuiz.explanation.empty":"ไม่มีคำอธิบาย","materialQuiz.explanation.show":"ดูคำอธิบาย","materialQuiz.next":"ไปยังข้อถัดไป >","materialQuiz.no_submit_history":"ไม่มีประวัติการส่ง","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.resubmit":"ส่งอีกครั้ง","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.submitted":"ส่งคำตอบแล้ว","materialQuiz.resultStatus.wrong":"กรุณาลองแก้ปัญหาอีกครั้ง","materialQuiz.selectMultiple.answer.title":"เลือกคำตอบจากตัวเลือกด้านล่าง (สามารถเลือกได้หลายข้อ)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.selectOne.answer.title":"เลือกคำตอบจากตัวเลือกด้านล่าง","materialQuiz.submit":"ส่ง","materialQuiz.submitStatus.failure":"ส่งล้มเหลว","materialQuiz.submitStatus.success":"ส่งเรียบร้อยแล้ว","materialQuiz.submitted_file":"ไฟล์ที่ส่ง","materialQuiz.submittedAnswer":"คำตอบที่ส่ง","materialQuiz.submmited_file":"ไฟล์ที่ส่งแล้ว","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.survey.empty.title":"แบบสำรวจยังไม่พร้อมใช้งาน","materialQuiz.text.answer.title":"กรุณาเขียนคำตอบของคุณ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.upload_file":"อัปโหลดไฟล์"};
|
|
1
|
+
var th = {"materialQuiz.anchorLabel.answer":"ดคำตอบ","materialQuiz.anchorLabel.question":"ทางเดิน","materialQuiz.answer":"ตอบ","materialQuiz.bottomSheet.optionEmpty":"คุณได้จัดเรียงตัวเลือกทั้งหมดลงในกลุ่มแล้ว","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.dropzone.desktop.answerEmpty":"ลากและวางตัวเลือกของคุณลงในพื้นที่นี้","materialQuiz.dropzone.mobile.answerEmpty":"แตะที่นี่เพื่อใส่ตัวเลือก","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ","materialQuiz.empty.description":"กรุณาลองอีกครั้งหลังจากเผยแพร่ข้อสอบ!","materialQuiz.empty.title":"ข้อสอบยังไม่พร้อมใช้งาน","materialQuiz.error":"เกิดข้อผิดพลาดในการโหลดข้อสอบ กรุณาลองอีกครั้งในภายหลัง","materialQuiz.explanation.close":"ปิดคำอธิบาย","materialQuiz.explanation.empty":"ไม่มีคำอธิบาย","materialQuiz.explanation.show":"ดูคำอธิบาย","materialQuiz.hint":"รับคำใบ้","materialQuiz.next":"ไปยังข้อถัดไป >","materialQuiz.no_submit_history":"ไม่มีประวัติการส่ง","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.resubmit":"ส่งอีกครั้ง","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.submitted":"ส่งคำตอบแล้ว","materialQuiz.resultStatus.wrong":"กรุณาลองแก้ปัญหาอีกครั้ง","materialQuiz.selectMultiple.answer.title":"เลือกคำตอบจากตัวเลือกด้านล่าง (สามารถเลือกได้หลายข้อ)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.selectOne.answer.title":"เลือกคำตอบจากตัวเลือกด้านล่าง","materialQuiz.submit":"ส่ง","materialQuiz.submitStatus.failure":"ส่งล้มเหลว","materialQuiz.submitStatus.success":"ส่งเรียบร้อยแล้ว","materialQuiz.submitted_file":"ไฟล์ที่ส่ง","materialQuiz.submittedAnswer":"คำตอบที่ส่ง","materialQuiz.submmited_file":"ไฟล์ที่ส่งแล้ว","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.survey.empty.title":"แบบสำรวจยังไม่พร้อมใช้งาน","materialQuiz.text.answer.title":"กรุณาเขียนคำตอบของคุณ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.upload_file":"อัปโหลดไฟล์"};
|
|
2
2
|
|
|
3
3
|
export { th as default };
|
|
@@ -37,7 +37,8 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
37
37
|
onSubmit = _useMaterialQuizDispa.onSubmit,
|
|
38
38
|
onNext = _useMaterialQuizDispa.onNext,
|
|
39
39
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
40
|
-
onDirty = _useMaterialQuizDispa.onDirty
|
|
40
|
+
onDirty = _useMaterialQuizDispa.onDirty,
|
|
41
|
+
onHint = _useMaterialQuizDispa.onHint;
|
|
41
42
|
var theme = useTheme();
|
|
42
43
|
var _React$useState = React.useState([]),
|
|
43
44
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -363,6 +364,7 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
363
364
|
titlePrefix: "Q.",
|
|
364
365
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
365
366
|
onNext: onNext,
|
|
367
|
+
onHint: onHint,
|
|
366
368
|
isNextActive: isNextActive,
|
|
367
369
|
submitStatus: jsx(QuizSubmitStatusText, {
|
|
368
370
|
status: submitStatus
|
|
@@ -370,6 +372,7 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
370
372
|
submitResult: jsx(QuizResultDescription, {
|
|
371
373
|
materialQuizResponse: materialQuizResponse
|
|
372
374
|
}),
|
|
375
|
+
materialQuizResponse: materialQuizResponse,
|
|
373
376
|
bodyContainerRef: containerRef,
|
|
374
377
|
footerActions: [{
|
|
375
378
|
border: false,
|
|
@@ -379,7 +382,7 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
379
382
|
transparent: false,
|
|
380
383
|
onClick: handleSubmit,
|
|
381
384
|
children: intl.formatMessage({
|
|
382
|
-
id:
|
|
385
|
+
id: 'materialQuiz.submit'
|
|
383
386
|
}),
|
|
384
387
|
customStyles: {
|
|
385
388
|
backgroundColor: isNextActive ? theme.palette.secondary.main : isDisabled ? base.color.gray6 : theme.palette.primary.main,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ButtonProps } from '@elice/blocks';
|
|
3
|
+
import type { GetOrgMaterialQuizResponseGetResponses } from '@elice/types';
|
|
3
4
|
import type { UseMeasureRef } from 'react-use/lib/useMeasure';
|
|
4
5
|
interface QuestionBoxProps {
|
|
5
6
|
footerActions?: ButtonProps[];
|
|
@@ -7,7 +8,9 @@ interface QuestionBoxProps {
|
|
|
7
8
|
titlePrefix?: string;
|
|
8
9
|
submitResult?: React.ReactNode;
|
|
9
10
|
submitStatus?: React.ReactNode;
|
|
11
|
+
materialQuizResponse?: GetOrgMaterialQuizResponseGetResponses['quizResponse'] | null;
|
|
10
12
|
onNext?: () => void;
|
|
13
|
+
onHint?: () => void;
|
|
11
14
|
isNextActive?: boolean;
|
|
12
15
|
bodyContainerRef?: UseMeasureRef<HTMLDivElement>;
|
|
13
16
|
}
|
|
@@ -3,16 +3,18 @@ import { __rest } from 'tslib';
|
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import React, { useEffect } from 'react';
|
|
5
5
|
import { useIntersection } from 'react-use';
|
|
6
|
-
import { Button,
|
|
6
|
+
import { Button, Text, Box as Box$1 } from '@elice/blocks';
|
|
7
7
|
import { base } from '@elice/design-tokens';
|
|
8
8
|
import { useRawEliceIntl } from '@elice/intl';
|
|
9
9
|
import { MarkdownTypography } from '@elice/markdown';
|
|
10
|
-
import { useTheme, Typography } from '@mui/material';
|
|
10
|
+
import { useTheme, Stack, Box, Typography, Button as Button$1, Avatar } from '@mui/material';
|
|
11
11
|
import animateScrollTo from 'animated-scroll-to';
|
|
12
12
|
import styled from 'styled-components';
|
|
13
|
+
import { getQuizResultStatus, QuizResultStatus } from '../../helpers/index.js';
|
|
13
14
|
import { MATERIAL_QUIZ_ANSWER_ID, MATERIAL_QUIZ_PASSIVE_ID } from '../../constant/element.js';
|
|
14
15
|
import { useMaterialQuizState } from '../material-quiz/context/MaterialQuizContext.js';
|
|
15
16
|
import { mergeRefs } from './utils/mergeRefs.js';
|
|
17
|
+
import img from '../../assets/imgs/ai_helpy.png.js';
|
|
16
18
|
|
|
17
19
|
var easeInOutCubic = function easeInOutCubic(t) {
|
|
18
20
|
return t < 0.5 ? 4 * Math.pow(t, 3) : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
|
|
@@ -75,16 +77,17 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
75
77
|
titlePrefix = _a.titlePrefix,
|
|
76
78
|
submitResult = _a.submitResult;
|
|
77
79
|
_a.submitStatus;
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
var materialQuizResponse = _a.materialQuizResponse;
|
|
81
|
+
_a.onNext;
|
|
82
|
+
var onHint = _a.onHint;
|
|
83
|
+
_a.isNextActive;
|
|
84
|
+
var bodyContainerRef = _a.bodyContainerRef,
|
|
85
|
+
props = __rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "materialQuizResponse", "onNext", "onHint", "isNextActive", "bodyContainerRef"]);
|
|
82
86
|
var theme = useTheme();
|
|
83
87
|
var intl = useRawEliceIntl();
|
|
84
88
|
var _useMaterialQuizState = useMaterialQuizState(),
|
|
85
89
|
vertical = _useMaterialQuizState.vertical,
|
|
86
90
|
isLongPassage = _useMaterialQuizState.isLongPassage,
|
|
87
|
-
isRecommendLecture = _useMaterialQuizState.isRecommendLecture,
|
|
88
91
|
course = _useMaterialQuizState.course;
|
|
89
92
|
var intersectionRef = React.useRef(null);
|
|
90
93
|
var headerRef = React.useRef(null);
|
|
@@ -135,24 +138,57 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
135
138
|
var header = title ? jsx(StyledQuestionBoxHeader, {
|
|
136
139
|
vertical: vertical,
|
|
137
140
|
ref: headerRef,
|
|
138
|
-
children: jsxs(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
children: jsxs(Stack, {
|
|
142
|
+
width: "100%",
|
|
143
|
+
direction: "row",
|
|
144
|
+
justifyContent: "space-between",
|
|
145
|
+
flexWrap: "wrap",
|
|
146
|
+
alignItems: "center",
|
|
147
|
+
gap: "1.25rem",
|
|
148
|
+
children: [jsxs(Box, {
|
|
149
|
+
display: "flex",
|
|
150
|
+
alignItems: "center",
|
|
151
|
+
children: [titlePrefix ? jsx(Text, {
|
|
152
|
+
bold: true,
|
|
153
|
+
size: "large",
|
|
154
|
+
customStyles: {
|
|
155
|
+
color: base.color.primary3,
|
|
156
|
+
marginRight: '0.5rem'
|
|
157
|
+
},
|
|
158
|
+
children: titlePrefix
|
|
159
|
+
}) : null, ((_b = course === null || course === void 0 ? void 0 : course.preference) === null || _b === void 0 ? void 0 : _b.renderMarkdownInQuizOptions) ? jsx(StyledMarkdownTypography, {
|
|
160
|
+
color: "text.primary",
|
|
161
|
+
variant: "subtitle2",
|
|
162
|
+
children: title
|
|
163
|
+
}) : jsx(Typography, {
|
|
164
|
+
color: "text.primary",
|
|
165
|
+
variant: "subtitle2",
|
|
166
|
+
children: title
|
|
167
|
+
})]
|
|
168
|
+
}), getQuizResultStatus(materialQuizResponse) === QuizResultStatus.Wrong ? jsx(Button$1, {
|
|
169
|
+
size: "small",
|
|
170
|
+
variant: "text",
|
|
171
|
+
sx: {
|
|
172
|
+
backgroundColor: function backgroundColor(theme) {
|
|
173
|
+
return theme.palette.primary.opacity02;
|
|
174
|
+
}
|
|
145
175
|
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
children:
|
|
155
|
-
|
|
176
|
+
startIcon: jsx(Avatar, {
|
|
177
|
+
src: img,
|
|
178
|
+
sx: {
|
|
179
|
+
width: '2rem',
|
|
180
|
+
height: '2rem'
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
183
|
+
onClick: onHint,
|
|
184
|
+
children: jsx(Typography, {
|
|
185
|
+
variant: "button",
|
|
186
|
+
color: "text.primary",
|
|
187
|
+
children: intl.formatMessage({
|
|
188
|
+
id: 'materialQuiz.hint'
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
}) : null]
|
|
156
192
|
})
|
|
157
193
|
}) : null;
|
|
158
194
|
var body = jsx(StyledQuestionBoxBody, {
|
|
@@ -165,7 +201,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
165
201
|
vertical: vertical,
|
|
166
202
|
children: jsxs(StyledQuestionBoxFooterActions, {
|
|
167
203
|
vertical: vertical,
|
|
168
|
-
children: [submitResult ? jsx(Box, {
|
|
204
|
+
children: [submitResult ? jsx(Box$1, {
|
|
169
205
|
children: submitResult
|
|
170
206
|
}) : null, footerActions.map(function (action, index) {
|
|
171
207
|
var Component = action.role === 'lightpurple' ? StyledPrimaryButton : Button;
|
|
@@ -175,21 +211,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
175
211
|
}, action, {
|
|
176
212
|
children: action.children
|
|
177
213
|
}), index);
|
|
178
|
-
})
|
|
179
|
-
isFluid: vertical,
|
|
180
|
-
size: "small",
|
|
181
|
-
border: false,
|
|
182
|
-
tabIndex: 0,
|
|
183
|
-
transparent: false,
|
|
184
|
-
onClick: onNext,
|
|
185
|
-
customStyles: {
|
|
186
|
-
backgroundColor: theme.palette.primary.main,
|
|
187
|
-
color: theme.palette.primary.contrastText
|
|
188
|
-
},
|
|
189
|
-
children: intl.formatMessage({
|
|
190
|
-
id: 'materialQuiz.next'
|
|
191
|
-
})
|
|
192
|
-
}) : null]
|
|
214
|
+
})]
|
|
193
215
|
})
|
|
194
216
|
});
|
|
195
217
|
var _renderAnchorSection = function _renderAnchorSection() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-quiz",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.250313.0",
|
|
4
4
|
"description": "User view and editing components of Elice material quiz",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
77
77
|
"@elice/intl": "0.241127.0",
|
|
78
78
|
"@elice/markdown": "1.241015.0",
|
|
79
|
-
"@elice/material-shared-types": "1.
|
|
80
|
-
"@elice/material-shared-utils": "1.
|
|
79
|
+
"@elice/material-shared-types": "1.250313.0",
|
|
80
|
+
"@elice/material-shared-utils": "1.250313.0",
|
|
81
81
|
"@elice/mui-elements": "^5.250108.0-controllabel.0",
|
|
82
82
|
"@elice/mui-system": "^5.250108.0-controllabel.0",
|
|
83
83
|
"@elice/openapi-client-course": "^1.241220.0",
|