@elice/material-quiz 1.240802.0-quiz.1 → 1.240802.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/MaterialQuizSelectMultiple.js +0 -5
- package/cjs/components/material-quiz/MaterialQuizSelectOne.js +0 -5
- package/cjs/components/material-quiz/MaterialQuizText.js +0 -5
- 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/shared/QuestionBox.d.ts +0 -3
- package/cjs/components/shared/QuestionBox.js +4 -47
- package/es/components/material-quiz/MaterialQuizSelectMultiple.js +1 -6
- package/es/components/material-quiz/MaterialQuizSelectOne.js +1 -6
- package/es/components/material-quiz/MaterialQuizText.js +1 -6
- 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/shared/QuestionBox.d.ts +0 -3
- package/es/components/shared/QuestionBox.js +4 -47
- package/package.json +4 -4
|
@@ -73,7 +73,6 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
73
73
|
setHasSubmitted = _React$useState10[1];
|
|
74
74
|
var isNextActive = hasSubmitted && typeof onNext === 'function';
|
|
75
75
|
var isDisabled = selectedAnswer.length === 0 || index.checkUserLectureTestEnded(lecture) || !!userId;
|
|
76
|
-
var questionStatus = hasSubmitted ? index.getQuizResultStatus(materialQuizResponse) : undefined;
|
|
77
76
|
// answer select handler
|
|
78
77
|
var handleAnswerSelect = function handleAnswerSelect(index$1) {
|
|
79
78
|
if (index.checkUserLectureTestEnded(lecture) || !!userId) {
|
|
@@ -225,10 +224,6 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
225
224
|
color: isNextActive ? theme.palette.secondary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
226
225
|
}
|
|
227
226
|
}],
|
|
228
|
-
questionStatus: questionStatus,
|
|
229
|
-
instructionText: intl$1.formatMessage({
|
|
230
|
-
id: 'materialQuiz.a11y.instruction-text.multiple-choice'
|
|
231
|
-
}),
|
|
232
227
|
children: jsxRuntime.jsxs(material.Stack, {
|
|
233
228
|
height: "100%",
|
|
234
229
|
gap: "1rem",
|
|
@@ -73,7 +73,6 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
73
73
|
setHasSubmitted = _React$useState10[1];
|
|
74
74
|
var isNextActive = hasSubmitted && typeof onNext === 'function';
|
|
75
75
|
var isDisabled = selectedAnswer === undefined || index.checkUserLectureTestEnded(lecture) || !!userId;
|
|
76
|
-
var questionStatus = hasSubmitted ? index.getQuizResultStatus(materialQuizResponse) : undefined;
|
|
77
76
|
// answer select handler
|
|
78
77
|
var handleAnswerSelect = function handleAnswerSelect(index$1) {
|
|
79
78
|
if (index.checkUserLectureTestEnded(lecture) || !!userId) {
|
|
@@ -214,10 +213,6 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
214
213
|
color: isNextActive ? theme.palette.secondary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
215
214
|
}
|
|
216
215
|
}],
|
|
217
|
-
questionStatus: questionStatus,
|
|
218
|
-
instructionText: intl$1.formatMessage({
|
|
219
|
-
id: 'materialQuiz.a11y.instruction-text.single-choice'
|
|
220
|
-
}),
|
|
221
216
|
children: jsxRuntime.jsxs(material.Stack, {
|
|
222
217
|
height: "100%",
|
|
223
218
|
gap: "1rem",
|
|
@@ -71,7 +71,6 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
71
71
|
setHasSubmitted = _React$useState8[1];
|
|
72
72
|
var isNextActive = hasSubmitted && typeof onNext === 'function';
|
|
73
73
|
var isDisabled = answer.length === 0 || index.checkUserLectureTestEnded(lecture) || !!userId;
|
|
74
|
-
var questionStatus = hasSubmitted ? index.getQuizResultStatus(materialQuizResponse) : undefined;
|
|
75
74
|
// quiz response fetcher
|
|
76
75
|
React__default.default.useEffect(function () {
|
|
77
76
|
if (!userId && (materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.lastQuizResponseId)) {
|
|
@@ -213,10 +212,6 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
213
212
|
color: isNextActive ? theme.palette.secondary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
214
213
|
}
|
|
215
214
|
}],
|
|
216
|
-
questionStatus: questionStatus,
|
|
217
|
-
instructionText: intl$1.formatMessage({
|
|
218
|
-
id: 'materialQuiz.a11y.instruction-text.quiz-text'
|
|
219
|
-
}),
|
|
220
215
|
children: jsxRuntime.jsxs(material.Stack, {
|
|
221
216
|
height: "100%",
|
|
222
217
|
gap: "1rem",
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var messageEn = {"materialQuiz.anchorLabel.question":"Passage","materialQuiz.anchorLabel.answer":"Answer","materialQuiz.error":"Failed to fetch quiz","materialQuiz.submit":"Submit","materialQuiz.resubmit":"Resubmit","materialQuiz.submittedAnswer":"Submitted Answer","materialQuiz.answer":"Answer","materialQuiz.next":"Next question >","materialQuiz.selectOne.answer.title":"Choose from the views below.","materialQuiz.selectMultiple.answer.title":"Choose from the views below. (Redundant selections available)","materialQuiz.selectMultipleOrder.answer.title":"Drag and drop your answers.","materialQuiz.text.answer.title":"Please fill out the answer.","materialQuiz.empty.title":"Quiz is now preparing.","materialQuiz.empty.description":"Please check again after quiz posting!","materialQuiz.survey.empty.title":"Survey is now preparing.","materialQuiz.survey.empty.description":"Please check again after survey posting!","materialQuiz.submitStatus.success":"Submitted","materialQuiz.submitStatus.failure":"Failed to submit","materialQuiz.resultStatus.correct":"Correct","materialQuiz.resultStatus.wrong":"Wrong","materialQuiz.resultStatus.submitted":"Submitted","materialQuiz.explanation.close":"close quiz explanations","materialQuiz.explanation.show":"show quiz explanations","materialQuiz.explanation.empty":"no explanations","materialQuiz.text.placeholder":"please fill the answer","materialQuiz.text.correct":"that's correct!","materialQuiz.text.wrong":"that's wrong. try it again!","materialQuiz.order.answerEmpty":"You could move the options back here","materialQuiz.bottomSheet.title":"Options","materialQuiz.bottomSheet.optionEmpty":"All views have been placed in the group.","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"
|
|
5
|
+
var messageEn = {"materialQuiz.anchorLabel.question":"Passage","materialQuiz.anchorLabel.answer":"Answer","materialQuiz.error":"Failed to fetch quiz","materialQuiz.submit":"Submit","materialQuiz.resubmit":"Resubmit","materialQuiz.submittedAnswer":"Submitted Answer","materialQuiz.answer":"Answer","materialQuiz.next":"Next question >","materialQuiz.selectOne.answer.title":"Choose from the views below.","materialQuiz.selectMultiple.answer.title":"Choose from the views below. (Redundant selections available)","materialQuiz.selectMultipleOrder.answer.title":"Drag and drop your answers.","materialQuiz.text.answer.title":"Please fill out the answer.","materialQuiz.empty.title":"Quiz is now preparing.","materialQuiz.empty.description":"Please check again after quiz posting!","materialQuiz.survey.empty.title":"Survey is now preparing.","materialQuiz.survey.empty.description":"Please check again after survey posting!","materialQuiz.submitStatus.success":"Submitted","materialQuiz.submitStatus.failure":"Failed to submit","materialQuiz.resultStatus.correct":"Correct","materialQuiz.resultStatus.wrong":"Wrong","materialQuiz.resultStatus.submitted":"Submitted","materialQuiz.explanation.close":"close quiz explanations","materialQuiz.explanation.show":"show quiz explanations","materialQuiz.explanation.empty":"no explanations","materialQuiz.text.placeholder":"please fill the answer","materialQuiz.text.correct":"that's correct!","materialQuiz.text.wrong":"that's wrong. try it again!","materialQuiz.order.answerEmpty":"You could move the options back here","materialQuiz.bottomSheet.title":"Options","materialQuiz.bottomSheet.optionEmpty":"All views have been placed in the group.","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"};
|
|
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.question":"文章","materialQuiz.anchorLabel.answer":"回答","materialQuiz.error":"クイズの取得に失敗しました。","materialQuiz.submit":"提出","materialQuiz.resubmit":"再送信","materialQuiz.submittedAnswer":"提出された回答","materialQuiz.answer":"回答","materialQuiz.next":"次の質問 >","materialQuiz.selectOne.answer.title":"以下から選択してください。","materialQuiz.selectMultiple.answer.title":"以下から選択してください。 (冗長な選択肢も利用可能)","materialQuiz.selectMultipleOrder.answer.title":"ドラッグして回答をドロップしてください。","materialQuiz.text.answer.title":"回答を記入してください。","materialQuiz.empty.title":"クイズは今準備中です。","materialQuiz.empty.description":"クイズの投稿後にもう一度確認してください!","materialQuiz.survey.empty.title":"調査は現在準備中です。","materialQuiz.survey.empty.description":"調査投稿後にもう一度ご確認ください!","materialQuiz.submitStatus.success":"提出済","materialQuiz.submitStatus.failure":"提出に失敗しました。","materialQuiz.resultStatus.correct":"正しい","materialQuiz.resultStatus.wrong":"間違った","materialQuiz.resultStatus.submitted":"提出済","materialQuiz.explanation.close":"クイズの説明を閉じる","materialQuiz.explanation.show":"クイズの説明を表示します","materialQuiz.explanation.empty":"いいです。","materialQuiz.text.placeholder":"回答を入力してください","materialQuiz.text.correct":"その通りです!","materialQuiz.text.wrong":"それは間違っています。もう一度やってみてください!","materialQuiz.order.answerEmpty":"オプションをここに戻すことができます。","materialQuiz.bottomSheet.title":"オプション","materialQuiz.bottomSheet.optionEmpty":"すべてのビューがグループに配置されました。","materialQuiz.dropzone.desktop.answerEmpty":"ビューをエリアにドラッグしてください。","materialQuiz.dropzone.mobile.answerEmpty":"ここをクリックしてビューを追加してください。","materialQuiz.dropzone.optionEmpty":"オプション","materialQuiz.dropzone.optionReset":"回答をリセットします"
|
|
5
|
+
var ja = {"materialQuiz.anchorLabel.question":"文章","materialQuiz.anchorLabel.answer":"回答","materialQuiz.error":"クイズの取得に失敗しました。","materialQuiz.submit":"提出","materialQuiz.resubmit":"再送信","materialQuiz.submittedAnswer":"提出された回答","materialQuiz.answer":"回答","materialQuiz.next":"次の質問 >","materialQuiz.selectOne.answer.title":"以下から選択してください。","materialQuiz.selectMultiple.answer.title":"以下から選択してください。 (冗長な選択肢も利用可能)","materialQuiz.selectMultipleOrder.answer.title":"ドラッグして回答をドロップしてください。","materialQuiz.text.answer.title":"回答を記入してください。","materialQuiz.empty.title":"クイズは今準備中です。","materialQuiz.empty.description":"クイズの投稿後にもう一度確認してください!","materialQuiz.survey.empty.title":"調査は現在準備中です。","materialQuiz.survey.empty.description":"調査投稿後にもう一度ご確認ください!","materialQuiz.submitStatus.success":"提出済","materialQuiz.submitStatus.failure":"提出に失敗しました。","materialQuiz.resultStatus.correct":"正しい","materialQuiz.resultStatus.wrong":"間違った","materialQuiz.resultStatus.submitted":"提出済","materialQuiz.explanation.close":"クイズの説明を閉じる","materialQuiz.explanation.show":"クイズの説明を表示します","materialQuiz.explanation.empty":"いいです。","materialQuiz.text.placeholder":"回答を入力してください","materialQuiz.text.correct":"その通りです!","materialQuiz.text.wrong":"それは間違っています。もう一度やってみてください!","materialQuiz.order.answerEmpty":"オプションをここに戻すことができます。","materialQuiz.bottomSheet.title":"オプション","materialQuiz.bottomSheet.optionEmpty":"すべてのビューがグループに配置されました。","materialQuiz.dropzone.desktop.answerEmpty":"ビューをエリアにドラッグしてください。","materialQuiz.dropzone.mobile.answerEmpty":"ここをクリックしてビューを追加してください。","materialQuiz.dropzone.optionEmpty":"オプション","materialQuiz.dropzone.optionReset":"回答をリセットします"};
|
|
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.question":"지문","materialQuiz.anchorLabel.answer":"답안","materialQuiz.error":"퀴즈를 불러오는데 실패했습니다.\n잠시 후 다시 시도해주세요.","materialQuiz.submit":"제출","materialQuiz.resubmit":"다시 제출","materialQuiz.submittedAnswer":"제출한 답","materialQuiz.answer":"정답","materialQuiz.next":"다음 문제로 이동 >","materialQuiz.selectOne.answer.title":"아래 보기에서 골라주세요.","materialQuiz.selectMultiple.answer.title":"아래 보기에서 골라주세요. (중복 선택 가능)","materialQuiz.selectMultipleOrder.answer.title":"답안을 드래그 앤 드롭하세요.","materialQuiz.text.answer.title":"답안을 작성해 주세요.","materialQuiz.empty.title":"퀴즈가 준비 중 입니다.","materialQuiz.empty.description":"퀴즈 게시 후 다시 확인해주세요!","materialQuiz.survey.empty.title":"설문조사 준비 중 입니다.","materialQuiz.survey.empty.description":"설문지 게시 후 다시 확인해주세요!","materialQuiz.submitStatus.success":"제출되었습니다.","materialQuiz.submitStatus.failure":"제출에 실패하였습니다.","materialQuiz.resultStatus.correct":"정답","materialQuiz.resultStatus.wrong":"오답","materialQuiz.resultStatus.submitted":"제출완료","materialQuiz.explanation.close":"퀴즈해설 닫기","materialQuiz.explanation.show":"퀴즈 해설 보기","materialQuiz.explanation.empty":"작성된 해설이 없습니다.","materialQuiz.text.placeholder":"답안을 작성해 주세요.","materialQuiz.text.correct":"정답입니다.","materialQuiz.text.wrong":"오답입니다. 다시 답안을 제출해보세요.","materialQuiz.order.answerEmpty":"항목을 다시 이곳으로 옮길 수 있습니다.","materialQuiz.bottomSheet.title":"보기","materialQuiz.bottomSheet.optionEmpty":"모든 보기를 그룹에 배치하였습니다.","materialQuiz.dropzone.desktop.answerEmpty":"보기를 영역에 끌어 넣어주세요.","materialQuiz.dropzone.mobile.answerEmpty":"이곳을 클릭하여 보기를 넣어주세요.","materialQuiz.dropzone.optionEmpty":"보기","materialQuiz.dropzone.optionReset":"답안 초기화"
|
|
5
|
+
var messageKo = {"materialQuiz.anchorLabel.question":"지문","materialQuiz.anchorLabel.answer":"답안","materialQuiz.error":"퀴즈를 불러오는데 실패했습니다.\n잠시 후 다시 시도해주세요.","materialQuiz.submit":"제출","materialQuiz.resubmit":"다시 제출","materialQuiz.submittedAnswer":"제출한 답","materialQuiz.answer":"정답","materialQuiz.next":"다음 문제로 이동 >","materialQuiz.selectOne.answer.title":"아래 보기에서 골라주세요.","materialQuiz.selectMultiple.answer.title":"아래 보기에서 골라주세요. (중복 선택 가능)","materialQuiz.selectMultipleOrder.answer.title":"답안을 드래그 앤 드롭하세요.","materialQuiz.text.answer.title":"답안을 작성해 주세요.","materialQuiz.empty.title":"퀴즈가 준비 중 입니다.","materialQuiz.empty.description":"퀴즈 게시 후 다시 확인해주세요!","materialQuiz.survey.empty.title":"설문조사 준비 중 입니다.","materialQuiz.survey.empty.description":"설문지 게시 후 다시 확인해주세요!","materialQuiz.submitStatus.success":"제출되었습니다.","materialQuiz.submitStatus.failure":"제출에 실패하였습니다.","materialQuiz.resultStatus.correct":"정답","materialQuiz.resultStatus.wrong":"오답","materialQuiz.resultStatus.submitted":"제출완료","materialQuiz.explanation.close":"퀴즈해설 닫기","materialQuiz.explanation.show":"퀴즈 해설 보기","materialQuiz.explanation.empty":"작성된 해설이 없습니다.","materialQuiz.text.placeholder":"답안을 작성해 주세요.","materialQuiz.text.correct":"정답입니다.","materialQuiz.text.wrong":"오답입니다. 다시 답안을 제출해보세요.","materialQuiz.order.answerEmpty":"항목을 다시 이곳으로 옮길 수 있습니다.","materialQuiz.bottomSheet.title":"보기","materialQuiz.bottomSheet.optionEmpty":"모든 보기를 그룹에 배치하였습니다.","materialQuiz.dropzone.desktop.answerEmpty":"보기를 영역에 끌어 넣어주세요.","materialQuiz.dropzone.mobile.answerEmpty":"이곳을 클릭하여 보기를 넣어주세요.","materialQuiz.dropzone.optionEmpty":"보기","materialQuiz.dropzone.optionReset":"답안 초기화"};
|
|
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.question":"ทางเดิน","materialQuiz.anchorLabel.answer":"ดคำตอบ","materialQuiz.error":"ไม่สามารถดึงควิซได้","materialQuiz.submit":"ส่งใบสมัคร","materialQuiz.resubmit":"ส่งอีกครั้ง","materialQuiz.submittedAnswer":"ฉันสามารถตอบคำถามเช่นนี้ได้","materialQuiz.answer":"ตอบ","materialQuiz.next":"คำถามถัดไป >","materialQuiz.selectOne.answer.title":"เลือกจากมุมมองด้านล่างนี้","materialQuiz.selectMultiple.answer.title":"เลือกจากรายการด้านล่าง (มีการเลือกที่ซ้ำซ้อน)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.text.answer.title":"กรุณากรอกคำตอบ","materialQuiz.empty.title":"ควิซกำลังเตรียมอยู่ตอนนี้","materialQuiz.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์ควิซ!","materialQuiz.survey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.submitStatus.success":"เสนอ","materialQuiz.submitStatus.failure":"การส่งล้มเหลว","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.wrong":"ผิด","materialQuiz.resultStatus.submitted":"เสนอ","materialQuiz.explanation.close":"ปิดคำอธิบายควิซ","materialQuiz.explanation.show":"แสดงคำอธิบายของควิซ","materialQuiz.explanation.empty":"ไม่ให้อธิบาย","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.bottomSheet.optionEmpty":"ทุกมุมมองได้ถูกวางไว้ในกลุ่มแล้ว","materialQuiz.dropzone.desktop.answerEmpty":"ลากมุมมองเข้าสู่พื้นที่","materialQuiz.dropzone.mobile.answerEmpty":"คลิกที่นี่เพื่อเพิ่มมุมมอง","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ"
|
|
5
|
+
var th = {"materialQuiz.anchorLabel.question":"ทางเดิน","materialQuiz.anchorLabel.answer":"ดคำตอบ","materialQuiz.error":"ไม่สามารถดึงควิซได้","materialQuiz.submit":"ส่งใบสมัคร","materialQuiz.resubmit":"ส่งอีกครั้ง","materialQuiz.submittedAnswer":"ฉันสามารถตอบคำถามเช่นนี้ได้","materialQuiz.answer":"ตอบ","materialQuiz.next":"คำถามถัดไป >","materialQuiz.selectOne.answer.title":"เลือกจากมุมมองด้านล่างนี้","materialQuiz.selectMultiple.answer.title":"เลือกจากรายการด้านล่าง (มีการเลือกที่ซ้ำซ้อน)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.text.answer.title":"กรุณากรอกคำตอบ","materialQuiz.empty.title":"ควิซกำลังเตรียมอยู่ตอนนี้","materialQuiz.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์ควิซ!","materialQuiz.survey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.submitStatus.success":"เสนอ","materialQuiz.submitStatus.failure":"การส่งล้มเหลว","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.wrong":"ผิด","materialQuiz.resultStatus.submitted":"เสนอ","materialQuiz.explanation.close":"ปิดคำอธิบายควิซ","materialQuiz.explanation.show":"แสดงคำอธิบายของควิซ","materialQuiz.explanation.empty":"ไม่ให้อธิบาย","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.bottomSheet.optionEmpty":"ทุกมุมมองได้ถูกวางไว้ในกลุ่มแล้ว","materialQuiz.dropzone.desktop.answerEmpty":"ลากมุมมองเข้าสู่พื้นที่","materialQuiz.dropzone.mobile.answerEmpty":"คลิกที่นี่เพื่อเพิ่มมุมมอง","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ"};
|
|
6
6
|
|
|
7
7
|
exports.default = th;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QuizResultStatus } from '../../helpers';
|
|
3
2
|
import type { ButtonProps } from '@elice/blocks';
|
|
4
3
|
import type { UseMeasureRef } from 'react-use/lib/useMeasure';
|
|
5
4
|
interface QuestionBoxProps {
|
|
@@ -11,8 +10,6 @@ interface QuestionBoxProps {
|
|
|
11
10
|
onNext?: () => void;
|
|
12
11
|
isNextActive?: boolean;
|
|
13
12
|
bodyContainerRef?: UseMeasureRef<HTMLDivElement>;
|
|
14
|
-
questionStatus?: QuizResultStatus;
|
|
15
|
-
instructionText?: string;
|
|
16
13
|
}
|
|
17
14
|
export declare const StyledQuestionBox: import("styled-components").StyledComponent<"div", any, {
|
|
18
15
|
vertical: boolean;
|
|
@@ -14,7 +14,6 @@ var material = require('@mui/material');
|
|
|
14
14
|
var animateScrollTo = require('animated-scroll-to');
|
|
15
15
|
var styled = require('styled-components');
|
|
16
16
|
var element = require('../../constant/element.js');
|
|
17
|
-
var index = require('../../helpers/index.js');
|
|
18
17
|
var MaterialQuizContext = require('../material-quiz/context/MaterialQuizContext.js');
|
|
19
18
|
var mergeRefs = require('./utils/mergeRefs.js');
|
|
20
19
|
|
|
@@ -84,9 +83,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
84
83
|
var onNext = _a.onNext,
|
|
85
84
|
isNextActive = _a.isNextActive,
|
|
86
85
|
bodyContainerRef = _a.bodyContainerRef,
|
|
87
|
-
|
|
88
|
-
instructionText = _a.instructionText,
|
|
89
|
-
props = tslib.__rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "onNext", "isNextActive", "bodyContainerRef", "questionStatus", "instructionText"]);
|
|
86
|
+
props = tslib.__rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "onNext", "isNextActive", "bodyContainerRef"]);
|
|
90
87
|
var theme = material.useTheme();
|
|
91
88
|
var intl$1 = intl.useRawEliceIntl();
|
|
92
89
|
var _useMaterialQuizState = MaterialQuizContext.useMaterialQuizState(),
|
|
@@ -95,7 +92,6 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
95
92
|
var intersectionRef = React__default.default.useRef(null);
|
|
96
93
|
var headerRef = React__default.default.useRef(null);
|
|
97
94
|
var bodyRef = React__default.default.useRef(null);
|
|
98
|
-
var questionFeedbackRef = React__default.default.useRef(null);
|
|
99
95
|
var currentBodyRef = mergeRefs.mergeRefs(bodyContainerRef, bodyRef);
|
|
100
96
|
var hasFooter = footerActions.length > 0;
|
|
101
97
|
var visibleAnchorSection = vertical && isLongPassage;
|
|
@@ -105,19 +101,6 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
105
101
|
threshold: 0.1
|
|
106
102
|
});
|
|
107
103
|
var isViewingAnswerContainer = Boolean(intersection === null || intersection === void 0 ? void 0 : intersection.isIntersecting);
|
|
108
|
-
React.useEffect(function () {
|
|
109
|
-
var content = '';
|
|
110
|
-
if (questionStatus === index.QuizResultStatus.Correct) {
|
|
111
|
-
content = intl$1.formatMessage({
|
|
112
|
-
id: 'materialQuiz.a11y.correct-answer'
|
|
113
|
-
});
|
|
114
|
-
} else if (questionStatus === index.QuizResultStatus.Wrong) {
|
|
115
|
-
content = intl$1.formatMessage({
|
|
116
|
-
id: 'materialQuiz.a11y.incorrect-answer'
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
questionFeedbackRef.current && (questionFeedbackRef.current.textContent = content);
|
|
120
|
-
}, [questionStatus, intl$1]);
|
|
121
104
|
React.useEffect(function () {
|
|
122
105
|
var answerContainer = document.getElementById(element.MATERIAL_QUIZ_ANSWER_ID);
|
|
123
106
|
// only enable for vertical mode
|
|
@@ -163,7 +146,6 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
163
146
|
color: designTokens.base.color.primary3,
|
|
164
147
|
marginRight: '0.5rem'
|
|
165
148
|
},
|
|
166
|
-
"aria-hidden": true,
|
|
167
149
|
children: titlePrefix
|
|
168
150
|
}) : null, jsxRuntime.jsx(blocks.Text, {
|
|
169
151
|
bold: true,
|
|
@@ -172,11 +154,8 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
172
154
|
wordBreak: "break-word",
|
|
173
155
|
children: title
|
|
174
156
|
})]
|
|
175
|
-
}), submitResult ? jsxRuntime.jsx(
|
|
176
|
-
|
|
177
|
-
children: jsxRuntime.jsx(blocks.Box, {
|
|
178
|
-
children: submitResult
|
|
179
|
-
})
|
|
157
|
+
}), submitResult ? jsxRuntime.jsx(blocks.Box, {
|
|
158
|
+
children: submitResult
|
|
180
159
|
}) : null]
|
|
181
160
|
}) : null;
|
|
182
161
|
var body = jsxRuntime.jsx(StyledQuestionBoxBody, {
|
|
@@ -267,29 +246,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
267
246
|
};
|
|
268
247
|
return jsxRuntime.jsxs(StyledQuestionBox, Object.assign({}, props, {
|
|
269
248
|
vertical: vertical,
|
|
270
|
-
children: [
|
|
271
|
-
id: "instruction-text",
|
|
272
|
-
"aria-live": "assertive",
|
|
273
|
-
"aria-atomic": "true",
|
|
274
|
-
style: {
|
|
275
|
-
position: 'absolute',
|
|
276
|
-
margin: '-1px',
|
|
277
|
-
width: '1px',
|
|
278
|
-
height: '1px',
|
|
279
|
-
overflow: 'hidden'
|
|
280
|
-
},
|
|
281
|
-
children: instructionText
|
|
282
|
-
}), header, renderContent(), _renderAnchorSection(), jsxRuntime.jsx("div", {
|
|
283
|
-
ref: questionFeedbackRef,
|
|
284
|
-
"aria-live": "polite",
|
|
285
|
-
style: {
|
|
286
|
-
position: 'absolute',
|
|
287
|
-
margin: '-1px',
|
|
288
|
-
width: '1px',
|
|
289
|
-
height: '1px',
|
|
290
|
-
overflow: 'hidden'
|
|
291
|
-
}
|
|
292
|
-
})]
|
|
249
|
+
children: [header, renderContent(), _renderAnchorSection()]
|
|
293
250
|
}));
|
|
294
251
|
};
|
|
295
252
|
|
|
@@ -6,7 +6,7 @@ import { base } from '@elice/design-tokens';
|
|
|
6
6
|
import { useRawEliceIntl } from '@elice/intl';
|
|
7
7
|
import { useTheme, Stack } from '@mui/material';
|
|
8
8
|
import { MATERIAL_QUIZ_PASSIVE_ID, MATERIAL_QUIZ_ANSWER_ID } from '../../constant/element.js';
|
|
9
|
-
import { checkUserLectureTestEnded,
|
|
9
|
+
import { checkUserLectureTestEnded, shouldResetOptions, getOptionStatus, getQuizResult } from '../../helpers/index.js';
|
|
10
10
|
import { useCaculatePassage } from '../../hooks/useCaculatePassage.js';
|
|
11
11
|
import '../shared/QuizDraggbleDroppedOption.js';
|
|
12
12
|
import '../shared/QuizDraggbleDummyOption.js';
|
|
@@ -65,7 +65,6 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
65
65
|
setHasSubmitted = _React$useState10[1];
|
|
66
66
|
var isNextActive = hasSubmitted && typeof onNext === 'function';
|
|
67
67
|
var isDisabled = selectedAnswer.length === 0 || checkUserLectureTestEnded(lecture) || !!userId;
|
|
68
|
-
var questionStatus = hasSubmitted ? getQuizResultStatus(materialQuizResponse) : undefined;
|
|
69
68
|
// answer select handler
|
|
70
69
|
var handleAnswerSelect = function handleAnswerSelect(index) {
|
|
71
70
|
if (checkUserLectureTestEnded(lecture) || !!userId) {
|
|
@@ -217,10 +216,6 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
217
216
|
color: isNextActive ? theme.palette.secondary.contrastText : isDisabled ? base.color.gray3 : theme.palette.primary.contrastText
|
|
218
217
|
}
|
|
219
218
|
}],
|
|
220
|
-
questionStatus: questionStatus,
|
|
221
|
-
instructionText: intl.formatMessage({
|
|
222
|
-
id: 'materialQuiz.a11y.instruction-text.multiple-choice'
|
|
223
|
-
}),
|
|
224
219
|
children: jsxs(Stack, {
|
|
225
220
|
height: "100%",
|
|
226
221
|
gap: "1rem",
|
|
@@ -6,7 +6,7 @@ import { base } from '@elice/design-tokens';
|
|
|
6
6
|
import { useRawEliceIntl } from '@elice/intl';
|
|
7
7
|
import { useTheme, Stack } from '@mui/material';
|
|
8
8
|
import { MATERIAL_QUIZ_PASSIVE_ID, MATERIAL_QUIZ_ANSWER_ID } from '../../constant/element.js';
|
|
9
|
-
import { checkUserLectureTestEnded,
|
|
9
|
+
import { checkUserLectureTestEnded, getOptionStatus, getQuizResult } from '../../helpers/index.js';
|
|
10
10
|
import { useCaculatePassage } from '../../hooks/useCaculatePassage.js';
|
|
11
11
|
import '../shared/QuizDraggbleDroppedOption.js';
|
|
12
12
|
import '../shared/QuizDraggbleDummyOption.js';
|
|
@@ -65,7 +65,6 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
65
65
|
setHasSubmitted = _React$useState10[1];
|
|
66
66
|
var isNextActive = hasSubmitted && typeof onNext === 'function';
|
|
67
67
|
var isDisabled = selectedAnswer === undefined || checkUserLectureTestEnded(lecture) || !!userId;
|
|
68
|
-
var questionStatus = hasSubmitted ? getQuizResultStatus(materialQuizResponse) : undefined;
|
|
69
68
|
// answer select handler
|
|
70
69
|
var handleAnswerSelect = function handleAnswerSelect(index) {
|
|
71
70
|
if (checkUserLectureTestEnded(lecture) || !!userId) {
|
|
@@ -206,10 +205,6 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
206
205
|
color: isNextActive ? theme.palette.secondary.contrastText : isDisabled ? base.color.gray3 : theme.palette.primary.contrastText
|
|
207
206
|
}
|
|
208
207
|
}],
|
|
209
|
-
questionStatus: questionStatus,
|
|
210
|
-
instructionText: intl.formatMessage({
|
|
211
|
-
id: 'materialQuiz.a11y.instruction-text.single-choice'
|
|
212
|
-
}),
|
|
213
208
|
children: jsxs(Stack, {
|
|
214
209
|
height: "100%",
|
|
215
210
|
gap: "1rem",
|
|
@@ -8,7 +8,7 @@ import { useRawEliceIntl } from '@elice/intl';
|
|
|
8
8
|
import { useTheme, Stack } from '@mui/material';
|
|
9
9
|
import styled from 'styled-components';
|
|
10
10
|
import { MATERIAL_QUIZ_PASSIVE_ID, MATERIAL_QUIZ_ANSWER_ID } from '../../constant/element.js';
|
|
11
|
-
import { checkUserLectureTestEnded,
|
|
11
|
+
import { checkUserLectureTestEnded, getQuizResult } from '../../helpers/index.js';
|
|
12
12
|
import { useCaculatePassage } from '../../hooks/useCaculatePassage.js';
|
|
13
13
|
import QuestionBox from '../shared/QuestionBox.js';
|
|
14
14
|
import { useMaterialQuizState, useMaterialQuizDispatch } from './context/MaterialQuizContext.js';
|
|
@@ -62,7 +62,6 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
62
62
|
setHasSubmitted = _React$useState8[1];
|
|
63
63
|
var isNextActive = hasSubmitted && typeof onNext === 'function';
|
|
64
64
|
var isDisabled = answer.length === 0 || checkUserLectureTestEnded(lecture) || !!userId;
|
|
65
|
-
var questionStatus = hasSubmitted ? getQuizResultStatus(materialQuizResponse) : undefined;
|
|
66
65
|
// quiz response fetcher
|
|
67
66
|
React.useEffect(function () {
|
|
68
67
|
if (!userId && (materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.lastQuizResponseId)) {
|
|
@@ -204,10 +203,6 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
204
203
|
color: isNextActive ? theme.palette.secondary.contrastText : isDisabled ? base.color.gray3 : theme.palette.primary.contrastText
|
|
205
204
|
}
|
|
206
205
|
}],
|
|
207
|
-
questionStatus: questionStatus,
|
|
208
|
-
instructionText: intl.formatMessage({
|
|
209
|
-
id: 'materialQuiz.a11y.instruction-text.quiz-text'
|
|
210
|
-
}),
|
|
211
206
|
children: jsxs(Stack, {
|
|
212
207
|
height: "100%",
|
|
213
208
|
gap: "1rem",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var messageEn = {"materialQuiz.anchorLabel.question":"Passage","materialQuiz.anchorLabel.answer":"Answer","materialQuiz.error":"Failed to fetch quiz","materialQuiz.submit":"Submit","materialQuiz.resubmit":"Resubmit","materialQuiz.submittedAnswer":"Submitted Answer","materialQuiz.answer":"Answer","materialQuiz.next":"Next question >","materialQuiz.selectOne.answer.title":"Choose from the views below.","materialQuiz.selectMultiple.answer.title":"Choose from the views below. (Redundant selections available)","materialQuiz.selectMultipleOrder.answer.title":"Drag and drop your answers.","materialQuiz.text.answer.title":"Please fill out the answer.","materialQuiz.empty.title":"Quiz is now preparing.","materialQuiz.empty.description":"Please check again after quiz posting!","materialQuiz.survey.empty.title":"Survey is now preparing.","materialQuiz.survey.empty.description":"Please check again after survey posting!","materialQuiz.submitStatus.success":"Submitted","materialQuiz.submitStatus.failure":"Failed to submit","materialQuiz.resultStatus.correct":"Correct","materialQuiz.resultStatus.wrong":"Wrong","materialQuiz.resultStatus.submitted":"Submitted","materialQuiz.explanation.close":"close quiz explanations","materialQuiz.explanation.show":"show quiz explanations","materialQuiz.explanation.empty":"no explanations","materialQuiz.text.placeholder":"please fill the answer","materialQuiz.text.correct":"that's correct!","materialQuiz.text.wrong":"that's wrong. try it again!","materialQuiz.order.answerEmpty":"You could move the options back here","materialQuiz.bottomSheet.title":"Options","materialQuiz.bottomSheet.optionEmpty":"All views have been placed in the group.","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"
|
|
1
|
+
var messageEn = {"materialQuiz.anchorLabel.question":"Passage","materialQuiz.anchorLabel.answer":"Answer","materialQuiz.error":"Failed to fetch quiz","materialQuiz.submit":"Submit","materialQuiz.resubmit":"Resubmit","materialQuiz.submittedAnswer":"Submitted Answer","materialQuiz.answer":"Answer","materialQuiz.next":"Next question >","materialQuiz.selectOne.answer.title":"Choose from the views below.","materialQuiz.selectMultiple.answer.title":"Choose from the views below. (Redundant selections available)","materialQuiz.selectMultipleOrder.answer.title":"Drag and drop your answers.","materialQuiz.text.answer.title":"Please fill out the answer.","materialQuiz.empty.title":"Quiz is now preparing.","materialQuiz.empty.description":"Please check again after quiz posting!","materialQuiz.survey.empty.title":"Survey is now preparing.","materialQuiz.survey.empty.description":"Please check again after survey posting!","materialQuiz.submitStatus.success":"Submitted","materialQuiz.submitStatus.failure":"Failed to submit","materialQuiz.resultStatus.correct":"Correct","materialQuiz.resultStatus.wrong":"Wrong","materialQuiz.resultStatus.submitted":"Submitted","materialQuiz.explanation.close":"close quiz explanations","materialQuiz.explanation.show":"show quiz explanations","materialQuiz.explanation.empty":"no explanations","materialQuiz.text.placeholder":"please fill the answer","materialQuiz.text.correct":"that's correct!","materialQuiz.text.wrong":"that's wrong. try it again!","materialQuiz.order.answerEmpty":"You could move the options back here","materialQuiz.bottomSheet.title":"Options","materialQuiz.bottomSheet.optionEmpty":"All views have been placed in the group.","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"};
|
|
2
2
|
|
|
3
3
|
export { messageEn as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var ja = {"materialQuiz.anchorLabel.question":"文章","materialQuiz.anchorLabel.answer":"回答","materialQuiz.error":"クイズの取得に失敗しました。","materialQuiz.submit":"提出","materialQuiz.resubmit":"再送信","materialQuiz.submittedAnswer":"提出された回答","materialQuiz.answer":"回答","materialQuiz.next":"次の質問 >","materialQuiz.selectOne.answer.title":"以下から選択してください。","materialQuiz.selectMultiple.answer.title":"以下から選択してください。 (冗長な選択肢も利用可能)","materialQuiz.selectMultipleOrder.answer.title":"ドラッグして回答をドロップしてください。","materialQuiz.text.answer.title":"回答を記入してください。","materialQuiz.empty.title":"クイズは今準備中です。","materialQuiz.empty.description":"クイズの投稿後にもう一度確認してください!","materialQuiz.survey.empty.title":"調査は現在準備中です。","materialQuiz.survey.empty.description":"調査投稿後にもう一度ご確認ください!","materialQuiz.submitStatus.success":"提出済","materialQuiz.submitStatus.failure":"提出に失敗しました。","materialQuiz.resultStatus.correct":"正しい","materialQuiz.resultStatus.wrong":"間違った","materialQuiz.resultStatus.submitted":"提出済","materialQuiz.explanation.close":"クイズの説明を閉じる","materialQuiz.explanation.show":"クイズの説明を表示します","materialQuiz.explanation.empty":"いいです。","materialQuiz.text.placeholder":"回答を入力してください","materialQuiz.text.correct":"その通りです!","materialQuiz.text.wrong":"それは間違っています。もう一度やってみてください!","materialQuiz.order.answerEmpty":"オプションをここに戻すことができます。","materialQuiz.bottomSheet.title":"オプション","materialQuiz.bottomSheet.optionEmpty":"すべてのビューがグループに配置されました。","materialQuiz.dropzone.desktop.answerEmpty":"ビューをエリアにドラッグしてください。","materialQuiz.dropzone.mobile.answerEmpty":"ここをクリックしてビューを追加してください。","materialQuiz.dropzone.optionEmpty":"オプション","materialQuiz.dropzone.optionReset":"回答をリセットします"
|
|
1
|
+
var ja = {"materialQuiz.anchorLabel.question":"文章","materialQuiz.anchorLabel.answer":"回答","materialQuiz.error":"クイズの取得に失敗しました。","materialQuiz.submit":"提出","materialQuiz.resubmit":"再送信","materialQuiz.submittedAnswer":"提出された回答","materialQuiz.answer":"回答","materialQuiz.next":"次の質問 >","materialQuiz.selectOne.answer.title":"以下から選択してください。","materialQuiz.selectMultiple.answer.title":"以下から選択してください。 (冗長な選択肢も利用可能)","materialQuiz.selectMultipleOrder.answer.title":"ドラッグして回答をドロップしてください。","materialQuiz.text.answer.title":"回答を記入してください。","materialQuiz.empty.title":"クイズは今準備中です。","materialQuiz.empty.description":"クイズの投稿後にもう一度確認してください!","materialQuiz.survey.empty.title":"調査は現在準備中です。","materialQuiz.survey.empty.description":"調査投稿後にもう一度ご確認ください!","materialQuiz.submitStatus.success":"提出済","materialQuiz.submitStatus.failure":"提出に失敗しました。","materialQuiz.resultStatus.correct":"正しい","materialQuiz.resultStatus.wrong":"間違った","materialQuiz.resultStatus.submitted":"提出済","materialQuiz.explanation.close":"クイズの説明を閉じる","materialQuiz.explanation.show":"クイズの説明を表示します","materialQuiz.explanation.empty":"いいです。","materialQuiz.text.placeholder":"回答を入力してください","materialQuiz.text.correct":"その通りです!","materialQuiz.text.wrong":"それは間違っています。もう一度やってみてください!","materialQuiz.order.answerEmpty":"オプションをここに戻すことができます。","materialQuiz.bottomSheet.title":"オプション","materialQuiz.bottomSheet.optionEmpty":"すべてのビューがグループに配置されました。","materialQuiz.dropzone.desktop.answerEmpty":"ビューをエリアにドラッグしてください。","materialQuiz.dropzone.mobile.answerEmpty":"ここをクリックしてビューを追加してください。","materialQuiz.dropzone.optionEmpty":"オプション","materialQuiz.dropzone.optionReset":"回答をリセットします"};
|
|
2
2
|
|
|
3
3
|
export { ja as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var messageKo = {"materialQuiz.anchorLabel.question":"지문","materialQuiz.anchorLabel.answer":"답안","materialQuiz.error":"퀴즈를 불러오는데 실패했습니다.\n잠시 후 다시 시도해주세요.","materialQuiz.submit":"제출","materialQuiz.resubmit":"다시 제출","materialQuiz.submittedAnswer":"제출한 답","materialQuiz.answer":"정답","materialQuiz.next":"다음 문제로 이동 >","materialQuiz.selectOne.answer.title":"아래 보기에서 골라주세요.","materialQuiz.selectMultiple.answer.title":"아래 보기에서 골라주세요. (중복 선택 가능)","materialQuiz.selectMultipleOrder.answer.title":"답안을 드래그 앤 드롭하세요.","materialQuiz.text.answer.title":"답안을 작성해 주세요.","materialQuiz.empty.title":"퀴즈가 준비 중 입니다.","materialQuiz.empty.description":"퀴즈 게시 후 다시 확인해주세요!","materialQuiz.survey.empty.title":"설문조사 준비 중 입니다.","materialQuiz.survey.empty.description":"설문지 게시 후 다시 확인해주세요!","materialQuiz.submitStatus.success":"제출되었습니다.","materialQuiz.submitStatus.failure":"제출에 실패하였습니다.","materialQuiz.resultStatus.correct":"정답","materialQuiz.resultStatus.wrong":"오답","materialQuiz.resultStatus.submitted":"제출완료","materialQuiz.explanation.close":"퀴즈해설 닫기","materialQuiz.explanation.show":"퀴즈 해설 보기","materialQuiz.explanation.empty":"작성된 해설이 없습니다.","materialQuiz.text.placeholder":"답안을 작성해 주세요.","materialQuiz.text.correct":"정답입니다.","materialQuiz.text.wrong":"오답입니다. 다시 답안을 제출해보세요.","materialQuiz.order.answerEmpty":"항목을 다시 이곳으로 옮길 수 있습니다.","materialQuiz.bottomSheet.title":"보기","materialQuiz.bottomSheet.optionEmpty":"모든 보기를 그룹에 배치하였습니다.","materialQuiz.dropzone.desktop.answerEmpty":"보기를 영역에 끌어 넣어주세요.","materialQuiz.dropzone.mobile.answerEmpty":"이곳을 클릭하여 보기를 넣어주세요.","materialQuiz.dropzone.optionEmpty":"보기","materialQuiz.dropzone.optionReset":"답안 초기화"
|
|
1
|
+
var messageKo = {"materialQuiz.anchorLabel.question":"지문","materialQuiz.anchorLabel.answer":"답안","materialQuiz.error":"퀴즈를 불러오는데 실패했습니다.\n잠시 후 다시 시도해주세요.","materialQuiz.submit":"제출","materialQuiz.resubmit":"다시 제출","materialQuiz.submittedAnswer":"제출한 답","materialQuiz.answer":"정답","materialQuiz.next":"다음 문제로 이동 >","materialQuiz.selectOne.answer.title":"아래 보기에서 골라주세요.","materialQuiz.selectMultiple.answer.title":"아래 보기에서 골라주세요. (중복 선택 가능)","materialQuiz.selectMultipleOrder.answer.title":"답안을 드래그 앤 드롭하세요.","materialQuiz.text.answer.title":"답안을 작성해 주세요.","materialQuiz.empty.title":"퀴즈가 준비 중 입니다.","materialQuiz.empty.description":"퀴즈 게시 후 다시 확인해주세요!","materialQuiz.survey.empty.title":"설문조사 준비 중 입니다.","materialQuiz.survey.empty.description":"설문지 게시 후 다시 확인해주세요!","materialQuiz.submitStatus.success":"제출되었습니다.","materialQuiz.submitStatus.failure":"제출에 실패하였습니다.","materialQuiz.resultStatus.correct":"정답","materialQuiz.resultStatus.wrong":"오답","materialQuiz.resultStatus.submitted":"제출완료","materialQuiz.explanation.close":"퀴즈해설 닫기","materialQuiz.explanation.show":"퀴즈 해설 보기","materialQuiz.explanation.empty":"작성된 해설이 없습니다.","materialQuiz.text.placeholder":"답안을 작성해 주세요.","materialQuiz.text.correct":"정답입니다.","materialQuiz.text.wrong":"오답입니다. 다시 답안을 제출해보세요.","materialQuiz.order.answerEmpty":"항목을 다시 이곳으로 옮길 수 있습니다.","materialQuiz.bottomSheet.title":"보기","materialQuiz.bottomSheet.optionEmpty":"모든 보기를 그룹에 배치하였습니다.","materialQuiz.dropzone.desktop.answerEmpty":"보기를 영역에 끌어 넣어주세요.","materialQuiz.dropzone.mobile.answerEmpty":"이곳을 클릭하여 보기를 넣어주세요.","materialQuiz.dropzone.optionEmpty":"보기","materialQuiz.dropzone.optionReset":"답안 초기화"};
|
|
2
2
|
|
|
3
3
|
export { messageKo as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var th = {"materialQuiz.anchorLabel.question":"ทางเดิน","materialQuiz.anchorLabel.answer":"ดคำตอบ","materialQuiz.error":"ไม่สามารถดึงควิซได้","materialQuiz.submit":"ส่งใบสมัคร","materialQuiz.resubmit":"ส่งอีกครั้ง","materialQuiz.submittedAnswer":"ฉันสามารถตอบคำถามเช่นนี้ได้","materialQuiz.answer":"ตอบ","materialQuiz.next":"คำถามถัดไป >","materialQuiz.selectOne.answer.title":"เลือกจากมุมมองด้านล่างนี้","materialQuiz.selectMultiple.answer.title":"เลือกจากรายการด้านล่าง (มีการเลือกที่ซ้ำซ้อน)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.text.answer.title":"กรุณากรอกคำตอบ","materialQuiz.empty.title":"ควิซกำลังเตรียมอยู่ตอนนี้","materialQuiz.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์ควิซ!","materialQuiz.survey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.submitStatus.success":"เสนอ","materialQuiz.submitStatus.failure":"การส่งล้มเหลว","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.wrong":"ผิด","materialQuiz.resultStatus.submitted":"เสนอ","materialQuiz.explanation.close":"ปิดคำอธิบายควิซ","materialQuiz.explanation.show":"แสดงคำอธิบายของควิซ","materialQuiz.explanation.empty":"ไม่ให้อธิบาย","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.bottomSheet.optionEmpty":"ทุกมุมมองได้ถูกวางไว้ในกลุ่มแล้ว","materialQuiz.dropzone.desktop.answerEmpty":"ลากมุมมองเข้าสู่พื้นที่","materialQuiz.dropzone.mobile.answerEmpty":"คลิกที่นี่เพื่อเพิ่มมุมมอง","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ"
|
|
1
|
+
var th = {"materialQuiz.anchorLabel.question":"ทางเดิน","materialQuiz.anchorLabel.answer":"ดคำตอบ","materialQuiz.error":"ไม่สามารถดึงควิซได้","materialQuiz.submit":"ส่งใบสมัคร","materialQuiz.resubmit":"ส่งอีกครั้ง","materialQuiz.submittedAnswer":"ฉันสามารถตอบคำถามเช่นนี้ได้","materialQuiz.answer":"ตอบ","materialQuiz.next":"คำถามถัดไป >","materialQuiz.selectOne.answer.title":"เลือกจากมุมมองด้านล่างนี้","materialQuiz.selectMultiple.answer.title":"เลือกจากรายการด้านล่าง (มีการเลือกที่ซ้ำซ้อน)","materialQuiz.selectMultipleOrder.answer.title":"ลากและวางคำตอบของคุณ","materialQuiz.text.answer.title":"กรุณากรอกคำตอบ","materialQuiz.empty.title":"ควิซกำลังเตรียมอยู่ตอนนี้","materialQuiz.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์ควิซ!","materialQuiz.survey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialQuiz.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialQuiz.submitStatus.success":"เสนอ","materialQuiz.submitStatus.failure":"การส่งล้มเหลว","materialQuiz.resultStatus.correct":"ถูกต้อง","materialQuiz.resultStatus.wrong":"ผิด","materialQuiz.resultStatus.submitted":"เสนอ","materialQuiz.explanation.close":"ปิดคำอธิบายควิซ","materialQuiz.explanation.show":"แสดงคำอธิบายของควิซ","materialQuiz.explanation.empty":"ไม่ให้อธิบาย","materialQuiz.text.placeholder":"กรุณากรอกคำตอบ","materialQuiz.text.correct":"ถูกต้อง!","materialQuiz.text.wrong":"นั่นผิด ลองอีกครั้ง!","materialQuiz.order.answerEmpty":"คุณสามารถย้ายตัวเลือกกลับมาที่นี่ได้","materialQuiz.bottomSheet.title":"ตัวเลือก","materialQuiz.bottomSheet.optionEmpty":"ทุกมุมมองได้ถูกวางไว้ในกลุ่มแล้ว","materialQuiz.dropzone.desktop.answerEmpty":"ลากมุมมองเข้าสู่พื้นที่","materialQuiz.dropzone.mobile.answerEmpty":"คลิกที่นี่เพื่อเพิ่มมุมมอง","materialQuiz.dropzone.optionEmpty":"ตัวเลือก","materialQuiz.dropzone.optionReset":"รีเซ็ตคำตอบ"};
|
|
2
2
|
|
|
3
3
|
export { th as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QuizResultStatus } from '../../helpers';
|
|
3
2
|
import type { ButtonProps } from '@elice/blocks';
|
|
4
3
|
import type { UseMeasureRef } from 'react-use/lib/useMeasure';
|
|
5
4
|
interface QuestionBoxProps {
|
|
@@ -11,8 +10,6 @@ interface QuestionBoxProps {
|
|
|
11
10
|
onNext?: () => void;
|
|
12
11
|
isNextActive?: boolean;
|
|
13
12
|
bodyContainerRef?: UseMeasureRef<HTMLDivElement>;
|
|
14
|
-
questionStatus?: QuizResultStatus;
|
|
15
|
-
instructionText?: string;
|
|
16
13
|
}
|
|
17
14
|
export declare const StyledQuestionBox: import("styled-components").StyledComponent<"div", any, {
|
|
18
15
|
vertical: boolean;
|
|
@@ -10,7 +10,6 @@ import { useTheme } from '@mui/material';
|
|
|
10
10
|
import animateScrollTo from 'animated-scroll-to';
|
|
11
11
|
import styled from 'styled-components';
|
|
12
12
|
import { MATERIAL_QUIZ_ANSWER_ID, MATERIAL_QUIZ_PASSIVE_ID } from '../../constant/element.js';
|
|
13
|
-
import { QuizResultStatus } from '../../helpers/index.js';
|
|
14
13
|
import { useMaterialQuizState } from '../material-quiz/context/MaterialQuizContext.js';
|
|
15
14
|
import { mergeRefs } from './utils/mergeRefs.js';
|
|
16
15
|
|
|
@@ -74,9 +73,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
74
73
|
var onNext = _a.onNext,
|
|
75
74
|
isNextActive = _a.isNextActive,
|
|
76
75
|
bodyContainerRef = _a.bodyContainerRef,
|
|
77
|
-
|
|
78
|
-
instructionText = _a.instructionText,
|
|
79
|
-
props = __rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "onNext", "isNextActive", "bodyContainerRef", "questionStatus", "instructionText"]);
|
|
76
|
+
props = __rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "onNext", "isNextActive", "bodyContainerRef"]);
|
|
80
77
|
var theme = useTheme();
|
|
81
78
|
var intl = useRawEliceIntl();
|
|
82
79
|
var _useMaterialQuizState = useMaterialQuizState(),
|
|
@@ -85,7 +82,6 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
85
82
|
var intersectionRef = React.useRef(null);
|
|
86
83
|
var headerRef = React.useRef(null);
|
|
87
84
|
var bodyRef = React.useRef(null);
|
|
88
|
-
var questionFeedbackRef = React.useRef(null);
|
|
89
85
|
var currentBodyRef = mergeRefs(bodyContainerRef, bodyRef);
|
|
90
86
|
var hasFooter = footerActions.length > 0;
|
|
91
87
|
var visibleAnchorSection = vertical && isLongPassage;
|
|
@@ -95,19 +91,6 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
95
91
|
threshold: 0.1
|
|
96
92
|
});
|
|
97
93
|
var isViewingAnswerContainer = Boolean(intersection === null || intersection === void 0 ? void 0 : intersection.isIntersecting);
|
|
98
|
-
useEffect(function () {
|
|
99
|
-
var content = '';
|
|
100
|
-
if (questionStatus === QuizResultStatus.Correct) {
|
|
101
|
-
content = intl.formatMessage({
|
|
102
|
-
id: 'materialQuiz.a11y.correct-answer'
|
|
103
|
-
});
|
|
104
|
-
} else if (questionStatus === QuizResultStatus.Wrong) {
|
|
105
|
-
content = intl.formatMessage({
|
|
106
|
-
id: 'materialQuiz.a11y.incorrect-answer'
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
questionFeedbackRef.current && (questionFeedbackRef.current.textContent = content);
|
|
110
|
-
}, [questionStatus, intl]);
|
|
111
94
|
useEffect(function () {
|
|
112
95
|
var answerContainer = document.getElementById(MATERIAL_QUIZ_ANSWER_ID);
|
|
113
96
|
// only enable for vertical mode
|
|
@@ -153,7 +136,6 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
153
136
|
color: base.color.primary3,
|
|
154
137
|
marginRight: '0.5rem'
|
|
155
138
|
},
|
|
156
|
-
"aria-hidden": true,
|
|
157
139
|
children: titlePrefix
|
|
158
140
|
}) : null, jsx(Text, {
|
|
159
141
|
bold: true,
|
|
@@ -162,11 +144,8 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
162
144
|
wordBreak: "break-word",
|
|
163
145
|
children: title
|
|
164
146
|
})]
|
|
165
|
-
}), submitResult ? jsx(
|
|
166
|
-
|
|
167
|
-
children: jsx(Box, {
|
|
168
|
-
children: submitResult
|
|
169
|
-
})
|
|
147
|
+
}), submitResult ? jsx(Box, {
|
|
148
|
+
children: submitResult
|
|
170
149
|
}) : null]
|
|
171
150
|
}) : null;
|
|
172
151
|
var body = jsx(StyledQuestionBoxBody, {
|
|
@@ -257,29 +236,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
257
236
|
};
|
|
258
237
|
return jsxs(StyledQuestionBox, Object.assign({}, props, {
|
|
259
238
|
vertical: vertical,
|
|
260
|
-
children: [
|
|
261
|
-
id: "instruction-text",
|
|
262
|
-
"aria-live": "assertive",
|
|
263
|
-
"aria-atomic": "true",
|
|
264
|
-
style: {
|
|
265
|
-
position: 'absolute',
|
|
266
|
-
margin: '-1px',
|
|
267
|
-
width: '1px',
|
|
268
|
-
height: '1px',
|
|
269
|
-
overflow: 'hidden'
|
|
270
|
-
},
|
|
271
|
-
children: instructionText
|
|
272
|
-
}), header, renderContent(), _renderAnchorSection(), jsx("div", {
|
|
273
|
-
ref: questionFeedbackRef,
|
|
274
|
-
"aria-live": "polite",
|
|
275
|
-
style: {
|
|
276
|
-
position: 'absolute',
|
|
277
|
-
margin: '-1px',
|
|
278
|
-
width: '1px',
|
|
279
|
-
height: '1px',
|
|
280
|
-
overflow: 'hidden'
|
|
281
|
-
}
|
|
282
|
-
})]
|
|
239
|
+
children: [header, renderContent(), _renderAnchorSection()]
|
|
283
240
|
}));
|
|
284
241
|
};
|
|
285
242
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-quiz",
|
|
3
|
-
"version": "1.240802.0
|
|
3
|
+
"version": "1.240802.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",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@dnd-kit/core": "^6.1.0",
|
|
62
62
|
"@elice/api-client": "^1.240619.0",
|
|
63
|
-
"@elice/blocks": "^1.
|
|
63
|
+
"@elice/blocks": "^1.240529.0",
|
|
64
64
|
"@elice/design-tokens": "^1.220803.0",
|
|
65
65
|
"@elice/icons": "^1.230814.0",
|
|
66
66
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
67
67
|
"@elice/intl": "0.240425.0-rc.2",
|
|
68
68
|
"@elice/markdown": "^1.240124.0",
|
|
69
|
-
"@elice/material-shared-types": "1.240802.0
|
|
70
|
-
"@elice/material-shared-utils": "1.240802.0
|
|
69
|
+
"@elice/material-shared-types": "1.240802.0",
|
|
70
|
+
"@elice/material-shared-utils": "1.240802.0",
|
|
71
71
|
"@elice/mui-system": "^5.240108.1",
|
|
72
72
|
"@elice/types": "1.240709.0",
|
|
73
73
|
"@elice/wysiwyg": "1.240716.1",
|