touchstudy-core 0.1.65 → 0.1.66
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/dist/components/Selectors/styles.d.ts +6 -0
- package/dist/containers/ExamResult/components/GradesByTerritory/index.d.ts +3 -1
- package/dist/containers/ExamResult/components/ProtractedProblem/index.d.ts +1 -0
- package/dist/containers/ExamResult/components/Vulnerable/index.d.ts +1 -0
- package/dist/containers/ExamResult/configs/constants.d.ts +1 -0
- package/dist/containers/ExamResult/configs/functions.d.ts +1 -0
- package/dist/containers/ExamResult/configs/types.d.ts +5 -2
- package/dist/containers/ExamResult/hooks/useExamResult.d.ts +2 -0
- package/dist/containers/ExamResult/views/ExamResultV2.d.ts +1 -0
- package/dist/containers/Textbooks/configs/types.d.ts +1 -6
- package/dist/index.css +34 -30
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1110 -331
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1103 -328
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/Header.d.ts +1 -1
- package/dist/services/examService.d.ts +1 -0
- package/dist/tests/performances/do-exam-session-skip-answer.d.ts +19 -0
- package/dist/tests/performances/do-exam-session.d.ts +5 -3
- package/dist/tests/performances/do-exam-session2.d.ts +19 -0
- package/dist/tests/performances/ramping-vus.d.ts +7 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/enums/examStatus.d.ts +6 -0
- package/dist/utils/enums/index.d.ts +2 -1
- package/dist/utils/enums/orderBy.d.ts +4 -0
- package/dist/utils/helpers.d.ts +10 -0
- package/dist/utils/hooks/useCheckExam.d.ts +5 -0
- package/dist/utils/hooks/useCountDownTimer.d.ts +11 -0
- package/dist/utils/hooks/useLoadMore.d.ts +9 -0
- package/dist/utils/hooks/useSwitchAcademy.d.ts +1 -0
- package/dist/utils/hooks/useVirtualizeList.d.ts +9 -0
- package/dist/utils/times.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -24,11 +24,11 @@ var MenuItem = _interopDefault(require('@mui/material/MenuItem'));
|
|
24
24
|
var IconButton = _interopDefault(require('@mui/material/IconButton'));
|
25
25
|
var go = require('react-icons/go');
|
26
26
|
var reactToastify = require('react-toastify');
|
27
|
-
var io = require('react-icons/io');
|
28
27
|
var Select = require('react-select');
|
29
28
|
var Select__default = _interopDefault(Select);
|
30
29
|
var fa = require('react-icons/fa');
|
31
30
|
var pi = require('react-icons/pi');
|
31
|
+
var io = require('react-icons/io');
|
32
32
|
var _ = _interopDefault(require('lodash'));
|
33
33
|
var fa6 = require('react-icons/fa6');
|
34
34
|
var CreatableSelect = _interopDefault(require('react-select/creatable'));
|
@@ -98,12 +98,12 @@ var encodeParams = function encodeParams(params) {
|
|
98
98
|
Role["Admin"] = "Admin";
|
99
99
|
Role["AcademyAdmin"] = "AcademyAdmin";
|
100
100
|
})(exports.Role || (exports.Role = {}));
|
101
|
-
var Language;
|
102
101
|
(function (Language) {
|
103
102
|
Language["ko"] = "ko";
|
104
103
|
Language["en"] = "en";
|
105
|
-
})(Language || (Language = {}));
|
104
|
+
})(exports.Language || (exports.Language = {}));
|
106
105
|
var PrintHeaderClassName = "print-header";
|
106
|
+
var PrintTitleClassName = "print-title";
|
107
107
|
var PrintContentClassName = "print-content";
|
108
108
|
var PrintContainerClassName = "print-container";
|
109
109
|
|
@@ -145,7 +145,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
145
145
|
return target;
|
146
146
|
}
|
147
147
|
|
148
|
-
var styles = {"lighter":"#F0FFF6","light":"#
|
148
|
+
var styles = {"lighter":"#F0FFF6","light":"#89F0B2","less_dark":"#3DC674","dark":"#349056","darker":"#18442A","gray_50":"#FBFBF9","gray_100":"#EAEAE5","gray_300":"#D0D0C8","gray_500":"#9A9A98","gray_700":"#5D5D5B","gray_900":"#363634","btn-login-google":"_2HqmH","block-login":"_wWIyO","box-login":"_38Lo1","btn-primary":"_rd4Uy","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","dropdown-academy":"_3CMVp","image-academy":"_2ibYC","academy-btn":"_1JMRU","switch-icon":"_N4FNf","dropdown-content-academy":"_31Dr0","dropdown-academy-item":"_3bjcz","noGutters":"_31ZQk","custom-col-2":"_3yXyK","custom-col-3":"_1RsJQ","custom-col-5":"_L42CP","custom-col-10":"_2u6eL","custom-row":"_8x7OP","custom-col":"_1JmTh","custom-col-4":"_3HO1e","custom-col-8":"_Oy31M","custom-col-12":"_3aUKo","custom-container":"_39LRs","form-label":"__Ut-u","form-control":"_2k4dX","btn-outline-primary":"_2PWdX","sort-icons":"_mQvLF","active":"_3oAH-","form-select":"_3W3aw","truncate":"_3NJzN","headers":"_3xnI5","logo-container":"_3YG70","tabBox":"_1CQPn","routerBox":"_3hx2T","tabText":"_3UyhW","router-link-active":"_1TGKA","router-link":"_1AqMh","userImg":"_2RI6G","disabled-link":"_3aVHg","line-clamp":"_3fpky"};
|
149
149
|
|
150
150
|
// A type of promise-like that resolves synchronously and supports only one observer
|
151
151
|
const _Pact = /*#__PURE__*/(function() {
|
@@ -920,7 +920,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
920
920
|
py: 2,
|
921
921
|
justifyContent: "center",
|
922
922
|
alignItems: "center"
|
923
|
-
}, language !== Language.en ? React__default.createElement(SloganFullLogoKo, {
|
923
|
+
}, language !== exports.Language.en ? React__default.createElement(SloganFullLogoKo, {
|
924
924
|
width: "300px"
|
925
925
|
}) : React__default.createElement(SloganFullLogoEn, {
|
926
926
|
width: "300px"
|
@@ -1860,7 +1860,7 @@ var student_status = "학생별 현황";
|
|
1860
1860
|
var user_manager = "사용자 목록";
|
1861
1861
|
var recent_exam_results = "최근 시험 결과";
|
1862
1862
|
var instructor_name = "강사이름";
|
1863
|
-
var
|
1863
|
+
var institute_name = "학원 이름";
|
1864
1864
|
var total_students = "총 학생수";
|
1865
1865
|
var total_class = "반 수";
|
1866
1866
|
var total_number_students = "총 학생수";
|
@@ -1892,10 +1892,11 @@ var yes = "예";
|
|
1892
1892
|
var no = "아니요";
|
1893
1893
|
var cancel = "취소";
|
1894
1894
|
var confirmation = "확인";
|
1895
|
-
var student_name = "
|
1895
|
+
var student_name = "학생 이름";
|
1896
1896
|
var full_pool_time = "전체풀이시간";
|
1897
1897
|
var number_question = "{{number}}번";
|
1898
1898
|
var number_answer = "{{number}}번";
|
1899
|
+
var answer_no = "{{number}}번";
|
1899
1900
|
var answer_rate = "정답률";
|
1900
1901
|
var seconds = "초";
|
1901
1902
|
var search_placeholder = "시험 이름으로 검색하기";
|
@@ -1911,13 +1912,13 @@ var no_data = "데이터 없음";
|
|
1911
1912
|
var internet_connection_was_lost = "인터넷 연결이 끊어졌습니다";
|
1912
1913
|
var internet_connection_is_back = "인터넷 연결이 다시 돌아왔습니다";
|
1913
1914
|
var problem = "문제";
|
1914
|
-
var number_problem = "{{number}}
|
1915
|
+
var number_problem = "문제 {{number}}";
|
1915
1916
|
var problems = "문제";
|
1916
1917
|
var problem_solving_time = "문제풀이 시간";
|
1917
1918
|
var minutes = "분";
|
1918
1919
|
var correct_rate = "정답률";
|
1919
1920
|
var title = "제목";
|
1920
|
-
var
|
1921
|
+
var exam_duration = "시험 시간";
|
1921
1922
|
var answer_count = "답변 수";
|
1922
1923
|
var question_count = "문제 갯수";
|
1923
1924
|
var multi_choice = "여러 개임";
|
@@ -1935,7 +1936,8 @@ var select_placeholder = "선택하다...";
|
|
1935
1936
|
var view_exam = "시험 보기";
|
1936
1937
|
var back = "뒤쪽에";
|
1937
1938
|
var edit = "편집하기";
|
1938
|
-
var
|
1939
|
+
var date_format_exam = "YYYY년 MM월";
|
1940
|
+
var date_format = "YYYY년 MM월 DD일";
|
1939
1941
|
var date_time_format = "YYYY년 MM월 DD일 HH:mm";
|
1940
1942
|
var date_time_format_12h = "YYYY-MM-DD HH:mm A";
|
1941
1943
|
var full_date_time_format = "YYYY년 MMMM월 DD일 HH:mm:ss";
|
@@ -2183,8 +2185,8 @@ var class_information = "수업정보";
|
|
2183
2185
|
var teachers = "교사";
|
2184
2186
|
var lessons = "수업";
|
2185
2187
|
var new_test = "새로운 시험";
|
2186
|
-
var
|
2187
|
-
var
|
2188
|
+
var manage_saved_exams = "저장된 시험 관리";
|
2189
|
+
var manage_textbook = "교과서 관리";
|
2188
2190
|
var my_question = "내 질문";
|
2189
2191
|
var update_class = "수업 업데이트";
|
2190
2192
|
var create_class = "수업 만들기";
|
@@ -2210,7 +2212,7 @@ var tricky_problems = "까다로웠던 문제";
|
|
2210
2212
|
var issues_vulnerable = "내가 취약한 문제";
|
2211
2213
|
var grades_by_area = "영역별 성적";
|
2212
2214
|
var problems_that_took_a_long_time = "시간이 오래 걸린 문제";
|
2213
|
-
var my_time = "
|
2215
|
+
var my_time = "내 시간";
|
2214
2216
|
var top_time = "상위권 시간";
|
2215
2217
|
var easy_problem = "쉬운 문제";
|
2216
2218
|
var trick_problem = "함정 문제";
|
@@ -2225,8 +2227,8 @@ var chosen = "정답";
|
|
2225
2227
|
var sign_in_with_your_google_account = "Google 계정으로 로그인";
|
2226
2228
|
var it_will_be_generated_automatically_if_not_provided = "제공되지 않으면 자동으로 생성됩니다";
|
2227
2229
|
var academy_not_found = "아카데미를 찾을 수 없습니다";
|
2228
|
-
var
|
2229
|
-
var
|
2230
|
+
var all_notice = "전체 공지";
|
2231
|
+
var institute_notice = "학원 공지";
|
2230
2232
|
var class_notice = "수업 공지";
|
2231
2233
|
var create_account_demo = "계정 데모 만들기";
|
2232
2234
|
var update_data_demo = "데이터 데모 업데이트";
|
@@ -2252,7 +2254,7 @@ var next = "다음";
|
|
2252
2254
|
var complete_processing = "완료 처리";
|
2253
2255
|
var creation_date = "생성 날짜";
|
2254
2256
|
var total_use = "총 사용량";
|
2255
|
-
var
|
2257
|
+
var duration = "지속";
|
2256
2258
|
var code_header = "암호";
|
2257
2259
|
var total_number_of_students_participating = "참여한 총 학생 수";
|
2258
2260
|
var create = "생성하기";
|
@@ -2472,6 +2474,33 @@ var full_name_is_required = "성명은 필수 항목입니다";
|
|
2472
2474
|
var email_is_required = "이메일은 필수입니다";
|
2473
2475
|
var not_found = "찾을 수 없음";
|
2474
2476
|
var enter_text_to_confirm_delete = "삭제를 확인하려면 \"{{text}}\" 를 입력하세요";
|
2477
|
+
var begin_exam = "시험 시작";
|
2478
|
+
var scheduled = "오늘 수업";
|
2479
|
+
var attended = "출석 완료";
|
2480
|
+
var today_classes = "오늘의 수업";
|
2481
|
+
var print_all = "전체 출력";
|
2482
|
+
var exam = "시험";
|
2483
|
+
var me = "나";
|
2484
|
+
var teacher_name = "선생님 성함";
|
2485
|
+
var class_schedule = "수업 시간표";
|
2486
|
+
var summary = "요약";
|
2487
|
+
var load_exam = "시험 로드";
|
2488
|
+
var exam_name = "시험 이름";
|
2489
|
+
var student_phone_number_header = "학생 전화번호";
|
2490
|
+
var parent_phone_number_header = "학부모 전화번호";
|
2491
|
+
var cases = "{{number}}건";
|
2492
|
+
var my_classes = "내 수업";
|
2493
|
+
var choose = "선택하다";
|
2494
|
+
var additional_duration = "추가 기간";
|
2495
|
+
var enter_textbook_name_to_search = "검색할 교재명을 입력하세요";
|
2496
|
+
var select_class_placeholder = "수업을 선택하세요...";
|
2497
|
+
var user_name = "유저 이름";
|
2498
|
+
var vulnerable_detail = "다른 학생들의 정답률은 높은데, 나는 정답을 맞추지 못한 문제들입니다.";
|
2499
|
+
var protracted_problem_detail = "정답 문제 중 풀이 시간을 비교합니다.";
|
2500
|
+
var number_of_correct_answers = "정답 수";
|
2501
|
+
var total_solve_time = "총 풀이 시간";
|
2502
|
+
var number_of_answer = "{{ number }} 개";
|
2503
|
+
var time_comparison = "시간 비교";
|
2475
2504
|
var lang_ko = {
|
2476
2505
|
problem_solving: problem_solving,
|
2477
2506
|
my_story: my_story,
|
@@ -2487,7 +2516,7 @@ var lang_ko = {
|
|
2487
2516
|
user_manager: user_manager,
|
2488
2517
|
recent_exam_results: recent_exam_results,
|
2489
2518
|
instructor_name: instructor_name,
|
2490
|
-
|
2519
|
+
institute_name: institute_name,
|
2491
2520
|
total_students: total_students,
|
2492
2521
|
total_class: total_class,
|
2493
2522
|
total_number_students: total_number_students,
|
@@ -2525,6 +2554,7 @@ var lang_ko = {
|
|
2525
2554
|
full_pool_time: full_pool_time,
|
2526
2555
|
number_question: number_question,
|
2527
2556
|
number_answer: number_answer,
|
2557
|
+
answer_no: answer_no,
|
2528
2558
|
answer_rate: answer_rate,
|
2529
2559
|
seconds: seconds,
|
2530
2560
|
search_placeholder: search_placeholder,
|
@@ -2546,7 +2576,7 @@ var lang_ko = {
|
|
2546
2576
|
minutes: minutes,
|
2547
2577
|
correct_rate: correct_rate,
|
2548
2578
|
title: title,
|
2549
|
-
|
2579
|
+
exam_duration: exam_duration,
|
2550
2580
|
answer_count: answer_count,
|
2551
2581
|
question_count: question_count,
|
2552
2582
|
multi_choice: multi_choice,
|
@@ -2565,6 +2595,7 @@ var lang_ko = {
|
|
2565
2595
|
back: back,
|
2566
2596
|
edit: edit,
|
2567
2597
|
"delete": "삭제하기",
|
2598
|
+
date_format_exam: date_format_exam,
|
2568
2599
|
date_format: date_format,
|
2569
2600
|
date_time_format: date_time_format,
|
2570
2601
|
date_time_format_12h: date_time_format_12h,
|
@@ -2799,8 +2830,8 @@ var lang_ko = {
|
|
2799
2830
|
teachers: teachers,
|
2800
2831
|
lessons: lessons,
|
2801
2832
|
new_test: new_test,
|
2802
|
-
|
2803
|
-
|
2833
|
+
manage_saved_exams: manage_saved_exams,
|
2834
|
+
manage_textbook: manage_textbook,
|
2804
2835
|
my_question: my_question,
|
2805
2836
|
update_class: update_class,
|
2806
2837
|
create_class: create_class,
|
@@ -2841,8 +2872,8 @@ var lang_ko = {
|
|
2841
2872
|
sign_in_with_your_google_account: sign_in_with_your_google_account,
|
2842
2873
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided,
|
2843
2874
|
academy_not_found: academy_not_found,
|
2844
|
-
|
2845
|
-
|
2875
|
+
all_notice: all_notice,
|
2876
|
+
institute_notice: institute_notice,
|
2846
2877
|
class_notice: class_notice,
|
2847
2878
|
create_account_demo: create_account_demo,
|
2848
2879
|
update_data_demo: update_data_demo,
|
@@ -2871,7 +2902,7 @@ var lang_ko = {
|
|
2871
2902
|
complete_processing: complete_processing,
|
2872
2903
|
creation_date: creation_date,
|
2873
2904
|
total_use: total_use,
|
2874
|
-
|
2905
|
+
duration: duration,
|
2875
2906
|
code_header: code_header,
|
2876
2907
|
total_number_of_students_participating: total_number_of_students_participating,
|
2877
2908
|
create: create,
|
@@ -3092,11 +3123,39 @@ var lang_ko = {
|
|
3092
3123
|
full_name_is_required: full_name_is_required,
|
3093
3124
|
email_is_required: email_is_required,
|
3094
3125
|
not_found: not_found,
|
3095
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete
|
3126
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete,
|
3127
|
+
begin_exam: begin_exam,
|
3128
|
+
scheduled: scheduled,
|
3129
|
+
attended: attended,
|
3130
|
+
today_classes: today_classes,
|
3131
|
+
print_all: print_all,
|
3132
|
+
exam: exam,
|
3133
|
+
me: me,
|
3134
|
+
teacher_name: teacher_name,
|
3135
|
+
class_schedule: class_schedule,
|
3136
|
+
summary: summary,
|
3137
|
+
load_exam: load_exam,
|
3138
|
+
exam_name: exam_name,
|
3139
|
+
student_phone_number_header: student_phone_number_header,
|
3140
|
+
parent_phone_number_header: parent_phone_number_header,
|
3141
|
+
cases: cases,
|
3142
|
+
my_classes: my_classes,
|
3143
|
+
choose: choose,
|
3144
|
+
additional_duration: additional_duration,
|
3145
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search,
|
3146
|
+
"type_at_least_{number}_characters_to_search": "검색하려면 최소 {{ number }}자를 입력하세요",
|
3147
|
+
select_class_placeholder: select_class_placeholder,
|
3148
|
+
user_name: user_name,
|
3149
|
+
vulnerable_detail: vulnerable_detail,
|
3150
|
+
protracted_problem_detail: protracted_problem_detail,
|
3151
|
+
number_of_correct_answers: number_of_correct_answers,
|
3152
|
+
total_solve_time: total_solve_time,
|
3153
|
+
number_of_answer: number_of_answer,
|
3154
|
+
time_comparison: time_comparison
|
3096
3155
|
};
|
3097
3156
|
|
3098
3157
|
var problem_solving$1 = "Problem Solving";
|
3099
|
-
var my_story$1 = "
|
3158
|
+
var my_story$1 = "Exam History";
|
3100
3159
|
var search_find$1 = "Search and find";
|
3101
3160
|
var enter_test_code$1 = "Enter test code";
|
3102
3161
|
var login_success$1 = "Login Success";
|
@@ -3109,7 +3168,7 @@ var student_status$1 = "Student Status";
|
|
3109
3168
|
var user_manager$1 = "User Manager";
|
3110
3169
|
var recent_exam_results$1 = "Recent exam";
|
3111
3170
|
var instructor_name$1 = "Instructor name";
|
3112
|
-
var
|
3171
|
+
var institute_name$1 = "Institute name";
|
3113
3172
|
var total_students$1 = "Total students";
|
3114
3173
|
var total_class$1 = "Total Class";
|
3115
3174
|
var total_number_students$1 = "Total number of students";
|
@@ -3125,10 +3184,10 @@ var time_remaining$1 = "Time remaining";
|
|
3125
3184
|
var number_results$1 = "{{number}} Results";
|
3126
3185
|
var number_result$1 = "{{number}} Result";
|
3127
3186
|
var mins_mins_seconds_seconds$1 = "{{mins}}m {{seconds}}s";
|
3128
|
-
var mins_mins$1 = "{{mins}}
|
3187
|
+
var mins_mins$1 = "{{mins}} Minutes";
|
3129
3188
|
var class_name$1 = "Class name";
|
3130
3189
|
var create_new_exam$1 = "Create exam";
|
3131
|
-
var live_exam$1 = "Live
|
3190
|
+
var live_exam$1 = "Live Exam";
|
3132
3191
|
var there_are_no_recent_exams$1 = "There are no recent exams";
|
3133
3192
|
var you_have_started_an_exam_with_code_code_do_you_want_to_continue$1 = "You have started an exam with code {{code}}, do you want to continue?";
|
3134
3193
|
var here$1 = "here";
|
@@ -3145,6 +3204,7 @@ var student_name$1 = "Student name";
|
|
3145
3204
|
var full_pool_time$1 = "Full pool time";
|
3146
3205
|
var number_question$1 = "No.{{number}}";
|
3147
3206
|
var number_answer$1 = "No.{{number}}";
|
3207
|
+
var answer_no$1 = "Ans.{{number}}";
|
3148
3208
|
var answer_rate$1 = "Answer rate";
|
3149
3209
|
var seconds$1 = "s";
|
3150
3210
|
var search_placeholder$1 = "Search by exam name";
|
@@ -3214,7 +3274,7 @@ var email$1 = "Email";
|
|
3214
3274
|
var is_paid$1 = "Is paid";
|
3215
3275
|
var payment_time$1 = "Payment time";
|
3216
3276
|
var payments$1 = "Payments";
|
3217
|
-
var
|
3277
|
+
var exam_duration$1 = "Exam Duration";
|
3218
3278
|
var answer_count$1 = "Answer count";
|
3219
3279
|
var question_count$1 = "Question count";
|
3220
3280
|
var multi_choice$1 = "Is multiple";
|
@@ -3223,8 +3283,9 @@ var view_exam$1 = "View exam";
|
|
3223
3283
|
var update_exam$1 = "Update exam";
|
3224
3284
|
var create_exam$1 = "Create exam";
|
3225
3285
|
var back$1 = "Back";
|
3226
|
-
var
|
3227
|
-
var
|
3286
|
+
var date_format_exam$1 = "MMMM YYYY";
|
3287
|
+
var date_format$1 = "MMM.D YYYY";
|
3288
|
+
var date_time_format$1 = "HH:mm MMM.D YYYY ";
|
3228
3289
|
var date_time_format_12h$1 = "MM-DD-YYYY HH:mm A";
|
3229
3290
|
var full_date_time_format$1 = "MMM Do YYYY HH:mm:ss";
|
3230
3291
|
var total_questions$1 = "Total questions";
|
@@ -3292,8 +3353,8 @@ var button$1 = {
|
|
3292
3353
|
close: "Close",
|
3293
3354
|
send: "Send"
|
3294
3355
|
};
|
3295
|
-
var question_and_answer$1 = "
|
3296
|
-
var problem_number_question$1 = "
|
3356
|
+
var question_and_answer$1 = "My Q&As";
|
3357
|
+
var problem_number_question$1 = "Question {{number}}";
|
3297
3358
|
var teacher_in_charge$1 = "Teacher In Charge";
|
3298
3359
|
var counselor$1 = "Counselor";
|
3299
3360
|
var new_question$1 = "New Question";
|
@@ -3308,7 +3369,7 @@ var no_academies_available$1 = "No academies available";
|
|
3308
3369
|
var not_allow_register$1 = "Not allow to register role";
|
3309
3370
|
var credentials_invalid$1 = "Credentials is invalid";
|
3310
3371
|
var role_is_invalid$1 = "Role is invalid";
|
3311
|
-
var today$1 = "
|
3372
|
+
var today$1 = "Today";
|
3312
3373
|
var user_is_disabled$1 = "User is disabled";
|
3313
3374
|
var cover_image$1 = "Cover image";
|
3314
3375
|
var notification$1 = "Notification";
|
@@ -3363,7 +3424,7 @@ var enter_subject_name_to_search$1 = "Enter subject name to search subjects";
|
|
3363
3424
|
var enter_textbook_title$1 = "Enter textbook title";
|
3364
3425
|
var chapter_name_placeholder$1 = "Enter chapter name";
|
3365
3426
|
var subchapter_name_placeholder$1 = "Enter subchapter name";
|
3366
|
-
var article_number$1 = "
|
3427
|
+
var article_number$1 = "Passage";
|
3367
3428
|
var question_count_format$1 = "No.{{number}}";
|
3368
3429
|
var select_category$1 = "Select category";
|
3369
3430
|
var update_textbook$1 = "Update textbook";
|
@@ -3377,14 +3438,14 @@ var add_new_chapter_to_textbook$1 = "Add new chapter to the textbook";
|
|
3377
3438
|
var add_new_subchapter_to_parent_chapter$1 = "Add new subchapter to the parent chapter ({{ chapterName }})";
|
3378
3439
|
var add$1 = "Add";
|
3379
3440
|
var add_new_article_to_chapter$1 = "Add new article to the chapter ({{ chapterName }})";
|
3380
|
-
var score_format$1 = "{{score}}
|
3441
|
+
var score_format$1 = "{{score}} Points";
|
3381
3442
|
var round$1 = "{{number}} round";
|
3382
3443
|
var number_grade$1 = "Grade {{number}}";
|
3383
3444
|
var print$1 = "Print";
|
3384
3445
|
var school$1 = "School";
|
3385
|
-
var grade$1 = "
|
3386
|
-
var student_phone_number$1 = "Student
|
3387
|
-
var parent_phone_number$1 = "Parent
|
3446
|
+
var grade$1 = "Year";
|
3447
|
+
var student_phone_number$1 = "Student Number";
|
3448
|
+
var parent_phone_number$1 = "Parent Number";
|
3388
3449
|
var update_textbook_title$1 = "Update textbook title";
|
3389
3450
|
var invalid_weekly_day_time$1 = "Invalid weekly day time";
|
3390
3451
|
var no_image$1 = "No image";
|
@@ -3403,7 +3464,7 @@ var switch_academy$1 = "Switch Academy";
|
|
3403
3464
|
var there_are_no_lessons_this_week$1 = "There are no lessons this week";
|
3404
3465
|
var today_lessons$1 = "Today lessons";
|
3405
3466
|
var update_message$1 = "Update message";
|
3406
|
-
var attachment$1 = "
|
3467
|
+
var attachment$1 = "Add File";
|
3407
3468
|
var confirm_delete_message$1 = "Are you sure to delete this message?";
|
3408
3469
|
var download$1 = "Download";
|
3409
3470
|
var full_exam$1 = "Full exam";
|
@@ -3429,8 +3490,8 @@ var my_problem_solving_order$1 = "My problem solving order";
|
|
3429
3490
|
var top_rankings_problem_solving_order$1 = "Top rankings problem solving order";
|
3430
3491
|
var comparison_of_top_rankings_and_problem_solving_order$1 = "Comparison of top rankings and problem-solving order";
|
3431
3492
|
var my_answers$1 = "My answers";
|
3432
|
-
var request_for_consultation$1 = "
|
3433
|
-
var ask_a_question_with_a_problem$1 = "Ask
|
3493
|
+
var request_for_consultation$1 = "Consultation";
|
3494
|
+
var ask_a_question_with_a_problem$1 = "Ask with Question ";
|
3434
3495
|
var live$1 = "live";
|
3435
3496
|
var user_email$1 = "User email";
|
3436
3497
|
var user_academy$1 = {
|
@@ -3458,9 +3519,9 @@ var lessons$1 = "Lessons";
|
|
3458
3519
|
var update_class$1 = "Update class";
|
3459
3520
|
var create_class$1 = "Create class";
|
3460
3521
|
var new_test$1 = "New Test";
|
3461
|
-
var
|
3462
|
-
var
|
3463
|
-
var my_question$1 = "My
|
3522
|
+
var manage_saved_exams$1 = "Manage saved exams";
|
3523
|
+
var manage_textbook$1 = "Manage Textbook";
|
3524
|
+
var my_question$1 = "My Q&As";
|
3464
3525
|
var problem_number$1 = "Problem number";
|
3465
3526
|
var solve_time$1 = "Solve time";
|
3466
3527
|
var comparison_of_top_rankings$1 = "Comparison of top rankings";
|
@@ -3497,8 +3558,8 @@ var chosen$1 = "Answer";
|
|
3497
3558
|
var sign_in_with_your_google_account$1 = "Sign in with your Google Account";
|
3498
3559
|
var it_will_be_generated_automatically_if_not_provided$1 = "It will be generated automatically if not provided";
|
3499
3560
|
var academy_not_found$1 = "Academy not found";
|
3500
|
-
var
|
3501
|
-
var
|
3561
|
+
var all_notice$1 = "All notice";
|
3562
|
+
var institute_notice$1 = "Institute Notice";
|
3502
3563
|
var class_notice$1 = "Class Notice";
|
3503
3564
|
var create_account_demo$1 = "Create Account Demo";
|
3504
3565
|
var update_data_demo$1 = "Update Data Demo";
|
@@ -3524,7 +3585,7 @@ var next$1 = "Next";
|
|
3524
3585
|
var complete_processing$1 = "Complete processing";
|
3525
3586
|
var creation_date$1 = "Creation date";
|
3526
3587
|
var total_use$1 = "Total use";
|
3527
|
-
var
|
3588
|
+
var duration$1 = "Duration";
|
3528
3589
|
var code_header$1 = "Code";
|
3529
3590
|
var total_number_of_students_participating$1 = "Total number of students participating";
|
3530
3591
|
var create$1 = "Create";
|
@@ -3540,7 +3601,7 @@ var time_heatmap_for_each_problem$1 = "Time heatmap for each problem";
|
|
3540
3601
|
var learn_more$1 = "Learn more";
|
3541
3602
|
var total_number_of_problems$1 = "Total number of problems";
|
3542
3603
|
var time_limit$1 = "time_limit";
|
3543
|
-
var add_questions$1 = "Add
|
3604
|
+
var add_questions$1 = "Add Passage";
|
3544
3605
|
var start_exam$1 = "Start Exam";
|
3545
3606
|
var copy_test_code$1 = "Copy Test Code";
|
3546
3607
|
var student_has_joined$1 = "Student has joined:";
|
@@ -3721,6 +3782,33 @@ var full_name_is_required$1 = "Full name is required";
|
|
3721
3782
|
var email_is_required$1 = "Email is required";
|
3722
3783
|
var not_found$1 = "Not found";
|
3723
3784
|
var enter_text_to_confirm_delete$1 = "Enter \"{{text}}\" to confirm delete";
|
3785
|
+
var begin_exam$1 = "Begin Exam";
|
3786
|
+
var scheduled$1 = "Scheduled";
|
3787
|
+
var attended$1 = "Attended";
|
3788
|
+
var today_classes$1 = "Today's Classes";
|
3789
|
+
var print_all$1 = "Print All";
|
3790
|
+
var exam$1 = "Exam";
|
3791
|
+
var me$1 = "Me";
|
3792
|
+
var teacher_name$1 = "Teacher Name";
|
3793
|
+
var class_schedule$1 = "Class Schedule";
|
3794
|
+
var summary$1 = "Summary";
|
3795
|
+
var load_exam$1 = "Load Exam";
|
3796
|
+
var exam_name$1 = "Exam Name";
|
3797
|
+
var student_phone_number_header$1 = "Stud. Number";
|
3798
|
+
var parent_phone_number_header$1 = "Prnt. Number";
|
3799
|
+
var cases$1 = "{{number}} Results";
|
3800
|
+
var my_classes$1 = "My Classes";
|
3801
|
+
var choose$1 = "Choose";
|
3802
|
+
var additional_duration$1 = "Additional duration";
|
3803
|
+
var enter_textbook_name_to_search$1 = "Enter textbook name to search";
|
3804
|
+
var select_class_placeholder$1 = "Select class...";
|
3805
|
+
var user_name$1 = "Username";
|
3806
|
+
var vulnerable_detail$1 = "Other students had a high percentage of correct answers, but I could not answer these questions correctly.";
|
3807
|
+
var protracted_problem_detail$1 = "Compare the solution time among the correct answers.";
|
3808
|
+
var number_of_correct_answers$1 = "Number of correct answers";
|
3809
|
+
var total_solve_time$1 = "Total solve time";
|
3810
|
+
var number_of_answer$1 = "{{ number }}";
|
3811
|
+
var time_comparison$1 = "Time comparison";
|
3724
3812
|
var lang_en = {
|
3725
3813
|
problem_solving: problem_solving$1,
|
3726
3814
|
my_story: my_story$1,
|
@@ -3736,7 +3824,7 @@ var lang_en = {
|
|
3736
3824
|
user_manager: user_manager$1,
|
3737
3825
|
recent_exam_results: recent_exam_results$1,
|
3738
3826
|
instructor_name: instructor_name$1,
|
3739
|
-
|
3827
|
+
institute_name: institute_name$1,
|
3740
3828
|
total_students: total_students$1,
|
3741
3829
|
total_class: total_class$1,
|
3742
3830
|
total_number_students: total_number_students$1,
|
@@ -3774,6 +3862,7 @@ var lang_en = {
|
|
3774
3862
|
full_pool_time: full_pool_time$1,
|
3775
3863
|
number_question: number_question$1,
|
3776
3864
|
number_answer: number_answer$1,
|
3865
|
+
answer_no: answer_no$1,
|
3777
3866
|
answer_rate: answer_rate$1,
|
3778
3867
|
seconds: seconds$1,
|
3779
3868
|
search_placeholder: search_placeholder$1,
|
@@ -3844,7 +3933,7 @@ var lang_en = {
|
|
3844
3933
|
is_paid: is_paid$1,
|
3845
3934
|
payment_time: payment_time$1,
|
3846
3935
|
payments: payments$1,
|
3847
|
-
|
3936
|
+
exam_duration: exam_duration$1,
|
3848
3937
|
answer_count: answer_count$1,
|
3849
3938
|
question_count: question_count$1,
|
3850
3939
|
multi_choice: multi_choice$1,
|
@@ -3853,6 +3942,7 @@ var lang_en = {
|
|
3853
3942
|
update_exam: update_exam$1,
|
3854
3943
|
create_exam: create_exam$1,
|
3855
3944
|
back: back$1,
|
3945
|
+
date_format_exam: date_format_exam$1,
|
3856
3946
|
date_format: date_format$1,
|
3857
3947
|
date_time_format: date_time_format$1,
|
3858
3948
|
date_time_format_12h: date_time_format_12h$1,
|
@@ -4074,8 +4164,8 @@ var lang_en = {
|
|
4074
4164
|
update_class: update_class$1,
|
4075
4165
|
create_class: create_class$1,
|
4076
4166
|
new_test: new_test$1,
|
4077
|
-
|
4078
|
-
|
4167
|
+
manage_saved_exams: manage_saved_exams$1,
|
4168
|
+
manage_textbook: manage_textbook$1,
|
4079
4169
|
my_question: my_question$1,
|
4080
4170
|
problem_number: problem_number$1,
|
4081
4171
|
solve_time: solve_time$1,
|
@@ -4113,8 +4203,8 @@ var lang_en = {
|
|
4113
4203
|
sign_in_with_your_google_account: sign_in_with_your_google_account$1,
|
4114
4204
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided$1,
|
4115
4205
|
academy_not_found: academy_not_found$1,
|
4116
|
-
|
4117
|
-
|
4206
|
+
all_notice: all_notice$1,
|
4207
|
+
institute_notice: institute_notice$1,
|
4118
4208
|
class_notice: class_notice$1,
|
4119
4209
|
create_account_demo: create_account_demo$1,
|
4120
4210
|
update_data_demo: update_data_demo$1,
|
@@ -4143,7 +4233,7 @@ var lang_en = {
|
|
4143
4233
|
complete_processing: complete_processing$1,
|
4144
4234
|
creation_date: creation_date$1,
|
4145
4235
|
total_use: total_use$1,
|
4146
|
-
|
4236
|
+
duration: duration$1,
|
4147
4237
|
code_header: code_header$1,
|
4148
4238
|
total_number_of_students_participating: total_number_of_students_participating$1,
|
4149
4239
|
create: create$1,
|
@@ -4341,7 +4431,35 @@ var lang_en = {
|
|
4341
4431
|
full_name_is_required: full_name_is_required$1,
|
4342
4432
|
email_is_required: email_is_required$1,
|
4343
4433
|
not_found: not_found$1,
|
4344
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1
|
4434
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1,
|
4435
|
+
begin_exam: begin_exam$1,
|
4436
|
+
scheduled: scheduled$1,
|
4437
|
+
attended: attended$1,
|
4438
|
+
today_classes: today_classes$1,
|
4439
|
+
print_all: print_all$1,
|
4440
|
+
exam: exam$1,
|
4441
|
+
me: me$1,
|
4442
|
+
teacher_name: teacher_name$1,
|
4443
|
+
class_schedule: class_schedule$1,
|
4444
|
+
summary: summary$1,
|
4445
|
+
load_exam: load_exam$1,
|
4446
|
+
exam_name: exam_name$1,
|
4447
|
+
student_phone_number_header: student_phone_number_header$1,
|
4448
|
+
parent_phone_number_header: parent_phone_number_header$1,
|
4449
|
+
cases: cases$1,
|
4450
|
+
my_classes: my_classes$1,
|
4451
|
+
choose: choose$1,
|
4452
|
+
additional_duration: additional_duration$1,
|
4453
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search$1,
|
4454
|
+
"type_at_least_{number}_characters_to_search": "Type at least {{ number }} characters to search",
|
4455
|
+
select_class_placeholder: select_class_placeholder$1,
|
4456
|
+
user_name: user_name$1,
|
4457
|
+
vulnerable_detail: vulnerable_detail$1,
|
4458
|
+
protracted_problem_detail: protracted_problem_detail$1,
|
4459
|
+
number_of_correct_answers: number_of_correct_answers$1,
|
4460
|
+
total_solve_time: total_solve_time$1,
|
4461
|
+
number_of_answer: number_of_answer$1,
|
4462
|
+
time_comparison: time_comparison$1
|
4345
4463
|
};
|
4346
4464
|
|
4347
4465
|
i18n.use(reactI18next.initReactI18next).init({
|
@@ -4530,6 +4648,36 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4530
4648
|
return Promise.reject(e);
|
4531
4649
|
}
|
4532
4650
|
};
|
4651
|
+
var handleLogOutAcademy = function handleLogOutAcademy(selectedAcademy, callback) {
|
4652
|
+
try {
|
4653
|
+
var _temp7 = function _temp7() {
|
4654
|
+
dispatch(setLoading(false));
|
4655
|
+
callback();
|
4656
|
+
};
|
4657
|
+
dispatch(setLoading(true));
|
4658
|
+
var academyDomain = selectedAcademy ? selectedAcademy.domain : undefined;
|
4659
|
+
var _temp6 = _catch(function () {
|
4660
|
+
return Promise.resolve(switchAcademy(0)).then(function (res) {
|
4661
|
+
var data = res.data;
|
4662
|
+
var requestBody = {
|
4663
|
+
accessToken: data.accessToken,
|
4664
|
+
email: user.email,
|
4665
|
+
academyId: 0,
|
4666
|
+
role: role
|
4667
|
+
};
|
4668
|
+
academyDomain && localStorage.setItem(ACADEMY_DOMAIN, academyDomain);
|
4669
|
+
!academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4670
|
+
return Promise.resolve(handleLoginAccessToken(requestBody, false, user.academyDomain ? academyDomain : undefined)).then(function () {});
|
4671
|
+
});
|
4672
|
+
}, function (error) {
|
4673
|
+
academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4674
|
+
reactToastify.toast.error(getErrorMessage(t, error));
|
4675
|
+
});
|
4676
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6));
|
4677
|
+
} catch (e) {
|
4678
|
+
return Promise.reject(e);
|
4679
|
+
}
|
4680
|
+
};
|
4533
4681
|
React.useEffect(function () {
|
4534
4682
|
getAcademies();
|
4535
4683
|
}, [user === null || user === void 0 ? void 0 : user.academyDomain, user === null || user === void 0 ? void 0 : user.email]);
|
@@ -4547,7 +4695,8 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4547
4695
|
dropdownOpen: dropdownOpen,
|
4548
4696
|
academyList: academyList,
|
4549
4697
|
toggleDropdown: toggleDropdown,
|
4550
|
-
handleSwitchAcademy: handleSwitchAcademy
|
4698
|
+
handleSwitchAcademy: handleSwitchAcademy,
|
4699
|
+
handleLogOutAcademy: handleLogOutAcademy
|
4551
4700
|
};
|
4552
4701
|
};
|
4553
4702
|
|
@@ -4555,23 +4704,25 @@ var MenuItemCustom = material.styled(MenuItem)(function () {
|
|
4555
4704
|
return {
|
4556
4705
|
'&.Mui-selected': {
|
4557
4706
|
backgroundColor: styles.light
|
4558
|
-
}
|
4707
|
+
},
|
4708
|
+
padding: "12px 8px"
|
4559
4709
|
};
|
4560
4710
|
});
|
4561
4711
|
var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
4562
|
-
var _user$roles
|
4712
|
+
var _user$roles;
|
4563
4713
|
var role = _ref.role,
|
4564
4714
|
history = _ref.history,
|
4565
4715
|
homeAcademyUrl = _ref.homeAcademyUrl,
|
4566
4716
|
homeUrl = _ref.homeUrl,
|
4567
|
-
|
4568
|
-
|
4717
|
+
hideAcademyName = _ref.hideAcademyName,
|
4718
|
+
onSignOut = _ref.onSignOut;
|
4569
4719
|
var theme = material.useTheme();
|
4570
4720
|
var isLargerThanLg = material.useMediaQuery(theme.breakpoints.up("lg"));
|
4571
4721
|
var _useSwitchAcademy = useSwitchAcademy(role, history, homeAcademyUrl, homeUrl),
|
4572
4722
|
academyList = _useSwitchAcademy.academyList,
|
4573
4723
|
handleSwitchAcademy = _useSwitchAcademy.handleSwitchAcademy,
|
4574
|
-
selectedAcademy = _useSwitchAcademy.selectedAcademy
|
4724
|
+
selectedAcademy = _useSwitchAcademy.selectedAcademy,
|
4725
|
+
handleLogOutAcademy = _useSwitchAcademy.handleLogOutAcademy;
|
4575
4726
|
var user = reactRedux.useSelector(function (state) {
|
4576
4727
|
var _state$common;
|
4577
4728
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
@@ -4593,8 +4744,6 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4593
4744
|
handleClose();
|
4594
4745
|
handleSwitchAcademy(data);
|
4595
4746
|
};
|
4596
|
-
var firstLetter = selectedAcademy === null || selectedAcademy === void 0 ? void 0 : (_selectedAcademy$name = selectedAcademy.name) === null || _selectedAcademy$name === void 0 ? void 0 : (_selectedAcademy$name2 = _selectedAcademy$name.charAt(0)) === null || _selectedAcademy$name2 === void 0 ? void 0 : _selectedAcademy$name2.toUpperCase();
|
4597
|
-
if (!academyList.length) return React__default.createElement(React.Fragment, null);
|
4598
4747
|
var popoverStyle = {
|
4599
4748
|
mx: 1,
|
4600
4749
|
bgcolor: open ? "action.selected" : undefined
|
@@ -4615,7 +4764,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4615
4764
|
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.image ? React__default.createElement("img", {
|
4616
4765
|
src: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.image,
|
4617
4766
|
alt: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name
|
4618
|
-
}) : React__default.createElement("span", null
|
4767
|
+
}) : React__default.createElement("span", null)), isLargerThanLg && React__default.createElement(material.Grid, {
|
4619
4768
|
item: true,
|
4620
4769
|
xs: 0,
|
4621
4770
|
lg: 8
|
@@ -4627,16 +4776,40 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4627
4776
|
display: "flex",
|
4628
4777
|
alignItems: "center"
|
4629
4778
|
}
|
4630
|
-
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(material.
|
4779
|
+
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(material.Stack, {
|
4780
|
+
flexDirection: "column",
|
4781
|
+
gap: "2px"
|
4782
|
+
}, React__default.createElement(material.Typography, {
|
4631
4783
|
textAlign: "start",
|
4632
4784
|
className: "" + styles["line-clamp"],
|
4633
4785
|
sx: {
|
4634
4786
|
fontSize: 14,
|
4635
|
-
fontWeight:
|
4787
|
+
fontWeight: 900,
|
4636
4788
|
lineHeight: '1.5em',
|
4637
4789
|
color: styles.gray_900
|
4638
4790
|
}
|
4639
|
-
},
|
4791
|
+
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(material.Typography, {
|
4792
|
+
textAlign: "start",
|
4793
|
+
className: "" + styles["line-clamp"],
|
4794
|
+
sx: {
|
4795
|
+
fontSize: 14,
|
4796
|
+
fontWeight: 500,
|
4797
|
+
lineHeight: '1.5em',
|
4798
|
+
color: styles.gray_500
|
4799
|
+
}
|
4800
|
+
}, selectedAcademy.name)) : React__default.createElement(material.Stack, {
|
4801
|
+
flexDirection: "column",
|
4802
|
+
gap: "2px"
|
4803
|
+
}, React__default.createElement(material.Typography, {
|
4804
|
+
textAlign: "start",
|
4805
|
+
className: "" + styles["line-clamp"],
|
4806
|
+
sx: {
|
4807
|
+
fontSize: 14,
|
4808
|
+
fontWeight: 900,
|
4809
|
+
lineHeight: '1.5em',
|
4810
|
+
color: styles.gray_900
|
4811
|
+
}
|
4812
|
+
}), React__default.createElement(material.Typography, {
|
4640
4813
|
textAlign: "start",
|
4641
4814
|
className: "" + styles["line-clamp"],
|
4642
4815
|
sx: {
|
@@ -4645,7 +4818,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4645
4818
|
lineHeight: '1.5em',
|
4646
4819
|
color: styles.gray_500
|
4647
4820
|
}
|
4648
|
-
}, t("no_academy_selected")))), React__default.createElement(material.Grid, {
|
4821
|
+
}, t("no_academy_selected"))))), React__default.createElement(material.Grid, {
|
4649
4822
|
item: true,
|
4650
4823
|
xs: 6,
|
4651
4824
|
lg: 2,
|
@@ -4667,6 +4840,11 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4667
4840
|
open: !!open,
|
4668
4841
|
anchorEl: open,
|
4669
4842
|
onClose: handleClose,
|
4843
|
+
sx: {
|
4844
|
+
"& .MuiPopover-paper": {
|
4845
|
+
padding: "8px !important"
|
4846
|
+
}
|
4847
|
+
},
|
4670
4848
|
anchorOrigin: {
|
4671
4849
|
vertical: "bottom",
|
4672
4850
|
horizontal: "right"
|
@@ -4692,25 +4870,31 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4692
4870
|
}, React__default.createElement(material.MenuList, {
|
4693
4871
|
sx: {
|
4694
4872
|
maxHeight: 240,
|
4695
|
-
overflowY: "auto"
|
4873
|
+
overflowY: "auto",
|
4874
|
+
padding: 0
|
4696
4875
|
}
|
4697
4876
|
}, academyList.map(function (option) {
|
4698
|
-
var _option$name$charAt;
|
4699
4877
|
return React__default.createElement(MenuItemCustom, {
|
4700
4878
|
key: option.id,
|
4701
4879
|
selected: option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id),
|
4702
4880
|
sx: {
|
4703
4881
|
whiteSpace: "wrap",
|
4704
|
-
borderRadius: "6px"
|
4882
|
+
borderRadius: "6px",
|
4883
|
+
display: "flex",
|
4884
|
+
gap: "8px"
|
4705
4885
|
},
|
4706
4886
|
onClick: function onClick() {
|
4707
4887
|
return option.id !== (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && handleChangeAcademy(option);
|
4708
4888
|
}
|
4709
4889
|
}, React__default.createElement(material.Stack, {
|
4710
4890
|
flexDirection: "row",
|
4711
|
-
|
4891
|
+
justifyContent: "space-between",
|
4892
|
+
alignItems: "center",
|
4712
4893
|
position: "relative",
|
4713
4894
|
width: "100%"
|
4895
|
+
}, React__default.createElement(material.Stack, {
|
4896
|
+
flexDirection: "row",
|
4897
|
+
gap: "12px"
|
4714
4898
|
}, React__default.createElement(material.Stack, {
|
4715
4899
|
className: styles["image-academy"] + " " + styles["image-academy--item"],
|
4716
4900
|
minWidth: "40px"
|
@@ -4718,7 +4902,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4718
4902
|
component: "img",
|
4719
4903
|
alt: option.name,
|
4720
4904
|
src: option.image
|
4721
|
-
}) : React__default.createElement("span", null
|
4905
|
+
}) : React__default.createElement("span", null)), React__default.createElement(Box, {
|
4722
4906
|
sx: {
|
4723
4907
|
position: "relative",
|
4724
4908
|
display: "flex",
|
@@ -4732,8 +4916,20 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4732
4916
|
lineHeight: '1.5em',
|
4733
4917
|
fontWeight: 600
|
4734
4918
|
}
|
4735
|
-
}, option.name))))
|
4736
|
-
|
4919
|
+
}, option.name))), option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && React__default.createElement("div", {
|
4920
|
+
onClick: function onClick() {
|
4921
|
+
return handleLogOutAcademy(selectedAcademy, handleClose);
|
4922
|
+
}
|
4923
|
+
}, React__default.createElement(io5.IoCloseCircle, {
|
4924
|
+
size: 18,
|
4925
|
+
color: styles.dark
|
4926
|
+
}))));
|
4927
|
+
})), React__default.createElement(material.Stack, {
|
4928
|
+
sx: {
|
4929
|
+
borderTop: "1px solid " + styles.gray_100,
|
4930
|
+
my: "8px"
|
4931
|
+
}
|
4932
|
+
}), React__default.createElement(MenuItemCustom, {
|
4737
4933
|
sx: {
|
4738
4934
|
whiteSpace: "wrap",
|
4739
4935
|
borderRadius: "6px"
|
@@ -4747,16 +4943,16 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4747
4943
|
alignItems: "center",
|
4748
4944
|
className: "" + styles["userImg"],
|
4749
4945
|
onClick: onSignOut
|
4750
|
-
}, React__default.createElement(
|
4751
|
-
size:
|
4752
|
-
color:
|
4946
|
+
}, React__default.createElement(io5.IoLogOut, {
|
4947
|
+
size: 18,
|
4948
|
+
color: styles.less_dark
|
4753
4949
|
}), React__default.createElement(material.Typography, {
|
4754
4950
|
sx: {
|
4755
4951
|
typography: "body2",
|
4756
|
-
p: "8px",
|
4757
4952
|
borderRadius: "4px",
|
4758
4953
|
fontSize: 14,
|
4759
|
-
fontWeight: 700
|
4954
|
+
fontWeight: 700,
|
4955
|
+
color: styles.less_dark
|
4760
4956
|
}
|
4761
4957
|
}, t("logout"))))));
|
4762
4958
|
};
|
@@ -4830,6 +5026,7 @@ var customStyles = {
|
|
4830
5026
|
|
4831
5027
|
var DropdownIndicator = function DropdownIndicator(props) {
|
4832
5028
|
return React__default.createElement(Select.components.DropdownIndicator, Object.assign({}, props), React__default.createElement(fa.FaCaretDown, {
|
5029
|
+
size: 20,
|
4833
5030
|
color: styles.darker
|
4834
5031
|
}));
|
4835
5032
|
};
|
@@ -4968,6 +5165,7 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4968
5165
|
return React__default.createElement(material.Stack, null, React__default.createElement(material.Stack, {
|
4969
5166
|
display: "flex",
|
4970
5167
|
gap: "4px",
|
5168
|
+
justifyItems: "center",
|
4971
5169
|
flexDirection: "column"
|
4972
5170
|
}, React__default.createElement("div", {
|
4973
5171
|
style: {
|
@@ -4978,7 +5176,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4978
5176
|
sx: {
|
4979
5177
|
fontWeight: 700,
|
4980
5178
|
fontSize: "14px",
|
4981
|
-
color: styles.
|
5179
|
+
color: styles.less_dark,
|
5180
|
+
display: 'flex',
|
5181
|
+
justifyContent: "center"
|
4982
5182
|
}
|
4983
5183
|
}, t("edit"))), React__default.createElement(material.Stack, {
|
4984
5184
|
border: "1px solid #E4E7EC"
|
@@ -4991,7 +5191,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4991
5191
|
sx: {
|
4992
5192
|
fontWeight: 700,
|
4993
5193
|
fontSize: "14px",
|
4994
|
-
color: styles.
|
5194
|
+
color: styles.less_dark,
|
5195
|
+
display: 'flex',
|
5196
|
+
justifyContent: "center"
|
4995
5197
|
}
|
4996
5198
|
}, t("delete")))));
|
4997
5199
|
};
|
@@ -5030,13 +5232,14 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5030
5232
|
className: " " + styles$1["name-sender"],
|
5031
5233
|
display: "flex",
|
5032
5234
|
alignItems: "center",
|
5235
|
+
justifyContent: "end",
|
5033
5236
|
flexDirection: "row"
|
5034
5237
|
}, React__default.createElement(iconPersonNoActive, null), React__default.createElement(material.Typography, {
|
5035
5238
|
fontWeight: 700,
|
5036
5239
|
fontSize: 14,
|
5037
5240
|
padding: "4px",
|
5038
5241
|
lineHeight: "16.71px",
|
5039
|
-
color: styles.
|
5242
|
+
color: styles.gray_700
|
5040
5243
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)), React__default.createElement(material.Stack, {
|
5041
5244
|
display: "flex",
|
5042
5245
|
flexDirection: "row",
|
@@ -5069,11 +5272,7 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5069
5272
|
placement: "top"
|
5070
5273
|
}, React__default.createElement("div", {
|
5071
5274
|
onClick: handleOpenTooltip
|
5072
|
-
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement(
|
5073
|
-
borderRadius: "6px",
|
5074
|
-
padding: "12px",
|
5075
|
-
bgcolor: styles.darker
|
5076
|
-
}, React__default.createElement("img", {
|
5275
|
+
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement("img", {
|
5077
5276
|
onClick: toggleImageDialog,
|
5078
5277
|
src: content,
|
5079
5278
|
style: {
|
@@ -5081,17 +5280,21 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5081
5280
|
position: "relative",
|
5082
5281
|
objectFit: "contain"
|
5083
5282
|
}
|
5084
|
-
})
|
5283
|
+
}) : React__default.createElement("div", {
|
5085
5284
|
className: styles$1["wrap-content"] + " " + styles$1["content-chat-receiver"],
|
5086
|
-
|
5087
|
-
"float": "inline-end"
|
5088
|
-
|
5089
|
-
|
5285
|
+
style: {
|
5286
|
+
"float": "inline-end",
|
5287
|
+
maxWidth: 400,
|
5288
|
+
background: styles.less_dark
|
5289
|
+
}
|
5090
5290
|
}, React__default.createElement(material.Typography, {
|
5091
5291
|
fontWeight: 500,
|
5092
5292
|
fontSize: "14px",
|
5093
5293
|
lineHeight: "16.71px",
|
5094
|
-
color: "#
|
5294
|
+
color: "#fff",
|
5295
|
+
sx: {
|
5296
|
+
wordBreak: "break-word"
|
5297
|
+
}
|
5095
5298
|
}, content))))));
|
5096
5299
|
};
|
5097
5300
|
|
@@ -5126,33 +5329,29 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5126
5329
|
fontWeight: 500,
|
5127
5330
|
fontSize: 14,
|
5128
5331
|
lineHeight: "16.71px",
|
5129
|
-
color: styles.
|
5130
|
-
}, t("
|
5332
|
+
color: styles.gray_700
|
5333
|
+
}, t("teacher")), React__default.createElement(material.Typography, {
|
5131
5334
|
fontWeight: 700,
|
5132
5335
|
fontSize: 14,
|
5133
5336
|
lineHeight: "16.71px",
|
5134
|
-
color: styles.
|
5337
|
+
color: styles.gray_700
|
5135
5338
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)) : React__default.createElement(React.Fragment, null, React__default.createElement(material.Typography, {
|
5136
5339
|
fontWeight: 700,
|
5137
5340
|
fontSize: 14,
|
5138
5341
|
lineHeight: "16.71px",
|
5139
|
-
color: styles.
|
5342
|
+
color: styles.gray_700
|
5140
5343
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName), React__default.createElement(material.Typography, {
|
5141
5344
|
fontWeight: 500,
|
5142
5345
|
fontSize: 14,
|
5143
5346
|
lineHeight: "16.71px",
|
5144
|
-
color: styles.
|
5347
|
+
color: styles.gray_700
|
5145
5348
|
}, t("student")))), React__default.createElement(material.Box, {
|
5146
5349
|
padding: "4px 0px"
|
5147
5350
|
}), React__default.createElement(material.Stack, {
|
5148
5351
|
display: "flex",
|
5149
5352
|
flexDirection: "row",
|
5150
5353
|
gap: "8px"
|
5151
|
-
}, contentType ? React__default.createElement(
|
5152
|
-
borderRadius: "6px",
|
5153
|
-
padding: "12px",
|
5154
|
-
bgcolor: styles.darker
|
5155
|
-
}, React__default.createElement("img", {
|
5354
|
+
}, contentType ? React__default.createElement("img", {
|
5156
5355
|
onClick: toggleImageDialog,
|
5157
5356
|
src: content,
|
5158
5357
|
style: {
|
@@ -5160,13 +5359,19 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5160
5359
|
position: "relative",
|
5161
5360
|
objectFit: "contain"
|
5162
5361
|
}
|
5163
|
-
})
|
5164
|
-
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"]
|
5362
|
+
}) : React__default.createElement("div", {
|
5363
|
+
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"],
|
5364
|
+
style: {
|
5365
|
+
maxWidth: 400
|
5366
|
+
}
|
5165
5367
|
}, React__default.createElement(material.Typography, {
|
5166
|
-
fontWeight:
|
5368
|
+
fontWeight: 500,
|
5167
5369
|
fontSize: "14px",
|
5168
5370
|
lineHeight: "16.71px",
|
5169
|
-
color:
|
5371
|
+
color: styles.gray_700,
|
5372
|
+
sx: {
|
5373
|
+
wordBreak: "break-word"
|
5374
|
+
}
|
5170
5375
|
}, content)))));
|
5171
5376
|
};
|
5172
5377
|
|
@@ -5703,7 +5908,7 @@ var InputChat = function InputChat(_ref) {
|
|
5703
5908
|
fullWidth: true,
|
5704
5909
|
className: styles$1["btn-send"],
|
5705
5910
|
sx: {
|
5706
|
-
bgcolor: isCompleted ? styles.light + " !important" : styles.
|
5911
|
+
bgcolor: isCompleted ? styles.light + " !important" : styles.less_dark
|
5707
5912
|
},
|
5708
5913
|
disabled: isCompleted,
|
5709
5914
|
onClick: handleSubmit
|
@@ -5724,13 +5929,13 @@ var InputChat = function InputChat(_ref) {
|
|
5724
5929
|
borderWidth: "1px"
|
5725
5930
|
}
|
5726
5931
|
}, React__default.createElement(iconPlusCircle, {
|
5727
|
-
color: styles.
|
5932
|
+
color: styles.less_dark
|
5728
5933
|
}), React__default.createElement(material.Typography, {
|
5729
5934
|
fontWeight: 700,
|
5730
5935
|
fontSize: "13px",
|
5731
5936
|
lineHeight: "15.51px",
|
5732
5937
|
sx: {
|
5733
|
-
color: styles.
|
5938
|
+
color: styles.less_dark
|
5734
5939
|
}
|
5735
5940
|
}, t("attachment")), React__default.createElement("input", {
|
5736
5941
|
type: "file",
|
@@ -5764,6 +5969,31 @@ var ellipsisText = function ellipsisText(text, maxLength) {
|
|
5764
5969
|
if (!text) return text;
|
5765
5970
|
return (text === null || text === void 0 ? void 0 : text.length) > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
5766
5971
|
};
|
5972
|
+
var getOrdinalSuffix = function getOrdinalSuffix(number, lang) {
|
5973
|
+
var suffixes = {
|
5974
|
+
en: ['th', 'st', 'nd', 'rd'],
|
5975
|
+
ko: ['']
|
5976
|
+
};
|
5977
|
+
switch (lang) {
|
5978
|
+
case 'en':
|
5979
|
+
var j = number % 10;
|
5980
|
+
var k = number % 100;
|
5981
|
+
if (j === 1 && k !== 11) {
|
5982
|
+
return suffixes.en[1];
|
5983
|
+
}
|
5984
|
+
if (j === 2 && k !== 12) {
|
5985
|
+
return suffixes.en[2];
|
5986
|
+
}
|
5987
|
+
if (j === 3 && k !== 13) {
|
5988
|
+
return suffixes.en[3];
|
5989
|
+
}
|
5990
|
+
return suffixes.en[0];
|
5991
|
+
case 'ko':
|
5992
|
+
return suffixes.ko[0];
|
5993
|
+
default:
|
5994
|
+
return '';
|
5995
|
+
}
|
5996
|
+
};
|
5767
5997
|
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
5768
5998
|
var uniqueCategories = new Set();
|
5769
5999
|
var filterCategories = categories.filter(function (category) {
|
@@ -5783,6 +6013,24 @@ var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
|
5783
6013
|
});
|
5784
6014
|
return questionsByCategory;
|
5785
6015
|
};
|
6016
|
+
var totalSolveTimeCategories = function totalSolveTimeCategories(inputData, categories) {
|
6017
|
+
var uniqueCategories = new Set();
|
6018
|
+
var filterCategories = categories.filter(function (category) {
|
6019
|
+
if (!uniqueCategories.has(category.name)) {
|
6020
|
+
uniqueCategories.add(category.name);
|
6021
|
+
return true;
|
6022
|
+
}
|
6023
|
+
return false;
|
6024
|
+
});
|
6025
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6026
|
+
return _extends({}, category, {
|
6027
|
+
totalSolveTime: inputData.questions.reduce(function (init, question) {
|
6028
|
+
return question.category.name === category.name ? init += question.duration : init;
|
6029
|
+
}, 0)
|
6030
|
+
});
|
6031
|
+
});
|
6032
|
+
return questionsByCategory;
|
6033
|
+
};
|
5786
6034
|
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
5787
6035
|
duration = Math.round(duration);
|
5788
6036
|
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
@@ -5834,7 +6082,6 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5834
6082
|
display: "flex",
|
5835
6083
|
alignItems: "center",
|
5836
6084
|
gap: "24px",
|
5837
|
-
border: "1px solid #EBEBFF",
|
5838
6085
|
borderRadius: "6px"
|
5839
6086
|
}, React__default.createElement(material.Box, {
|
5840
6087
|
display: "flex",
|
@@ -5842,21 +6089,21 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5842
6089
|
flexDirection: "row",
|
5843
6090
|
gap: "8px"
|
5844
6091
|
}, React__default.createElement(iconPersonNoActive, {
|
5845
|
-
color: styles.
|
6092
|
+
color: styles.gray_700
|
5846
6093
|
}), isTabletUp && React__default.createElement(material.Typography, {
|
5847
6094
|
fontWeight: 500,
|
5848
6095
|
fontSize: "14px",
|
5849
6096
|
lineHeight: "16.71px",
|
5850
|
-
color: styles.
|
5851
|
-
}, t("
|
5852
|
-
fontWeight:
|
6097
|
+
color: styles.gray_700
|
6098
|
+
}, t("teacher"))), React__default.createElement(material.Typography, {
|
6099
|
+
fontWeight: 500,
|
5853
6100
|
fontSize: "14px",
|
5854
6101
|
lineHeight: "16.71px",
|
5855
|
-
color: styles.
|
6102
|
+
color: styles.gray_700
|
5856
6103
|
}, ellipsisText(teacherName || "", 15))), !!examTitle && React__default.createElement(material.Box, {
|
5857
6104
|
display: "flex",
|
5858
6105
|
alignItems: "start",
|
5859
|
-
color: styles.
|
6106
|
+
color: styles.gray_700,
|
5860
6107
|
gap: "6px",
|
5861
6108
|
flexDirection: "column"
|
5862
6109
|
}, React__default.createElement(material.Typography, {
|
@@ -5870,13 +6117,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5870
6117
|
}, React__default.createElement(material.Typography, {
|
5871
6118
|
fontWeight: 600,
|
5872
6119
|
fontSize: "12px",
|
5873
|
-
lineHeight: "14.2px"
|
5874
|
-
|
6120
|
+
lineHeight: "14.2px",
|
6121
|
+
sx: {
|
6122
|
+
color: styles.gray_700
|
6123
|
+
}
|
6124
|
+
}, "LIVE " + t('exam')), filterDurationExam && React__default.createElement(material.Typography, {
|
5875
6125
|
fontWeight: 500,
|
5876
6126
|
fontSize: "12px",
|
5877
6127
|
lineHeight: "14.32px",
|
5878
6128
|
sx: {
|
5879
|
-
color:
|
6129
|
+
color: styles.gray_500
|
5880
6130
|
}
|
5881
6131
|
}, (!!filterDurationExam.hours() ? filterDurationExam.hours() + " " + t("hour") : "") + " " + (!!filterDurationExam.minutes() ? filterDurationExam.minutes() + " " + t("minute") : "") + " " + (!!filterDurationExam.seconds() ? filterDurationExam.seconds() + " " + t("second") : "")))), React__default.createElement(material.Box, {
|
5882
6132
|
display: "flex",
|
@@ -5898,16 +6148,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5898
6148
|
fontWeight: 700,
|
5899
6149
|
fontSize: "12px",
|
5900
6150
|
lineHeight: "14.32px",
|
5901
|
-
color: styles.
|
6151
|
+
color: styles.less_dark
|
5902
6152
|
}, t("points", {
|
5903
|
-
number: score
|
6153
|
+
number: score || 0
|
5904
6154
|
})), React__default.createElement(material.Typography, {
|
5905
6155
|
fontWeight: 700,
|
5906
6156
|
fontSize: "12px",
|
5907
6157
|
lineHeight: "14.32px",
|
5908
|
-
color:
|
6158
|
+
color: styles.gray_300
|
5909
6159
|
}, "/", t("points", {
|
5910
|
-
number: totalScore
|
6160
|
+
number: totalScore || 0
|
5911
6161
|
}))), React__default.createElement(material.Typography, {
|
5912
6162
|
fontWeight: 500,
|
5913
6163
|
fontSize: "12px",
|
@@ -5966,7 +6216,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5966
6216
|
color: styles.darker
|
5967
6217
|
}, examTitle ? React__default.createElement(material.Typography, {
|
5968
6218
|
fontWeight: 600,
|
5969
|
-
fontSize: "
|
6219
|
+
fontSize: "11px",
|
5970
6220
|
lineHeight: "14.32px"
|
5971
6221
|
}, ellipsisText(examTitle || "", 10)) : React__default.createElement(material.Box, {
|
5972
6222
|
display: "flex",
|
@@ -6000,12 +6250,12 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
6000
6250
|
borderColor: styles.less_dark,
|
6001
6251
|
borderRadius: "6px"
|
6002
6252
|
}, React__default.createElement(iconChecked, {
|
6003
|
-
color: styles.
|
6253
|
+
color: styles.less_dark
|
6004
6254
|
}), React__default.createElement(material.Typography, {
|
6005
6255
|
fontWeight: 700,
|
6006
6256
|
fontSize: "13px",
|
6007
6257
|
lineHeight: "15.51px",
|
6008
|
-
color: styles.
|
6258
|
+
color: styles.less_dark
|
6009
6259
|
}, t('complete_processing')))) : React__default.createElement("div", null));
|
6010
6260
|
};
|
6011
6261
|
return React__default.createElement(material.Grid, {
|
@@ -6020,9 +6270,9 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
6020
6270
|
}, React__default.createElement(material.Typography, {
|
6021
6271
|
fontWeight: 800,
|
6022
6272
|
fontSize: "20px",
|
6023
|
-
color: styles.
|
6273
|
+
color: styles.less_dark,
|
6024
6274
|
lineHeight: "23.87px"
|
6025
|
-
}, t("question_and_answer"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6275
|
+
}, isStudent ? t("question_and_answer") : t("q&a"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6026
6276
|
open: openDialog,
|
6027
6277
|
toggle: toggleDialog,
|
6028
6278
|
text: t("are_you_sure_you_want_to_complete_this_conversation"),
|
@@ -6757,17 +7007,14 @@ var BpIcon = material.styled('span')(function (_ref) {
|
|
6757
7007
|
};
|
6758
7008
|
});
|
6759
7009
|
var BpCheckedIcon = material.styled(BpIcon)({
|
6760
|
-
backgroundColor:
|
7010
|
+
backgroundColor: "#fff",
|
6761
7011
|
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
6762
7012
|
'&::before': {
|
6763
7013
|
display: 'block',
|
6764
7014
|
width: 16,
|
6765
7015
|
height: 16,
|
6766
|
-
backgroundImage:
|
7016
|
+
backgroundImage: "radial-gradient(" + styles.less_dark + " 36%,transparent 40%)",
|
6767
7017
|
content: '""'
|
6768
|
-
},
|
6769
|
-
'input:hover ~ &': {
|
6770
|
-
backgroundColor: styles.dark
|
6771
7018
|
}
|
6772
7019
|
});
|
6773
7020
|
var QuestionView = function QuestionView(_ref2) {
|
@@ -6827,7 +7074,7 @@ var QuestionView = function QuestionView(_ref2) {
|
|
6827
7074
|
mb: "16px"
|
6828
7075
|
}, React__default.createElement(material.FormControl, {
|
6829
7076
|
style: {
|
6830
|
-
width: "
|
7077
|
+
width: "168px"
|
6831
7078
|
}
|
6832
7079
|
}, React__default.createElement(ScoreSelector, {
|
6833
7080
|
value: question.score,
|
@@ -7082,7 +7329,7 @@ var ArticleGroupView = function ArticleGroupView(_ref) {
|
|
7082
7329
|
}, React__default.createElement(material.FormGroup, null, React__default.createElement(material.FormLabel, {
|
7083
7330
|
htmlFor: "question_count",
|
7084
7331
|
className: styles$2["question-label"] + " form-label"
|
7085
|
-
}, t("
|
7332
|
+
}, t("questions")), React__default.createElement(QuestionCountSelector, {
|
7086
7333
|
id: "question_count",
|
7087
7334
|
value: questionCount,
|
7088
7335
|
onChange: handleChangeQuestionCount,
|
@@ -7381,9 +7628,11 @@ var ChapterBox = function ChapterBox(_ref) {
|
|
7381
7628
|
onUpdateArticleQuestion: onUpdateArticleQuestion,
|
7382
7629
|
onRemoveChapter: onRemoveChapter
|
7383
7630
|
});
|
7384
|
-
}), data.subChapters.length === 0 && data.articles.map(function (article) {
|
7631
|
+
}), data.subChapters.length === 0 && data.articles.map(function (article, index) {
|
7385
7632
|
var _article$category;
|
7386
|
-
return React__default.createElement(material.Stack,
|
7633
|
+
return React__default.createElement(material.Stack, {
|
7634
|
+
key: index
|
7635
|
+
}, React__default.createElement(material.Stack, {
|
7387
7636
|
display: "flex",
|
7388
7637
|
flexDirection: "row",
|
7389
7638
|
gap: "8px",
|
@@ -7458,6 +7707,14 @@ var deleteTextbookApi = function deleteTextbookApi(textbookId, role) {
|
|
7458
7707
|
});
|
7459
7708
|
};
|
7460
7709
|
|
7710
|
+
var ExamStatus$1;
|
7711
|
+
(function (ExamStatus) {
|
7712
|
+
ExamStatus[ExamStatus["Default"] = 0] = "Default";
|
7713
|
+
ExamStatus[ExamStatus["Pending"] = 1] = "Pending";
|
7714
|
+
ExamStatus[ExamStatus["InProgress"] = 2] = "InProgress";
|
7715
|
+
ExamStatus[ExamStatus["Completed"] = 3] = "Completed";
|
7716
|
+
})(ExamStatus$1 || (ExamStatus$1 = {}));
|
7717
|
+
|
7461
7718
|
var OrderType;
|
7462
7719
|
(function (OrderType) {
|
7463
7720
|
OrderType["ASC"] = "ASC";
|
@@ -7468,7 +7725,8 @@ var OrderType;
|
|
7468
7725
|
|
7469
7726
|
var index = {
|
7470
7727
|
__proto__: null,
|
7471
|
-
get OrderType () { return OrderType; }
|
7728
|
+
get OrderType () { return OrderType; },
|
7729
|
+
get ExamStatus () { return ExamStatus$1; }
|
7472
7730
|
};
|
7473
7731
|
|
7474
7732
|
var TextbookSortBy;
|
@@ -7482,20 +7740,13 @@ var ExamType;
|
|
7482
7740
|
ExamType["Normal"] = "Normal";
|
7483
7741
|
ExamType["Standard"] = "Standard";
|
7484
7742
|
})(ExamType || (ExamType = {}));
|
7485
|
-
var ExamStatus$
|
7743
|
+
var ExamStatus$2;
|
7486
7744
|
(function (ExamStatus) {
|
7487
7745
|
ExamStatus["Default"] = "Default";
|
7488
7746
|
ExamStatus["Pending"] = "Pending";
|
7489
7747
|
ExamStatus["InProgress"] = "InProgress";
|
7490
7748
|
ExamStatus["Completed"] = "Completed";
|
7491
|
-
})(ExamStatus$
|
7492
|
-
var ExamStatusNumber;
|
7493
|
-
(function (ExamStatusNumber) {
|
7494
|
-
ExamStatusNumber[ExamStatusNumber["Default"] = 0] = "Default";
|
7495
|
-
ExamStatusNumber[ExamStatusNumber["Pending"] = 1] = "Pending";
|
7496
|
-
ExamStatusNumber[ExamStatusNumber["InProgress"] = 2] = "InProgress";
|
7497
|
-
ExamStatusNumber[ExamStatusNumber["Completed"] = 3] = "Completed";
|
7498
|
-
})(ExamStatusNumber || (ExamStatusNumber = {}));
|
7749
|
+
})(ExamStatus$2 || (ExamStatus$2 = {}));
|
7499
7750
|
|
7500
7751
|
var TEXTBOOK_HEADERS = [{
|
7501
7752
|
title: "#"
|
@@ -7527,7 +7778,7 @@ var DEFAULT_EXAM_REQUEST = {
|
|
7527
7778
|
subjectId: 0
|
7528
7779
|
};
|
7529
7780
|
var TEXTBOOK_PAGE_TITLE = "textbooks";
|
7530
|
-
var TEXT_BOOK_SEARCH_PLACEHOLDER = "
|
7781
|
+
var TEXT_BOOK_SEARCH_PLACEHOLDER = "enter_textbook_name_to_search";
|
7531
7782
|
var TextbookDefaultQuery = {
|
7532
7783
|
pageSize: 12,
|
7533
7784
|
currentPage: 1,
|
@@ -8879,6 +9130,9 @@ var useExamDetailView = function useExamDetailView(props) {
|
|
8879
9130
|
var exam = props.exam,
|
8880
9131
|
selectedSubject = props.selectedSubject,
|
8881
9132
|
onChangeExam = props.onChangeExam;
|
9133
|
+
console.log({
|
9134
|
+
exam: exam
|
9135
|
+
});
|
8882
9136
|
var _useTranslation = reactI18next.useTranslation(),
|
8883
9137
|
t = _useTranslation.t;
|
8884
9138
|
var handleChangeQuestionCount = function handleChangeQuestionCount(article, questionCount, answerCount) {
|
@@ -9156,7 +9410,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9156
9410
|
}, React__default.createElement("label", {
|
9157
9411
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9158
9412
|
htmlFor: "title"
|
9159
|
-
}, t("
|
9413
|
+
}, t("exam_name")), React__default.createElement("input", {
|
9160
9414
|
disabled: isDisabled,
|
9161
9415
|
className: "" + styles["form-control"],
|
9162
9416
|
value: exam.title,
|
@@ -9170,7 +9424,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9170
9424
|
}, React__default.createElement("label", {
|
9171
9425
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9172
9426
|
htmlFor: "duration"
|
9173
|
-
}, t("
|
9427
|
+
}, t("exam_duration")), React__default.createElement(CustomSelect, {
|
9174
9428
|
inputId: "duration",
|
9175
9429
|
value: exam.duration,
|
9176
9430
|
options: durationOptions,
|
@@ -9213,8 +9467,12 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9213
9467
|
}, React__default.createElement(material.Button, {
|
9214
9468
|
variant: 'outlined',
|
9215
9469
|
sx: {
|
9216
|
-
color: styles.
|
9217
|
-
|
9470
|
+
color: styles.less_dark,
|
9471
|
+
border: 'none',
|
9472
|
+
'&:hover': {
|
9473
|
+
border: "none",
|
9474
|
+
bgcolor: "#FFF"
|
9475
|
+
}
|
9218
9476
|
},
|
9219
9477
|
disabled: isDisabled,
|
9220
9478
|
className: "w-100 d-flex justify-content-center align-items-center " + styles$2["question-btn"] + " mt-3",
|
@@ -10064,6 +10322,14 @@ var getCheckStatusExam = function getCheckStatusExam(examCode) {
|
|
10064
10322
|
var toNumberOrder = function toNumberOrder(value) {
|
10065
10323
|
return "The " + value + (value % 10 === 1 ? 'st' : value % 10 === 2 ? 'nd' : value % 10 === 3 ? 'rd' : 'th');
|
10066
10324
|
};
|
10325
|
+
var formatDuration = function formatDuration(t, duration) {
|
10326
|
+
if (!duration) return "0" + t("seconds");
|
10327
|
+
var totalTime = Math.round(duration);
|
10328
|
+
return totalTime > 60 ? t("mins_mins_seconds_seconds", {
|
10329
|
+
mins: Math.floor(totalTime / 60),
|
10330
|
+
seconds: totalTime % 60
|
10331
|
+
}) : "" + Math.round(duration) + t("seconds");
|
10332
|
+
};
|
10067
10333
|
|
10068
10334
|
var ORDER_NUMBERS = {
|
10069
10335
|
1: "the_first",
|
@@ -10771,6 +11037,7 @@ var CATEGORY_RESPONSES = [{
|
|
10771
11037
|
percentageAmongStudents: 40
|
10772
11038
|
}];
|
10773
11039
|
var DEFAULT_LINE_CHART_OPTIONS = {
|
11040
|
+
colors: ["#3DC674", "#C3099A"],
|
10774
11041
|
chart: {
|
10775
11042
|
type: "line",
|
10776
11043
|
toolbar: {
|
@@ -11114,6 +11381,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11114
11381
|
}
|
11115
11382
|
}
|
11116
11383
|
}),
|
11384
|
+
colors: ['#3DC674', '#C3099A'],
|
11117
11385
|
xaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.xaxis, {
|
11118
11386
|
categories: ["."].concat(Array.from({
|
11119
11387
|
length: questionLength
|
@@ -11138,13 +11406,13 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11138
11406
|
var series = (_allSeries$dataChartI = allSeries[dataChartIndex]) != null ? _allSeries$dataChartI : defaultSeries(t);
|
11139
11407
|
var handleExportPdf = function handleExportPdf() {
|
11140
11408
|
try {
|
11141
|
-
var
|
11409
|
+
var _temp26 = function _temp26(_result) {
|
11142
11410
|
if (_exit) return _result;
|
11143
11411
|
dispatch(setLoading(false));
|
11144
11412
|
};
|
11145
11413
|
var _exit = false;
|
11146
11414
|
dispatch(setLoading(true));
|
11147
|
-
var
|
11415
|
+
var _temp25 = _catch(function () {
|
11148
11416
|
var canvas = document.querySelector("#canvas");
|
11149
11417
|
var headerCanvas = document.querySelector("#header-canvas");
|
11150
11418
|
if (!canvas || !headerCanvas) {
|
@@ -11166,7 +11434,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11166
11434
|
var imgWidth = WIDTH_PAPER;
|
11167
11435
|
var chartWidth = WIDTH_PAPER - 20;
|
11168
11436
|
return Promise.resolve(html2canvas(headerCanvas)).then(function (header) {
|
11169
|
-
function
|
11437
|
+
function _temp24() {
|
11170
11438
|
doc.save("download.pdf");
|
11171
11439
|
}
|
11172
11440
|
var imgHeaderHeight = header.height * imgWidth / header.width;
|
@@ -11174,16 +11442,16 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11174
11442
|
doc.addImage(imgHeaderData, 'PNG', 0, 0, imgWidth, imgHeaderHeight);
|
11175
11443
|
line += imgHeaderHeight;
|
11176
11444
|
if (line > HEIGHT_PAPER) breakPage();
|
11177
|
-
var
|
11445
|
+
var _temp23 = function () {
|
11178
11446
|
if (canvas && canvas.childElementCount > 0) {
|
11179
11447
|
var _index = 0;
|
11180
|
-
var
|
11448
|
+
var _temp22 = _for(function () {
|
11181
11449
|
return _index < canvas.childElementCount;
|
11182
11450
|
}, function () {
|
11183
11451
|
return _index++;
|
11184
11452
|
}, function () {
|
11185
|
-
function
|
11186
|
-
function
|
11453
|
+
function _temp21() {
|
11454
|
+
function _temp19() {
|
11187
11455
|
line += 20;
|
11188
11456
|
}
|
11189
11457
|
var printChartTitle = function printChartTitle() {
|
@@ -11198,73 +11466,100 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11198
11466
|
return Promise.reject(e);
|
11199
11467
|
}
|
11200
11468
|
};
|
11201
|
-
var
|
11469
|
+
var _temp18 = function () {
|
11202
11470
|
if (printContainerEls.length) {
|
11203
|
-
var
|
11204
|
-
function
|
11205
|
-
|
11206
|
-
|
11207
|
-
|
11208
|
-
|
11209
|
-
|
11210
|
-
|
11211
|
-
|
11212
|
-
|
11213
|
-
|
11214
|
-
|
11215
|
-
|
11216
|
-
|
11217
|
-
|
11218
|
-
|
11219
|
-
|
11220
|
-
|
11221
|
-
|
11222
|
-
|
11223
|
-
|
11224
|
-
|
11225
|
-
|
11226
|
-
|
11227
|
-
|
11471
|
+
var _temp17 = _forTo(printContainerEls, function (i) {
|
11472
|
+
function _temp16() {
|
11473
|
+
function _temp14() {
|
11474
|
+
var printTitle = function printTitle() {
|
11475
|
+
try {
|
11476
|
+
if (!printTitleHeight || !printTitleData) return Promise.resolve();
|
11477
|
+
doc.addImage(printTitleData, 'PNG', 0, line, chartWidth, printTitleHeight);
|
11478
|
+
line += printTitleHeight;
|
11479
|
+
return Promise.resolve();
|
11480
|
+
} catch (e) {
|
11481
|
+
return Promise.reject(e);
|
11482
|
+
}
|
11483
|
+
};
|
11484
|
+
var printHeader = function printHeader(top) {
|
11485
|
+
if (top === void 0) {
|
11486
|
+
top = 0;
|
11487
|
+
}
|
11488
|
+
try {
|
11489
|
+
if (!printHeaderData || !printHeaderHeight) return Promise.resolve();
|
11490
|
+
line += top;
|
11491
|
+
if (line + printHeaderHeight > HEIGHT_PAPER) breakPage();
|
11492
|
+
doc.addImage(printHeaderData, 'PNG', 10, line, chartWidth, printHeaderHeight);
|
11493
|
+
line += printHeaderHeight;
|
11494
|
+
return Promise.resolve();
|
11495
|
+
} catch (e) {
|
11496
|
+
return Promise.reject(e);
|
11228
11497
|
}
|
11229
|
-
|
11230
|
-
|
11231
|
-
|
11232
|
-
|
11233
|
-
|
11234
|
-
|
11235
|
-
|
11236
|
-
|
11237
|
-
|
11238
|
-
|
11239
|
-
if (j === 0) {
|
11240
|
-
return Promise.resolve(printHeader(10)).then(function () {});
|
11241
|
-
}
|
11242
|
-
}();
|
11243
|
-
if (_temp25 && _temp25.then) return _temp25.then(function () {});
|
11498
|
+
};
|
11499
|
+
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
11500
|
+
if (!printContents.length) return;
|
11501
|
+
printTitle();
|
11502
|
+
var _temp12 = _forTo(printContents, function (j) {
|
11503
|
+
var rowItem = printContents[j];
|
11504
|
+
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
11505
|
+
function _temp11() {
|
11506
|
+
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
11507
|
+
line += height;
|
11244
11508
|
}
|
11245
|
-
|
11246
|
-
|
11509
|
+
var height = rowItemCanvas.height * chartWidth / rowItemCanvas.width;
|
11510
|
+
var data = rowItemCanvas.toDataURL('image/png');
|
11511
|
+
if (i === 0 && j === 0 && line + height + (printHeaderHeight || 0) + ((chartTitleHeight || 0) + 10) + 20 > HEIGHT_PAPER) breakPage();
|
11512
|
+
i === 0 && j === 0 && printChartTitle();
|
11513
|
+
var _temp10 = function () {
|
11514
|
+
if (line + height + 20 > HEIGHT_PAPER) {
|
11515
|
+
breakPage();
|
11516
|
+
return Promise.resolve(printHeader()).then(function () {});
|
11517
|
+
} else {
|
11518
|
+
var _temp27 = function () {
|
11519
|
+
if (j === 0) {
|
11520
|
+
return Promise.resolve(printHeader(10)).then(function () {});
|
11521
|
+
}
|
11522
|
+
}();
|
11523
|
+
if (_temp27 && _temp27.then) return _temp27.then(function () {});
|
11524
|
+
}
|
11525
|
+
}();
|
11526
|
+
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
|
11527
|
+
});
|
11247
11528
|
});
|
11248
|
-
|
11249
|
-
|
11529
|
+
if (_temp12 && _temp12.then) return _temp12.then(function () {});
|
11530
|
+
}
|
11531
|
+
var _temp13 = function () {
|
11532
|
+
if (printHeaderEl) {
|
11533
|
+
return Promise.resolve(html2canvas(printHeaderEl)).then(function (_html2canvas3) {
|
11534
|
+
printHeaderCanvas = _html2canvas3;
|
11535
|
+
printHeaderHeight = printHeaderCanvas.height * chartWidth / printHeaderCanvas.width;
|
11536
|
+
printHeaderData = printHeaderCanvas.toDataURL('image/png');
|
11537
|
+
});
|
11538
|
+
}
|
11539
|
+
}();
|
11540
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
11250
11541
|
}
|
11251
11542
|
var printContainerEl = printContainerEls[i];
|
11543
|
+
var printTitleEl = printContainerEl.querySelector("." + PrintTitleClassName);
|
11252
11544
|
var printHeaderEl = printContainerEl.querySelector("." + PrintHeaderClassName);
|
11545
|
+
var printTitleCanvas = null;
|
11546
|
+
var printTitleHeight = null;
|
11547
|
+
var printTitleData = "";
|
11253
11548
|
var printHeaderCanvas = null;
|
11254
11549
|
var printHeaderHeight = null;
|
11255
11550
|
var printHeaderData = "";
|
11256
|
-
var
|
11257
|
-
if (
|
11258
|
-
return Promise.resolve(html2canvas(
|
11259
|
-
|
11260
|
-
|
11261
|
-
|
11551
|
+
var _temp15 = function () {
|
11552
|
+
if (printTitleEl) {
|
11553
|
+
return Promise.resolve(html2canvas(printTitleEl)).then(function (_html2canvas2) {
|
11554
|
+
printTitleCanvas = _html2canvas2;
|
11555
|
+
printTitleHeight = printTitleCanvas.height * chartWidth / printTitleCanvas.width;
|
11556
|
+
printTitleData = printTitleCanvas.toDataURL('image/png');
|
11262
11557
|
});
|
11263
11558
|
}
|
11264
11559
|
}();
|
11265
|
-
return
|
11560
|
+
return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
|
11266
11561
|
});
|
11267
|
-
if (
|
11562
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
11268
11563
|
} else {
|
11269
11564
|
return Promise.resolve(html2canvas(chart)).then(function (chartCanvas) {
|
11270
11565
|
var imgBodyHeight = chartCanvas.height * chartWidth / chartCanvas.width;
|
@@ -11277,7 +11572,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11277
11572
|
});
|
11278
11573
|
}
|
11279
11574
|
}();
|
11280
|
-
return
|
11575
|
+
return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
|
11281
11576
|
}
|
11282
11577
|
var chart = canvas.children.item(_index);
|
11283
11578
|
if (chart.getAttribute("id") === "header-canvas") return;
|
@@ -11286,7 +11581,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11286
11581
|
var printChartTitleCanvas = null;
|
11287
11582
|
var chartTitleHeight = null;
|
11288
11583
|
var chartTitleData = "";
|
11289
|
-
var
|
11584
|
+
var _temp20 = function () {
|
11290
11585
|
if (chartTitle && printContainerEls.length) {
|
11291
11586
|
return Promise.resolve(html2canvas(chartTitle)).then(function (_html2canvas) {
|
11292
11587
|
printChartTitleCanvas = _html2canvas;
|
@@ -11295,12 +11590,12 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11295
11590
|
});
|
11296
11591
|
}
|
11297
11592
|
}();
|
11298
|
-
return
|
11593
|
+
return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
|
11299
11594
|
});
|
11300
|
-
if (
|
11595
|
+
if (_temp22 && _temp22.then) return _temp22.then(function () {});
|
11301
11596
|
}
|
11302
11597
|
}();
|
11303
|
-
return
|
11598
|
+
return _temp23 && _temp23.then ? _temp23.then(_temp24) : _temp24(_temp23);
|
11304
11599
|
});
|
11305
11600
|
}, function (error) {
|
11306
11601
|
console.log({
|
@@ -11308,7 +11603,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11308
11603
|
});
|
11309
11604
|
reactToastify.toast.error(getErrorMessage(t, error));
|
11310
11605
|
});
|
11311
|
-
return Promise.resolve(
|
11606
|
+
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(_temp26) : _temp26(_temp25));
|
11312
11607
|
} catch (e) {
|
11313
11608
|
return Promise.reject(e);
|
11314
11609
|
}
|
@@ -12455,7 +12750,7 @@ Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==t
|
|
12455
12750
|
|
12456
12751
|
var ReactApexChart = unwrapExports(reactApexcharts_min);
|
12457
12752
|
|
12458
|
-
var styles$4 = {"lighter":"#F0FFF6","light":"#
|
12753
|
+
var styles$4 = {"lighter":"#F0FFF6","light":"#89F0B2","less_dark":"#3DC674","dark":"#349056","darker":"#18442A","gray_50":"#FBFBF9","gray_100":"#EAEAE5","gray_300":"#D0D0C8","gray_500":"#9A9A98","gray_700":"#5D5D5B","gray_900":"#363634","titleBox":"_1dveO","title":"_mxRxf","point":"_2fD-F","buttonGroup":"_2DGl3","btnFeedback":"_xGW1x","btnTerminate":"_3mLu2","myanswer":"_eDBpS","titleMyAnswer1":"_2fMq3","titleMyAnswer2":"_3gEYh","contentMyAnswer":"_2K_sx","myAnswerItem":"_2qiLh","time":"_6TCOK","timeCol":"_hmseC","answer-response":"_3GfJt","answer-response-0":"_3ut64","answer-response-1":"_2VtpD","answer-response-2":"_58lQU","answer-response-3":"_1ucMY","answer-response-4":"_1qkxy","answerCorrect":"_2jIeT","answerIncorrect":"_to2v0","answerNograss":"_1JSte","answerEasy":"_2_uTU","answerDiscrimination":"_1DBoA","answerTrap":"_1q3tD","answerNoTime":"_3iItu","questionOrder":"_1fNkS","myTimeLabel":"_1Z_F3","myPoolTime":"_4KwG0","topTimeLabel":"_245H-","topTime":"_3tZqw","meanTimeLabel":"_PlPLY","meanTime":"_12a7R","compareChart":"_3MW16","prevChart":"_1fNkb","chart":"_3K4oY","nextChart":"_3YKBp","titleChart":"_13BVP","titleCompareGrass":"_o1txm","tableCompareGrass":"_bT5nf","thcolumn1":"_3Umg0","tdcolumn1":"_3dRMF","tdcolumn3":"_2tcBP","classification":"_1AFeb","wrapperProblem":"_oTqG7","titleProblem":"_35eIx","titleProblemClose":"_3t4HO","titleTrickyProblem":"_1-oxK","wrongQuestions":"_2dpMR","question":"_1lSOX","assignedQuestions":"_1ONUt","wrapperContent":"_nPoR0","content":"_2zmZn","contentColumn1":"_334SY","span1":"_3Lf-U","span2":"_ZpMot","contentColumn2":"_16P3l","duration":"_1kT28","topDuration":"_1fVRi","overallCorrectRate":"_3jLGe","answer":"_VsZ0K","contentVulnerable":"_QxKMy","wrappContentProblem":"_nnqpW","contentProblem":"_3Z1nV","labelProblem":"_36Xpx","name":"_3ZJQW","percent":"_2J3MK","slider":"_1MPdO","track":"_3CV_y","noData":"__g-ff","loading":"_3j485","table-responsive":"_2O6RX","form-label":"_1RYOQ","form-control":"_3VRVT","form-label-dialog":"_3oCSh","btn-cancel":"_3USKq","btn-register":"_3y_iD","pdfBtnBox":"_3xZHo","pdfBtn":"_1DtWq","form-select":"_1a_vw"};
|
12459
12754
|
|
12460
12755
|
var iconStarQuestion = function iconStarQuestion(_ref) {
|
12461
12756
|
var _ref$width = _ref.width,
|
@@ -12999,7 +13294,9 @@ function MyAnswer(_ref) {
|
|
12999
13294
|
sx: {
|
13000
13295
|
fontSize: "13px",
|
13001
13296
|
fontWeight: 600,
|
13002
|
-
color: "#97A1AF"
|
13297
|
+
color: "#97A1AF",
|
13298
|
+
display: "flex",
|
13299
|
+
alignItems: "center"
|
13003
13300
|
}
|
13004
13301
|
}, t("problem_number"))), React__default.createElement("div", {
|
13005
13302
|
className: styles["custom-col-2"],
|
@@ -13011,7 +13308,9 @@ function MyAnswer(_ref) {
|
|
13011
13308
|
sx: {
|
13012
13309
|
fontSize: "13px",
|
13013
13310
|
fontWeight: 600,
|
13014
|
-
color: "#97A1AF"
|
13311
|
+
color: "#97A1AF",
|
13312
|
+
display: "flex",
|
13313
|
+
alignItems: "center"
|
13015
13314
|
}
|
13016
13315
|
}, t("answer"))), React__default.createElement("div", {
|
13017
13316
|
className: styles["custom-col-2"],
|
@@ -13023,7 +13322,9 @@ function MyAnswer(_ref) {
|
|
13023
13322
|
sx: {
|
13024
13323
|
fontSize: "13px",
|
13025
13324
|
fontWeight: 600,
|
13026
|
-
color: "#97A1AF"
|
13325
|
+
color: "#97A1AF",
|
13326
|
+
display: "flex",
|
13327
|
+
alignItems: "center"
|
13027
13328
|
}
|
13028
13329
|
}, t("solve_time"))), React__default.createElement("div", {
|
13029
13330
|
className: styles["custom-col-2"],
|
@@ -13036,7 +13337,9 @@ function MyAnswer(_ref) {
|
|
13036
13337
|
sx: {
|
13037
13338
|
fontSize: "13px",
|
13038
13339
|
fontWeight: 600,
|
13039
|
-
color: "#97A1AF"
|
13340
|
+
color: "#97A1AF",
|
13341
|
+
display: "flex",
|
13342
|
+
alignItems: "center"
|
13040
13343
|
}
|
13041
13344
|
}, t("comparison_of_top_rankings"))), React__default.createElement("div", {
|
13042
13345
|
className: styles["custom-col-2"],
|
@@ -13049,7 +13352,9 @@ function MyAnswer(_ref) {
|
|
13049
13352
|
sx: {
|
13050
13353
|
fontSize: "13px",
|
13051
13354
|
fontWeight: 600,
|
13052
|
-
color: "#97A1AF"
|
13355
|
+
color: "#97A1AF",
|
13356
|
+
display: "flex",
|
13357
|
+
alignItems: "center"
|
13053
13358
|
}
|
13054
13359
|
}, t("total_correct_rate")))), React__default.createElement("div", {
|
13055
13360
|
className: styles$4["titleMyAnswer2"]
|
@@ -13229,48 +13534,6 @@ var CompareGrass = function CompareGrass(_ref) {
|
|
13229
13534
|
}, t("problem_classification")))), isPrint ? renderPrintTableBody(effectSize) : React__default.createElement("tbody", null, renderTableBody(effectSize))))));
|
13230
13535
|
};
|
13231
13536
|
|
13232
|
-
var iconUpArrow = function iconUpArrow(_ref) {
|
13233
|
-
var _ref$width = _ref.width,
|
13234
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13235
|
-
_ref$height = _ref.height,
|
13236
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13237
|
-
color = _ref.color;
|
13238
|
-
return React__default.createElement("svg", {
|
13239
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13240
|
-
width: width,
|
13241
|
-
height: height,
|
13242
|
-
viewBox: "0 0 24 24",
|
13243
|
-
fill: color
|
13244
|
-
}, React__default.createElement("path", {
|
13245
|
-
d: "M5.25 15.375L12 8.625L18.75 15.375",
|
13246
|
-
stroke: "#CED2DA",
|
13247
|
-
strokeWidth: "2",
|
13248
|
-
strokeLinecap: "round",
|
13249
|
-
strokeLinejoin: "round"
|
13250
|
-
}));
|
13251
|
-
};
|
13252
|
-
|
13253
|
-
var iconDownArrow = function iconDownArrow(_ref) {
|
13254
|
-
var _ref$width = _ref.width,
|
13255
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13256
|
-
_ref$height = _ref.height,
|
13257
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13258
|
-
color = _ref.color;
|
13259
|
-
return React__default.createElement("svg", {
|
13260
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13261
|
-
width: width,
|
13262
|
-
height: height,
|
13263
|
-
viewBox: "0 0 24 24",
|
13264
|
-
fill: color
|
13265
|
-
}, React__default.createElement("path", {
|
13266
|
-
d: "M5.25 8.625L12 15.375L18.75 8.625",
|
13267
|
-
stroke: "#CED2DA",
|
13268
|
-
strokeWidth: "2",
|
13269
|
-
strokeLinecap: "round",
|
13270
|
-
strokeLinejoin: "round"
|
13271
|
-
}));
|
13272
|
-
};
|
13273
|
-
|
13274
13537
|
var iconX = function iconX(_ref) {
|
13275
13538
|
var _ref$width = _ref.width,
|
13276
13539
|
width = _ref$width === void 0 ? "15" : _ref$width,
|
@@ -13406,7 +13669,13 @@ var TrickyProblem = function TrickyProblem(_ref) {
|
|
13406
13669
|
fontSize: "14px",
|
13407
13670
|
fontWeight: 700
|
13408
13671
|
}
|
13409
|
-
}, t("tricky_problems")), isOpen ? React__default.createElement(
|
13672
|
+
}, t("tricky_problems")), isOpen ? React__default.createElement(io5.IoChevronUp, {
|
13673
|
+
size: 24,
|
13674
|
+
color: styles$4.gray_300
|
13675
|
+
}) : React__default.createElement(io5.IoChevronDown, {
|
13676
|
+
size: 24,
|
13677
|
+
color: styles$4.gray_300
|
13678
|
+
})), isOpen && React__default.createElement(React.Fragment, null, isPrint ? renderPrintProblems() : renderProblems()));
|
13410
13679
|
};
|
13411
13680
|
|
13412
13681
|
var ProtractedProblem = function ProtractedProblem(_ref) {
|
@@ -13414,10 +13683,55 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13414
13683
|
data = _ref.data,
|
13415
13684
|
openProblem = _ref.openProblem,
|
13416
13685
|
changeOpen = _ref.changeOpen,
|
13417
|
-
isPrint = _ref.isPrint
|
13686
|
+
isPrint = _ref.isPrint,
|
13687
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13418
13688
|
var _useTranslation = reactI18next.useTranslation(),
|
13419
13689
|
t = _useTranslation.t;
|
13420
13690
|
var isOpen = openProblem === keyOpen;
|
13691
|
+
var renderTableBody = function renderTableBody(data) {
|
13692
|
+
return data.map(function (item, index) {
|
13693
|
+
var time = item.topDuration - item.duration;
|
13694
|
+
var isBetter = time > 0;
|
13695
|
+
return React__default.createElement("tr", {
|
13696
|
+
id: "print-item",
|
13697
|
+
key: item.id,
|
13698
|
+
style: index < data.length - 1 ? {
|
13699
|
+
borderBottom: "1px solid #e4e7ec"
|
13700
|
+
} : {}
|
13701
|
+
}, React__default.createElement("td", {
|
13702
|
+
className: styles$4["tdcolumn1"],
|
13703
|
+
style: {
|
13704
|
+
color: styles$4.gray_900,
|
13705
|
+
fontSize: "13px",
|
13706
|
+
fontWeight: 500
|
13707
|
+
}
|
13708
|
+
}, t("number_problem", {
|
13709
|
+
number: item.questionOrder + 1
|
13710
|
+
})), React__default.createElement("td", {
|
13711
|
+
style: {
|
13712
|
+
textAlign: "center",
|
13713
|
+
color: styles$4.gray_700,
|
13714
|
+
fontSize: "13px",
|
13715
|
+
fontWeight: 500
|
13716
|
+
}
|
13717
|
+
}, item.duration ? formatTimeSecond(item.duration, t) : ""), React__default.createElement("td", {
|
13718
|
+
className: styles$4["tdcolumn3"],
|
13719
|
+
style: {
|
13720
|
+
textAlign: "center",
|
13721
|
+
color: styles$4.gray_700,
|
13722
|
+
fontSize: "13px",
|
13723
|
+
fontWeight: 500
|
13724
|
+
}
|
13725
|
+
}, item.topDuration ? formatTimeSecond(item.topDuration, t) : ""), React__default.createElement("td", {
|
13726
|
+
style: {
|
13727
|
+
textAlign: "center",
|
13728
|
+
color: isBetter ? styles$4.dark : "red",
|
13729
|
+
fontSize: "13px",
|
13730
|
+
fontWeight: 600
|
13731
|
+
}
|
13732
|
+
}, item.topDuration && item.duration ? "" + (isBetter ? "" : "+") + formatTimeSecond(Math.abs(time), t) : ""));
|
13733
|
+
});
|
13734
|
+
};
|
13421
13735
|
var renderQuestions = function renderQuestions(data) {
|
13422
13736
|
return data.map(function (item) {
|
13423
13737
|
return React__default.createElement("div", {
|
@@ -13447,30 +13761,72 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13447
13761
|
var renderPrintQuestions = function renderPrintQuestions() {
|
13448
13762
|
var chunkedData = _.chunk(data, 5);
|
13449
13763
|
return chunkedData.map(function (i, index) {
|
13450
|
-
return React__default.createElement("
|
13764
|
+
return React__default.createElement("tbody", {
|
13451
13765
|
key: index,
|
13452
13766
|
className: PrintContentClassName
|
13453
|
-
}, renderQuestions(i));
|
13767
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13454
13768
|
});
|
13455
13769
|
};
|
13456
13770
|
return React__default.createElement("div", {
|
13457
13771
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13458
13772
|
}, React__default.createElement("div", {
|
13459
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13773
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13460
13774
|
onClick: function onClick() {
|
13461
13775
|
return changeOpen(isOpen ? "" : keyOpen);
|
13462
13776
|
}
|
13777
|
+
}, React__default.createElement(material.Stack, {
|
13778
|
+
flexDirection: "row",
|
13779
|
+
gap: "24px",
|
13780
|
+
alignItems: "center"
|
13463
13781
|
}, React__default.createElement(material.Typography, {
|
13464
13782
|
sx: {
|
13465
13783
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13466
13784
|
fontSize: "14px",
|
13467
13785
|
fontWeight: 700
|
13468
13786
|
}
|
13469
|
-
}, t("problems_that_took_a_long_time")),
|
13470
|
-
|
13471
|
-
|
13787
|
+
}, t("problems_that_took_a_long_time")), React__default.createElement(material.Typography, {
|
13788
|
+
sx: {
|
13789
|
+
color: styles$4.gray_300,
|
13790
|
+
fontSize: "11px",
|
13791
|
+
fontWeight: 500
|
13792
|
+
}
|
13793
|
+
}, t("protracted_problem_detail"))), isOpen ? React__default.createElement(io5.IoChevronUp, {
|
13794
|
+
size: 24,
|
13795
|
+
color: styles$4.gray_300
|
13796
|
+
}) : React__default.createElement(io5.IoChevronDown, {
|
13797
|
+
size: 24,
|
13798
|
+
color: styles$4.gray_300
|
13799
|
+
})), isOpen && React__default.createElement(React.Fragment, null, data.length ? React__default.createElement("div", {
|
13800
|
+
className: styles$4["tableCompareGrass"]
|
13801
|
+
}, React__default.createElement("div", {
|
13802
|
+
className: styles$4["table-responsive"]
|
13803
|
+
}, React__default.createElement(material.Table, {
|
13804
|
+
style: {
|
13805
|
+
width: "100%",
|
13806
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13807
|
+
}
|
13808
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13809
|
+
style: {
|
13810
|
+
borderBottom: "1px solid #E4E7EC"
|
13811
|
+
},
|
13812
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13813
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13814
|
+
className: styles$4["thcolumn1"]
|
13815
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13816
|
+
style: {
|
13817
|
+
textAlign: "center"
|
13818
|
+
}
|
13819
|
+
}, t("my_time")), React__default.createElement("th", {
|
13820
|
+
style: {
|
13821
|
+
textAlign: "center"
|
13822
|
+
}
|
13823
|
+
}, t("top_time")), React__default.createElement("th", {
|
13824
|
+
style: {
|
13825
|
+
textAlign: "center"
|
13826
|
+
}
|
13827
|
+
}, t("time_comparison")))), isPrint ? renderPrintQuestions() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(data) : renderQuestions(data))))) : React__default.createElement("div", {
|
13472
13828
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13473
|
-
}, t("no_data"))))
|
13829
|
+
}, t("no_data"))));
|
13474
13830
|
};
|
13475
13831
|
|
13476
13832
|
var Vulnerable = function Vulnerable(_ref) {
|
@@ -13478,7 +13834,8 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13478
13834
|
keyOpen = _ref.keyOpen,
|
13479
13835
|
openProblem = _ref.openProblem,
|
13480
13836
|
changeOpen = _ref.changeOpen,
|
13481
|
-
isPrint = _ref.isPrint
|
13837
|
+
isPrint = _ref.isPrint,
|
13838
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13482
13839
|
var _useTranslation = reactI18next.useTranslation(),
|
13483
13840
|
t = _useTranslation.t;
|
13484
13841
|
var isOpen = openProblem === keyOpen;
|
@@ -13487,12 +13844,65 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13487
13844
|
}).sort(function (q1, q2) {
|
13488
13845
|
return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
|
13489
13846
|
});
|
13847
|
+
var renderTableBody = function renderTableBody(data) {
|
13848
|
+
return data.map(function (item, index) {
|
13849
|
+
return React__default.createElement("tr", {
|
13850
|
+
id: "print-item",
|
13851
|
+
key: item.id,
|
13852
|
+
style: index < data.length - 1 ? {
|
13853
|
+
borderBottom: "1px solid #e4e7ec"
|
13854
|
+
} : {}
|
13855
|
+
}, React__default.createElement("td", {
|
13856
|
+
className: styles$4["tdcolumn1"],
|
13857
|
+
style: {
|
13858
|
+
color: styles$4.gray_900,
|
13859
|
+
fontSize: "13px",
|
13860
|
+
fontWeight: 600
|
13861
|
+
}
|
13862
|
+
}, React__default.createElement(material.Typography, {
|
13863
|
+
color: styles$4.gray_900,
|
13864
|
+
fontSize: "13px",
|
13865
|
+
fontWeight: 600
|
13866
|
+
}, t("problem") + " " + (item.questionOrder + 1))), React__default.createElement("td", {
|
13867
|
+
style: {
|
13868
|
+
textAlign: "center",
|
13869
|
+
color: styles$4.dark,
|
13870
|
+
fontSize: "13px",
|
13871
|
+
fontWeight: 600
|
13872
|
+
}
|
13873
|
+
}, item.overallCorrectRate.toFixed(2) ? item.overallCorrectRate.toFixed(2) + "%" : ""), React__default.createElement("td", {
|
13874
|
+
className: styles$4["tdcolumn3"],
|
13875
|
+
style: {
|
13876
|
+
color: "red",
|
13877
|
+
fontSize: "13px",
|
13878
|
+
fontWeight: 500
|
13879
|
+
}
|
13880
|
+
}, item.selectedAnswers ? t("number_answer", {
|
13881
|
+
number: item.selectedAnswers
|
13882
|
+
}) : ""), React__default.createElement("td", {
|
13883
|
+
style: {
|
13884
|
+
textAlign: "center",
|
13885
|
+
color: styles$4.gray_700
|
13886
|
+
}
|
13887
|
+
}, item.correctAnswers ? t("number_answer", {
|
13888
|
+
number: item.correctAnswers
|
13889
|
+
}) : ""), React__default.createElement("td", {
|
13890
|
+
style: {
|
13891
|
+
textAlign: "center",
|
13892
|
+
color: styles$4.gray_700
|
13893
|
+
}
|
13894
|
+
}, item.category.name ? item.category.name : ""));
|
13895
|
+
});
|
13896
|
+
};
|
13490
13897
|
var renderQuestions = function renderQuestions(questions) {
|
13491
13898
|
return questions.map(function (question) {
|
13492
|
-
return React__default.createElement(
|
13899
|
+
return React__default.createElement(material.Grid, {
|
13900
|
+
container: true,
|
13493
13901
|
className: styles$4["content"],
|
13494
13902
|
key: question.id
|
13495
|
-
}, React__default.createElement(
|
13903
|
+
}, React__default.createElement(material.Grid, {
|
13904
|
+
item: true,
|
13905
|
+
xs: 1.5,
|
13496
13906
|
className: styles$4["contentColumn1"]
|
13497
13907
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13498
13908
|
className: styles$4["span1"]
|
@@ -13500,7 +13910,9 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13500
13910
|
className: styles$4["span2"]
|
13501
13911
|
}, t("number_question", {
|
13502
13912
|
number: question.questionOrder + 1
|
13503
|
-
})))), React__default.createElement(
|
13913
|
+
})))), React__default.createElement(material.Grid, {
|
13914
|
+
item: true,
|
13915
|
+
xs: 10.5,
|
13504
13916
|
className: styles$4["contentColumn2"]
|
13505
13917
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13506
13918
|
className: styles$4["span1"]
|
@@ -13520,30 +13932,76 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13520
13932
|
var renderPrintQuestions = function renderPrintQuestions(questions) {
|
13521
13933
|
var chunkedQuestions = _.chunk(questions, 5);
|
13522
13934
|
return chunkedQuestions.map(function (i, index) {
|
13523
|
-
return React__default.createElement("
|
13935
|
+
return React__default.createElement("tbody", {
|
13524
13936
|
key: index,
|
13525
13937
|
className: PrintContentClassName
|
13526
|
-
}, renderQuestions(i));
|
13938
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13527
13939
|
});
|
13528
13940
|
};
|
13529
13941
|
return React__default.createElement("div", {
|
13530
13942
|
className: styles$4["wrapperProblem"] + " " + PrintContainerClassName
|
13531
13943
|
}, React__default.createElement("div", {
|
13532
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13944
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13533
13945
|
onClick: function onClick() {
|
13534
13946
|
return changeOpen(isOpen ? "" : keyOpen);
|
13535
13947
|
}
|
13948
|
+
}, React__default.createElement(material.Stack, {
|
13949
|
+
flexDirection: "row",
|
13950
|
+
gap: "24px",
|
13951
|
+
alignItems: "center"
|
13536
13952
|
}, React__default.createElement(material.Typography, {
|
13537
13953
|
sx: {
|
13538
13954
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13539
13955
|
fontSize: "14px",
|
13540
13956
|
fontWeight: 700
|
13541
13957
|
}
|
13542
|
-
}, t("issues_vulnerable")),
|
13543
|
-
|
13544
|
-
|
13958
|
+
}, t("issues_vulnerable")), React__default.createElement(material.Typography, {
|
13959
|
+
sx: {
|
13960
|
+
color: styles$4.gray_300,
|
13961
|
+
fontSize: "11px",
|
13962
|
+
fontWeight: 500
|
13963
|
+
}
|
13964
|
+
}, t("vulnerable_detail"))), isOpen ? React__default.createElement(io5.IoChevronUp, {
|
13965
|
+
size: 24,
|
13966
|
+
color: styles$4.gray_300
|
13967
|
+
}) : React__default.createElement(io5.IoChevronDown, {
|
13968
|
+
size: 24,
|
13969
|
+
color: styles$4.gray_300
|
13970
|
+
})), isOpen && React__default.createElement(React.Fragment, null, incorrectQuestions.length ? React__default.createElement("div", {
|
13971
|
+
className: styles$4["tableCompareGrass"]
|
13972
|
+
}, React__default.createElement("div", {
|
13973
|
+
className: styles$4["table-responsive"]
|
13974
|
+
}, React__default.createElement(material.Table, {
|
13975
|
+
style: {
|
13976
|
+
width: "100%",
|
13977
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13978
|
+
}
|
13979
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13980
|
+
style: {
|
13981
|
+
borderBottom: "1px solid #E4E7EC"
|
13982
|
+
},
|
13983
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13984
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13985
|
+
className: styles$4["thcolumn1"]
|
13986
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13987
|
+
style: {
|
13988
|
+
textAlign: "center"
|
13989
|
+
}
|
13990
|
+
}, t("total_correct_rate")), React__default.createElement("th", {
|
13991
|
+
style: {
|
13992
|
+
textAlign: "center"
|
13993
|
+
}
|
13994
|
+
}, t("my_wrong_answer")), React__default.createElement("th", {
|
13995
|
+
style: {
|
13996
|
+
textAlign: "center"
|
13997
|
+
}
|
13998
|
+
}, t("answer")), React__default.createElement("th", {
|
13999
|
+
style: {
|
14000
|
+
textAlign: "center"
|
14001
|
+
}
|
14002
|
+
}, t("_category")))), isPrint ? renderPrintQuestions(incorrectQuestions) : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(incorrectQuestions) : renderQuestions(incorrectQuestions))))) : React__default.createElement("div", {
|
13545
14003
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13546
|
-
}, t("no_data"))))
|
14004
|
+
}, t("no_data"))));
|
13547
14005
|
};
|
13548
14006
|
|
13549
14007
|
var GradesByTerritory = function GradesByTerritory(_ref) {
|
@@ -13551,10 +14009,64 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13551
14009
|
data = _ref.data,
|
13552
14010
|
openProblem = _ref.openProblem,
|
13553
14011
|
changeOpen = _ref.changeOpen,
|
13554
|
-
isPrint = _ref.isPrint
|
14012
|
+
isPrint = _ref.isPrint,
|
14013
|
+
resultData = _ref.resultData,
|
14014
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13555
14015
|
var _useTranslation = reactI18next.useTranslation(),
|
13556
14016
|
t = _useTranslation.t;
|
14017
|
+
var formattedData = totalSolveTimeCategories(resultData, data);
|
13557
14018
|
var isOpen = openProblem === keyOpen;
|
14019
|
+
var renderTableBody = function renderTableBody(data) {
|
14020
|
+
return data.map(function (item, index) {
|
14021
|
+
return React__default.createElement("tr", {
|
14022
|
+
id: "print-item",
|
14023
|
+
key: item.id,
|
14024
|
+
style: index < data.length - 1 ? {
|
14025
|
+
borderBottom: "1px solid #e4e7ec"
|
14026
|
+
} : {}
|
14027
|
+
}, React__default.createElement("td", {
|
14028
|
+
className: styles$4["tdcolumn1"],
|
14029
|
+
style: {
|
14030
|
+
color: styles$4.gray_900,
|
14031
|
+
fontSize: "13px",
|
14032
|
+
fontWeight: 600
|
14033
|
+
}
|
14034
|
+
}, item.name), React__default.createElement("td", {
|
14035
|
+
style: {
|
14036
|
+
textAlign: "center",
|
14037
|
+
color: styles$4.gray_900,
|
14038
|
+
fontSize: "13px",
|
14039
|
+
fontWeight: 600
|
14040
|
+
}
|
14041
|
+
}, item.percentageAmongStudents.toFixed(2), "%"), React__default.createElement("td", {
|
14042
|
+
className: styles$4["tdcolumn3"],
|
14043
|
+
style: {
|
14044
|
+
textAlign: "center",
|
14045
|
+
color: styles$4.gray_700,
|
14046
|
+
fontSize: "13px",
|
14047
|
+
fontWeight: 500
|
14048
|
+
}
|
14049
|
+
}, item.totalCorrectQuestions ? t("number_of_answer", {
|
14050
|
+
number: item.totalCorrectQuestions
|
14051
|
+
}) : ""), React__default.createElement("td", {
|
14052
|
+
style: {
|
14053
|
+
textAlign: "center",
|
14054
|
+
color: styles$4.gray_700,
|
14055
|
+
fontSize: "13px",
|
14056
|
+
fontWeight: 500
|
14057
|
+
}
|
14058
|
+
}, item.totalQuestions ? t("number_of_answer", {
|
14059
|
+
number: item.totalQuestions
|
14060
|
+
}) : ""), React__default.createElement("td", {
|
14061
|
+
style: {
|
14062
|
+
textAlign: "center",
|
14063
|
+
color: styles$4.gray_700,
|
14064
|
+
fontSize: "13px",
|
14065
|
+
fontWeight: 500
|
14066
|
+
}
|
14067
|
+
}, item.totalSolveTime ? formatDuration(t, item.totalSolveTime) : ""));
|
14068
|
+
});
|
14069
|
+
};
|
13558
14070
|
var renderCategories = function renderCategories(data) {
|
13559
14071
|
return data.map(function (item) {
|
13560
14072
|
var trackStyle = {
|
@@ -13578,18 +14090,18 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13578
14090
|
});
|
13579
14091
|
};
|
13580
14092
|
var renderPrintCategories = function renderPrintCategories() {
|
13581
|
-
var chunkedCategories = _.chunk(
|
14093
|
+
var chunkedCategories = _.chunk(formattedData, 10);
|
13582
14094
|
return chunkedCategories.map(function (i, index) {
|
13583
|
-
return React__default.createElement("
|
14095
|
+
return React__default.createElement("tbody", {
|
13584
14096
|
key: index,
|
13585
14097
|
className: PrintContentClassName
|
13586
|
-
}, renderCategories(i));
|
14098
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderCategories(i));
|
13587
14099
|
});
|
13588
14100
|
};
|
13589
14101
|
return React__default.createElement("div", {
|
13590
14102
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13591
14103
|
}, React__default.createElement("div", {
|
13592
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
14104
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13593
14105
|
onClick: function onClick() {
|
13594
14106
|
return changeOpen(isOpen ? "" : keyOpen);
|
13595
14107
|
}
|
@@ -13599,9 +14111,45 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13599
14111
|
fontSize: "14px",
|
13600
14112
|
fontWeight: 700
|
13601
14113
|
}
|
13602
|
-
}, t("grades_by_area")), isOpen ? React__default.createElement(
|
13603
|
-
|
13604
|
-
|
14114
|
+
}, t("grades_by_area")), isOpen ? React__default.createElement(io5.IoChevronUp, {
|
14115
|
+
size: 24,
|
14116
|
+
color: styles$4.gray_300
|
14117
|
+
}) : React__default.createElement(io5.IoChevronDown, {
|
14118
|
+
size: 24,
|
14119
|
+
color: styles$4.gray_300
|
14120
|
+
})), isOpen && React__default.createElement(React.Fragment, null, formattedData.length ? React__default.createElement("div", {
|
14121
|
+
className: styles$4["tableCompareGrass"]
|
14122
|
+
}, React__default.createElement("div", {
|
14123
|
+
className: styles$4["table-responsive"]
|
14124
|
+
}, React__default.createElement(material.Table, {
|
14125
|
+
style: {
|
14126
|
+
width: "100%",
|
14127
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
14128
|
+
}
|
14129
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
14130
|
+
style: {
|
14131
|
+
borderBottom: "1px solid #E4E7EC"
|
14132
|
+
},
|
14133
|
+
className: isPrint ? PrintHeaderClassName : ""
|
14134
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
14135
|
+
className: styles$4["thcolumn1"]
|
14136
|
+
}, t("categories")), React__default.createElement("th", {
|
14137
|
+
style: {
|
14138
|
+
textAlign: "center"
|
14139
|
+
}
|
14140
|
+
}, t("correct_rate")), React__default.createElement("th", {
|
14141
|
+
style: {
|
14142
|
+
textAlign: "center"
|
14143
|
+
}
|
14144
|
+
}, t("number_of_correct_answers")), React__default.createElement("th", {
|
14145
|
+
style: {
|
14146
|
+
textAlign: "center"
|
14147
|
+
}
|
14148
|
+
}, t("total_number_of_problems")), React__default.createElement("th", {
|
14149
|
+
style: {
|
14150
|
+
textAlign: "center"
|
14151
|
+
}
|
14152
|
+
}, t("total_solve_time")))), isPrint ? renderPrintCategories() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(formattedData) : renderCategories(formattedData))))) : React__default.createElement("div", {
|
13605
14153
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13606
14154
|
}, t("no_data"))));
|
13607
14155
|
};
|
@@ -13811,7 +14359,8 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13811
14359
|
history = _ref.history,
|
13812
14360
|
examSessionId = _ref.examSessionId,
|
13813
14361
|
studentId = _ref.studentId,
|
13814
|
-
code = _ref.code
|
14362
|
+
code = _ref.code,
|
14363
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13815
14364
|
var _useTab = useTab(),
|
13816
14365
|
selected = _useTab.selected,
|
13817
14366
|
handleChangeTab = _useTab.handleChangeTab;
|
@@ -13912,7 +14461,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13912
14461
|
fontWeight: 600,
|
13913
14462
|
color: styles.gray_500
|
13914
14463
|
}
|
13915
|
-
}, t("
|
14464
|
+
}, t("students")), React__default.createElement(material.Typography, {
|
13916
14465
|
sx: {
|
13917
14466
|
fontSize: "14px",
|
13918
14467
|
fontWeight: 600,
|
@@ -13956,7 +14505,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13956
14505
|
}, React__default.createElement("button", {
|
13957
14506
|
className: styles$4["pdfBtn"] + " " + styles["truncate"],
|
13958
14507
|
onClick: handleExportPdf
|
13959
|
-
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("
|
14508
|
+
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("print_all"))))))), React__default.createElement(material.Grid, {
|
13960
14509
|
item: true,
|
13961
14510
|
xs: 12
|
13962
14511
|
}, React__default.createElement(material.Box, {
|
@@ -13966,7 +14515,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13966
14515
|
alignItems: "center",
|
13967
14516
|
display: "flex",
|
13968
14517
|
overflow: "scroll",
|
13969
|
-
bgcolor: styles.
|
14518
|
+
bgcolor: styles.gray_50,
|
13970
14519
|
borderTop: "1px solid #E4E7EC",
|
13971
14520
|
borderBottom: "1px solid #E4E7EC"
|
13972
14521
|
}, React__default.createElement(material.Stack, {
|
@@ -14046,16 +14595,20 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14046
14595
|
keyOpen: "Vulnerable",
|
14047
14596
|
data: resultData,
|
14048
14597
|
openProblem: openProblem,
|
14049
|
-
changeOpen: setOpenProblem
|
14598
|
+
changeOpen: setOpenProblem,
|
14599
|
+
isMyStoryStudent: isMyStoryStudent
|
14050
14600
|
}), React__default.createElement(ProtractedProblem, {
|
14051
14601
|
keyOpen: "ProtractedProblem",
|
14052
14602
|
data: longTimeSpend,
|
14053
14603
|
openProblem: openProblem,
|
14054
|
-
changeOpen: setOpenProblem
|
14604
|
+
changeOpen: setOpenProblem,
|
14605
|
+
isMyStoryStudent: isMyStoryStudent
|
14055
14606
|
}), React__default.createElement(GradesByTerritory, {
|
14056
14607
|
keyOpen: "GradesByTerritory",
|
14057
14608
|
data: categoryResponses,
|
14609
|
+
resultData: resultData,
|
14058
14610
|
openProblem: openProblem,
|
14611
|
+
isMyStoryStudent: isMyStoryStudent,
|
14059
14612
|
changeOpen: setOpenProblem
|
14060
14613
|
}))), React__default.createElement(material.Grid, {
|
14061
14614
|
item: true,
|
@@ -14213,10 +14766,11 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14213
14766
|
gap: "12px",
|
14214
14767
|
marginTop: "24px"
|
14215
14768
|
}, React__default.createElement(material.Typography, {
|
14769
|
+
className: "chart-title",
|
14216
14770
|
sx: {
|
14217
|
-
fontSize: "
|
14771
|
+
fontSize: "18px",
|
14218
14772
|
fontWeight: 700,
|
14219
|
-
color: styles.
|
14773
|
+
color: styles.gray_500
|
14220
14774
|
}
|
14221
14775
|
}, t(TabList[2].label)), React__default.createElement(CompareGrass, {
|
14222
14776
|
effectSize: effectSize,
|
@@ -14244,19 +14798,23 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14244
14798
|
data: resultData,
|
14245
14799
|
openProblem: "Vulnerable",
|
14246
14800
|
changeOpen: setOpenProblem,
|
14801
|
+
isMyStoryStudent: isMyStoryStudent,
|
14247
14802
|
isPrint: true
|
14248
14803
|
}), React__default.createElement(ProtractedProblem, {
|
14249
14804
|
keyOpen: "ProtractedProblem",
|
14250
14805
|
data: longTimeSpend,
|
14251
14806
|
openProblem: "ProtractedProblem",
|
14252
14807
|
changeOpen: setOpenProblem,
|
14253
|
-
isPrint: true
|
14808
|
+
isPrint: true,
|
14809
|
+
isMyStoryStudent: isMyStoryStudent
|
14254
14810
|
}), React__default.createElement(GradesByTerritory, {
|
14255
14811
|
keyOpen: "GradesByTerritory",
|
14256
14812
|
data: categoryResponses,
|
14813
|
+
resultData: resultData,
|
14257
14814
|
openProblem: "GradesByTerritory",
|
14258
14815
|
changeOpen: setOpenProblem,
|
14259
|
-
isPrint: true
|
14816
|
+
isPrint: true,
|
14817
|
+
isMyStoryStudent: isMyStoryStudent
|
14260
14818
|
})))), React__default.createElement(CreateNewQuestionDialog$1, {
|
14261
14819
|
examSessionId: resultData === null || resultData === void 0 ? void 0 : resultData.examSessionId,
|
14262
14820
|
handleCreateQuestion: handleCreateQuestion,
|
@@ -14291,12 +14849,25 @@ var timeSpanToLocalMoment = function timeSpanToLocalMoment(time, date) {
|
|
14291
14849
|
var value = date ? moment.utc(date).startOf("day").add(totalSeconds, "seconds").local() : moment().startOf("day").add(totalSeconds, "seconds");
|
14292
14850
|
return value;
|
14293
14851
|
};
|
14852
|
+
var convertHHMMSStoSeconds = function convertHHMMSStoSeconds(time) {
|
14853
|
+
var times = time.split(":");
|
14854
|
+
return +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
14855
|
+
};
|
14856
|
+
var getRemainTime = function getRemainTime(startTime, duration) {
|
14857
|
+
var timePass = diffFromNow(startTime, "second");
|
14858
|
+
var durationInNumber = convertHHMMSStoSeconds(duration);
|
14859
|
+
if (typeof timePass !== "number") return null;
|
14860
|
+
if (timePass > durationInNumber) return 0;
|
14861
|
+
return durationInNumber - timePass;
|
14862
|
+
};
|
14294
14863
|
|
14295
14864
|
var times = {
|
14296
14865
|
__proto__: null,
|
14297
14866
|
getLocalDayOfWeek: getLocalDayOfWeek,
|
14298
14867
|
getUtcDayOfWeek: getUtcDayOfWeek,
|
14299
|
-
timeSpanToLocalMoment: timeSpanToLocalMoment
|
14868
|
+
timeSpanToLocalMoment: timeSpanToLocalMoment,
|
14869
|
+
convertHHMMSStoSeconds: convertHHMMSStoSeconds,
|
14870
|
+
getRemainTime: getRemainTime
|
14300
14871
|
};
|
14301
14872
|
|
14302
14873
|
var SIGN_IN_SUPER_ADMIN_URL = SUPER_ADMIN_BASE_URL + "/api/auth/login";
|
@@ -14875,9 +15446,9 @@ var Header = function Header(_ref) {
|
|
14875
15446
|
});
|
14876
15447
|
var logo = React.useMemo(function () {
|
14877
15448
|
if (isTeacher) {
|
14878
|
-
return language === Language.en ? React__default.createElement(teacherFullLogoEn, null) : React__default.createElement(teacherFullLogoKo, null);
|
15449
|
+
return language === exports.Language.en ? React__default.createElement(teacherFullLogoEn, null) : React__default.createElement(teacherFullLogoKo, null);
|
14879
15450
|
} else {
|
14880
|
-
return language === Language.en ? React__default.createElement(studentFullLogoEn, null) : React__default.createElement(studentFullLogoKo, null);
|
15451
|
+
return language === exports.Language.en ? React__default.createElement(studentFullLogoEn, null) : React__default.createElement(studentFullLogoKo, null);
|
14881
15452
|
}
|
14882
15453
|
}, [isTeacher, language]);
|
14883
15454
|
var pathname = location.pathname.toLowerCase();
|
@@ -14901,8 +15472,8 @@ var Header = function Header(_ref) {
|
|
14901
15472
|
homeUrl: homeRoute.path,
|
14902
15473
|
role: role,
|
14903
15474
|
history: history,
|
14904
|
-
|
14905
|
-
|
15475
|
+
onSignOut: onSignOut,
|
15476
|
+
hideAcademyName: !isLargerThanXL && headerTabs.length > 6
|
14906
15477
|
})), React__default.createElement(material.Stack, {
|
14907
15478
|
display: "flex",
|
14908
15479
|
flexGrow: 1,
|
@@ -14949,23 +15520,7 @@ var Header = function Header(_ref) {
|
|
14949
15520
|
})), React__default.createElement(material.Stack, {
|
14950
15521
|
direction: "row",
|
14951
15522
|
alignItems: "center"
|
14952
|
-
}, React__default.createElement(
|
14953
|
-
color: styles.gray_700,
|
14954
|
-
className: "fw-bold me-3 text-nowrap flex-shrink-1",
|
14955
|
-
sx: {
|
14956
|
-
minWidth: "60px",
|
14957
|
-
maxWidth: {
|
14958
|
-
md: "100px",
|
14959
|
-
xs: "60px"
|
14960
|
-
},
|
14961
|
-
fontSize: {
|
14962
|
-
md: "16px",
|
14963
|
-
xs: "14px"
|
14964
|
-
},
|
14965
|
-
overflow: "hidden",
|
14966
|
-
textOverflow: "ellipsis"
|
14967
|
-
}
|
14968
|
-
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(reactRouterDom.Link, {
|
15523
|
+
}, React__default.createElement(reactRouterDom.Link, {
|
14969
15524
|
"aria-current": "page",
|
14970
15525
|
to: homeRoute.path,
|
14971
15526
|
className: "border-none"
|
@@ -15078,7 +15633,11 @@ var AcademyCard = function AcademyCard(_ref) {
|
|
15078
15633
|
}), React.createElement(CardContent, null, React.createElement(Typography, {
|
15079
15634
|
variant: "h6",
|
15080
15635
|
component: "div"
|
15081
|
-
}, academy.name)), React.createElement(CardActions,
|
15636
|
+
}, academy.name)), React.createElement(CardActions, {
|
15637
|
+
sx: {
|
15638
|
+
padding: "16px"
|
15639
|
+
}
|
15640
|
+
}, React.createElement(Button, {
|
15082
15641
|
sx: {
|
15083
15642
|
bgColor: theme.palette.main_theme.dark
|
15084
15643
|
},
|
@@ -15135,6 +15694,221 @@ var AcademyList = function AcademyList(_ref) {
|
|
15135
15694
|
}, React__default.createElement("span", null, t("no_academy_available"), "."))))));
|
15136
15695
|
};
|
15137
15696
|
|
15697
|
+
var ONE_SECOND_IN_MILLISECONDS = 1000;
|
15698
|
+
var useCountDownTimer = function useCountDownTimer(props) {
|
15699
|
+
var startTime = props.startTime,
|
15700
|
+
status = props.status,
|
15701
|
+
code = props.code,
|
15702
|
+
duration = props.duration,
|
15703
|
+
fetchedCount = props.fetchedCount,
|
15704
|
+
onFinish = props.onFinish;
|
15705
|
+
var _useState = React.useState(),
|
15706
|
+
remainTime = _useState[0],
|
15707
|
+
setRemainTime = _useState[1];
|
15708
|
+
var checkStatusRef = React.useRef(null);
|
15709
|
+
var requestRef = React.useRef(null);
|
15710
|
+
var checkLiveExamStatus = React.useCallback(function () {
|
15711
|
+
try {
|
15712
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15713
|
+
if (!code || status === ExamStatus$1.Completed) {
|
15714
|
+
return Promise.resolve();
|
15715
|
+
}
|
15716
|
+
var _temp = _catch(function () {
|
15717
|
+
return Promise.resolve(getCheckStatusExam(code)).then(function (res) {
|
15718
|
+
if (res.data.data.status === ExamStatus$1.Completed) {
|
15719
|
+
clearInterval(checkStatusRef.current);
|
15720
|
+
onFinish();
|
15721
|
+
} else {
|
15722
|
+
checkStatusRef.current = setTimeout(checkLiveExamStatus, ONE_SECOND_IN_MILLISECONDS);
|
15723
|
+
}
|
15724
|
+
});
|
15725
|
+
}, function (error) {
|
15726
|
+
console.log({
|
15727
|
+
error: error
|
15728
|
+
});
|
15729
|
+
});
|
15730
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15731
|
+
} catch (e) {
|
15732
|
+
return Promise.reject(e);
|
15733
|
+
}
|
15734
|
+
}, [code, status, onFinish]);
|
15735
|
+
React.useEffect(function () {
|
15736
|
+
if (status !== ExamStatus$1.InProgress) return;
|
15737
|
+
var animate = function animate() {
|
15738
|
+
if (!startTime || !duration) return;
|
15739
|
+
if (typeof remainTime === "number" && remainTime <= 0) {
|
15740
|
+
onFinish();
|
15741
|
+
return;
|
15742
|
+
}
|
15743
|
+
var remain = getRemainTime(startTime, duration);
|
15744
|
+
if (typeof remain !== "number") {
|
15745
|
+
setRemainTime(undefined);
|
15746
|
+
return;
|
15747
|
+
}
|
15748
|
+
if (remain <= 0) {
|
15749
|
+
setRemainTime(0);
|
15750
|
+
checkLiveExamStatus();
|
15751
|
+
return;
|
15752
|
+
}
|
15753
|
+
setRemainTime(remain || 0);
|
15754
|
+
requestRef.current = requestAnimationFrame(animate);
|
15755
|
+
};
|
15756
|
+
requestRef.current = requestAnimationFrame(animate);
|
15757
|
+
return function () {
|
15758
|
+
!!requestRef.current && cancelAnimationFrame(requestRef.current);
|
15759
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15760
|
+
setRemainTime(undefined);
|
15761
|
+
};
|
15762
|
+
}, [startTime, duration, fetchedCount, checkLiveExamStatus]);
|
15763
|
+
React.useEffect(function () {
|
15764
|
+
if (typeof remainTime === "number" && remainTime <= 0) onFinish();
|
15765
|
+
}, [remainTime, onFinish]);
|
15766
|
+
return remainTime;
|
15767
|
+
};
|
15768
|
+
|
15769
|
+
var EXAM_SESSION_URL$1 = BASE_URL + "/api/examSession";
|
15770
|
+
var getCheckStatusExam$1 = function getCheckStatusExam(examCode) {
|
15771
|
+
return api.get(EXAM_SESSION_URL$1 + "/" + examCode + "/status");
|
15772
|
+
};
|
15773
|
+
|
15774
|
+
var useCheckExam = function useCheckExam(code, status) {
|
15775
|
+
var _useState = React.useState({}),
|
15776
|
+
isCheckExam = _useState[0],
|
15777
|
+
setCheckExam = _useState[1];
|
15778
|
+
var isCheck = !code ? false : isCheckExam[code];
|
15779
|
+
var checkExam = function checkExam() {
|
15780
|
+
try {
|
15781
|
+
if (!code || isCheck) return Promise.resolve();
|
15782
|
+
if (status === ExamStatus$1.Completed) {
|
15783
|
+
setCheckExam(function (state) {
|
15784
|
+
var _extends2;
|
15785
|
+
return _extends({}, state, (_extends2 = {}, _extends2[code] = true, _extends2));
|
15786
|
+
});
|
15787
|
+
return Promise.resolve();
|
15788
|
+
}
|
15789
|
+
var _temp = _catch(function () {
|
15790
|
+
return Promise.resolve(getCheckStatusExam$1(code)).then(function () {
|
15791
|
+
setCheckExam(function (state) {
|
15792
|
+
var _extends3;
|
15793
|
+
return _extends({}, state, (_extends3 = {}, _extends3[code] = true, _extends3));
|
15794
|
+
});
|
15795
|
+
});
|
15796
|
+
}, function (error) {
|
15797
|
+
console.log({
|
15798
|
+
error: error
|
15799
|
+
});
|
15800
|
+
});
|
15801
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15802
|
+
} catch (e) {
|
15803
|
+
return Promise.reject(e);
|
15804
|
+
}
|
15805
|
+
};
|
15806
|
+
React.useEffect(function () {
|
15807
|
+
checkExam();
|
15808
|
+
}, [code]);
|
15809
|
+
return {
|
15810
|
+
isCheck: isCheck
|
15811
|
+
};
|
15812
|
+
};
|
15813
|
+
|
15814
|
+
var useLoadMore = function useLoadMore(props) {
|
15815
|
+
var onLoadMore = props.onLoadMore,
|
15816
|
+
loading = props.loading;
|
15817
|
+
var observerTarget = React.useRef(null);
|
15818
|
+
React.useEffect(function () {
|
15819
|
+
var currentTarget = observerTarget.current;
|
15820
|
+
var observer = new IntersectionObserver(function (entries) {
|
15821
|
+
if (entries[0].isIntersecting && !loading) {
|
15822
|
+
onLoadMore();
|
15823
|
+
}
|
15824
|
+
}, {
|
15825
|
+
threshold: 1
|
15826
|
+
});
|
15827
|
+
if (observerTarget.current) {
|
15828
|
+
observer.observe(observerTarget.current);
|
15829
|
+
}
|
15830
|
+
return function () {
|
15831
|
+
if (currentTarget) {
|
15832
|
+
observer.unobserve(currentTarget);
|
15833
|
+
}
|
15834
|
+
};
|
15835
|
+
}, [observerTarget, loading, onLoadMore]);
|
15836
|
+
return {
|
15837
|
+
observerTarget: observerTarget
|
15838
|
+
};
|
15839
|
+
};
|
15840
|
+
|
15841
|
+
var useVirtualizeList = function useVirtualizeList(totalItems, rowHeight, offsetRow, minRows) {
|
15842
|
+
if (offsetRow === void 0) {
|
15843
|
+
offsetRow = 1;
|
15844
|
+
}
|
15845
|
+
var _useState = React.useState(-1),
|
15846
|
+
startIndex = _useState[0],
|
15847
|
+
setStartIndex = _useState[1];
|
15848
|
+
var _useState2 = React.useState(-1),
|
15849
|
+
endIndex = _useState2[0],
|
15850
|
+
setEndIndex = _useState2[1];
|
15851
|
+
var containerRef = React.useRef(null);
|
15852
|
+
var handleScroll = React.useCallback(function () {
|
15853
|
+
if (containerRef.current) {
|
15854
|
+
var _containerRef$current = containerRef.current,
|
15855
|
+
scrollTop = _containerRef$current.scrollTop,
|
15856
|
+
clientHeight = _containerRef$current.clientHeight;
|
15857
|
+
var itemsPerPage = Math.ceil(clientHeight / rowHeight);
|
15858
|
+
var newStartIndex = Math.max(Math.floor(scrollTop / rowHeight) - offsetRow, 0);
|
15859
|
+
var newEndIndex = Math.min(newStartIndex + itemsPerPage + offsetRow, totalItems - 1);
|
15860
|
+
if (minRows) {
|
15861
|
+
if (totalItems <= minRows) {
|
15862
|
+
newStartIndex = -1;
|
15863
|
+
newEndIndex = -1;
|
15864
|
+
} else {
|
15865
|
+
var total = newEndIndex - newStartIndex;
|
15866
|
+
var diff = minRows - total;
|
15867
|
+
if (diff > 0) {
|
15868
|
+
var valS = diff / 2;
|
15869
|
+
var valE = diff - valS;
|
15870
|
+
if (newStartIndex < valS) {
|
15871
|
+
valE += valS - newStartIndex;
|
15872
|
+
newStartIndex = 0;
|
15873
|
+
}
|
15874
|
+
if (newEndIndex + valE > totalItems - 1) {
|
15875
|
+
valS += newEndIndex + valE - totalItems + 1;
|
15876
|
+
}
|
15877
|
+
newStartIndex = Math.max(newStartIndex - valS, 0);
|
15878
|
+
newEndIndex = Math.min(newEndIndex + valE, totalItems - 1);
|
15879
|
+
}
|
15880
|
+
}
|
15881
|
+
}
|
15882
|
+
setStartIndex(newStartIndex);
|
15883
|
+
setEndIndex(newEndIndex);
|
15884
|
+
}
|
15885
|
+
}, [totalItems, rowHeight, offsetRow]);
|
15886
|
+
React.useEffect(function () {
|
15887
|
+
var container = containerRef.current;
|
15888
|
+
if (container) {
|
15889
|
+
container.addEventListener("scroll", handleScroll);
|
15890
|
+
}
|
15891
|
+
return function () {
|
15892
|
+
if (container) {
|
15893
|
+
container.removeEventListener("scroll", handleScroll);
|
15894
|
+
}
|
15895
|
+
};
|
15896
|
+
}, [handleScroll]);
|
15897
|
+
var handleChangeStartIndex = function handleChangeStartIndex(index) {
|
15898
|
+
setStartIndex(index);
|
15899
|
+
};
|
15900
|
+
var handleChangeEndIndex = function handleChangeEndIndex(index) {
|
15901
|
+
setEndIndex(index);
|
15902
|
+
};
|
15903
|
+
return {
|
15904
|
+
startIndex: startIndex,
|
15905
|
+
endIndex: endIndex,
|
15906
|
+
containerRef: containerRef,
|
15907
|
+
handleChangeStartIndex: handleChangeStartIndex,
|
15908
|
+
handleChangeEndIndex: handleChangeEndIndex
|
15909
|
+
};
|
15910
|
+
};
|
15911
|
+
|
15138
15912
|
exports.moment = moment;
|
15139
15913
|
Object.defineProperty(exports, 'I18nextProvider', {
|
15140
15914
|
enumerable: true,
|
@@ -15214,6 +15988,7 @@ exports.formatTime = formatTime;
|
|
15214
15988
|
exports.getAcademyDomain = getAcademyDomain;
|
15215
15989
|
exports.getAccessToken = getAccessToken;
|
15216
15990
|
exports.getErrorMessage = getErrorMessage;
|
15991
|
+
exports.getOrdinalSuffix = getOrdinalSuffix;
|
15217
15992
|
exports.i18n = i18n;
|
15218
15993
|
exports.minutesToTimeSpan = minutesToTimeSpan;
|
15219
15994
|
exports.setAlert = setAlert;
|
@@ -15228,11 +16003,15 @@ exports.toISOString = toISOString;
|
|
15228
16003
|
exports.useAutoAcademyDomain = useAutoAcademyDomain;
|
15229
16004
|
exports.useCategorySelect = useCategorySelect;
|
15230
16005
|
exports.useChatContainer = useChatContainer;
|
16006
|
+
exports.useCheckExam = useCheckExam;
|
16007
|
+
exports.useCountDownTimer = useCountDownTimer;
|
15231
16008
|
exports.useGoogleSignOut = useGoogleSignOut;
|
15232
16009
|
exports.useLanguage = useLanguage;
|
16010
|
+
exports.useLoadMore = useLoadMore;
|
15233
16011
|
exports.useLogin = useLogin;
|
15234
16012
|
exports.usePusherConversation = usePusherConversation;
|
15235
16013
|
exports.useSubjectSelect = useSubjectSelect;
|
15236
16014
|
exports.useSwitchAcademy = useSwitchAcademy;
|
16015
|
+
exports.useVirtualizeList = useVirtualizeList;
|
15237
16016
|
exports.utcToLocalTime = utcToLocalTime;
|
15238
16017
|
//# sourceMappingURL=index.js.map
|