@elice/material-runbox 1.250311.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.
Files changed (43) hide show
  1. package/cjs/components/material-runbox/MaterialRunboxContent.d.ts +17 -0
  2. package/cjs/components/material-runbox/MaterialRunboxContent.js +17 -5
  3. package/cjs/components/material-runbox/MaterialRunboxHeader.js +10 -4
  4. package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +1 -1
  5. package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +12 -1
  6. package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +1 -1
  7. package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +3 -1
  8. package/cjs/components/material-runbox/actions/MaterialRunboxActionSubmitLog.d.ts +9 -0
  9. package/cjs/components/material-runbox/actions/MaterialRunboxActionSubmitLog.js +67 -0
  10. package/cjs/components/material-runbox/actions/MaterialRunboxActionSubmitLogDialog.d.ts +9 -0
  11. package/cjs/components/material-runbox/actions/MaterialRunboxActionSubmitLogDialog.js +196 -0
  12. package/cjs/components/material-runbox/hooks/useInfiniteRunboxRunboxIdGrade.d.ts +13 -0
  13. package/cjs/components/material-runbox/hooks/useInfiniteRunboxRunboxIdGrade.js +59 -0
  14. package/cjs/components/material-runbox/hooks/useRunboxControl.d.ts +1 -1
  15. package/cjs/components/material-runbox/hooks/useRunboxControl.js +5 -2
  16. package/cjs/components/material-runbox/locales/en.json.js +1 -1
  17. package/cjs/components/material-runbox/locales/ja.json.js +1 -1
  18. package/cjs/components/material-runbox/locales/ko.json.js +1 -1
  19. package/cjs/components/material-runbox/locales/th.json.js +1 -1
  20. package/cjs/components/material-runbox/runtime/Runtime.d.ts +7 -0
  21. package/cjs/components/material-runbox/runtime/Runtime.js +1 -1
  22. package/es/components/material-runbox/MaterialRunboxContent.d.ts +17 -0
  23. package/es/components/material-runbox/MaterialRunboxContent.js +17 -5
  24. package/es/components/material-runbox/MaterialRunboxHeader.js +10 -4
  25. package/es/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +1 -1
  26. package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +12 -1
  27. package/es/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +1 -1
  28. package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +3 -1
  29. package/es/components/material-runbox/actions/MaterialRunboxActionSubmitLog.d.ts +9 -0
  30. package/es/components/material-runbox/actions/MaterialRunboxActionSubmitLog.js +59 -0
  31. package/es/components/material-runbox/actions/MaterialRunboxActionSubmitLogDialog.d.ts +9 -0
  32. package/es/components/material-runbox/actions/MaterialRunboxActionSubmitLogDialog.js +187 -0
  33. package/es/components/material-runbox/hooks/useInfiniteRunboxRunboxIdGrade.d.ts +13 -0
  34. package/es/components/material-runbox/hooks/useInfiniteRunboxRunboxIdGrade.js +57 -0
  35. package/es/components/material-runbox/hooks/useRunboxControl.d.ts +1 -1
  36. package/es/components/material-runbox/hooks/useRunboxControl.js +5 -2
  37. package/es/components/material-runbox/locales/en.json.js +1 -1
  38. package/es/components/material-runbox/locales/ja.json.js +1 -1
  39. package/es/components/material-runbox/locales/ko.json.js +1 -1
  40. package/es/components/material-runbox/locales/th.json.js +1 -1
  41. package/es/components/material-runbox/runtime/Runtime.d.ts +7 -0
  42. package/es/components/material-runbox/runtime/Runtime.js +1 -1
  43. package/package.json +5 -4
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var messageKo = {"runbox.action.autoShutdown.title":"항상 켜두기","runbox.action.autoShutdown.tooltip.disabled":"해당 런타임은 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.action.autoShutdown.tooltip.enabled":"항상 켜두기를 설정하면 학습 {_termLibraryLecturePage} 밖으로 나가도 런타임이 종료되지 않습니다. 다만, 해당 런타임의 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.action.grade.dialog.description.error":"채점 중에 오류가 발생했습니다.","runbox.action.grade.dialog.description.success":"채점이 완료되었습니다.","runbox.action.grade.dialog.title":"채점 결과","runbox.action.grade.noti.error":"코드를 채점하는 도중 오류가 발생했습니다.","runbox.action.grade.title":"제출","runbox.action.grade.tooltip.onProgress":"코드 채점이 진행 중 입니다. 잠시만 기다려 주세요. 실습에 따라 채점이 최대 3분까지 소요될 수 있습니다.","runbox.action.reset.dialog.actions.confirm":"초기화","runbox.action.reset.dialog.description":"런박스 코드를 초기화하시겠습니까? 초기화 시 학습{_termLibraryLecturePage}의 코드가 기본 코드로 덮어씌워집니다.\n초기화 이후 런박스 세션이 새로고침 됩니다.","runbox.action.reset.noti.error":"런박스 코드를 초기화 하는 중에 오류가 발생했습니다.","runbox.action.reset.title":"코드 초기화","runbox.action.restart.dialog.actions.confirm":"재시작","runbox.action.restart.dialog.description":"런박스를 재시작 하시겠습니까?","runbox.action.restart.title":"런박스 재시작","runbox.action.share.snackbar.copied.fail":"런박스 URL을 복사에 실패했습니다. 다시 시도해주세요.","runbox.action.share.snackbar.copied.success":"런박스 URL을 복사하였습니다.","runbox.action.share.title":"런박스 URL 복사","runbox.action.submitCountInfo.dialog.description":"제출 횟수 제한을 초과했습니다.","runbox.action.submitCountInfo.dialog.title":"제출 횟수 제한","runbox.action.submitCountInfo.tooltip.disabled":"제출 횟수를 모두 사용했습니다.","runbox.common.close":"닫기","runbox.common.retry":"재시도","runbox.common.support":"고객센터","runbox.context.command.ping.error":"런박스 작업을 수행하는 도중 오류가 발생했습니다.","runbox.header.submitInfo":"{isIndividual, select, true {} other {팀}} 제출 횟수 | {isDailyLimitEnabled, select, true {오늘} other {}} {remainCount}/{totalCount}회 남음","runbox.runtime.message.lxp_plan_required":"현재 기관에서는 런박스 수업 자료를 학습할 수 없습니다.\n자세한 사항은 기관 관리자에게 문의하세요.","runbox.runtime.message.runbox_unavailable":"런박스 사용 불가","runbox.runtime.message.startError":"런박스를 시작하는 중에 오류가 발생했습니다.","runbox.runtime.overlay.assigned.description_timeout":"(3 / 3)\n런박스를 실행하는데\n예상보다 시간이 소요되고 있습니다.\n새로고침하지 말고 조금만 더 기다려주세요!","runbox.runtime.overlay.assigned.description":"(3 / 3)\n런박스가 실행 중입니다.\n잠시만 기다려주세요!","runbox.runtime.overlay.queued.description_zero":"(2 / 3)\n 런박스가 실행됩니다","runbox.runtime.overlay.queued.description":"(2 / 3)\n현재 {waiters}번째 대기 중입니다...","runbox.runtime.overlay.terminated.description.default":"예상치 못한 문제로 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.general":"런박스에 연결된 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"디스크가 가득 차서 런타임이 종료되었습니다.\n최근 런박스를 삭제하셨다면 반영까지 시간이 소요될 수 있습니다.","runbox.runtime.overlay.terminated.description.quota_exceeded":"런타임 사용시간이 만료되어 런타임이 종료되었습니다.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"런박스를 실행한지 24시간이 경과하여 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.unexpected":"문제가 지속되면 고객센터에 문의해주세요.","runbox.runtime.overlay.terminated.restart":"재접속","runbox.runtime.overlay.terminated.title":"런타임 연결 해제됨"};
5
+ var messageKo = {"runbox.action.autoShutdown.title":"항상 켜두기","runbox.action.autoShutdown.tooltip.disabled":"해당 런타임은 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.action.autoShutdown.tooltip.enabled":"항상 켜두기를 설정하면 학습 {_termLibraryLecturePage} 밖으로 나가도 런타임이 종료되지 않습니다. 다만, 해당 런타임의 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.action.grade.dialog.description.error":"채점 중에 오류가 발생했습니다.","runbox.action.grade.dialog.description.success":"채점이 완료되었습니다.","runbox.action.grade.dialog.title":"채점 결과","runbox.action.grade.noti.error":"코드를 채점하는 도중 오류가 발생했습니다.","runbox.action.grade.title":"제출","runbox.action.grade.tooltip.onProgress":"코드 채점이 진행 중 입니다. 잠시만 기다려 주세요. 실습에 따라 채점이 최대 3분까지 소요될 수 있습니다.","runbox.action.reset.dialog.actions.confirm":"초기화","runbox.action.reset.dialog.description":"런박스 코드를 초기화하시겠습니까? 초기화 시 학습{_termLibraryLecturePage}의 코드가 기본 코드로 덮어씌워집니다.\n초기화 이후 런박스 세션이 새로고침 됩니다.","runbox.action.reset.noti.error":"런박스 코드를 초기화 하는 중에 오류가 발생했습니다.","runbox.action.reset.title":"코드 초기화","runbox.action.restart.dialog.actions.confirm":"재시작","runbox.action.restart.dialog.description":"런박스를 재시작 하시겠습니까?","runbox.action.restart.title":"런박스 재시작","runbox.action.share.snackbar.copied.fail":"런박스 URL을 복사에 실패했습니다. 다시 시도해주세요.","runbox.action.share.snackbar.copied.success":"런박스 URL을 복사하였습니다.","runbox.action.share.title":"런박스 URL 복사","runbox.action.submitCountInfo.dialog.description":"제출 횟수 제한을 초과했습니다.","runbox.action.submitCountInfo.dialog.title":"제출 횟수 제한","runbox.action.submitCountInfo.tooltip.disabled":"제출 횟수를 모두 사용했습니다.","runbox.action.submitLog.dialog.download.tooltip":"제출 파일 다운로드","runbox.action.submitLog.dialog.title":"제출 이력","runbox.action.submitLog.empty":"제출 이력이 존재하지 않습니다.","runbox.action.submitLog.title":"런박스 제출 이력","runbox.common.close":"닫기","runbox.common.retry":"재시도","runbox.common.score":"{score}점","runbox.common.support":"고객센터","runbox.context.command.ping.error":"런박스 작업을 수행하는 도중 오류가 발생했습니다.","runbox.header.submitInfo":"{isIndividual, select, true {} other {팀}} 제출 횟수 | {isDailyLimitEnabled, select, true {오늘} other {}} {remainCount}/{totalCount}회 남음","runbox.runtime.message.lxp_plan_required":"현재 기관에서는 런박스 수업 자료를 학습할 수 없습니다.\n자세한 사항은 기관 관리자에게 문의하세요.","runbox.runtime.message.runbox_unavailable":"런박스 사용 불가","runbox.runtime.message.startError":"런박스를 시작하는 중에 오류가 발생했습니다.","runbox.runtime.overlay.assigned.description":"(3 / 3)\n런박스가 실행 중입니다.\n잠시만 기다려주세요!","runbox.runtime.overlay.assigned.description_timeout":"(3 / 3)\n런박스를 실행하는데\n예상보다 시간이 소요되고 있습니다.\n새로고침하지 말고 조금만 더 기다려주세요!","runbox.runtime.overlay.queued.description":"(2 / 3)\n현재 {waiters}번째 대기 중입니다...","runbox.runtime.overlay.queued.description_zero":"(2 / 3)\n 런박스가 실행됩니다","runbox.runtime.overlay.terminated.description.default":"예상치 못한 문제로 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.general":"런박스에 연결된 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"디스크가 가득 차서 런타임이 종료되었습니다.\n최근 런박스를 삭제하셨다면 반영까지 시간이 소요될 수 있습니다.","runbox.runtime.overlay.terminated.description.quota_exceeded":"런타임 사용시간이 만료되어 런타임이 종료되었습니다.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"런박스를 실행한지 24시간이 경과하여 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.unexpected":"문제가 지속되면 고객센터에 문의해주세요.","runbox.runtime.overlay.terminated.restart":"재접속","runbox.runtime.overlay.terminated.title":"런타임 연결 해제됨"};
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 = {"runbox.action.autoShutdown.title":"เปิดตลอดเวลา","runbox.action.autoShutdown.tooltip.disabled":"Runbox นี้จะปิดโดยอัตโนมัติหลังจากใช้งาน {time} นาทีต่อเซสชัน","runbox.action.autoShutdown.tooltip.enabled":"หากตั้งค่าให้เปิดตลอดเวลา Runbox จะไม่ปิดแม้ว่าคุณจะออกจากหน้าเรียน {_termLibraryLecturePage} แต่จะปิดโดยอัตโนมัติหลังจากใช้งาน {time} นาทีต่อเซสชัน","runbox.action.grade.dialog.description.error":"เกิดข้อผิดพลาดขึ้นในขณะที่ทำการตรวจคะแนนของโค้ด","runbox.action.grade.dialog.description.success":"การจัดเกรดเสร็จสมบูรณ์เรียบร้อยแล้ว","runbox.action.grade.dialog.title":"ผลการประเมินผลการเรียน","runbox.action.grade.noti.error":"เกิดข้อผิดพลาดขึ้นในขณะที่ทำการตรวจคะแนนของโค้ด","runbox.action.grade.title":"ส่ง","runbox.action.grade.tooltip.onProgress":"กำลังให้คะแนนโค้ด โปรดรอสักครู่ การให้คะแนนอาจใช้เวลาสูงสุด 3 นาที ขึ้นอยู่กับประเภทของการฝึกอบรม","runbox.action.reset.dialog.actions.confirm":"รีเซ็ต","runbox.action.reset.dialog.description":"ต้องการรีเซ็ตโค้ด Runbox หรือไม่? การรีเซ็ตจะแทนที่โค้ดของคุณด้วยโค้ดเริ่มต้นของหน้าเรียน {_termLibraryLecturePage} \nเซสชัน Runbox จะรีเฟรชหลังจากรีเซ็ต","runbox.action.reset.noti.error":"เกิดข้อผิดพลาดระหว่างการรีเซ็ตโค้ด Runbox","runbox.action.reset.title":"รีเซ็ตโค้ด","runbox.action.restart.dialog.actions.confirm":"เริ่มต้นใหม่","runbox.action.restart.dialog.description":"ต้องการเริ่มต้น Runbox ใหม่หรือไม่?","runbox.action.restart.title":"เริ่มต้น Runbox ใหม่","runbox.action.share.snackbar.copied.fail":"ล้มเหลวในการคัดลอก URL Runbox กรุณาลองอีกครั้ง","runbox.action.share.snackbar.copied.success":"คัดลอก URL Runbox สำเร็จ","runbox.action.share.title":"คัดลอก URL Runbox","runbox.action.submitCountInfo.dialog.description":"คุณใช้จำนวนครั้งในการส่งเกินขีดจำกัดแล้ว","runbox.action.submitCountInfo.dialog.title":"ข้อจำกัดจำนวนครั้งในการส่ง","runbox.action.submitCountInfo.tooltip.disabled":"คุณใช้จำนวนครั้งในการส่งทั้งหมดแล้ว","runbox.common.close":"ปิด","runbox.common.retry":"ลองใหม่","runbox.common.support":"สนับสนุน","runbox.context.command.ping.error":"เกิดข้อผิดพลาดขณะดำเนินการ Runbox","runbox.header.submitInfo":"{isIndividual, select, true {การส่งแบบส่วนตัว} other {การส่งแบบทีม}} | {remainCount}/{totalCount} ครั้งที่เหลือ | {isDailyLimitEnabled, select, true {วันนี้} other {}} ","runbox.runtime.message.lxp_plan_required":"ขณะนี้สถาบันของคุณไม่รองรับการใช้งานสื่อการเรียนการสอน Runbox\nโปรดติดต่อผู้ดูแลระบบของสถาบันของคุณสำหรับข้อมูลเพิ่มเติม","runbox.runtime.message.runbox_unavailable":"ไม่สามารถใช้ Runbox ได้","runbox.runtime.message.startError":"เกิดข้อผิดพลาดขณะเริ่ม Runbox","runbox.runtime.overlay.assigned.description_timeout":"(3 / 3)\nRunbox ใช้เวลานานกว่าที่คาดไว้ในการทำงาน\nกรุณาอย่ารีเฟรชและรอสักครู่!","runbox.runtime.overlay.assigned.description":"(3 / 3)\nRunbox กำลังทำงานอยู่\nกรุณารอสักครู่!","runbox.runtime.overlay.queued.description_zero":"(2 / 3)\nRunbox ของคุณจะเริ่มทำงานเร็วๆ นี้","runbox.runtime.overlay.queued.description":"(2 / 3)\nกำลังรอคิวอยู่ที่ {waiters}...","runbox.runtime.overlay.terminated.description.default":"Runbox หยุดทำงานเนื่องจากปัญหาที่ไม่คาดคิด\nคลิกปุ่มด้านล่างเพื่อเชื่อมต่อ Runbox ใหม่","runbox.runtime.overlay.terminated.description.general":"Runbox ที่เชื่อมต่อกับคุณหยุดทำงาน\nคลิกปุ่มด้านล่างเพื่อเชื่อมต่อ Runbox ใหม่","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Runbox หยุดทำงานเนื่องจากพื้นที่ดิสก์เต็ม\nหากคุณเพิ่งลบ Runbox อาจใช้เวลาสักครู่กว่าจะสะท้อนผล","runbox.runtime.overlay.terminated.description.quota_exceeded":"Runbox หยุดทำงานเนื่องจากใช้เวลาเกินขีดจำกัด","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runbox หยุดทำงานหลังจากใช้งานครบ 24 ชั่วโมง\nคลิกปุ่มด้านล่างเพื่อเชื่อมต่อ Runbox ใหม่","runbox.runtime.overlay.terminated.description.unexpected":"หากปัญหายังคงมีอยู่ โปรดติดต่อฝ่ายสนับสนุน","runbox.runtime.overlay.terminated.restart":"เชื่อมต่อใหม่","runbox.runtime.overlay.terminated.title":"การเชื่อมต่อ Runbox หยุดชะงัก"};
5
+ var th = {"runbox.action.autoShutdown.title":"เปิดตลอดเวลา","runbox.action.autoShutdown.tooltip.disabled":"Runbox นี้จะปิดโดยอัตโนมัติหลังจากใช้งาน {time} นาทีต่อเซสชัน","runbox.action.autoShutdown.tooltip.enabled":"หากตั้งค่าให้เปิดตลอดเวลา Runbox จะไม่ปิดแม้ว่าคุณจะออกจากหน้าเรียน {_termLibraryLecturePage} แต่จะปิดโดยอัตโนมัติหลังจากใช้งาน {time} นาทีต่อเซสชัน","runbox.action.grade.dialog.description.error":"เกิดข้อผิดพลาดขึ้นในขณะที่ทำการตรวจคะแนนของโค้ด","runbox.action.grade.dialog.description.success":"การจัดเกรดเสร็จสมบูรณ์เรียบร้อยแล้ว","runbox.action.grade.dialog.title":"ผลการประเมินผลการเรียน","runbox.action.grade.noti.error":"เกิดข้อผิดพลาดขึ้นในขณะที่ทำการตรวจคะแนนของโค้ด","runbox.action.grade.title":"ส่ง","runbox.action.grade.tooltip.onProgress":"กำลังให้คะแนนโค้ด โปรดรอสักครู่ การให้คะแนนอาจใช้เวลาสูงสุด 3 นาที ขึ้นอยู่กับประเภทของการฝึกอบรม","runbox.action.reset.dialog.actions.confirm":"รีเซ็ต","runbox.action.reset.dialog.description":"ต้องการรีเซ็ตโค้ด Runbox หรือไม่? การรีเซ็ตจะแทนที่โค้ดของคุณด้วยโค้ดเริ่มต้นของหน้าเรียน {_termLibraryLecturePage} \nเซสชัน Runbox จะรีเฟรชหลังจากรีเซ็ต","runbox.action.reset.noti.error":"เกิดข้อผิดพลาดระหว่างการรีเซ็ตโค้ด Runbox","runbox.action.reset.title":"รีเซ็ตโค้ด","runbox.action.restart.dialog.actions.confirm":"เริ่มต้นใหม่","runbox.action.restart.dialog.description":"ต้องการเริ่มต้น Runbox ใหม่หรือไม่?","runbox.action.restart.title":"เริ่มต้น Runbox ใหม่","runbox.action.share.snackbar.copied.fail":"ล้มเหลวในการคัดลอก URL Runbox กรุณาลองอีกครั้ง","runbox.action.share.snackbar.copied.success":"คัดลอก URL Runbox สำเร็จ","runbox.action.share.title":"คัดลอก URL Runbox","runbox.action.submitCountInfo.dialog.description":"คุณใช้จำนวนครั้งในการส่งเกินขีดจำกัดแล้ว","runbox.action.submitCountInfo.dialog.title":"ข้อจำกัดจำนวนครั้งในการส่ง","runbox.action.submitCountInfo.tooltip.disabled":"คุณใช้จำนวนครั้งในการส่งทั้งหมดแล้ว","runbox.action.submitLog.dialog.download.tooltip":"ดาวน์โหลดไฟล์ที่ส่ง","runbox.action.submitLog.dialog.title":"ประวัติการส่ง","runbox.action.submitLog.empty":"ไม่มีประวัติการส่ง","runbox.action.submitLog.title":"ประวัติการส่ง Runbox","runbox.common.close":"ปิด","runbox.common.retry":"ลองใหม่","runbox.common.score":"{score} คะแนน","runbox.common.support":"สนับสนุน","runbox.context.command.ping.error":"เกิดข้อผิดพลาดขณะดำเนินการ Runbox","runbox.header.submitInfo":"{isIndividual, select, true {การส่งแบบส่วนตัว} other {การส่งแบบทีม}} | {remainCount}/{totalCount} ครั้งที่เหลือ | {isDailyLimitEnabled, select, true {วันนี้} other {}} ","runbox.runtime.message.lxp_plan_required":"ขณะนี้สถาบันของคุณไม่รองรับการใช้งานสื่อการเรียนการสอน Runbox\nโปรดติดต่อผู้ดูแลระบบของสถาบันของคุณสำหรับข้อมูลเพิ่มเติม","runbox.runtime.message.runbox_unavailable":"ไม่สามารถใช้ Runbox ได้","runbox.runtime.message.startError":"เกิดข้อผิดพลาดขณะเริ่ม Runbox","runbox.runtime.overlay.assigned.description":"(3 / 3)\nRunbox กำลังทำงานอยู่\nกรุณารอสักครู่!","runbox.runtime.overlay.assigned.description_timeout":"(3 / 3)\nRunbox ใช้เวลานานกว่าที่คาดไว้ในการทำงาน\nกรุณาอย่ารีเฟรชและรอสักครู่!","runbox.runtime.overlay.queued.description":"(2 / 3)\nกำลังรอคิวอยู่ที่ {waiters}...","runbox.runtime.overlay.queued.description_zero":"(2 / 3)\nRunbox ของคุณจะเริ่มทำงานเร็วๆ นี้","runbox.runtime.overlay.terminated.description.default":"Runbox หยุดทำงานเนื่องจากปัญหาที่ไม่คาดคิด\nคลิกปุ่มด้านล่างเพื่อเชื่อมต่อ Runbox ใหม่","runbox.runtime.overlay.terminated.description.general":"Runbox ที่เชื่อมต่อกับคุณหยุดทำงาน\nคลิกปุ่มด้านล่างเพื่อเชื่อมต่อ Runbox ใหม่","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Runbox หยุดทำงานเนื่องจากพื้นที่ดิสก์เต็ม\nหากคุณเพิ่งลบ Runbox อาจใช้เวลาสักครู่กว่าจะสะท้อนผล","runbox.runtime.overlay.terminated.description.quota_exceeded":"Runbox หยุดทำงานเนื่องจากใช้เวลาเกินขีดจำกัด","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runbox หยุดทำงานหลังจากใช้งานครบ 24 ชั่วโมง\nคลิกปุ่มด้านล่างเพื่อเชื่อมต่อ Runbox ใหม่","runbox.runtime.overlay.terminated.description.unexpected":"หากปัญหายังคงมีอยู่ โปรดติดต่อฝ่ายสนับสนุน","runbox.runtime.overlay.terminated.restart":"เชื่อมต่อใหม่","runbox.runtime.overlay.terminated.title":"การเชื่อมต่อ Runbox หยุดชะงัก"};
6
6
 
7
7
  exports.default = th;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { RunboxGetAndListResponse, RuntimeGetAndListResponse, RuntimeTemplateGetAndListResponse } from '@elice/openapi-client-material-runbox';
3
3
  import type { QueryObserverResult } from '@tanstack/react-query';
4
+ import type { GetAchievementColor } from '../MaterialRunboxContent';
4
5
  export interface RuntimeProps {
5
6
  /** */
6
7
  runbox: RunboxGetAndListResponse;
@@ -11,11 +12,17 @@ export interface RuntimeProps {
11
12
  /** */
12
13
  courseId: number;
13
14
  /** */
15
+ userId: number;
16
+ /** */
17
+ isTutoring?: boolean;
18
+ /** */
14
19
  refetch: () => Promise<QueryObserverResult<[
15
20
  RunboxGetAndListResponse,
16
21
  RuntimeGetAndListResponse,
17
22
  RuntimeTemplateGetAndListResponse
18
23
  ], unknown>>;
24
+ /** */
25
+ getAchievementColor?: GetAchievementColor;
19
26
  }
20
27
  declare const Runtime: React.FC<RuntimeProps>;
21
28
  export default Runtime;
@@ -52,7 +52,7 @@ var Runtime = function Runtime(props) {
52
52
  // };
53
53
  },
54
54
  // eslint-disable-next-line react-hooks/exhaustive-deps
55
- [props.runbox.id]);
55
+ [props.runbox.id, props.userId]);
56
56
  //
57
57
  // refresh view when `ProjectFileReset` command done.
58
58
  //
@@ -1,4 +1,15 @@
1
1
  import React from 'react';
2
+ import type { TagProps } from '@elice/mui-elements';
3
+ export type GetAchievementColor = {
4
+ (params: {
5
+ score: number;
6
+ variant: 'text' | 'chart';
7
+ }): string | null;
8
+ (params: {
9
+ score: number;
10
+ variant: 'tag';
11
+ }): TagProps['color'];
12
+ };
2
13
  export interface MaterialRunboxContentProps {
3
14
  /** Runbox ID. */
4
15
  runboxId: string | null;
@@ -6,6 +17,12 @@ export interface MaterialRunboxContentProps {
6
17
  courseId: number;
7
18
  /** */
8
19
  enabledLxpPlan?: boolean;
20
+ /** User ID for tutoring. */
21
+ userId: number;
22
+ /** Whether tutoring is enabled. */
23
+ isTutoring: boolean;
24
+ /** Used for submit log score tag color. */
25
+ getAchievementColor?: GetAchievementColor;
9
26
  }
10
27
  declare const MaterialRunboxContent: React.FC<MaterialRunboxContentProps>;
11
28
  export default MaterialRunboxContent;
@@ -28,7 +28,11 @@ var StyledRunboxContainer = styled('div')(_templateObject || (_templateObject =
28
28
  var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
29
29
  var runboxId = _ref.runboxId,
30
30
  courseId = _ref.courseId,
31
- enabledLxpPlan = _ref.enabledLxpPlan;
31
+ enabledLxpPlan = _ref.enabledLxpPlan,
32
+ userId = _ref.userId,
33
+ _ref$isTutoring = _ref.isTutoring,
34
+ isTutoring = _ref$isTutoring === void 0 ? false : _ref$isTutoring,
35
+ getAchievementColor = _ref.getAchievementColor;
32
36
  var intl = useRawEliceIntl();
33
37
  var _useMaterialRunboxCon = useMaterialRunboxContext(),
34
38
  showMessenger = _useMaterialRunboxCon.showMessenger;
@@ -56,7 +60,8 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
56
60
  filterRuntimeTemplateId: runbox.runtimeTemplateId,
57
61
  skip: 0,
58
62
  count: 1,
59
- eliceCourseId: courseId
63
+ eliceCourseId: courseId,
64
+ userId: userId
60
65
  }, {
61
66
  signal: signal
62
67
  }).then(function (runtimes) {
@@ -160,7 +165,10 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
160
165
  runtime: runtime,
161
166
  runtimeTemplate: runtimeTemplate,
162
167
  courseId: courseId,
163
- refetch: refetch
168
+ userId: userId,
169
+ isTutoring: isTutoring,
170
+ refetch: refetch,
171
+ getAchievementColor: getAchievementColor
164
172
  };
165
173
  return jsx(MaterialRunboxCommandContextProvider, {
166
174
  runtime: runtime,
@@ -172,7 +180,10 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
172
180
  signal = _ref3.signal;
173
181
  return materialRunboxApi.runbox.runboxRunboxIdHeartbeatPost({
174
182
  runboxId: id,
175
- eliceCourseId: courseId
183
+ eliceCourseId: courseId,
184
+ runboxHeartbeatPostRequest: {
185
+ userId: userId
186
+ }
176
187
  }, {
177
188
  signal: signal
178
189
  });
@@ -182,7 +193,8 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
182
193
  signal = _ref4.signal;
183
194
  return materialRunboxApi.runbox.runboxRunboxIdQuotaGet({
184
195
  runboxId: id,
185
- eliceCourseId: courseId
196
+ eliceCourseId: courseId,
197
+ userId: userId
186
198
  }, {
187
199
  signal: signal
188
200
  });
@@ -34,7 +34,10 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
34
34
  runtime = _ref3.runtime,
35
35
  runtimeTemplate = _ref3.runtimeTemplate,
36
36
  courseId = _ref3.courseId,
37
- refetch = _ref3.refetch;
37
+ userId = _ref3.userId,
38
+ isTutoring = _ref3.isTutoring,
39
+ refetch = _ref3.refetch,
40
+ getAchievementColor = _ref3.getAchievementColor;
38
41
  var intl = useRawEliceIntl();
39
42
  var _useMaterialRunboxCon = useMaterialRunboxContext(),
40
43
  enableAutoShutdownToggle = _useMaterialRunboxCon.enableAutoShutdownToggle;
@@ -102,7 +105,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
102
105
  *
103
106
  */
104
107
  var renderHeaderActionAutoShutdown = function renderHeaderActionAutoShutdown() {
105
- if (!enableAutoShutdownToggle) {
108
+ if (!enableAutoShutdownToggle || isTutoring) {
106
109
  return null;
107
110
  }
108
111
  return jsx(MaterialRunboxActionAutoShutdown, {
@@ -116,7 +119,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
116
119
  *
117
120
  */
118
121
  var renderHeaderActionGrade = function renderHeaderActionGrade() {
119
- if (!runbox.submission.enabled) {
122
+ if (!runbox.submission.enabled || isTutoring) {
120
123
  return null;
121
124
  }
122
125
  return jsx(MaterialRunboxActionGrade, {
@@ -145,9 +148,12 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
145
148
  runbox: runbox,
146
149
  runtime: runtime,
147
150
  courseId: courseId,
151
+ userId: userId,
152
+ isTutoring: isTutoring,
148
153
  menuAnchorEl: menuAnchorEl,
149
154
  refetch: refetch,
150
- handleMenuClose: handleMenuClose
155
+ handleMenuClose: handleMenuClose,
156
+ getAchievementColor: getAchievementColor
151
157
  })]
152
158
  });
153
159
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RuntimeProps } from '../runtime/Runtime';
3
- type MaterialRunboxActionMenuProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch'> & {
3
+ type MaterialRunboxActionMenuProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch' | 'userId' | 'isTutoring' | 'getAchievementColor'> & {
4
4
  menuAnchorEl: null | HTMLButtonElement;
5
5
  handleMenuClose: () => void;
6
6
  };
@@ -5,6 +5,7 @@ import { Menu } from '@mui/material';
5
5
  import MaterialRunboxActionReset from './MaterialRunboxActionReset.js';
6
6
  import MaterialRunboxActionRestart from './MaterialRunboxActionRestart.js';
7
7
  import MaterialRunboxActionShare from './MaterialRunboxActionShare.js';
8
+ import MaterialRunboxActionSubmitLog from './MaterialRunboxActionSubmitLog.js';
8
9
 
9
10
  //
10
11
  //
@@ -13,8 +14,11 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
13
14
  var runbox = _ref.runbox,
14
15
  runtime = _ref.runtime,
15
16
  courseId = _ref.courseId,
17
+ userId = _ref.userId,
18
+ isTutoring = _ref.isTutoring,
16
19
  menuAnchorEl = _ref.menuAnchorEl,
17
20
  refetch = _ref.refetch,
21
+ getAchievementColor = _ref.getAchievementColor,
18
22
  handleMenuClose = _ref.handleMenuClose;
19
23
  var _useEliceRunboxRunnin = useEliceRunboxRunning(),
20
24
  status = _useEliceRunboxRunnin.status;
@@ -48,9 +52,16 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
48
52
  runbox: runbox,
49
53
  runtime: runtime,
50
54
  courseId: courseId,
55
+ userId: userId,
51
56
  refetch: refetch,
52
57
  handleMenuClose: handleMenuClose
53
- }), jsx(MaterialRunboxActionReset, {
58
+ }), isTutoring ? jsx(MaterialRunboxActionSubmitLog, {
59
+ runboxId: runbox === null || runbox === void 0 ? void 0 : runbox.id,
60
+ userId: userId,
61
+ eliceCourseId: courseId,
62
+ getAchievementColor: getAchievementColor,
63
+ handleMenuClose: handleMenuClose
64
+ }) : jsx(MaterialRunboxActionReset, {
54
65
  runtime: runtime,
55
66
  courseId: courseId,
56
67
  handleMenuClose: handleMenuClose
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RuntimeProps } from '../runtime/Runtime';
3
- type MaterialRunboxActionRestartProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch'> & {
3
+ type MaterialRunboxActionRestartProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch' | 'userId'> & {
4
4
  handleMenuClose: () => void;
5
5
  };
6
6
  declare const MaterialRunboxActionRestart: React.FC<MaterialRunboxActionRestartProps>;
@@ -15,6 +15,7 @@ var MaterialRunboxActionRestart = function MaterialRunboxActionRestart(_ref) {
15
15
  var runbox = _ref.runbox,
16
16
  courseId = _ref.courseId,
17
17
  refetch = _ref.refetch,
18
+ userId = _ref.userId,
18
19
  handleMenuClose = _ref.handleMenuClose;
19
20
  var intl = useRawEliceIntl();
20
21
  var _React$useState = React.useState(false),
@@ -29,7 +30,8 @@ var MaterialRunboxActionRestart = function MaterialRunboxActionRestart(_ref) {
29
30
  var _useRunboxControl = useRunboxControl({
30
31
  runbox: runbox,
31
32
  courseId: courseId,
32
- refetch: refetch
33
+ refetch: refetch,
34
+ userId: userId
33
35
  }),
34
36
  start = _useRunboxControl.start;
35
37
  /**
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { RunboxRunboxIdGradeGetRequest } from '@elice/openapi-client-material-runbox';
3
+ import type { GetAchievementColor } from '../MaterialRunboxContent';
4
+ export type MaterialRunboxActionSubmitLogProps = Omit<RunboxRunboxIdGradeGetRequest, 'skip' | 'count'> & {
5
+ handleMenuClose: () => void;
6
+ getAchievementColor?: GetAchievementColor;
7
+ };
8
+ declare const MaterialRunboxActionSubmitLog: React.FC<MaterialRunboxActionSubmitLogProps>;
9
+ export default MaterialRunboxActionSubmitLog;
@@ -0,0 +1,59 @@
1
+ import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
+ import React from 'react';
4
+ import { useRawEliceIntl } from '@elice/intl';
5
+ import { EliceIcon } from '@elice/mui-elements';
6
+ import { faTimeline } from '@fortawesome/pro-regular-svg-icons';
7
+ import { MenuItem, ListItemIcon, ListItemText } from '@mui/material';
8
+ import MaterialRunboxActionSubmitLogDialog from './MaterialRunboxActionSubmitLogDialog.js';
9
+
10
+ //
11
+ //
12
+ //
13
+ var MaterialRunboxActionSubmitLog = function MaterialRunboxActionSubmitLog(props) {
14
+ var intl = useRawEliceIntl();
15
+ //
16
+ var _React$useState = React.useState(false),
17
+ _React$useState2 = _slicedToArray(_React$useState, 2),
18
+ isOpen = _React$useState2[0],
19
+ setIsOpen = _React$useState2[1];
20
+ /**
21
+ *
22
+ */
23
+ var renderMenuItem = function renderMenuItem() {
24
+ return jsxs(MenuItem, {
25
+ onClick: function onClick() {
26
+ return setIsOpen(true);
27
+ },
28
+ children: [jsx(ListItemIcon, {
29
+ children: jsx(EliceIcon, {
30
+ icon: faTimeline
31
+ })
32
+ }), jsx(ListItemText, {
33
+ children: intl.formatMessage({
34
+ id: 'runbox.action.submitLog.title'
35
+ })
36
+ })]
37
+ });
38
+ };
39
+ /**
40
+ *
41
+ */
42
+ var renderSubmitLogDialog = function renderSubmitLogDialog() {
43
+ return jsx(MaterialRunboxActionSubmitLogDialog, Object.assign({}, props, {
44
+ isOpen: isOpen,
45
+ onClose: function onClose() {
46
+ setIsOpen(false);
47
+ props.handleMenuClose();
48
+ }
49
+ }));
50
+ };
51
+ //
52
+ //
53
+ //
54
+ return jsxs(Fragment, {
55
+ children: [renderMenuItem(), renderSubmitLogDialog()]
56
+ });
57
+ };
58
+
59
+ export { MaterialRunboxActionSubmitLog as default };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { MaterialRunboxActionSubmitLogProps } from './MaterialRunboxActionSubmitLog';
3
+ type MaterialRunboxActionSubmitLogDialogProps = MaterialRunboxActionSubmitLogProps & {
4
+ userId: number;
5
+ isOpen: boolean;
6
+ onClose: () => void;
7
+ };
8
+ declare const MaterialRunboxActionSubmitLogDialog: React.FC<MaterialRunboxActionSubmitLogDialogProps>;
9
+ export default MaterialRunboxActionSubmitLogDialog;
@@ -0,0 +1,187 @@
1
+ import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { __rest } from 'tslib';
3
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
+ import React from 'react';
5
+ import { useInView } from 'react-intersection-observer';
6
+ import { useRawEliceIntl } from '@elice/intl';
7
+ import { Tag, EliceIcon } from '@elice/mui-elements';
8
+ import { useTheme } from '@emotion/react';
9
+ import { faArrowDownToLine } from '@fortawesome/pro-regular-svg-icons';
10
+ import { useMediaQuery, Dialog, DialogTitle, DialogContent, Stack, DialogActions, Button, Typography, List, ListItemButton, ListItemText, ListItemSecondaryAction, Tooltip, IconButton, Box } from '@mui/material';
11
+ import dayjs from 'dayjs';
12
+ import '../contexts/MaterialRunboxApiContext.js';
13
+ import '../contexts/MaterialRunboxCommandContext.js';
14
+ import { useMaterialRunboxContext } from '../contexts/MaterialRunboxContext.js';
15
+ import { useInfiniteRunboxRunboxIdGrade } from '../hooks/useInfiniteRunboxRunboxIdGrade.js';
16
+
17
+ //
18
+ //
19
+ //
20
+ var MaterialRunboxActionSubmitLogDialog = function MaterialRunboxActionSubmitLogDialog(_a) {
21
+ var isOpen = _a.isOpen,
22
+ onClose = _a.onClose,
23
+ getAchievementColor = _a.getAchievementColor,
24
+ props = __rest(_a, ["isOpen", "onClose", "getAchievementColor"]);
25
+ var intl = useRawEliceIntl();
26
+ //
27
+ var _useMaterialRunboxCon = useMaterialRunboxContext(),
28
+ locale = _useMaterialRunboxCon.locale;
29
+ dayjs.locale(locale);
30
+ //
31
+ var theme = useTheme();
32
+ var isMobileOrSmaller = useMediaQuery(theme.breakpoints.down('sm'));
33
+ //
34
+ var _useInfiniteRunboxRun = useInfiniteRunboxRunboxIdGrade(Object.assign(Object.assign({}, props), {
35
+ enabled: Boolean(isOpen && props.runboxId && props.userId)
36
+ })),
37
+ grade = _useInfiniteRunboxRun.grade,
38
+ fetchNextPage = _useInfiniteRunboxRun.fetchNextPage;
39
+ var _useInView = useInView(),
40
+ inView = _useInView.inView,
41
+ ref = _useInView.ref;
42
+ //
43
+ var _React$useState = React.useState(null),
44
+ _React$useState2 = _slicedToArray(_React$useState, 2),
45
+ selectedGrade = _React$useState2[0],
46
+ setSelectedGrade = _React$useState2[1];
47
+ /**
48
+ *
49
+ */
50
+ var renderEmpty = function renderEmpty() {
51
+ return jsx(Stack, {
52
+ justifyContent: "center",
53
+ alignItems: "center",
54
+ children: jsx(Typography, {
55
+ variant: "body1",
56
+ children: intl.formatMessage({
57
+ id: 'runbox.action.submitLog.empty'
58
+ })
59
+ })
60
+ });
61
+ };
62
+ /**
63
+ *
64
+ */
65
+ var renderGradeList = function renderGradeList() {
66
+ return jsxs(List, {
67
+ ref: ref,
68
+ sx: {
69
+ width: '100%',
70
+ maxHeight: '100%',
71
+ overflow: 'auto'
72
+ },
73
+ children: [grade === null || grade === void 0 ? void 0 : grade.map(function (item) {
74
+ return jsxs(ListItemButton, {
75
+ selected: (selectedGrade === null || selectedGrade === void 0 ? void 0 : selectedGrade.id) === item.id,
76
+ onClick: function onClick() {
77
+ return setSelectedGrade(item);
78
+ },
79
+ children: [jsx(ListItemText, {
80
+ primary: dayjs(item.created).format(isMobileOrSmaller ? 'YYYY.MM.DD' : 'YYYY.MM.DD A HH:mm')
81
+ }), jsx(ListItemSecondaryAction, {
82
+ children: jsxs(Stack, {
83
+ direction: "row",
84
+ alignItems: "center",
85
+ gap: "0.5rem",
86
+ children: [(item === null || item === void 0 ? void 0 : item.score) ? jsx(Tag, {
87
+ variant: "muted",
88
+ color: typeof getAchievementColor === 'function' ? getAchievementColor({
89
+ score: Number(item.score),
90
+ variant: 'tag'
91
+ }) : 'info',
92
+ label: intl.formatMessage({
93
+ id: 'runbox.common.score'
94
+ }, {
95
+ score: item.score
96
+ })
97
+ }) : null, jsx(Tooltip, {
98
+ title: intl.formatMessage({
99
+ id: 'runbox.action.submitLog.dialog.download.tooltip'
100
+ }),
101
+ children: jsx(IconButton, {
102
+ onClick: function onClick() {
103
+ window.open(item.submissionFileUrl, '_blank');
104
+ },
105
+ children: jsx(EliceIcon, {
106
+ icon: faArrowDownToLine
107
+ })
108
+ })
109
+ })]
110
+ })
111
+ })]
112
+ }, item.id);
113
+ }), jsx("div", {
114
+ ref: ref
115
+ })]
116
+ });
117
+ };
118
+ /**
119
+ *
120
+ */
121
+ var renderCodebox = function renderCodebox() {
122
+ return jsx(Box, {
123
+ bgcolor: function bgcolor(theme) {
124
+ return theme.palette.common.black;
125
+ },
126
+ borderRadius: "0.5rem",
127
+ padding: "1rem",
128
+ width: "100%",
129
+ overflow: "auto",
130
+ fontFamily: "Elice Digital Coding, monospace",
131
+ fontSize: "0.875rem",
132
+ whiteSpace: "pre-wrap",
133
+ lineHeight: "1.375rem",
134
+ children: selectedGrade === null || selectedGrade === void 0 ? void 0 : selectedGrade.output
135
+ });
136
+ };
137
+ //
138
+ //
139
+ //
140
+ React.useEffect(function () {
141
+ if (inView) {
142
+ fetchNextPage();
143
+ }
144
+ }, [inView, fetchNextPage]);
145
+ //
146
+ //
147
+ //
148
+ React.useEffect(function () {
149
+ if ((grade === null || grade === void 0 ? void 0 : grade.length) && !selectedGrade) {
150
+ setSelectedGrade(grade[0]);
151
+ }
152
+ }, [grade, selectedGrade]);
153
+ //
154
+ //
155
+ //
156
+ return jsxs(Dialog, {
157
+ fullWidth: true,
158
+ maxWidth: "lg",
159
+ open: isOpen,
160
+ onClose: onClose,
161
+ children: [jsx(DialogTitle, {
162
+ children: intl.formatMessage({
163
+ id: 'runbox.action.submitLog.dialog.title'
164
+ })
165
+ }), jsx(DialogContent, {
166
+ children: jsx(Stack, {
167
+ direction: "row",
168
+ gap: "0.5rem",
169
+ overflow: "auto",
170
+ maxHeight: "30rem",
171
+ children: (grade === null || grade === void 0 ? void 0 : grade.length) ? jsxs(Fragment, {
172
+ children: [renderGradeList(), renderCodebox()]
173
+ }) : renderEmpty()
174
+ })
175
+ }), jsx(DialogActions, {
176
+ children: jsx(Button, {
177
+ color: "inherit",
178
+ onClick: onClose,
179
+ children: intl.formatMessage({
180
+ id: 'runbox.common.close'
181
+ })
182
+ })
183
+ })]
184
+ });
185
+ };
186
+
187
+ export { MaterialRunboxActionSubmitLogDialog as default };
@@ -0,0 +1,13 @@
1
+ import type { RunboxGradeGetResponse, RunboxRunboxIdGradeGetRequest } from '@elice/openapi-client-material-runbox';
2
+ type UseInfiniteRunboxRunboxIdGradeProps = RunboxRunboxIdGradeGetRequest & {
3
+ enabled: boolean;
4
+ };
5
+ type UseInfiniteRunboxRunboxIdGradeReturn = {
6
+ grade: RunboxGradeGetResponse[] | undefined;
7
+ isGradeLoading: boolean;
8
+ isGradeError: boolean;
9
+ refetchGrade: () => void;
10
+ fetchNextPage: () => void;
11
+ };
12
+ export declare const useInfiniteRunboxRunboxIdGrade: (props: Omit<UseInfiniteRunboxRunboxIdGradeProps, 'skip' | 'count'>) => UseInfiniteRunboxRunboxIdGradeReturn;
13
+ export {};
@@ -0,0 +1,57 @@
1
+ import { useRef, useCallback } from 'react';
2
+ import { useInfiniteQuery } from '@tanstack/react-query';
3
+ import { useMaterialRunboxApiContext } from '../contexts/MaterialRunboxApiContext.js';
4
+ import '../contexts/MaterialRunboxCommandContext.js';
5
+ import '../contexts/MaterialRunboxContext.js';
6
+
7
+ //
8
+ //
9
+ //
10
+ var DEFAULT_COUNT = 10;
11
+ var DEFAULT_SKIP = 0;
12
+ //
13
+ //
14
+ //
15
+ var useInfiniteRunboxRunboxIdGrade = function useInfiniteRunboxRunboxIdGrade(props) {
16
+ var _return = useRef({});
17
+ var enabled = props.enabled;
18
+ var materialRunboxApi = useMaterialRunboxApiContext();
19
+ //
20
+ var _useInfiniteQuery = useInfiniteQuery({
21
+ queryKey: ['runboxRunboxIdGrade', props],
22
+ queryFn: function queryFn(_ref) {
23
+ var _ref$pageParam = _ref.pageParam,
24
+ pageParam = _ref$pageParam === void 0 ? DEFAULT_SKIP : _ref$pageParam;
25
+ return materialRunboxApi.runbox.runboxRunboxIdGradeGet(Object.assign(Object.assign({}, props), {
26
+ skip: pageParam,
27
+ count: DEFAULT_COUNT
28
+ }));
29
+ },
30
+ getNextPageParam: function getNextPageParam(lastPage, pages) {
31
+ return lastPage.length === DEFAULT_COUNT ? pages.length * DEFAULT_COUNT : undefined;
32
+ },
33
+ enabled: enabled
34
+ }),
35
+ data = _useInfiniteQuery.data,
36
+ isLoading = _useInfiniteQuery.isLoading,
37
+ isFetchingNextPage = _useInfiniteQuery.isFetchingNextPage,
38
+ hasNextPage = _useInfiniteQuery.hasNextPage,
39
+ isError = _useInfiniteQuery.isError,
40
+ fetchNextPage = _useInfiniteQuery.fetchNextPage,
41
+ refetch = _useInfiniteQuery.refetch;
42
+ //
43
+ _return.current.grade = data === null || data === void 0 ? void 0 : data.pages.flatMap(function (page) {
44
+ return page;
45
+ });
46
+ _return.current.isGradeLoading = isLoading || isFetchingNextPage;
47
+ _return.current.isGradeError = isError;
48
+ _return.current.refetchGrade = refetch;
49
+ _return.current.fetchNextPage = useCallback(function () {
50
+ if (hasNextPage && !isFetchingNextPage) {
51
+ void fetchNextPage();
52
+ }
53
+ }, [fetchNextPage, hasNextPage, isFetchingNextPage]);
54
+ return _return.current;
55
+ };
56
+
57
+ export { useInfiniteRunboxRunboxIdGrade };