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.modern.js
CHANGED
@@ -14,7 +14,7 @@ import { gapi } from 'gapi-script';
|
|
14
14
|
import 'moment/locale/ko.js';
|
15
15
|
import 'moment/locale/en-au.js';
|
16
16
|
import Pusher from 'pusher-js';
|
17
|
-
import { IoClose, IoCloseOutline, IoSearch } from 'react-icons/io5';
|
17
|
+
import { IoClose, IoCloseCircle, IoLogOut, IoCloseOutline, IoSearch, IoChevronUp, IoChevronDown } from 'react-icons/io5';
|
18
18
|
import i18n from 'i18next';
|
19
19
|
import Box$1 from '@mui/material/Box';
|
20
20
|
import Popover from '@mui/material/Popover';
|
@@ -23,10 +23,10 @@ import IconButton$1 from '@mui/material/IconButton';
|
|
23
23
|
import { GoArrowSwitch } from 'react-icons/go';
|
24
24
|
import { toast } from 'react-toastify';
|
25
25
|
export { ToastContainer, toast } from 'react-toastify';
|
26
|
-
import { IoIosLogOut, IoMdArrowBack } from 'react-icons/io';
|
27
26
|
import Select, { components } from 'react-select';
|
28
27
|
import { FaCaretDown, FaTrash, FaPlus, FaSave, FaPencilAlt, FaPlusCircle, FaTimes, FaSortUp, FaSortDown, FaEye } from 'react-icons/fa';
|
29
28
|
import { PiDotsNineLight } from 'react-icons/pi';
|
29
|
+
import { IoMdArrowBack } from 'react-icons/io';
|
30
30
|
import _ from 'lodash';
|
31
31
|
import { FaPencil } from 'react-icons/fa6';
|
32
32
|
import CreatableSelect from 'react-select/creatable';
|
@@ -103,6 +103,7 @@ var Language;
|
|
103
103
|
Language["en"] = "en";
|
104
104
|
})(Language || (Language = {}));
|
105
105
|
var PrintHeaderClassName = "print-header";
|
106
|
+
var PrintTitleClassName = "print-title";
|
106
107
|
var PrintContentClassName = "print-content";
|
107
108
|
var PrintContainerClassName = "print-container";
|
108
109
|
|
@@ -144,7 +145,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
144
145
|
return target;
|
145
146
|
}
|
146
147
|
|
147
|
-
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"};
|
148
149
|
|
149
150
|
// A type of promise-like that resolves synchronously and supports only one observer
|
150
151
|
const _Pact = /*#__PURE__*/(function() {
|
@@ -1861,7 +1862,7 @@ var student_status = "학생별 현황";
|
|
1861
1862
|
var user_manager = "사용자 목록";
|
1862
1863
|
var recent_exam_results = "최근 시험 결과";
|
1863
1864
|
var instructor_name = "강사이름";
|
1864
|
-
var
|
1865
|
+
var institute_name = "학원 이름";
|
1865
1866
|
var total_students = "총 학생수";
|
1866
1867
|
var total_class = "반 수";
|
1867
1868
|
var total_number_students = "총 학생수";
|
@@ -1893,10 +1894,11 @@ var yes = "예";
|
|
1893
1894
|
var no = "아니요";
|
1894
1895
|
var cancel = "취소";
|
1895
1896
|
var confirmation = "확인";
|
1896
|
-
var student_name = "
|
1897
|
+
var student_name = "학생 이름";
|
1897
1898
|
var full_pool_time = "전체풀이시간";
|
1898
1899
|
var number_question = "{{number}}번";
|
1899
1900
|
var number_answer = "{{number}}번";
|
1901
|
+
var answer_no = "{{number}}번";
|
1900
1902
|
var answer_rate = "정답률";
|
1901
1903
|
var seconds = "초";
|
1902
1904
|
var search_placeholder = "시험 이름으로 검색하기";
|
@@ -1912,13 +1914,13 @@ var no_data = "데이터 없음";
|
|
1912
1914
|
var internet_connection_was_lost = "인터넷 연결이 끊어졌습니다";
|
1913
1915
|
var internet_connection_is_back = "인터넷 연결이 다시 돌아왔습니다";
|
1914
1916
|
var problem = "문제";
|
1915
|
-
var number_problem = "{{number}}
|
1917
|
+
var number_problem = "문제 {{number}}";
|
1916
1918
|
var problems = "문제";
|
1917
1919
|
var problem_solving_time = "문제풀이 시간";
|
1918
1920
|
var minutes = "분";
|
1919
1921
|
var correct_rate = "정답률";
|
1920
1922
|
var title = "제목";
|
1921
|
-
var
|
1923
|
+
var exam_duration = "시험 시간";
|
1922
1924
|
var answer_count = "답변 수";
|
1923
1925
|
var question_count = "문제 갯수";
|
1924
1926
|
var multi_choice = "여러 개임";
|
@@ -1936,7 +1938,8 @@ var select_placeholder = "선택하다...";
|
|
1936
1938
|
var view_exam = "시험 보기";
|
1937
1939
|
var back = "뒤쪽에";
|
1938
1940
|
var edit = "편집하기";
|
1939
|
-
var
|
1941
|
+
var date_format_exam = "YYYY년 MM월";
|
1942
|
+
var date_format = "YYYY년 MM월 DD일";
|
1940
1943
|
var date_time_format = "YYYY년 MM월 DD일 HH:mm";
|
1941
1944
|
var date_time_format_12h = "YYYY-MM-DD HH:mm A";
|
1942
1945
|
var full_date_time_format = "YYYY년 MMMM월 DD일 HH:mm:ss";
|
@@ -2184,8 +2187,8 @@ var class_information = "수업정보";
|
|
2184
2187
|
var teachers = "교사";
|
2185
2188
|
var lessons = "수업";
|
2186
2189
|
var new_test = "새로운 시험";
|
2187
|
-
var
|
2188
|
-
var
|
2190
|
+
var manage_saved_exams = "저장된 시험 관리";
|
2191
|
+
var manage_textbook = "교과서 관리";
|
2189
2192
|
var my_question = "내 질문";
|
2190
2193
|
var update_class = "수업 업데이트";
|
2191
2194
|
var create_class = "수업 만들기";
|
@@ -2211,7 +2214,7 @@ var tricky_problems = "까다로웠던 문제";
|
|
2211
2214
|
var issues_vulnerable = "내가 취약한 문제";
|
2212
2215
|
var grades_by_area = "영역별 성적";
|
2213
2216
|
var problems_that_took_a_long_time = "시간이 오래 걸린 문제";
|
2214
|
-
var my_time = "
|
2217
|
+
var my_time = "내 시간";
|
2215
2218
|
var top_time = "상위권 시간";
|
2216
2219
|
var easy_problem = "쉬운 문제";
|
2217
2220
|
var trick_problem = "함정 문제";
|
@@ -2226,8 +2229,8 @@ var chosen = "정답";
|
|
2226
2229
|
var sign_in_with_your_google_account = "Google 계정으로 로그인";
|
2227
2230
|
var it_will_be_generated_automatically_if_not_provided = "제공되지 않으면 자동으로 생성됩니다";
|
2228
2231
|
var academy_not_found = "아카데미를 찾을 수 없습니다";
|
2229
|
-
var
|
2230
|
-
var
|
2232
|
+
var all_notice = "전체 공지";
|
2233
|
+
var institute_notice = "학원 공지";
|
2231
2234
|
var class_notice = "수업 공지";
|
2232
2235
|
var create_account_demo = "계정 데모 만들기";
|
2233
2236
|
var update_data_demo = "데이터 데모 업데이트";
|
@@ -2253,7 +2256,7 @@ var next = "다음";
|
|
2253
2256
|
var complete_processing = "완료 처리";
|
2254
2257
|
var creation_date = "생성 날짜";
|
2255
2258
|
var total_use = "총 사용량";
|
2256
|
-
var
|
2259
|
+
var duration = "지속";
|
2257
2260
|
var code_header = "암호";
|
2258
2261
|
var total_number_of_students_participating = "참여한 총 학생 수";
|
2259
2262
|
var create = "생성하기";
|
@@ -2473,6 +2476,33 @@ var full_name_is_required = "성명은 필수 항목입니다";
|
|
2473
2476
|
var email_is_required = "이메일은 필수입니다";
|
2474
2477
|
var not_found = "찾을 수 없음";
|
2475
2478
|
var enter_text_to_confirm_delete = "삭제를 확인하려면 \"{{text}}\" 를 입력하세요";
|
2479
|
+
var begin_exam = "시험 시작";
|
2480
|
+
var scheduled = "오늘 수업";
|
2481
|
+
var attended = "출석 완료";
|
2482
|
+
var today_classes = "오늘의 수업";
|
2483
|
+
var print_all = "전체 출력";
|
2484
|
+
var exam = "시험";
|
2485
|
+
var me = "나";
|
2486
|
+
var teacher_name = "선생님 성함";
|
2487
|
+
var class_schedule = "수업 시간표";
|
2488
|
+
var summary = "요약";
|
2489
|
+
var load_exam = "시험 로드";
|
2490
|
+
var exam_name = "시험 이름";
|
2491
|
+
var student_phone_number_header = "학생 전화번호";
|
2492
|
+
var parent_phone_number_header = "학부모 전화번호";
|
2493
|
+
var cases = "{{number}}건";
|
2494
|
+
var my_classes = "내 수업";
|
2495
|
+
var choose = "선택하다";
|
2496
|
+
var additional_duration = "추가 기간";
|
2497
|
+
var enter_textbook_name_to_search = "검색할 교재명을 입력하세요";
|
2498
|
+
var select_class_placeholder = "수업을 선택하세요...";
|
2499
|
+
var user_name = "유저 이름";
|
2500
|
+
var vulnerable_detail = "다른 학생들의 정답률은 높은데, 나는 정답을 맞추지 못한 문제들입니다.";
|
2501
|
+
var protracted_problem_detail = "정답 문제 중 풀이 시간을 비교합니다.";
|
2502
|
+
var number_of_correct_answers = "정답 수";
|
2503
|
+
var total_solve_time = "총 풀이 시간";
|
2504
|
+
var number_of_answer = "{{ number }} 개";
|
2505
|
+
var time_comparison = "시간 비교";
|
2476
2506
|
var lang_ko = {
|
2477
2507
|
problem_solving: problem_solving,
|
2478
2508
|
my_story: my_story,
|
@@ -2488,7 +2518,7 @@ var lang_ko = {
|
|
2488
2518
|
user_manager: user_manager,
|
2489
2519
|
recent_exam_results: recent_exam_results,
|
2490
2520
|
instructor_name: instructor_name,
|
2491
|
-
|
2521
|
+
institute_name: institute_name,
|
2492
2522
|
total_students: total_students,
|
2493
2523
|
total_class: total_class,
|
2494
2524
|
total_number_students: total_number_students,
|
@@ -2526,6 +2556,7 @@ var lang_ko = {
|
|
2526
2556
|
full_pool_time: full_pool_time,
|
2527
2557
|
number_question: number_question,
|
2528
2558
|
number_answer: number_answer,
|
2559
|
+
answer_no: answer_no,
|
2529
2560
|
answer_rate: answer_rate,
|
2530
2561
|
seconds: seconds,
|
2531
2562
|
search_placeholder: search_placeholder,
|
@@ -2547,7 +2578,7 @@ var lang_ko = {
|
|
2547
2578
|
minutes: minutes,
|
2548
2579
|
correct_rate: correct_rate,
|
2549
2580
|
title: title,
|
2550
|
-
|
2581
|
+
exam_duration: exam_duration,
|
2551
2582
|
answer_count: answer_count,
|
2552
2583
|
question_count: question_count,
|
2553
2584
|
multi_choice: multi_choice,
|
@@ -2566,6 +2597,7 @@ var lang_ko = {
|
|
2566
2597
|
back: back,
|
2567
2598
|
edit: edit,
|
2568
2599
|
"delete": "삭제하기",
|
2600
|
+
date_format_exam: date_format_exam,
|
2569
2601
|
date_format: date_format,
|
2570
2602
|
date_time_format: date_time_format,
|
2571
2603
|
date_time_format_12h: date_time_format_12h,
|
@@ -2800,8 +2832,8 @@ var lang_ko = {
|
|
2800
2832
|
teachers: teachers,
|
2801
2833
|
lessons: lessons,
|
2802
2834
|
new_test: new_test,
|
2803
|
-
|
2804
|
-
|
2835
|
+
manage_saved_exams: manage_saved_exams,
|
2836
|
+
manage_textbook: manage_textbook,
|
2805
2837
|
my_question: my_question,
|
2806
2838
|
update_class: update_class,
|
2807
2839
|
create_class: create_class,
|
@@ -2842,8 +2874,8 @@ var lang_ko = {
|
|
2842
2874
|
sign_in_with_your_google_account: sign_in_with_your_google_account,
|
2843
2875
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided,
|
2844
2876
|
academy_not_found: academy_not_found,
|
2845
|
-
|
2846
|
-
|
2877
|
+
all_notice: all_notice,
|
2878
|
+
institute_notice: institute_notice,
|
2847
2879
|
class_notice: class_notice,
|
2848
2880
|
create_account_demo: create_account_demo,
|
2849
2881
|
update_data_demo: update_data_demo,
|
@@ -2872,7 +2904,7 @@ var lang_ko = {
|
|
2872
2904
|
complete_processing: complete_processing,
|
2873
2905
|
creation_date: creation_date,
|
2874
2906
|
total_use: total_use,
|
2875
|
-
|
2907
|
+
duration: duration,
|
2876
2908
|
code_header: code_header,
|
2877
2909
|
total_number_of_students_participating: total_number_of_students_participating,
|
2878
2910
|
create: create,
|
@@ -3093,11 +3125,39 @@ var lang_ko = {
|
|
3093
3125
|
full_name_is_required: full_name_is_required,
|
3094
3126
|
email_is_required: email_is_required,
|
3095
3127
|
not_found: not_found,
|
3096
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete
|
3128
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete,
|
3129
|
+
begin_exam: begin_exam,
|
3130
|
+
scheduled: scheduled,
|
3131
|
+
attended: attended,
|
3132
|
+
today_classes: today_classes,
|
3133
|
+
print_all: print_all,
|
3134
|
+
exam: exam,
|
3135
|
+
me: me,
|
3136
|
+
teacher_name: teacher_name,
|
3137
|
+
class_schedule: class_schedule,
|
3138
|
+
summary: summary,
|
3139
|
+
load_exam: load_exam,
|
3140
|
+
exam_name: exam_name,
|
3141
|
+
student_phone_number_header: student_phone_number_header,
|
3142
|
+
parent_phone_number_header: parent_phone_number_header,
|
3143
|
+
cases: cases,
|
3144
|
+
my_classes: my_classes,
|
3145
|
+
choose: choose,
|
3146
|
+
additional_duration: additional_duration,
|
3147
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search,
|
3148
|
+
"type_at_least_{number}_characters_to_search": "검색하려면 최소 {{ number }}자를 입력하세요",
|
3149
|
+
select_class_placeholder: select_class_placeholder,
|
3150
|
+
user_name: user_name,
|
3151
|
+
vulnerable_detail: vulnerable_detail,
|
3152
|
+
protracted_problem_detail: protracted_problem_detail,
|
3153
|
+
number_of_correct_answers: number_of_correct_answers,
|
3154
|
+
total_solve_time: total_solve_time,
|
3155
|
+
number_of_answer: number_of_answer,
|
3156
|
+
time_comparison: time_comparison
|
3097
3157
|
};
|
3098
3158
|
|
3099
3159
|
var problem_solving$1 = "Problem Solving";
|
3100
|
-
var my_story$1 = "
|
3160
|
+
var my_story$1 = "Exam History";
|
3101
3161
|
var search_find$1 = "Search and find";
|
3102
3162
|
var enter_test_code$1 = "Enter test code";
|
3103
3163
|
var login_success$1 = "Login Success";
|
@@ -3110,7 +3170,7 @@ var student_status$1 = "Student Status";
|
|
3110
3170
|
var user_manager$1 = "User Manager";
|
3111
3171
|
var recent_exam_results$1 = "Recent exam";
|
3112
3172
|
var instructor_name$1 = "Instructor name";
|
3113
|
-
var
|
3173
|
+
var institute_name$1 = "Institute name";
|
3114
3174
|
var total_students$1 = "Total students";
|
3115
3175
|
var total_class$1 = "Total Class";
|
3116
3176
|
var total_number_students$1 = "Total number of students";
|
@@ -3126,10 +3186,10 @@ var time_remaining$1 = "Time remaining";
|
|
3126
3186
|
var number_results$1 = "{{number}} Results";
|
3127
3187
|
var number_result$1 = "{{number}} Result";
|
3128
3188
|
var mins_mins_seconds_seconds$1 = "{{mins}}m {{seconds}}s";
|
3129
|
-
var mins_mins$1 = "{{mins}}
|
3189
|
+
var mins_mins$1 = "{{mins}} Minutes";
|
3130
3190
|
var class_name$1 = "Class name";
|
3131
3191
|
var create_new_exam$1 = "Create exam";
|
3132
|
-
var live_exam$1 = "Live
|
3192
|
+
var live_exam$1 = "Live Exam";
|
3133
3193
|
var there_are_no_recent_exams$1 = "There are no recent exams";
|
3134
3194
|
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?";
|
3135
3195
|
var here$1 = "here";
|
@@ -3146,6 +3206,7 @@ var student_name$1 = "Student name";
|
|
3146
3206
|
var full_pool_time$1 = "Full pool time";
|
3147
3207
|
var number_question$1 = "No.{{number}}";
|
3148
3208
|
var number_answer$1 = "No.{{number}}";
|
3209
|
+
var answer_no$1 = "Ans.{{number}}";
|
3149
3210
|
var answer_rate$1 = "Answer rate";
|
3150
3211
|
var seconds$1 = "s";
|
3151
3212
|
var search_placeholder$1 = "Search by exam name";
|
@@ -3215,7 +3276,7 @@ var email$1 = "Email";
|
|
3215
3276
|
var is_paid$1 = "Is paid";
|
3216
3277
|
var payment_time$1 = "Payment time";
|
3217
3278
|
var payments$1 = "Payments";
|
3218
|
-
var
|
3279
|
+
var exam_duration$1 = "Exam Duration";
|
3219
3280
|
var answer_count$1 = "Answer count";
|
3220
3281
|
var question_count$1 = "Question count";
|
3221
3282
|
var multi_choice$1 = "Is multiple";
|
@@ -3224,8 +3285,9 @@ var view_exam$1 = "View exam";
|
|
3224
3285
|
var update_exam$1 = "Update exam";
|
3225
3286
|
var create_exam$1 = "Create exam";
|
3226
3287
|
var back$1 = "Back";
|
3227
|
-
var
|
3228
|
-
var
|
3288
|
+
var date_format_exam$1 = "MMMM YYYY";
|
3289
|
+
var date_format$1 = "MMM.D YYYY";
|
3290
|
+
var date_time_format$1 = "HH:mm MMM.D YYYY ";
|
3229
3291
|
var date_time_format_12h$1 = "MM-DD-YYYY HH:mm A";
|
3230
3292
|
var full_date_time_format$1 = "MMM Do YYYY HH:mm:ss";
|
3231
3293
|
var total_questions$1 = "Total questions";
|
@@ -3293,8 +3355,8 @@ var button$1 = {
|
|
3293
3355
|
close: "Close",
|
3294
3356
|
send: "Send"
|
3295
3357
|
};
|
3296
|
-
var question_and_answer$1 = "
|
3297
|
-
var problem_number_question$1 = "
|
3358
|
+
var question_and_answer$1 = "My Q&As";
|
3359
|
+
var problem_number_question$1 = "Question {{number}}";
|
3298
3360
|
var teacher_in_charge$1 = "Teacher In Charge";
|
3299
3361
|
var counselor$1 = "Counselor";
|
3300
3362
|
var new_question$1 = "New Question";
|
@@ -3309,7 +3371,7 @@ var no_academies_available$1 = "No academies available";
|
|
3309
3371
|
var not_allow_register$1 = "Not allow to register role";
|
3310
3372
|
var credentials_invalid$1 = "Credentials is invalid";
|
3311
3373
|
var role_is_invalid$1 = "Role is invalid";
|
3312
|
-
var today$1 = "
|
3374
|
+
var today$1 = "Today";
|
3313
3375
|
var user_is_disabled$1 = "User is disabled";
|
3314
3376
|
var cover_image$1 = "Cover image";
|
3315
3377
|
var notification$1 = "Notification";
|
@@ -3364,7 +3426,7 @@ var enter_subject_name_to_search$1 = "Enter subject name to search subjects";
|
|
3364
3426
|
var enter_textbook_title$1 = "Enter textbook title";
|
3365
3427
|
var chapter_name_placeholder$1 = "Enter chapter name";
|
3366
3428
|
var subchapter_name_placeholder$1 = "Enter subchapter name";
|
3367
|
-
var article_number$1 = "
|
3429
|
+
var article_number$1 = "Passage";
|
3368
3430
|
var question_count_format$1 = "No.{{number}}";
|
3369
3431
|
var select_category$1 = "Select category";
|
3370
3432
|
var update_textbook$1 = "Update textbook";
|
@@ -3378,14 +3440,14 @@ var add_new_chapter_to_textbook$1 = "Add new chapter to the textbook";
|
|
3378
3440
|
var add_new_subchapter_to_parent_chapter$1 = "Add new subchapter to the parent chapter ({{ chapterName }})";
|
3379
3441
|
var add$1 = "Add";
|
3380
3442
|
var add_new_article_to_chapter$1 = "Add new article to the chapter ({{ chapterName }})";
|
3381
|
-
var score_format$1 = "{{score}}
|
3443
|
+
var score_format$1 = "{{score}} Points";
|
3382
3444
|
var round$1 = "{{number}} round";
|
3383
3445
|
var number_grade$1 = "Grade {{number}}";
|
3384
3446
|
var print$1 = "Print";
|
3385
3447
|
var school$1 = "School";
|
3386
|
-
var grade$1 = "
|
3387
|
-
var student_phone_number$1 = "Student
|
3388
|
-
var parent_phone_number$1 = "Parent
|
3448
|
+
var grade$1 = "Year";
|
3449
|
+
var student_phone_number$1 = "Student Number";
|
3450
|
+
var parent_phone_number$1 = "Parent Number";
|
3389
3451
|
var update_textbook_title$1 = "Update textbook title";
|
3390
3452
|
var invalid_weekly_day_time$1 = "Invalid weekly day time";
|
3391
3453
|
var no_image$1 = "No image";
|
@@ -3404,7 +3466,7 @@ var switch_academy$1 = "Switch Academy";
|
|
3404
3466
|
var there_are_no_lessons_this_week$1 = "There are no lessons this week";
|
3405
3467
|
var today_lessons$1 = "Today lessons";
|
3406
3468
|
var update_message$1 = "Update message";
|
3407
|
-
var attachment$1 = "
|
3469
|
+
var attachment$1 = "Add File";
|
3408
3470
|
var confirm_delete_message$1 = "Are you sure to delete this message?";
|
3409
3471
|
var download$1 = "Download";
|
3410
3472
|
var full_exam$1 = "Full exam";
|
@@ -3430,8 +3492,8 @@ var my_problem_solving_order$1 = "My problem solving order";
|
|
3430
3492
|
var top_rankings_problem_solving_order$1 = "Top rankings problem solving order";
|
3431
3493
|
var comparison_of_top_rankings_and_problem_solving_order$1 = "Comparison of top rankings and problem-solving order";
|
3432
3494
|
var my_answers$1 = "My answers";
|
3433
|
-
var request_for_consultation$1 = "
|
3434
|
-
var ask_a_question_with_a_problem$1 = "Ask
|
3495
|
+
var request_for_consultation$1 = "Consultation";
|
3496
|
+
var ask_a_question_with_a_problem$1 = "Ask with Question ";
|
3435
3497
|
var live$1 = "live";
|
3436
3498
|
var user_email$1 = "User email";
|
3437
3499
|
var user_academy$1 = {
|
@@ -3459,9 +3521,9 @@ var lessons$1 = "Lessons";
|
|
3459
3521
|
var update_class$1 = "Update class";
|
3460
3522
|
var create_class$1 = "Create class";
|
3461
3523
|
var new_test$1 = "New Test";
|
3462
|
-
var
|
3463
|
-
var
|
3464
|
-
var my_question$1 = "My
|
3524
|
+
var manage_saved_exams$1 = "Manage saved exams";
|
3525
|
+
var manage_textbook$1 = "Manage Textbook";
|
3526
|
+
var my_question$1 = "My Q&As";
|
3465
3527
|
var problem_number$1 = "Problem number";
|
3466
3528
|
var solve_time$1 = "Solve time";
|
3467
3529
|
var comparison_of_top_rankings$1 = "Comparison of top rankings";
|
@@ -3498,8 +3560,8 @@ var chosen$1 = "Answer";
|
|
3498
3560
|
var sign_in_with_your_google_account$1 = "Sign in with your Google Account";
|
3499
3561
|
var it_will_be_generated_automatically_if_not_provided$1 = "It will be generated automatically if not provided";
|
3500
3562
|
var academy_not_found$1 = "Academy not found";
|
3501
|
-
var
|
3502
|
-
var
|
3563
|
+
var all_notice$1 = "All notice";
|
3564
|
+
var institute_notice$1 = "Institute Notice";
|
3503
3565
|
var class_notice$1 = "Class Notice";
|
3504
3566
|
var create_account_demo$1 = "Create Account Demo";
|
3505
3567
|
var update_data_demo$1 = "Update Data Demo";
|
@@ -3525,7 +3587,7 @@ var next$1 = "Next";
|
|
3525
3587
|
var complete_processing$1 = "Complete processing";
|
3526
3588
|
var creation_date$1 = "Creation date";
|
3527
3589
|
var total_use$1 = "Total use";
|
3528
|
-
var
|
3590
|
+
var duration$1 = "Duration";
|
3529
3591
|
var code_header$1 = "Code";
|
3530
3592
|
var total_number_of_students_participating$1 = "Total number of students participating";
|
3531
3593
|
var create$1 = "Create";
|
@@ -3541,7 +3603,7 @@ var time_heatmap_for_each_problem$1 = "Time heatmap for each problem";
|
|
3541
3603
|
var learn_more$1 = "Learn more";
|
3542
3604
|
var total_number_of_problems$1 = "Total number of problems";
|
3543
3605
|
var time_limit$1 = "time_limit";
|
3544
|
-
var add_questions$1 = "Add
|
3606
|
+
var add_questions$1 = "Add Passage";
|
3545
3607
|
var start_exam$1 = "Start Exam";
|
3546
3608
|
var copy_test_code$1 = "Copy Test Code";
|
3547
3609
|
var student_has_joined$1 = "Student has joined:";
|
@@ -3722,6 +3784,33 @@ var full_name_is_required$1 = "Full name is required";
|
|
3722
3784
|
var email_is_required$1 = "Email is required";
|
3723
3785
|
var not_found$1 = "Not found";
|
3724
3786
|
var enter_text_to_confirm_delete$1 = "Enter \"{{text}}\" to confirm delete";
|
3787
|
+
var begin_exam$1 = "Begin Exam";
|
3788
|
+
var scheduled$1 = "Scheduled";
|
3789
|
+
var attended$1 = "Attended";
|
3790
|
+
var today_classes$1 = "Today's Classes";
|
3791
|
+
var print_all$1 = "Print All";
|
3792
|
+
var exam$1 = "Exam";
|
3793
|
+
var me$1 = "Me";
|
3794
|
+
var teacher_name$1 = "Teacher Name";
|
3795
|
+
var class_schedule$1 = "Class Schedule";
|
3796
|
+
var summary$1 = "Summary";
|
3797
|
+
var load_exam$1 = "Load Exam";
|
3798
|
+
var exam_name$1 = "Exam Name";
|
3799
|
+
var student_phone_number_header$1 = "Stud. Number";
|
3800
|
+
var parent_phone_number_header$1 = "Prnt. Number";
|
3801
|
+
var cases$1 = "{{number}} Results";
|
3802
|
+
var my_classes$1 = "My Classes";
|
3803
|
+
var choose$1 = "Choose";
|
3804
|
+
var additional_duration$1 = "Additional duration";
|
3805
|
+
var enter_textbook_name_to_search$1 = "Enter textbook name to search";
|
3806
|
+
var select_class_placeholder$1 = "Select class...";
|
3807
|
+
var user_name$1 = "Username";
|
3808
|
+
var vulnerable_detail$1 = "Other students had a high percentage of correct answers, but I could not answer these questions correctly.";
|
3809
|
+
var protracted_problem_detail$1 = "Compare the solution time among the correct answers.";
|
3810
|
+
var number_of_correct_answers$1 = "Number of correct answers";
|
3811
|
+
var total_solve_time$1 = "Total solve time";
|
3812
|
+
var number_of_answer$1 = "{{ number }}";
|
3813
|
+
var time_comparison$1 = "Time comparison";
|
3725
3814
|
var lang_en = {
|
3726
3815
|
problem_solving: problem_solving$1,
|
3727
3816
|
my_story: my_story$1,
|
@@ -3737,7 +3826,7 @@ var lang_en = {
|
|
3737
3826
|
user_manager: user_manager$1,
|
3738
3827
|
recent_exam_results: recent_exam_results$1,
|
3739
3828
|
instructor_name: instructor_name$1,
|
3740
|
-
|
3829
|
+
institute_name: institute_name$1,
|
3741
3830
|
total_students: total_students$1,
|
3742
3831
|
total_class: total_class$1,
|
3743
3832
|
total_number_students: total_number_students$1,
|
@@ -3775,6 +3864,7 @@ var lang_en = {
|
|
3775
3864
|
full_pool_time: full_pool_time$1,
|
3776
3865
|
number_question: number_question$1,
|
3777
3866
|
number_answer: number_answer$1,
|
3867
|
+
answer_no: answer_no$1,
|
3778
3868
|
answer_rate: answer_rate$1,
|
3779
3869
|
seconds: seconds$1,
|
3780
3870
|
search_placeholder: search_placeholder$1,
|
@@ -3845,7 +3935,7 @@ var lang_en = {
|
|
3845
3935
|
is_paid: is_paid$1,
|
3846
3936
|
payment_time: payment_time$1,
|
3847
3937
|
payments: payments$1,
|
3848
|
-
|
3938
|
+
exam_duration: exam_duration$1,
|
3849
3939
|
answer_count: answer_count$1,
|
3850
3940
|
question_count: question_count$1,
|
3851
3941
|
multi_choice: multi_choice$1,
|
@@ -3854,6 +3944,7 @@ var lang_en = {
|
|
3854
3944
|
update_exam: update_exam$1,
|
3855
3945
|
create_exam: create_exam$1,
|
3856
3946
|
back: back$1,
|
3947
|
+
date_format_exam: date_format_exam$1,
|
3857
3948
|
date_format: date_format$1,
|
3858
3949
|
date_time_format: date_time_format$1,
|
3859
3950
|
date_time_format_12h: date_time_format_12h$1,
|
@@ -4075,8 +4166,8 @@ var lang_en = {
|
|
4075
4166
|
update_class: update_class$1,
|
4076
4167
|
create_class: create_class$1,
|
4077
4168
|
new_test: new_test$1,
|
4078
|
-
|
4079
|
-
|
4169
|
+
manage_saved_exams: manage_saved_exams$1,
|
4170
|
+
manage_textbook: manage_textbook$1,
|
4080
4171
|
my_question: my_question$1,
|
4081
4172
|
problem_number: problem_number$1,
|
4082
4173
|
solve_time: solve_time$1,
|
@@ -4114,8 +4205,8 @@ var lang_en = {
|
|
4114
4205
|
sign_in_with_your_google_account: sign_in_with_your_google_account$1,
|
4115
4206
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided$1,
|
4116
4207
|
academy_not_found: academy_not_found$1,
|
4117
|
-
|
4118
|
-
|
4208
|
+
all_notice: all_notice$1,
|
4209
|
+
institute_notice: institute_notice$1,
|
4119
4210
|
class_notice: class_notice$1,
|
4120
4211
|
create_account_demo: create_account_demo$1,
|
4121
4212
|
update_data_demo: update_data_demo$1,
|
@@ -4144,7 +4235,7 @@ var lang_en = {
|
|
4144
4235
|
complete_processing: complete_processing$1,
|
4145
4236
|
creation_date: creation_date$1,
|
4146
4237
|
total_use: total_use$1,
|
4147
|
-
|
4238
|
+
duration: duration$1,
|
4148
4239
|
code_header: code_header$1,
|
4149
4240
|
total_number_of_students_participating: total_number_of_students_participating$1,
|
4150
4241
|
create: create$1,
|
@@ -4342,7 +4433,35 @@ var lang_en = {
|
|
4342
4433
|
full_name_is_required: full_name_is_required$1,
|
4343
4434
|
email_is_required: email_is_required$1,
|
4344
4435
|
not_found: not_found$1,
|
4345
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1
|
4436
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1,
|
4437
|
+
begin_exam: begin_exam$1,
|
4438
|
+
scheduled: scheduled$1,
|
4439
|
+
attended: attended$1,
|
4440
|
+
today_classes: today_classes$1,
|
4441
|
+
print_all: print_all$1,
|
4442
|
+
exam: exam$1,
|
4443
|
+
me: me$1,
|
4444
|
+
teacher_name: teacher_name$1,
|
4445
|
+
class_schedule: class_schedule$1,
|
4446
|
+
summary: summary$1,
|
4447
|
+
load_exam: load_exam$1,
|
4448
|
+
exam_name: exam_name$1,
|
4449
|
+
student_phone_number_header: student_phone_number_header$1,
|
4450
|
+
parent_phone_number_header: parent_phone_number_header$1,
|
4451
|
+
cases: cases$1,
|
4452
|
+
my_classes: my_classes$1,
|
4453
|
+
choose: choose$1,
|
4454
|
+
additional_duration: additional_duration$1,
|
4455
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search$1,
|
4456
|
+
"type_at_least_{number}_characters_to_search": "Type at least {{ number }} characters to search",
|
4457
|
+
select_class_placeholder: select_class_placeholder$1,
|
4458
|
+
user_name: user_name$1,
|
4459
|
+
vulnerable_detail: vulnerable_detail$1,
|
4460
|
+
protracted_problem_detail: protracted_problem_detail$1,
|
4461
|
+
number_of_correct_answers: number_of_correct_answers$1,
|
4462
|
+
total_solve_time: total_solve_time$1,
|
4463
|
+
number_of_answer: number_of_answer$1,
|
4464
|
+
time_comparison: time_comparison$1
|
4346
4465
|
};
|
4347
4466
|
|
4348
4467
|
i18n.use(initReactI18next).init({
|
@@ -4531,6 +4650,36 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4531
4650
|
return Promise.reject(e);
|
4532
4651
|
}
|
4533
4652
|
};
|
4653
|
+
var handleLogOutAcademy = function handleLogOutAcademy(selectedAcademy, callback) {
|
4654
|
+
try {
|
4655
|
+
var _temp7 = function _temp7() {
|
4656
|
+
dispatch(setLoading(false));
|
4657
|
+
callback();
|
4658
|
+
};
|
4659
|
+
dispatch(setLoading(true));
|
4660
|
+
var academyDomain = selectedAcademy ? selectedAcademy.domain : undefined;
|
4661
|
+
var _temp6 = _catch(function () {
|
4662
|
+
return Promise.resolve(switchAcademy(0)).then(function (res) {
|
4663
|
+
var data = res.data;
|
4664
|
+
var requestBody = {
|
4665
|
+
accessToken: data.accessToken,
|
4666
|
+
email: user.email,
|
4667
|
+
academyId: 0,
|
4668
|
+
role: role
|
4669
|
+
};
|
4670
|
+
academyDomain && localStorage.setItem(ACADEMY_DOMAIN, academyDomain);
|
4671
|
+
!academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4672
|
+
return Promise.resolve(handleLoginAccessToken(requestBody, false, user.academyDomain ? academyDomain : undefined)).then(function () {});
|
4673
|
+
});
|
4674
|
+
}, function (error) {
|
4675
|
+
academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4676
|
+
toast.error(getErrorMessage(t, error));
|
4677
|
+
});
|
4678
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6));
|
4679
|
+
} catch (e) {
|
4680
|
+
return Promise.reject(e);
|
4681
|
+
}
|
4682
|
+
};
|
4534
4683
|
useEffect(function () {
|
4535
4684
|
getAcademies();
|
4536
4685
|
}, [user === null || user === void 0 ? void 0 : user.academyDomain, user === null || user === void 0 ? void 0 : user.email]);
|
@@ -4548,7 +4697,8 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4548
4697
|
dropdownOpen: dropdownOpen,
|
4549
4698
|
academyList: academyList,
|
4550
4699
|
toggleDropdown: toggleDropdown,
|
4551
|
-
handleSwitchAcademy: handleSwitchAcademy
|
4700
|
+
handleSwitchAcademy: handleSwitchAcademy,
|
4701
|
+
handleLogOutAcademy: handleLogOutAcademy
|
4552
4702
|
};
|
4553
4703
|
};
|
4554
4704
|
|
@@ -4556,23 +4706,25 @@ var MenuItemCustom = styled(MenuItem)(function () {
|
|
4556
4706
|
return {
|
4557
4707
|
'&.Mui-selected': {
|
4558
4708
|
backgroundColor: styles.light
|
4559
|
-
}
|
4709
|
+
},
|
4710
|
+
padding: "12px 8px"
|
4560
4711
|
};
|
4561
4712
|
});
|
4562
4713
|
var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
4563
|
-
var _user$roles
|
4714
|
+
var _user$roles;
|
4564
4715
|
var role = _ref.role,
|
4565
4716
|
history = _ref.history,
|
4566
4717
|
homeAcademyUrl = _ref.homeAcademyUrl,
|
4567
4718
|
homeUrl = _ref.homeUrl,
|
4568
|
-
|
4569
|
-
|
4719
|
+
hideAcademyName = _ref.hideAcademyName,
|
4720
|
+
onSignOut = _ref.onSignOut;
|
4570
4721
|
var theme = useTheme();
|
4571
4722
|
var isLargerThanLg = useMediaQuery(theme.breakpoints.up("lg"));
|
4572
4723
|
var _useSwitchAcademy = useSwitchAcademy(role, history, homeAcademyUrl, homeUrl),
|
4573
4724
|
academyList = _useSwitchAcademy.academyList,
|
4574
4725
|
handleSwitchAcademy = _useSwitchAcademy.handleSwitchAcademy,
|
4575
|
-
selectedAcademy = _useSwitchAcademy.selectedAcademy
|
4726
|
+
selectedAcademy = _useSwitchAcademy.selectedAcademy,
|
4727
|
+
handleLogOutAcademy = _useSwitchAcademy.handleLogOutAcademy;
|
4576
4728
|
var user = useSelector(function (state) {
|
4577
4729
|
var _state$common;
|
4578
4730
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
@@ -4594,8 +4746,6 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4594
4746
|
handleClose();
|
4595
4747
|
handleSwitchAcademy(data);
|
4596
4748
|
};
|
4597
|
-
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();
|
4598
|
-
if (!academyList.length) return React__default.createElement(Fragment$1, null);
|
4599
4749
|
var popoverStyle = {
|
4600
4750
|
mx: 1,
|
4601
4751
|
bgcolor: open ? "action.selected" : undefined
|
@@ -4616,7 +4766,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4616
4766
|
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.image ? React__default.createElement("img", {
|
4617
4767
|
src: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.image,
|
4618
4768
|
alt: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name
|
4619
|
-
}) : React__default.createElement("span", null
|
4769
|
+
}) : React__default.createElement("span", null)), isLargerThanLg && React__default.createElement(Grid, {
|
4620
4770
|
item: true,
|
4621
4771
|
xs: 0,
|
4622
4772
|
lg: 8
|
@@ -4628,16 +4778,40 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4628
4778
|
display: "flex",
|
4629
4779
|
alignItems: "center"
|
4630
4780
|
}
|
4631
|
-
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(
|
4781
|
+
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(Stack, {
|
4782
|
+
flexDirection: "column",
|
4783
|
+
gap: "2px"
|
4784
|
+
}, React__default.createElement(Typography, {
|
4632
4785
|
textAlign: "start",
|
4633
4786
|
className: "" + styles["line-clamp"],
|
4634
4787
|
sx: {
|
4635
4788
|
fontSize: 14,
|
4636
|
-
fontWeight:
|
4789
|
+
fontWeight: 900,
|
4637
4790
|
lineHeight: '1.5em',
|
4638
4791
|
color: styles.gray_900
|
4639
4792
|
}
|
4640
|
-
},
|
4793
|
+
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(Typography, {
|
4794
|
+
textAlign: "start",
|
4795
|
+
className: "" + styles["line-clamp"],
|
4796
|
+
sx: {
|
4797
|
+
fontSize: 14,
|
4798
|
+
fontWeight: 500,
|
4799
|
+
lineHeight: '1.5em',
|
4800
|
+
color: styles.gray_500
|
4801
|
+
}
|
4802
|
+
}, selectedAcademy.name)) : React__default.createElement(Stack, {
|
4803
|
+
flexDirection: "column",
|
4804
|
+
gap: "2px"
|
4805
|
+
}, React__default.createElement(Typography, {
|
4806
|
+
textAlign: "start",
|
4807
|
+
className: "" + styles["line-clamp"],
|
4808
|
+
sx: {
|
4809
|
+
fontSize: 14,
|
4810
|
+
fontWeight: 900,
|
4811
|
+
lineHeight: '1.5em',
|
4812
|
+
color: styles.gray_900
|
4813
|
+
}
|
4814
|
+
}), React__default.createElement(Typography, {
|
4641
4815
|
textAlign: "start",
|
4642
4816
|
className: "" + styles["line-clamp"],
|
4643
4817
|
sx: {
|
@@ -4646,7 +4820,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4646
4820
|
lineHeight: '1.5em',
|
4647
4821
|
color: styles.gray_500
|
4648
4822
|
}
|
4649
|
-
}, t("no_academy_selected")))), React__default.createElement(Grid, {
|
4823
|
+
}, t("no_academy_selected"))))), React__default.createElement(Grid, {
|
4650
4824
|
item: true,
|
4651
4825
|
xs: 6,
|
4652
4826
|
lg: 2,
|
@@ -4668,6 +4842,11 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4668
4842
|
open: !!open,
|
4669
4843
|
anchorEl: open,
|
4670
4844
|
onClose: handleClose,
|
4845
|
+
sx: {
|
4846
|
+
"& .MuiPopover-paper": {
|
4847
|
+
padding: "8px !important"
|
4848
|
+
}
|
4849
|
+
},
|
4671
4850
|
anchorOrigin: {
|
4672
4851
|
vertical: "bottom",
|
4673
4852
|
horizontal: "right"
|
@@ -4693,25 +4872,31 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4693
4872
|
}, React__default.createElement(MenuList, {
|
4694
4873
|
sx: {
|
4695
4874
|
maxHeight: 240,
|
4696
|
-
overflowY: "auto"
|
4875
|
+
overflowY: "auto",
|
4876
|
+
padding: 0
|
4697
4877
|
}
|
4698
4878
|
}, academyList.map(function (option) {
|
4699
|
-
var _option$name$charAt;
|
4700
4879
|
return React__default.createElement(MenuItemCustom, {
|
4701
4880
|
key: option.id,
|
4702
4881
|
selected: option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id),
|
4703
4882
|
sx: {
|
4704
4883
|
whiteSpace: "wrap",
|
4705
|
-
borderRadius: "6px"
|
4884
|
+
borderRadius: "6px",
|
4885
|
+
display: "flex",
|
4886
|
+
gap: "8px"
|
4706
4887
|
},
|
4707
4888
|
onClick: function onClick() {
|
4708
4889
|
return option.id !== (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && handleChangeAcademy(option);
|
4709
4890
|
}
|
4710
4891
|
}, React__default.createElement(Stack, {
|
4711
4892
|
flexDirection: "row",
|
4712
|
-
|
4893
|
+
justifyContent: "space-between",
|
4894
|
+
alignItems: "center",
|
4713
4895
|
position: "relative",
|
4714
4896
|
width: "100%"
|
4897
|
+
}, React__default.createElement(Stack, {
|
4898
|
+
flexDirection: "row",
|
4899
|
+
gap: "12px"
|
4715
4900
|
}, React__default.createElement(Stack, {
|
4716
4901
|
className: styles["image-academy"] + " " + styles["image-academy--item"],
|
4717
4902
|
minWidth: "40px"
|
@@ -4719,7 +4904,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4719
4904
|
component: "img",
|
4720
4905
|
alt: option.name,
|
4721
4906
|
src: option.image
|
4722
|
-
}) : React__default.createElement("span", null
|
4907
|
+
}) : React__default.createElement("span", null)), React__default.createElement(Box$1, {
|
4723
4908
|
sx: {
|
4724
4909
|
position: "relative",
|
4725
4910
|
display: "flex",
|
@@ -4733,8 +4918,20 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4733
4918
|
lineHeight: '1.5em',
|
4734
4919
|
fontWeight: 600
|
4735
4920
|
}
|
4736
|
-
}, option.name))))
|
4737
|
-
|
4921
|
+
}, option.name))), option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && React__default.createElement("div", {
|
4922
|
+
onClick: function onClick() {
|
4923
|
+
return handleLogOutAcademy(selectedAcademy, handleClose);
|
4924
|
+
}
|
4925
|
+
}, React__default.createElement(IoCloseCircle, {
|
4926
|
+
size: 18,
|
4927
|
+
color: styles.dark
|
4928
|
+
}))));
|
4929
|
+
})), React__default.createElement(Stack, {
|
4930
|
+
sx: {
|
4931
|
+
borderTop: "1px solid " + styles.gray_100,
|
4932
|
+
my: "8px"
|
4933
|
+
}
|
4934
|
+
}), React__default.createElement(MenuItemCustom, {
|
4738
4935
|
sx: {
|
4739
4936
|
whiteSpace: "wrap",
|
4740
4937
|
borderRadius: "6px"
|
@@ -4748,16 +4945,16 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4748
4945
|
alignItems: "center",
|
4749
4946
|
className: "" + styles["userImg"],
|
4750
4947
|
onClick: onSignOut
|
4751
|
-
}, React__default.createElement(
|
4752
|
-
size:
|
4753
|
-
color:
|
4948
|
+
}, React__default.createElement(IoLogOut, {
|
4949
|
+
size: 18,
|
4950
|
+
color: styles.less_dark
|
4754
4951
|
}), React__default.createElement(Typography, {
|
4755
4952
|
sx: {
|
4756
4953
|
typography: "body2",
|
4757
|
-
p: "8px",
|
4758
4954
|
borderRadius: "4px",
|
4759
4955
|
fontSize: 14,
|
4760
|
-
fontWeight: 700
|
4956
|
+
fontWeight: 700,
|
4957
|
+
color: styles.less_dark
|
4761
4958
|
}
|
4762
4959
|
}, t("logout"))))));
|
4763
4960
|
};
|
@@ -4831,6 +5028,7 @@ var customStyles = {
|
|
4831
5028
|
|
4832
5029
|
var DropdownIndicator = function DropdownIndicator(props) {
|
4833
5030
|
return React__default.createElement(components.DropdownIndicator, Object.assign({}, props), React__default.createElement(FaCaretDown, {
|
5031
|
+
size: 20,
|
4834
5032
|
color: styles.darker
|
4835
5033
|
}));
|
4836
5034
|
};
|
@@ -4969,6 +5167,7 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4969
5167
|
return React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
4970
5168
|
display: "flex",
|
4971
5169
|
gap: "4px",
|
5170
|
+
justifyItems: "center",
|
4972
5171
|
flexDirection: "column"
|
4973
5172
|
}, React__default.createElement("div", {
|
4974
5173
|
style: {
|
@@ -4979,7 +5178,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4979
5178
|
sx: {
|
4980
5179
|
fontWeight: 700,
|
4981
5180
|
fontSize: "14px",
|
4982
|
-
color: styles.
|
5181
|
+
color: styles.less_dark,
|
5182
|
+
display: 'flex',
|
5183
|
+
justifyContent: "center"
|
4983
5184
|
}
|
4984
5185
|
}, t("edit"))), React__default.createElement(Stack, {
|
4985
5186
|
border: "1px solid #E4E7EC"
|
@@ -4992,7 +5193,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4992
5193
|
sx: {
|
4993
5194
|
fontWeight: 700,
|
4994
5195
|
fontSize: "14px",
|
4995
|
-
color: styles.
|
5196
|
+
color: styles.less_dark,
|
5197
|
+
display: 'flex',
|
5198
|
+
justifyContent: "center"
|
4996
5199
|
}
|
4997
5200
|
}, t("delete")))));
|
4998
5201
|
};
|
@@ -5031,13 +5234,14 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5031
5234
|
className: " " + styles$1["name-sender"],
|
5032
5235
|
display: "flex",
|
5033
5236
|
alignItems: "center",
|
5237
|
+
justifyContent: "end",
|
5034
5238
|
flexDirection: "row"
|
5035
5239
|
}, React__default.createElement(iconPersonNoActive, null), React__default.createElement(Typography, {
|
5036
5240
|
fontWeight: 700,
|
5037
5241
|
fontSize: 14,
|
5038
5242
|
padding: "4px",
|
5039
5243
|
lineHeight: "16.71px",
|
5040
|
-
color: styles.
|
5244
|
+
color: styles.gray_700
|
5041
5245
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)), React__default.createElement(Stack, {
|
5042
5246
|
display: "flex",
|
5043
5247
|
flexDirection: "row",
|
@@ -5070,11 +5274,7 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5070
5274
|
placement: "top"
|
5071
5275
|
}, React__default.createElement("div", {
|
5072
5276
|
onClick: handleOpenTooltip
|
5073
|
-
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement(
|
5074
|
-
borderRadius: "6px",
|
5075
|
-
padding: "12px",
|
5076
|
-
bgcolor: styles.darker
|
5077
|
-
}, React__default.createElement("img", {
|
5277
|
+
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement("img", {
|
5078
5278
|
onClick: toggleImageDialog,
|
5079
5279
|
src: content,
|
5080
5280
|
style: {
|
@@ -5082,17 +5282,21 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5082
5282
|
position: "relative",
|
5083
5283
|
objectFit: "contain"
|
5084
5284
|
}
|
5085
|
-
})
|
5285
|
+
}) : React__default.createElement("div", {
|
5086
5286
|
className: styles$1["wrap-content"] + " " + styles$1["content-chat-receiver"],
|
5087
|
-
|
5088
|
-
"float": "inline-end"
|
5089
|
-
|
5090
|
-
|
5287
|
+
style: {
|
5288
|
+
"float": "inline-end",
|
5289
|
+
maxWidth: 400,
|
5290
|
+
background: styles.less_dark
|
5291
|
+
}
|
5091
5292
|
}, React__default.createElement(Typography, {
|
5092
5293
|
fontWeight: 500,
|
5093
5294
|
fontSize: "14px",
|
5094
5295
|
lineHeight: "16.71px",
|
5095
|
-
color: "#
|
5296
|
+
color: "#fff",
|
5297
|
+
sx: {
|
5298
|
+
wordBreak: "break-word"
|
5299
|
+
}
|
5096
5300
|
}, content))))));
|
5097
5301
|
};
|
5098
5302
|
|
@@ -5127,33 +5331,29 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5127
5331
|
fontWeight: 500,
|
5128
5332
|
fontSize: 14,
|
5129
5333
|
lineHeight: "16.71px",
|
5130
|
-
color: styles.
|
5131
|
-
}, t("
|
5334
|
+
color: styles.gray_700
|
5335
|
+
}, t("teacher")), React__default.createElement(Typography, {
|
5132
5336
|
fontWeight: 700,
|
5133
5337
|
fontSize: 14,
|
5134
5338
|
lineHeight: "16.71px",
|
5135
|
-
color: styles.
|
5339
|
+
color: styles.gray_700
|
5136
5340
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)) : React__default.createElement(Fragment$1, null, React__default.createElement(Typography, {
|
5137
5341
|
fontWeight: 700,
|
5138
5342
|
fontSize: 14,
|
5139
5343
|
lineHeight: "16.71px",
|
5140
|
-
color: styles.
|
5344
|
+
color: styles.gray_700
|
5141
5345
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName), React__default.createElement(Typography, {
|
5142
5346
|
fontWeight: 500,
|
5143
5347
|
fontSize: 14,
|
5144
5348
|
lineHeight: "16.71px",
|
5145
|
-
color: styles.
|
5349
|
+
color: styles.gray_700
|
5146
5350
|
}, t("student")))), React__default.createElement(Box, {
|
5147
5351
|
padding: "4px 0px"
|
5148
5352
|
}), React__default.createElement(Stack, {
|
5149
5353
|
display: "flex",
|
5150
5354
|
flexDirection: "row",
|
5151
5355
|
gap: "8px"
|
5152
|
-
}, contentType ? React__default.createElement(
|
5153
|
-
borderRadius: "6px",
|
5154
|
-
padding: "12px",
|
5155
|
-
bgcolor: styles.darker
|
5156
|
-
}, React__default.createElement("img", {
|
5356
|
+
}, contentType ? React__default.createElement("img", {
|
5157
5357
|
onClick: toggleImageDialog,
|
5158
5358
|
src: content,
|
5159
5359
|
style: {
|
@@ -5161,13 +5361,19 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5161
5361
|
position: "relative",
|
5162
5362
|
objectFit: "contain"
|
5163
5363
|
}
|
5164
|
-
})
|
5165
|
-
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"]
|
5364
|
+
}) : React__default.createElement("div", {
|
5365
|
+
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"],
|
5366
|
+
style: {
|
5367
|
+
maxWidth: 400
|
5368
|
+
}
|
5166
5369
|
}, React__default.createElement(Typography, {
|
5167
|
-
fontWeight:
|
5370
|
+
fontWeight: 500,
|
5168
5371
|
fontSize: "14px",
|
5169
5372
|
lineHeight: "16.71px",
|
5170
|
-
color:
|
5373
|
+
color: styles.gray_700,
|
5374
|
+
sx: {
|
5375
|
+
wordBreak: "break-word"
|
5376
|
+
}
|
5171
5377
|
}, content)))));
|
5172
5378
|
};
|
5173
5379
|
|
@@ -5705,7 +5911,7 @@ var InputChat = function InputChat(_ref) {
|
|
5705
5911
|
fullWidth: true,
|
5706
5912
|
className: styles$1["btn-send"],
|
5707
5913
|
sx: {
|
5708
|
-
bgcolor: isCompleted ? styles.light + " !important" : styles.
|
5914
|
+
bgcolor: isCompleted ? styles.light + " !important" : styles.less_dark
|
5709
5915
|
},
|
5710
5916
|
disabled: isCompleted,
|
5711
5917
|
onClick: handleSubmit
|
@@ -5726,13 +5932,13 @@ var InputChat = function InputChat(_ref) {
|
|
5726
5932
|
borderWidth: "1px"
|
5727
5933
|
}
|
5728
5934
|
}, React__default.createElement(iconPlusCircle, {
|
5729
|
-
color: styles.
|
5935
|
+
color: styles.less_dark
|
5730
5936
|
}), React__default.createElement(Typography, {
|
5731
5937
|
fontWeight: 700,
|
5732
5938
|
fontSize: "13px",
|
5733
5939
|
lineHeight: "15.51px",
|
5734
5940
|
sx: {
|
5735
|
-
color: styles.
|
5941
|
+
color: styles.less_dark
|
5736
5942
|
}
|
5737
5943
|
}, t("attachment")), React__default.createElement("input", {
|
5738
5944
|
type: "file",
|
@@ -5766,6 +5972,31 @@ var ellipsisText = function ellipsisText(text, maxLength) {
|
|
5766
5972
|
if (!text) return text;
|
5767
5973
|
return (text === null || text === void 0 ? void 0 : text.length) > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
5768
5974
|
};
|
5975
|
+
var getOrdinalSuffix = function getOrdinalSuffix(number, lang) {
|
5976
|
+
var suffixes = {
|
5977
|
+
en: ['th', 'st', 'nd', 'rd'],
|
5978
|
+
ko: ['']
|
5979
|
+
};
|
5980
|
+
switch (lang) {
|
5981
|
+
case 'en':
|
5982
|
+
var j = number % 10;
|
5983
|
+
var k = number % 100;
|
5984
|
+
if (j === 1 && k !== 11) {
|
5985
|
+
return suffixes.en[1];
|
5986
|
+
}
|
5987
|
+
if (j === 2 && k !== 12) {
|
5988
|
+
return suffixes.en[2];
|
5989
|
+
}
|
5990
|
+
if (j === 3 && k !== 13) {
|
5991
|
+
return suffixes.en[3];
|
5992
|
+
}
|
5993
|
+
return suffixes.en[0];
|
5994
|
+
case 'ko':
|
5995
|
+
return suffixes.ko[0];
|
5996
|
+
default:
|
5997
|
+
return '';
|
5998
|
+
}
|
5999
|
+
};
|
5769
6000
|
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
5770
6001
|
var uniqueCategories = new Set();
|
5771
6002
|
var filterCategories = categories.filter(function (category) {
|
@@ -5785,6 +6016,24 @@ var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
|
5785
6016
|
});
|
5786
6017
|
return questionsByCategory;
|
5787
6018
|
};
|
6019
|
+
var totalSolveTimeCategories = function totalSolveTimeCategories(inputData, categories) {
|
6020
|
+
var uniqueCategories = new Set();
|
6021
|
+
var filterCategories = categories.filter(function (category) {
|
6022
|
+
if (!uniqueCategories.has(category.name)) {
|
6023
|
+
uniqueCategories.add(category.name);
|
6024
|
+
return true;
|
6025
|
+
}
|
6026
|
+
return false;
|
6027
|
+
});
|
6028
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6029
|
+
return _extends({}, category, {
|
6030
|
+
totalSolveTime: inputData.questions.reduce(function (init, question) {
|
6031
|
+
return question.category.name === category.name ? init += question.duration : init;
|
6032
|
+
}, 0)
|
6033
|
+
});
|
6034
|
+
});
|
6035
|
+
return questionsByCategory;
|
6036
|
+
};
|
5788
6037
|
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
5789
6038
|
duration = Math.round(duration);
|
5790
6039
|
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
@@ -5836,7 +6085,6 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5836
6085
|
display: "flex",
|
5837
6086
|
alignItems: "center",
|
5838
6087
|
gap: "24px",
|
5839
|
-
border: "1px solid #EBEBFF",
|
5840
6088
|
borderRadius: "6px"
|
5841
6089
|
}, React__default.createElement(Box, {
|
5842
6090
|
display: "flex",
|
@@ -5844,21 +6092,21 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5844
6092
|
flexDirection: "row",
|
5845
6093
|
gap: "8px"
|
5846
6094
|
}, React__default.createElement(iconPersonNoActive, {
|
5847
|
-
color: styles.
|
6095
|
+
color: styles.gray_700
|
5848
6096
|
}), isTabletUp && React__default.createElement(Typography, {
|
5849
6097
|
fontWeight: 500,
|
5850
6098
|
fontSize: "14px",
|
5851
6099
|
lineHeight: "16.71px",
|
5852
|
-
color: styles.
|
5853
|
-
}, t("
|
5854
|
-
fontWeight:
|
6100
|
+
color: styles.gray_700
|
6101
|
+
}, t("teacher"))), React__default.createElement(Typography, {
|
6102
|
+
fontWeight: 500,
|
5855
6103
|
fontSize: "14px",
|
5856
6104
|
lineHeight: "16.71px",
|
5857
|
-
color: styles.
|
6105
|
+
color: styles.gray_700
|
5858
6106
|
}, ellipsisText(teacherName || "", 15))), !!examTitle && React__default.createElement(Box, {
|
5859
6107
|
display: "flex",
|
5860
6108
|
alignItems: "start",
|
5861
|
-
color: styles.
|
6109
|
+
color: styles.gray_700,
|
5862
6110
|
gap: "6px",
|
5863
6111
|
flexDirection: "column"
|
5864
6112
|
}, React__default.createElement(Typography, {
|
@@ -5872,13 +6120,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5872
6120
|
}, React__default.createElement(Typography, {
|
5873
6121
|
fontWeight: 600,
|
5874
6122
|
fontSize: "12px",
|
5875
|
-
lineHeight: "14.2px"
|
5876
|
-
|
6123
|
+
lineHeight: "14.2px",
|
6124
|
+
sx: {
|
6125
|
+
color: styles.gray_700
|
6126
|
+
}
|
6127
|
+
}, "LIVE " + t('exam')), filterDurationExam && React__default.createElement(Typography, {
|
5877
6128
|
fontWeight: 500,
|
5878
6129
|
fontSize: "12px",
|
5879
6130
|
lineHeight: "14.32px",
|
5880
6131
|
sx: {
|
5881
|
-
color:
|
6132
|
+
color: styles.gray_500
|
5882
6133
|
}
|
5883
6134
|
}, (!!filterDurationExam.hours() ? filterDurationExam.hours() + " " + t("hour") : "") + " " + (!!filterDurationExam.minutes() ? filterDurationExam.minutes() + " " + t("minute") : "") + " " + (!!filterDurationExam.seconds() ? filterDurationExam.seconds() + " " + t("second") : "")))), React__default.createElement(Box, {
|
5884
6135
|
display: "flex",
|
@@ -5900,16 +6151,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5900
6151
|
fontWeight: 700,
|
5901
6152
|
fontSize: "12px",
|
5902
6153
|
lineHeight: "14.32px",
|
5903
|
-
color: styles.
|
6154
|
+
color: styles.less_dark
|
5904
6155
|
}, t("points", {
|
5905
|
-
number: score
|
6156
|
+
number: score || 0
|
5906
6157
|
})), React__default.createElement(Typography, {
|
5907
6158
|
fontWeight: 700,
|
5908
6159
|
fontSize: "12px",
|
5909
6160
|
lineHeight: "14.32px",
|
5910
|
-
color:
|
6161
|
+
color: styles.gray_300
|
5911
6162
|
}, "/", t("points", {
|
5912
|
-
number: totalScore
|
6163
|
+
number: totalScore || 0
|
5913
6164
|
}))), React__default.createElement(Typography, {
|
5914
6165
|
fontWeight: 500,
|
5915
6166
|
fontSize: "12px",
|
@@ -5968,7 +6219,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5968
6219
|
color: styles.darker
|
5969
6220
|
}, examTitle ? React__default.createElement(Typography, {
|
5970
6221
|
fontWeight: 600,
|
5971
|
-
fontSize: "
|
6222
|
+
fontSize: "11px",
|
5972
6223
|
lineHeight: "14.32px"
|
5973
6224
|
}, ellipsisText(examTitle || "", 10)) : React__default.createElement(Box, {
|
5974
6225
|
display: "flex",
|
@@ -6002,12 +6253,12 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
6002
6253
|
borderColor: styles.less_dark,
|
6003
6254
|
borderRadius: "6px"
|
6004
6255
|
}, React__default.createElement(iconChecked, {
|
6005
|
-
color: styles.
|
6256
|
+
color: styles.less_dark
|
6006
6257
|
}), React__default.createElement(Typography, {
|
6007
6258
|
fontWeight: 700,
|
6008
6259
|
fontSize: "13px",
|
6009
6260
|
lineHeight: "15.51px",
|
6010
|
-
color: styles.
|
6261
|
+
color: styles.less_dark
|
6011
6262
|
}, t('complete_processing')))) : React__default.createElement("div", null));
|
6012
6263
|
};
|
6013
6264
|
return React__default.createElement(Grid, {
|
@@ -6022,9 +6273,9 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
6022
6273
|
}, React__default.createElement(Typography, {
|
6023
6274
|
fontWeight: 800,
|
6024
6275
|
fontSize: "20px",
|
6025
|
-
color: styles.
|
6276
|
+
color: styles.less_dark,
|
6026
6277
|
lineHeight: "23.87px"
|
6027
|
-
}, t("question_and_answer"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6278
|
+
}, isStudent ? t("question_and_answer") : t("q&a"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6028
6279
|
open: openDialog,
|
6029
6280
|
toggle: toggleDialog,
|
6030
6281
|
text: t("are_you_sure_you_want_to_complete_this_conversation"),
|
@@ -6759,17 +7010,14 @@ var BpIcon = styled('span')(function (_ref) {
|
|
6759
7010
|
};
|
6760
7011
|
});
|
6761
7012
|
var BpCheckedIcon = styled(BpIcon)({
|
6762
|
-
backgroundColor:
|
7013
|
+
backgroundColor: "#fff",
|
6763
7014
|
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
6764
7015
|
'&::before': {
|
6765
7016
|
display: 'block',
|
6766
7017
|
width: 16,
|
6767
7018
|
height: 16,
|
6768
|
-
backgroundImage:
|
7019
|
+
backgroundImage: "radial-gradient(" + styles.less_dark + " 36%,transparent 40%)",
|
6769
7020
|
content: '""'
|
6770
|
-
},
|
6771
|
-
'input:hover ~ &': {
|
6772
|
-
backgroundColor: styles.dark
|
6773
7021
|
}
|
6774
7022
|
});
|
6775
7023
|
var QuestionView = function QuestionView(_ref2) {
|
@@ -6829,7 +7077,7 @@ var QuestionView = function QuestionView(_ref2) {
|
|
6829
7077
|
mb: "16px"
|
6830
7078
|
}, React__default.createElement(FormControl, {
|
6831
7079
|
style: {
|
6832
|
-
width: "
|
7080
|
+
width: "168px"
|
6833
7081
|
}
|
6834
7082
|
}, React__default.createElement(ScoreSelector, {
|
6835
7083
|
value: question.score,
|
@@ -7084,7 +7332,7 @@ var ArticleGroupView = function ArticleGroupView(_ref) {
|
|
7084
7332
|
}, React__default.createElement(FormGroup, null, React__default.createElement(FormLabel, {
|
7085
7333
|
htmlFor: "question_count",
|
7086
7334
|
className: styles$2["question-label"] + " form-label"
|
7087
|
-
}, t("
|
7335
|
+
}, t("questions")), React__default.createElement(QuestionCountSelector, {
|
7088
7336
|
id: "question_count",
|
7089
7337
|
value: questionCount,
|
7090
7338
|
onChange: handleChangeQuestionCount,
|
@@ -7383,9 +7631,11 @@ var ChapterBox = function ChapterBox(_ref) {
|
|
7383
7631
|
onUpdateArticleQuestion: onUpdateArticleQuestion,
|
7384
7632
|
onRemoveChapter: onRemoveChapter
|
7385
7633
|
});
|
7386
|
-
}), data.subChapters.length === 0 && data.articles.map(function (article) {
|
7634
|
+
}), data.subChapters.length === 0 && data.articles.map(function (article, index) {
|
7387
7635
|
var _article$category;
|
7388
|
-
return React__default.createElement(Stack,
|
7636
|
+
return React__default.createElement(Stack, {
|
7637
|
+
key: index
|
7638
|
+
}, React__default.createElement(Stack, {
|
7389
7639
|
display: "flex",
|
7390
7640
|
flexDirection: "row",
|
7391
7641
|
gap: "8px",
|
@@ -7460,6 +7710,14 @@ var deleteTextbookApi = function deleteTextbookApi(textbookId, role) {
|
|
7460
7710
|
});
|
7461
7711
|
};
|
7462
7712
|
|
7713
|
+
var ExamStatus$1;
|
7714
|
+
(function (ExamStatus) {
|
7715
|
+
ExamStatus[ExamStatus["Default"] = 0] = "Default";
|
7716
|
+
ExamStatus[ExamStatus["Pending"] = 1] = "Pending";
|
7717
|
+
ExamStatus[ExamStatus["InProgress"] = 2] = "InProgress";
|
7718
|
+
ExamStatus[ExamStatus["Completed"] = 3] = "Completed";
|
7719
|
+
})(ExamStatus$1 || (ExamStatus$1 = {}));
|
7720
|
+
|
7463
7721
|
var OrderType;
|
7464
7722
|
(function (OrderType) {
|
7465
7723
|
OrderType["ASC"] = "ASC";
|
@@ -7470,7 +7728,8 @@ var OrderType;
|
|
7470
7728
|
|
7471
7729
|
var index = {
|
7472
7730
|
__proto__: null,
|
7473
|
-
get OrderType () { return OrderType; }
|
7731
|
+
get OrderType () { return OrderType; },
|
7732
|
+
get ExamStatus () { return ExamStatus$1; }
|
7474
7733
|
};
|
7475
7734
|
|
7476
7735
|
var TextbookSortBy;
|
@@ -7484,20 +7743,13 @@ var ExamType;
|
|
7484
7743
|
ExamType["Normal"] = "Normal";
|
7485
7744
|
ExamType["Standard"] = "Standard";
|
7486
7745
|
})(ExamType || (ExamType = {}));
|
7487
|
-
var ExamStatus$
|
7746
|
+
var ExamStatus$2;
|
7488
7747
|
(function (ExamStatus) {
|
7489
7748
|
ExamStatus["Default"] = "Default";
|
7490
7749
|
ExamStatus["Pending"] = "Pending";
|
7491
7750
|
ExamStatus["InProgress"] = "InProgress";
|
7492
7751
|
ExamStatus["Completed"] = "Completed";
|
7493
|
-
})(ExamStatus$
|
7494
|
-
var ExamStatusNumber;
|
7495
|
-
(function (ExamStatusNumber) {
|
7496
|
-
ExamStatusNumber[ExamStatusNumber["Default"] = 0] = "Default";
|
7497
|
-
ExamStatusNumber[ExamStatusNumber["Pending"] = 1] = "Pending";
|
7498
|
-
ExamStatusNumber[ExamStatusNumber["InProgress"] = 2] = "InProgress";
|
7499
|
-
ExamStatusNumber[ExamStatusNumber["Completed"] = 3] = "Completed";
|
7500
|
-
})(ExamStatusNumber || (ExamStatusNumber = {}));
|
7752
|
+
})(ExamStatus$2 || (ExamStatus$2 = {}));
|
7501
7753
|
|
7502
7754
|
var TEXTBOOK_HEADERS = [{
|
7503
7755
|
title: "#"
|
@@ -7529,7 +7781,7 @@ var DEFAULT_EXAM_REQUEST = {
|
|
7529
7781
|
subjectId: 0
|
7530
7782
|
};
|
7531
7783
|
var TEXTBOOK_PAGE_TITLE = "textbooks";
|
7532
|
-
var TEXT_BOOK_SEARCH_PLACEHOLDER = "
|
7784
|
+
var TEXT_BOOK_SEARCH_PLACEHOLDER = "enter_textbook_name_to_search";
|
7533
7785
|
var TextbookDefaultQuery = {
|
7534
7786
|
pageSize: 12,
|
7535
7787
|
currentPage: 1,
|
@@ -8881,6 +9133,9 @@ var useExamDetailView = function useExamDetailView(props) {
|
|
8881
9133
|
var exam = props.exam,
|
8882
9134
|
selectedSubject = props.selectedSubject,
|
8883
9135
|
onChangeExam = props.onChangeExam;
|
9136
|
+
console.log({
|
9137
|
+
exam: exam
|
9138
|
+
});
|
8884
9139
|
var _useTranslation = useTranslation(),
|
8885
9140
|
t = _useTranslation.t;
|
8886
9141
|
var handleChangeQuestionCount = function handleChangeQuestionCount(article, questionCount, answerCount) {
|
@@ -9158,7 +9413,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9158
9413
|
}, React__default.createElement("label", {
|
9159
9414
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9160
9415
|
htmlFor: "title"
|
9161
|
-
}, t("
|
9416
|
+
}, t("exam_name")), React__default.createElement("input", {
|
9162
9417
|
disabled: isDisabled,
|
9163
9418
|
className: "" + styles["form-control"],
|
9164
9419
|
value: exam.title,
|
@@ -9172,7 +9427,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9172
9427
|
}, React__default.createElement("label", {
|
9173
9428
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9174
9429
|
htmlFor: "duration"
|
9175
|
-
}, t("
|
9430
|
+
}, t("exam_duration")), React__default.createElement(CustomSelect, {
|
9176
9431
|
inputId: "duration",
|
9177
9432
|
value: exam.duration,
|
9178
9433
|
options: durationOptions,
|
@@ -9215,8 +9470,12 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9215
9470
|
}, React__default.createElement(Button, {
|
9216
9471
|
variant: 'outlined',
|
9217
9472
|
sx: {
|
9218
|
-
color: styles.
|
9219
|
-
|
9473
|
+
color: styles.less_dark,
|
9474
|
+
border: 'none',
|
9475
|
+
'&:hover': {
|
9476
|
+
border: "none",
|
9477
|
+
bgcolor: "#FFF"
|
9478
|
+
}
|
9220
9479
|
},
|
9221
9480
|
disabled: isDisabled,
|
9222
9481
|
className: "w-100 d-flex justify-content-center align-items-center " + styles$2["question-btn"] + " mt-3",
|
@@ -10066,6 +10325,14 @@ var getCheckStatusExam = function getCheckStatusExam(examCode) {
|
|
10066
10325
|
var toNumberOrder = function toNumberOrder(value) {
|
10067
10326
|
return "The " + value + (value % 10 === 1 ? 'st' : value % 10 === 2 ? 'nd' : value % 10 === 3 ? 'rd' : 'th');
|
10068
10327
|
};
|
10328
|
+
var formatDuration = function formatDuration(t, duration) {
|
10329
|
+
if (!duration) return "0" + t("seconds");
|
10330
|
+
var totalTime = Math.round(duration);
|
10331
|
+
return totalTime > 60 ? t("mins_mins_seconds_seconds", {
|
10332
|
+
mins: Math.floor(totalTime / 60),
|
10333
|
+
seconds: totalTime % 60
|
10334
|
+
}) : "" + Math.round(duration) + t("seconds");
|
10335
|
+
};
|
10069
10336
|
|
10070
10337
|
var ORDER_NUMBERS = {
|
10071
10338
|
1: "the_first",
|
@@ -10773,6 +11040,7 @@ var CATEGORY_RESPONSES = [{
|
|
10773
11040
|
percentageAmongStudents: 40
|
10774
11041
|
}];
|
10775
11042
|
var DEFAULT_LINE_CHART_OPTIONS = {
|
11043
|
+
colors: ["#3DC674", "#C3099A"],
|
10776
11044
|
chart: {
|
10777
11045
|
type: "line",
|
10778
11046
|
toolbar: {
|
@@ -11116,6 +11384,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11116
11384
|
}
|
11117
11385
|
}
|
11118
11386
|
}),
|
11387
|
+
colors: ['#3DC674', '#C3099A'],
|
11119
11388
|
xaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.xaxis, {
|
11120
11389
|
categories: ["."].concat(Array.from({
|
11121
11390
|
length: questionLength
|
@@ -11140,13 +11409,13 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11140
11409
|
var series = (_allSeries$dataChartI = allSeries[dataChartIndex]) != null ? _allSeries$dataChartI : defaultSeries(t);
|
11141
11410
|
var handleExportPdf = function handleExportPdf() {
|
11142
11411
|
try {
|
11143
|
-
var
|
11412
|
+
var _temp26 = function _temp26(_result) {
|
11144
11413
|
if (_exit) return _result;
|
11145
11414
|
dispatch(setLoading(false));
|
11146
11415
|
};
|
11147
11416
|
var _exit = false;
|
11148
11417
|
dispatch(setLoading(true));
|
11149
|
-
var
|
11418
|
+
var _temp25 = _catch(function () {
|
11150
11419
|
var canvas = document.querySelector("#canvas");
|
11151
11420
|
var headerCanvas = document.querySelector("#header-canvas");
|
11152
11421
|
if (!canvas || !headerCanvas) {
|
@@ -11168,7 +11437,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11168
11437
|
var imgWidth = WIDTH_PAPER;
|
11169
11438
|
var chartWidth = WIDTH_PAPER - 20;
|
11170
11439
|
return Promise.resolve(html2canvas(headerCanvas)).then(function (header) {
|
11171
|
-
function
|
11440
|
+
function _temp24() {
|
11172
11441
|
doc.save("download.pdf");
|
11173
11442
|
}
|
11174
11443
|
var imgHeaderHeight = header.height * imgWidth / header.width;
|
@@ -11176,16 +11445,16 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11176
11445
|
doc.addImage(imgHeaderData, 'PNG', 0, 0, imgWidth, imgHeaderHeight);
|
11177
11446
|
line += imgHeaderHeight;
|
11178
11447
|
if (line > HEIGHT_PAPER) breakPage();
|
11179
|
-
var
|
11448
|
+
var _temp23 = function () {
|
11180
11449
|
if (canvas && canvas.childElementCount > 0) {
|
11181
11450
|
var _index = 0;
|
11182
|
-
var
|
11451
|
+
var _temp22 = _for(function () {
|
11183
11452
|
return _index < canvas.childElementCount;
|
11184
11453
|
}, function () {
|
11185
11454
|
return _index++;
|
11186
11455
|
}, function () {
|
11187
|
-
function
|
11188
|
-
function
|
11456
|
+
function _temp21() {
|
11457
|
+
function _temp19() {
|
11189
11458
|
line += 20;
|
11190
11459
|
}
|
11191
11460
|
var printChartTitle = function printChartTitle() {
|
@@ -11200,73 +11469,100 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11200
11469
|
return Promise.reject(e);
|
11201
11470
|
}
|
11202
11471
|
};
|
11203
|
-
var
|
11472
|
+
var _temp18 = function () {
|
11204
11473
|
if (printContainerEls.length) {
|
11205
|
-
var
|
11206
|
-
function
|
11207
|
-
|
11208
|
-
|
11209
|
-
|
11210
|
-
|
11211
|
-
|
11212
|
-
|
11213
|
-
|
11214
|
-
|
11215
|
-
|
11216
|
-
line += printHeaderHeight;
|
11217
|
-
return Promise.resolve();
|
11218
|
-
} catch (e) {
|
11219
|
-
return Promise.reject(e);
|
11220
|
-
}
|
11221
|
-
};
|
11222
|
-
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
11223
|
-
if (!printContents.length) return;
|
11224
|
-
var _temp12 = _forTo(printContents, function (j) {
|
11225
|
-
var rowItem = printContents[j];
|
11226
|
-
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
11227
|
-
function _temp11() {
|
11228
|
-
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
11229
|
-
line += height;
|
11474
|
+
var _temp17 = _forTo(printContainerEls, function (i) {
|
11475
|
+
function _temp16() {
|
11476
|
+
function _temp14() {
|
11477
|
+
var printTitle = function printTitle() {
|
11478
|
+
try {
|
11479
|
+
if (!printTitleHeight || !printTitleData) return Promise.resolve();
|
11480
|
+
doc.addImage(printTitleData, 'PNG', 0, line, chartWidth, printTitleHeight);
|
11481
|
+
line += printTitleHeight;
|
11482
|
+
return Promise.resolve();
|
11483
|
+
} catch (e) {
|
11484
|
+
return Promise.reject(e);
|
11230
11485
|
}
|
11231
|
-
|
11232
|
-
|
11233
|
-
if (
|
11234
|
-
|
11235
|
-
|
11236
|
-
|
11237
|
-
|
11238
|
-
|
11239
|
-
|
11240
|
-
|
11241
|
-
|
11242
|
-
|
11243
|
-
|
11244
|
-
|
11245
|
-
|
11486
|
+
};
|
11487
|
+
var printHeader = function printHeader(top) {
|
11488
|
+
if (top === void 0) {
|
11489
|
+
top = 0;
|
11490
|
+
}
|
11491
|
+
try {
|
11492
|
+
if (!printHeaderData || !printHeaderHeight) return Promise.resolve();
|
11493
|
+
line += top;
|
11494
|
+
if (line + printHeaderHeight > HEIGHT_PAPER) breakPage();
|
11495
|
+
doc.addImage(printHeaderData, 'PNG', 10, line, chartWidth, printHeaderHeight);
|
11496
|
+
line += printHeaderHeight;
|
11497
|
+
return Promise.resolve();
|
11498
|
+
} catch (e) {
|
11499
|
+
return Promise.reject(e);
|
11500
|
+
}
|
11501
|
+
};
|
11502
|
+
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
11503
|
+
if (!printContents.length) return;
|
11504
|
+
printTitle();
|
11505
|
+
var _temp12 = _forTo(printContents, function (j) {
|
11506
|
+
var rowItem = printContents[j];
|
11507
|
+
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
11508
|
+
function _temp11() {
|
11509
|
+
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
11510
|
+
line += height;
|
11246
11511
|
}
|
11247
|
-
|
11248
|
-
|
11512
|
+
var height = rowItemCanvas.height * chartWidth / rowItemCanvas.width;
|
11513
|
+
var data = rowItemCanvas.toDataURL('image/png');
|
11514
|
+
if (i === 0 && j === 0 && line + height + (printHeaderHeight || 0) + ((chartTitleHeight || 0) + 10) + 20 > HEIGHT_PAPER) breakPage();
|
11515
|
+
i === 0 && j === 0 && printChartTitle();
|
11516
|
+
var _temp10 = function () {
|
11517
|
+
if (line + height + 20 > HEIGHT_PAPER) {
|
11518
|
+
breakPage();
|
11519
|
+
return Promise.resolve(printHeader()).then(function () {});
|
11520
|
+
} else {
|
11521
|
+
var _temp27 = function () {
|
11522
|
+
if (j === 0) {
|
11523
|
+
return Promise.resolve(printHeader(10)).then(function () {});
|
11524
|
+
}
|
11525
|
+
}();
|
11526
|
+
if (_temp27 && _temp27.then) return _temp27.then(function () {});
|
11527
|
+
}
|
11528
|
+
}();
|
11529
|
+
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
|
11530
|
+
});
|
11249
11531
|
});
|
11250
|
-
|
11251
|
-
|
11532
|
+
if (_temp12 && _temp12.then) return _temp12.then(function () {});
|
11533
|
+
}
|
11534
|
+
var _temp13 = function () {
|
11535
|
+
if (printHeaderEl) {
|
11536
|
+
return Promise.resolve(html2canvas(printHeaderEl)).then(function (_html2canvas3) {
|
11537
|
+
printHeaderCanvas = _html2canvas3;
|
11538
|
+
printHeaderHeight = printHeaderCanvas.height * chartWidth / printHeaderCanvas.width;
|
11539
|
+
printHeaderData = printHeaderCanvas.toDataURL('image/png');
|
11540
|
+
});
|
11541
|
+
}
|
11542
|
+
}();
|
11543
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
11252
11544
|
}
|
11253
11545
|
var printContainerEl = printContainerEls[i];
|
11546
|
+
var printTitleEl = printContainerEl.querySelector("." + PrintTitleClassName);
|
11254
11547
|
var printHeaderEl = printContainerEl.querySelector("." + PrintHeaderClassName);
|
11548
|
+
var printTitleCanvas = null;
|
11549
|
+
var printTitleHeight = null;
|
11550
|
+
var printTitleData = "";
|
11255
11551
|
var printHeaderCanvas = null;
|
11256
11552
|
var printHeaderHeight = null;
|
11257
11553
|
var printHeaderData = "";
|
11258
|
-
var
|
11259
|
-
if (
|
11260
|
-
return Promise.resolve(html2canvas(
|
11261
|
-
|
11262
|
-
|
11263
|
-
|
11554
|
+
var _temp15 = function () {
|
11555
|
+
if (printTitleEl) {
|
11556
|
+
return Promise.resolve(html2canvas(printTitleEl)).then(function (_html2canvas2) {
|
11557
|
+
printTitleCanvas = _html2canvas2;
|
11558
|
+
printTitleHeight = printTitleCanvas.height * chartWidth / printTitleCanvas.width;
|
11559
|
+
printTitleData = printTitleCanvas.toDataURL('image/png');
|
11264
11560
|
});
|
11265
11561
|
}
|
11266
11562
|
}();
|
11267
|
-
return
|
11563
|
+
return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
|
11268
11564
|
});
|
11269
|
-
if (
|
11565
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
11270
11566
|
} else {
|
11271
11567
|
return Promise.resolve(html2canvas(chart)).then(function (chartCanvas) {
|
11272
11568
|
var imgBodyHeight = chartCanvas.height * chartWidth / chartCanvas.width;
|
@@ -11279,7 +11575,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11279
11575
|
});
|
11280
11576
|
}
|
11281
11577
|
}();
|
11282
|
-
return
|
11578
|
+
return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
|
11283
11579
|
}
|
11284
11580
|
var chart = canvas.children.item(_index);
|
11285
11581
|
if (chart.getAttribute("id") === "header-canvas") return;
|
@@ -11288,7 +11584,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11288
11584
|
var printChartTitleCanvas = null;
|
11289
11585
|
var chartTitleHeight = null;
|
11290
11586
|
var chartTitleData = "";
|
11291
|
-
var
|
11587
|
+
var _temp20 = function () {
|
11292
11588
|
if (chartTitle && printContainerEls.length) {
|
11293
11589
|
return Promise.resolve(html2canvas(chartTitle)).then(function (_html2canvas) {
|
11294
11590
|
printChartTitleCanvas = _html2canvas;
|
@@ -11297,12 +11593,12 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11297
11593
|
});
|
11298
11594
|
}
|
11299
11595
|
}();
|
11300
|
-
return
|
11596
|
+
return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
|
11301
11597
|
});
|
11302
|
-
if (
|
11598
|
+
if (_temp22 && _temp22.then) return _temp22.then(function () {});
|
11303
11599
|
}
|
11304
11600
|
}();
|
11305
|
-
return
|
11601
|
+
return _temp23 && _temp23.then ? _temp23.then(_temp24) : _temp24(_temp23);
|
11306
11602
|
});
|
11307
11603
|
}, function (error) {
|
11308
11604
|
console.log({
|
@@ -11310,7 +11606,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11310
11606
|
});
|
11311
11607
|
toast.error(getErrorMessage(t, error));
|
11312
11608
|
});
|
11313
|
-
return Promise.resolve(
|
11609
|
+
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(_temp26) : _temp26(_temp25));
|
11314
11610
|
} catch (e) {
|
11315
11611
|
return Promise.reject(e);
|
11316
11612
|
}
|
@@ -12457,7 +12753,7 @@ Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==t
|
|
12457
12753
|
|
12458
12754
|
var ReactApexChart = unwrapExports(reactApexcharts_min);
|
12459
12755
|
|
12460
|
-
var styles$4 = {"lighter":"#F0FFF6","light":"#
|
12756
|
+
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"};
|
12461
12757
|
|
12462
12758
|
var iconStarQuestion = function iconStarQuestion(_ref) {
|
12463
12759
|
var _ref$width = _ref.width,
|
@@ -13001,7 +13297,9 @@ function MyAnswer(_ref) {
|
|
13001
13297
|
sx: {
|
13002
13298
|
fontSize: "13px",
|
13003
13299
|
fontWeight: 600,
|
13004
|
-
color: "#97A1AF"
|
13300
|
+
color: "#97A1AF",
|
13301
|
+
display: "flex",
|
13302
|
+
alignItems: "center"
|
13005
13303
|
}
|
13006
13304
|
}, t("problem_number"))), React__default.createElement("div", {
|
13007
13305
|
className: styles["custom-col-2"],
|
@@ -13013,7 +13311,9 @@ function MyAnswer(_ref) {
|
|
13013
13311
|
sx: {
|
13014
13312
|
fontSize: "13px",
|
13015
13313
|
fontWeight: 600,
|
13016
|
-
color: "#97A1AF"
|
13314
|
+
color: "#97A1AF",
|
13315
|
+
display: "flex",
|
13316
|
+
alignItems: "center"
|
13017
13317
|
}
|
13018
13318
|
}, t("answer"))), React__default.createElement("div", {
|
13019
13319
|
className: styles["custom-col-2"],
|
@@ -13025,7 +13325,9 @@ function MyAnswer(_ref) {
|
|
13025
13325
|
sx: {
|
13026
13326
|
fontSize: "13px",
|
13027
13327
|
fontWeight: 600,
|
13028
|
-
color: "#97A1AF"
|
13328
|
+
color: "#97A1AF",
|
13329
|
+
display: "flex",
|
13330
|
+
alignItems: "center"
|
13029
13331
|
}
|
13030
13332
|
}, t("solve_time"))), React__default.createElement("div", {
|
13031
13333
|
className: styles["custom-col-2"],
|
@@ -13038,7 +13340,9 @@ function MyAnswer(_ref) {
|
|
13038
13340
|
sx: {
|
13039
13341
|
fontSize: "13px",
|
13040
13342
|
fontWeight: 600,
|
13041
|
-
color: "#97A1AF"
|
13343
|
+
color: "#97A1AF",
|
13344
|
+
display: "flex",
|
13345
|
+
alignItems: "center"
|
13042
13346
|
}
|
13043
13347
|
}, t("comparison_of_top_rankings"))), React__default.createElement("div", {
|
13044
13348
|
className: styles["custom-col-2"],
|
@@ -13051,7 +13355,9 @@ function MyAnswer(_ref) {
|
|
13051
13355
|
sx: {
|
13052
13356
|
fontSize: "13px",
|
13053
13357
|
fontWeight: 600,
|
13054
|
-
color: "#97A1AF"
|
13358
|
+
color: "#97A1AF",
|
13359
|
+
display: "flex",
|
13360
|
+
alignItems: "center"
|
13055
13361
|
}
|
13056
13362
|
}, t("total_correct_rate")))), React__default.createElement("div", {
|
13057
13363
|
className: styles$4["titleMyAnswer2"]
|
@@ -13231,48 +13537,6 @@ var CompareGrass = function CompareGrass(_ref) {
|
|
13231
13537
|
}, t("problem_classification")))), isPrint ? renderPrintTableBody(effectSize) : React__default.createElement("tbody", null, renderTableBody(effectSize))))));
|
13232
13538
|
};
|
13233
13539
|
|
13234
|
-
var iconUpArrow = function iconUpArrow(_ref) {
|
13235
|
-
var _ref$width = _ref.width,
|
13236
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13237
|
-
_ref$height = _ref.height,
|
13238
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13239
|
-
color = _ref.color;
|
13240
|
-
return React__default.createElement("svg", {
|
13241
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13242
|
-
width: width,
|
13243
|
-
height: height,
|
13244
|
-
viewBox: "0 0 24 24",
|
13245
|
-
fill: color
|
13246
|
-
}, React__default.createElement("path", {
|
13247
|
-
d: "M5.25 15.375L12 8.625L18.75 15.375",
|
13248
|
-
stroke: "#CED2DA",
|
13249
|
-
strokeWidth: "2",
|
13250
|
-
strokeLinecap: "round",
|
13251
|
-
strokeLinejoin: "round"
|
13252
|
-
}));
|
13253
|
-
};
|
13254
|
-
|
13255
|
-
var iconDownArrow = function iconDownArrow(_ref) {
|
13256
|
-
var _ref$width = _ref.width,
|
13257
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13258
|
-
_ref$height = _ref.height,
|
13259
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13260
|
-
color = _ref.color;
|
13261
|
-
return React__default.createElement("svg", {
|
13262
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13263
|
-
width: width,
|
13264
|
-
height: height,
|
13265
|
-
viewBox: "0 0 24 24",
|
13266
|
-
fill: color
|
13267
|
-
}, React__default.createElement("path", {
|
13268
|
-
d: "M5.25 8.625L12 15.375L18.75 8.625",
|
13269
|
-
stroke: "#CED2DA",
|
13270
|
-
strokeWidth: "2",
|
13271
|
-
strokeLinecap: "round",
|
13272
|
-
strokeLinejoin: "round"
|
13273
|
-
}));
|
13274
|
-
};
|
13275
|
-
|
13276
13540
|
var iconX = function iconX(_ref) {
|
13277
13541
|
var _ref$width = _ref.width,
|
13278
13542
|
width = _ref$width === void 0 ? "15" : _ref$width,
|
@@ -13408,7 +13672,13 @@ var TrickyProblem = function TrickyProblem(_ref) {
|
|
13408
13672
|
fontSize: "14px",
|
13409
13673
|
fontWeight: 700
|
13410
13674
|
}
|
13411
|
-
}, t("tricky_problems")), isOpen ? React__default.createElement(
|
13675
|
+
}, t("tricky_problems")), isOpen ? React__default.createElement(IoChevronUp, {
|
13676
|
+
size: 24,
|
13677
|
+
color: styles$4.gray_300
|
13678
|
+
}) : React__default.createElement(IoChevronDown, {
|
13679
|
+
size: 24,
|
13680
|
+
color: styles$4.gray_300
|
13681
|
+
})), isOpen && React__default.createElement(Fragment$1, null, isPrint ? renderPrintProblems() : renderProblems()));
|
13412
13682
|
};
|
13413
13683
|
|
13414
13684
|
var ProtractedProblem = function ProtractedProblem(_ref) {
|
@@ -13416,10 +13686,55 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13416
13686
|
data = _ref.data,
|
13417
13687
|
openProblem = _ref.openProblem,
|
13418
13688
|
changeOpen = _ref.changeOpen,
|
13419
|
-
isPrint = _ref.isPrint
|
13689
|
+
isPrint = _ref.isPrint,
|
13690
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13420
13691
|
var _useTranslation = useTranslation(),
|
13421
13692
|
t = _useTranslation.t;
|
13422
13693
|
var isOpen = openProblem === keyOpen;
|
13694
|
+
var renderTableBody = function renderTableBody(data) {
|
13695
|
+
return data.map(function (item, index) {
|
13696
|
+
var time = item.topDuration - item.duration;
|
13697
|
+
var isBetter = time > 0;
|
13698
|
+
return React__default.createElement("tr", {
|
13699
|
+
id: "print-item",
|
13700
|
+
key: item.id,
|
13701
|
+
style: index < data.length - 1 ? {
|
13702
|
+
borderBottom: "1px solid #e4e7ec"
|
13703
|
+
} : {}
|
13704
|
+
}, React__default.createElement("td", {
|
13705
|
+
className: styles$4["tdcolumn1"],
|
13706
|
+
style: {
|
13707
|
+
color: styles$4.gray_900,
|
13708
|
+
fontSize: "13px",
|
13709
|
+
fontWeight: 500
|
13710
|
+
}
|
13711
|
+
}, t("number_problem", {
|
13712
|
+
number: item.questionOrder + 1
|
13713
|
+
})), React__default.createElement("td", {
|
13714
|
+
style: {
|
13715
|
+
textAlign: "center",
|
13716
|
+
color: styles$4.gray_700,
|
13717
|
+
fontSize: "13px",
|
13718
|
+
fontWeight: 500
|
13719
|
+
}
|
13720
|
+
}, item.duration ? formatTimeSecond(item.duration, t) : ""), React__default.createElement("td", {
|
13721
|
+
className: styles$4["tdcolumn3"],
|
13722
|
+
style: {
|
13723
|
+
textAlign: "center",
|
13724
|
+
color: styles$4.gray_700,
|
13725
|
+
fontSize: "13px",
|
13726
|
+
fontWeight: 500
|
13727
|
+
}
|
13728
|
+
}, item.topDuration ? formatTimeSecond(item.topDuration, t) : ""), React__default.createElement("td", {
|
13729
|
+
style: {
|
13730
|
+
textAlign: "center",
|
13731
|
+
color: isBetter ? styles$4.dark : "red",
|
13732
|
+
fontSize: "13px",
|
13733
|
+
fontWeight: 600
|
13734
|
+
}
|
13735
|
+
}, item.topDuration && item.duration ? "" + (isBetter ? "" : "+") + formatTimeSecond(Math.abs(time), t) : ""));
|
13736
|
+
});
|
13737
|
+
};
|
13423
13738
|
var renderQuestions = function renderQuestions(data) {
|
13424
13739
|
return data.map(function (item) {
|
13425
13740
|
return React__default.createElement("div", {
|
@@ -13449,30 +13764,72 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13449
13764
|
var renderPrintQuestions = function renderPrintQuestions() {
|
13450
13765
|
var chunkedData = _.chunk(data, 5);
|
13451
13766
|
return chunkedData.map(function (i, index) {
|
13452
|
-
return React__default.createElement("
|
13767
|
+
return React__default.createElement("tbody", {
|
13453
13768
|
key: index,
|
13454
13769
|
className: PrintContentClassName
|
13455
|
-
}, renderQuestions(i));
|
13770
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13456
13771
|
});
|
13457
13772
|
};
|
13458
13773
|
return React__default.createElement("div", {
|
13459
13774
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13460
13775
|
}, React__default.createElement("div", {
|
13461
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13776
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13462
13777
|
onClick: function onClick() {
|
13463
13778
|
return changeOpen(isOpen ? "" : keyOpen);
|
13464
13779
|
}
|
13780
|
+
}, React__default.createElement(Stack, {
|
13781
|
+
flexDirection: "row",
|
13782
|
+
gap: "24px",
|
13783
|
+
alignItems: "center"
|
13465
13784
|
}, React__default.createElement(Typography, {
|
13466
13785
|
sx: {
|
13467
13786
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13468
13787
|
fontSize: "14px",
|
13469
13788
|
fontWeight: 700
|
13470
13789
|
}
|
13471
|
-
}, t("problems_that_took_a_long_time")),
|
13472
|
-
|
13473
|
-
|
13790
|
+
}, t("problems_that_took_a_long_time")), React__default.createElement(Typography, {
|
13791
|
+
sx: {
|
13792
|
+
color: styles$4.gray_300,
|
13793
|
+
fontSize: "11px",
|
13794
|
+
fontWeight: 500
|
13795
|
+
}
|
13796
|
+
}, t("protracted_problem_detail"))), isOpen ? React__default.createElement(IoChevronUp, {
|
13797
|
+
size: 24,
|
13798
|
+
color: styles$4.gray_300
|
13799
|
+
}) : React__default.createElement(IoChevronDown, {
|
13800
|
+
size: 24,
|
13801
|
+
color: styles$4.gray_300
|
13802
|
+
})), isOpen && React__default.createElement(Fragment$1, null, data.length ? React__default.createElement("div", {
|
13803
|
+
className: styles$4["tableCompareGrass"]
|
13804
|
+
}, React__default.createElement("div", {
|
13805
|
+
className: styles$4["table-responsive"]
|
13806
|
+
}, React__default.createElement(Table, {
|
13807
|
+
style: {
|
13808
|
+
width: "100%",
|
13809
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13810
|
+
}
|
13811
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13812
|
+
style: {
|
13813
|
+
borderBottom: "1px solid #E4E7EC"
|
13814
|
+
},
|
13815
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13816
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13817
|
+
className: styles$4["thcolumn1"]
|
13818
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13819
|
+
style: {
|
13820
|
+
textAlign: "center"
|
13821
|
+
}
|
13822
|
+
}, t("my_time")), React__default.createElement("th", {
|
13823
|
+
style: {
|
13824
|
+
textAlign: "center"
|
13825
|
+
}
|
13826
|
+
}, t("top_time")), React__default.createElement("th", {
|
13827
|
+
style: {
|
13828
|
+
textAlign: "center"
|
13829
|
+
}
|
13830
|
+
}, t("time_comparison")))), isPrint ? renderPrintQuestions() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(data) : renderQuestions(data))))) : React__default.createElement("div", {
|
13474
13831
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13475
|
-
}, t("no_data"))))
|
13832
|
+
}, t("no_data"))));
|
13476
13833
|
};
|
13477
13834
|
|
13478
13835
|
var Vulnerable = function Vulnerable(_ref) {
|
@@ -13480,7 +13837,8 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13480
13837
|
keyOpen = _ref.keyOpen,
|
13481
13838
|
openProblem = _ref.openProblem,
|
13482
13839
|
changeOpen = _ref.changeOpen,
|
13483
|
-
isPrint = _ref.isPrint
|
13840
|
+
isPrint = _ref.isPrint,
|
13841
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13484
13842
|
var _useTranslation = useTranslation(),
|
13485
13843
|
t = _useTranslation.t;
|
13486
13844
|
var isOpen = openProblem === keyOpen;
|
@@ -13489,12 +13847,65 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13489
13847
|
}).sort(function (q1, q2) {
|
13490
13848
|
return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
|
13491
13849
|
});
|
13850
|
+
var renderTableBody = function renderTableBody(data) {
|
13851
|
+
return data.map(function (item, index) {
|
13852
|
+
return React__default.createElement("tr", {
|
13853
|
+
id: "print-item",
|
13854
|
+
key: item.id,
|
13855
|
+
style: index < data.length - 1 ? {
|
13856
|
+
borderBottom: "1px solid #e4e7ec"
|
13857
|
+
} : {}
|
13858
|
+
}, React__default.createElement("td", {
|
13859
|
+
className: styles$4["tdcolumn1"],
|
13860
|
+
style: {
|
13861
|
+
color: styles$4.gray_900,
|
13862
|
+
fontSize: "13px",
|
13863
|
+
fontWeight: 600
|
13864
|
+
}
|
13865
|
+
}, React__default.createElement(Typography, {
|
13866
|
+
color: styles$4.gray_900,
|
13867
|
+
fontSize: "13px",
|
13868
|
+
fontWeight: 600
|
13869
|
+
}, t("problem") + " " + (item.questionOrder + 1))), React__default.createElement("td", {
|
13870
|
+
style: {
|
13871
|
+
textAlign: "center",
|
13872
|
+
color: styles$4.dark,
|
13873
|
+
fontSize: "13px",
|
13874
|
+
fontWeight: 600
|
13875
|
+
}
|
13876
|
+
}, item.overallCorrectRate.toFixed(2) ? item.overallCorrectRate.toFixed(2) + "%" : ""), React__default.createElement("td", {
|
13877
|
+
className: styles$4["tdcolumn3"],
|
13878
|
+
style: {
|
13879
|
+
color: "red",
|
13880
|
+
fontSize: "13px",
|
13881
|
+
fontWeight: 500
|
13882
|
+
}
|
13883
|
+
}, item.selectedAnswers ? t("number_answer", {
|
13884
|
+
number: item.selectedAnswers
|
13885
|
+
}) : ""), React__default.createElement("td", {
|
13886
|
+
style: {
|
13887
|
+
textAlign: "center",
|
13888
|
+
color: styles$4.gray_700
|
13889
|
+
}
|
13890
|
+
}, item.correctAnswers ? t("number_answer", {
|
13891
|
+
number: item.correctAnswers
|
13892
|
+
}) : ""), React__default.createElement("td", {
|
13893
|
+
style: {
|
13894
|
+
textAlign: "center",
|
13895
|
+
color: styles$4.gray_700
|
13896
|
+
}
|
13897
|
+
}, item.category.name ? item.category.name : ""));
|
13898
|
+
});
|
13899
|
+
};
|
13492
13900
|
var renderQuestions = function renderQuestions(questions) {
|
13493
13901
|
return questions.map(function (question) {
|
13494
|
-
return React__default.createElement(
|
13902
|
+
return React__default.createElement(Grid, {
|
13903
|
+
container: true,
|
13495
13904
|
className: styles$4["content"],
|
13496
13905
|
key: question.id
|
13497
|
-
}, React__default.createElement(
|
13906
|
+
}, React__default.createElement(Grid, {
|
13907
|
+
item: true,
|
13908
|
+
xs: 1.5,
|
13498
13909
|
className: styles$4["contentColumn1"]
|
13499
13910
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13500
13911
|
className: styles$4["span1"]
|
@@ -13502,7 +13913,9 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13502
13913
|
className: styles$4["span2"]
|
13503
13914
|
}, t("number_question", {
|
13504
13915
|
number: question.questionOrder + 1
|
13505
|
-
})))), React__default.createElement(
|
13916
|
+
})))), React__default.createElement(Grid, {
|
13917
|
+
item: true,
|
13918
|
+
xs: 10.5,
|
13506
13919
|
className: styles$4["contentColumn2"]
|
13507
13920
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13508
13921
|
className: styles$4["span1"]
|
@@ -13522,30 +13935,76 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13522
13935
|
var renderPrintQuestions = function renderPrintQuestions(questions) {
|
13523
13936
|
var chunkedQuestions = _.chunk(questions, 5);
|
13524
13937
|
return chunkedQuestions.map(function (i, index) {
|
13525
|
-
return React__default.createElement("
|
13938
|
+
return React__default.createElement("tbody", {
|
13526
13939
|
key: index,
|
13527
13940
|
className: PrintContentClassName
|
13528
|
-
}, renderQuestions(i));
|
13941
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13529
13942
|
});
|
13530
13943
|
};
|
13531
13944
|
return React__default.createElement("div", {
|
13532
13945
|
className: styles$4["wrapperProblem"] + " " + PrintContainerClassName
|
13533
13946
|
}, React__default.createElement("div", {
|
13534
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13947
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13535
13948
|
onClick: function onClick() {
|
13536
13949
|
return changeOpen(isOpen ? "" : keyOpen);
|
13537
13950
|
}
|
13951
|
+
}, React__default.createElement(Stack, {
|
13952
|
+
flexDirection: "row",
|
13953
|
+
gap: "24px",
|
13954
|
+
alignItems: "center"
|
13538
13955
|
}, React__default.createElement(Typography, {
|
13539
13956
|
sx: {
|
13540
13957
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13541
13958
|
fontSize: "14px",
|
13542
13959
|
fontWeight: 700
|
13543
13960
|
}
|
13544
|
-
}, t("issues_vulnerable")),
|
13545
|
-
|
13546
|
-
|
13961
|
+
}, t("issues_vulnerable")), React__default.createElement(Typography, {
|
13962
|
+
sx: {
|
13963
|
+
color: styles$4.gray_300,
|
13964
|
+
fontSize: "11px",
|
13965
|
+
fontWeight: 500
|
13966
|
+
}
|
13967
|
+
}, t("vulnerable_detail"))), isOpen ? React__default.createElement(IoChevronUp, {
|
13968
|
+
size: 24,
|
13969
|
+
color: styles$4.gray_300
|
13970
|
+
}) : React__default.createElement(IoChevronDown, {
|
13971
|
+
size: 24,
|
13972
|
+
color: styles$4.gray_300
|
13973
|
+
})), isOpen && React__default.createElement(Fragment$1, null, incorrectQuestions.length ? React__default.createElement("div", {
|
13974
|
+
className: styles$4["tableCompareGrass"]
|
13975
|
+
}, React__default.createElement("div", {
|
13976
|
+
className: styles$4["table-responsive"]
|
13977
|
+
}, React__default.createElement(Table, {
|
13978
|
+
style: {
|
13979
|
+
width: "100%",
|
13980
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13981
|
+
}
|
13982
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13983
|
+
style: {
|
13984
|
+
borderBottom: "1px solid #E4E7EC"
|
13985
|
+
},
|
13986
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13987
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13988
|
+
className: styles$4["thcolumn1"]
|
13989
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13990
|
+
style: {
|
13991
|
+
textAlign: "center"
|
13992
|
+
}
|
13993
|
+
}, t("total_correct_rate")), React__default.createElement("th", {
|
13994
|
+
style: {
|
13995
|
+
textAlign: "center"
|
13996
|
+
}
|
13997
|
+
}, t("my_wrong_answer")), React__default.createElement("th", {
|
13998
|
+
style: {
|
13999
|
+
textAlign: "center"
|
14000
|
+
}
|
14001
|
+
}, t("answer")), React__default.createElement("th", {
|
14002
|
+
style: {
|
14003
|
+
textAlign: "center"
|
14004
|
+
}
|
14005
|
+
}, t("_category")))), isPrint ? renderPrintQuestions(incorrectQuestions) : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(incorrectQuestions) : renderQuestions(incorrectQuestions))))) : React__default.createElement("div", {
|
13547
14006
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13548
|
-
}, t("no_data"))))
|
14007
|
+
}, t("no_data"))));
|
13549
14008
|
};
|
13550
14009
|
|
13551
14010
|
var GradesByTerritory = function GradesByTerritory(_ref) {
|
@@ -13553,10 +14012,64 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13553
14012
|
data = _ref.data,
|
13554
14013
|
openProblem = _ref.openProblem,
|
13555
14014
|
changeOpen = _ref.changeOpen,
|
13556
|
-
isPrint = _ref.isPrint
|
14015
|
+
isPrint = _ref.isPrint,
|
14016
|
+
resultData = _ref.resultData,
|
14017
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13557
14018
|
var _useTranslation = useTranslation(),
|
13558
14019
|
t = _useTranslation.t;
|
14020
|
+
var formattedData = totalSolveTimeCategories(resultData, data);
|
13559
14021
|
var isOpen = openProblem === keyOpen;
|
14022
|
+
var renderTableBody = function renderTableBody(data) {
|
14023
|
+
return data.map(function (item, index) {
|
14024
|
+
return React__default.createElement("tr", {
|
14025
|
+
id: "print-item",
|
14026
|
+
key: item.id,
|
14027
|
+
style: index < data.length - 1 ? {
|
14028
|
+
borderBottom: "1px solid #e4e7ec"
|
14029
|
+
} : {}
|
14030
|
+
}, React__default.createElement("td", {
|
14031
|
+
className: styles$4["tdcolumn1"],
|
14032
|
+
style: {
|
14033
|
+
color: styles$4.gray_900,
|
14034
|
+
fontSize: "13px",
|
14035
|
+
fontWeight: 600
|
14036
|
+
}
|
14037
|
+
}, item.name), React__default.createElement("td", {
|
14038
|
+
style: {
|
14039
|
+
textAlign: "center",
|
14040
|
+
color: styles$4.gray_900,
|
14041
|
+
fontSize: "13px",
|
14042
|
+
fontWeight: 600
|
14043
|
+
}
|
14044
|
+
}, item.percentageAmongStudents.toFixed(2), "%"), React__default.createElement("td", {
|
14045
|
+
className: styles$4["tdcolumn3"],
|
14046
|
+
style: {
|
14047
|
+
textAlign: "center",
|
14048
|
+
color: styles$4.gray_700,
|
14049
|
+
fontSize: "13px",
|
14050
|
+
fontWeight: 500
|
14051
|
+
}
|
14052
|
+
}, item.totalCorrectQuestions ? t("number_of_answer", {
|
14053
|
+
number: item.totalCorrectQuestions
|
14054
|
+
}) : ""), React__default.createElement("td", {
|
14055
|
+
style: {
|
14056
|
+
textAlign: "center",
|
14057
|
+
color: styles$4.gray_700,
|
14058
|
+
fontSize: "13px",
|
14059
|
+
fontWeight: 500
|
14060
|
+
}
|
14061
|
+
}, item.totalQuestions ? t("number_of_answer", {
|
14062
|
+
number: item.totalQuestions
|
14063
|
+
}) : ""), React__default.createElement("td", {
|
14064
|
+
style: {
|
14065
|
+
textAlign: "center",
|
14066
|
+
color: styles$4.gray_700,
|
14067
|
+
fontSize: "13px",
|
14068
|
+
fontWeight: 500
|
14069
|
+
}
|
14070
|
+
}, item.totalSolveTime ? formatDuration(t, item.totalSolveTime) : ""));
|
14071
|
+
});
|
14072
|
+
};
|
13560
14073
|
var renderCategories = function renderCategories(data) {
|
13561
14074
|
return data.map(function (item) {
|
13562
14075
|
var trackStyle = {
|
@@ -13580,18 +14093,18 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13580
14093
|
});
|
13581
14094
|
};
|
13582
14095
|
var renderPrintCategories = function renderPrintCategories() {
|
13583
|
-
var chunkedCategories = _.chunk(
|
14096
|
+
var chunkedCategories = _.chunk(formattedData, 10);
|
13584
14097
|
return chunkedCategories.map(function (i, index) {
|
13585
|
-
return React__default.createElement("
|
14098
|
+
return React__default.createElement("tbody", {
|
13586
14099
|
key: index,
|
13587
14100
|
className: PrintContentClassName
|
13588
|
-
}, renderCategories(i));
|
14101
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderCategories(i));
|
13589
14102
|
});
|
13590
14103
|
};
|
13591
14104
|
return React__default.createElement("div", {
|
13592
14105
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13593
14106
|
}, React__default.createElement("div", {
|
13594
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
14107
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13595
14108
|
onClick: function onClick() {
|
13596
14109
|
return changeOpen(isOpen ? "" : keyOpen);
|
13597
14110
|
}
|
@@ -13601,9 +14114,45 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13601
14114
|
fontSize: "14px",
|
13602
14115
|
fontWeight: 700
|
13603
14116
|
}
|
13604
|
-
}, t("grades_by_area")), isOpen ? React__default.createElement(
|
13605
|
-
|
13606
|
-
|
14117
|
+
}, t("grades_by_area")), isOpen ? React__default.createElement(IoChevronUp, {
|
14118
|
+
size: 24,
|
14119
|
+
color: styles$4.gray_300
|
14120
|
+
}) : React__default.createElement(IoChevronDown, {
|
14121
|
+
size: 24,
|
14122
|
+
color: styles$4.gray_300
|
14123
|
+
})), isOpen && React__default.createElement(Fragment$1, null, formattedData.length ? React__default.createElement("div", {
|
14124
|
+
className: styles$4["tableCompareGrass"]
|
14125
|
+
}, React__default.createElement("div", {
|
14126
|
+
className: styles$4["table-responsive"]
|
14127
|
+
}, React__default.createElement(Table, {
|
14128
|
+
style: {
|
14129
|
+
width: "100%",
|
14130
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
14131
|
+
}
|
14132
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
14133
|
+
style: {
|
14134
|
+
borderBottom: "1px solid #E4E7EC"
|
14135
|
+
},
|
14136
|
+
className: isPrint ? PrintHeaderClassName : ""
|
14137
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
14138
|
+
className: styles$4["thcolumn1"]
|
14139
|
+
}, t("categories")), React__default.createElement("th", {
|
14140
|
+
style: {
|
14141
|
+
textAlign: "center"
|
14142
|
+
}
|
14143
|
+
}, t("correct_rate")), React__default.createElement("th", {
|
14144
|
+
style: {
|
14145
|
+
textAlign: "center"
|
14146
|
+
}
|
14147
|
+
}, t("number_of_correct_answers")), React__default.createElement("th", {
|
14148
|
+
style: {
|
14149
|
+
textAlign: "center"
|
14150
|
+
}
|
14151
|
+
}, t("total_number_of_problems")), React__default.createElement("th", {
|
14152
|
+
style: {
|
14153
|
+
textAlign: "center"
|
14154
|
+
}
|
14155
|
+
}, t("total_solve_time")))), isPrint ? renderPrintCategories() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(formattedData) : renderCategories(formattedData))))) : React__default.createElement("div", {
|
13607
14156
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13608
14157
|
}, t("no_data"))));
|
13609
14158
|
};
|
@@ -13813,7 +14362,8 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13813
14362
|
history = _ref.history,
|
13814
14363
|
examSessionId = _ref.examSessionId,
|
13815
14364
|
studentId = _ref.studentId,
|
13816
|
-
code = _ref.code
|
14365
|
+
code = _ref.code,
|
14366
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13817
14367
|
var _useTab = useTab(),
|
13818
14368
|
selected = _useTab.selected,
|
13819
14369
|
handleChangeTab = _useTab.handleChangeTab;
|
@@ -13914,7 +14464,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13914
14464
|
fontWeight: 600,
|
13915
14465
|
color: styles.gray_500
|
13916
14466
|
}
|
13917
|
-
}, t("
|
14467
|
+
}, t("students")), React__default.createElement(Typography, {
|
13918
14468
|
sx: {
|
13919
14469
|
fontSize: "14px",
|
13920
14470
|
fontWeight: 600,
|
@@ -13958,7 +14508,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13958
14508
|
}, React__default.createElement("button", {
|
13959
14509
|
className: styles$4["pdfBtn"] + " " + styles["truncate"],
|
13960
14510
|
onClick: handleExportPdf
|
13961
|
-
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("
|
14511
|
+
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("print_all"))))))), React__default.createElement(Grid, {
|
13962
14512
|
item: true,
|
13963
14513
|
xs: 12
|
13964
14514
|
}, React__default.createElement(Box, {
|
@@ -13968,7 +14518,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13968
14518
|
alignItems: "center",
|
13969
14519
|
display: "flex",
|
13970
14520
|
overflow: "scroll",
|
13971
|
-
bgcolor: styles.
|
14521
|
+
bgcolor: styles.gray_50,
|
13972
14522
|
borderTop: "1px solid #E4E7EC",
|
13973
14523
|
borderBottom: "1px solid #E4E7EC"
|
13974
14524
|
}, React__default.createElement(Stack, {
|
@@ -14048,16 +14598,20 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14048
14598
|
keyOpen: "Vulnerable",
|
14049
14599
|
data: resultData,
|
14050
14600
|
openProblem: openProblem,
|
14051
|
-
changeOpen: setOpenProblem
|
14601
|
+
changeOpen: setOpenProblem,
|
14602
|
+
isMyStoryStudent: isMyStoryStudent
|
14052
14603
|
}), React__default.createElement(ProtractedProblem, {
|
14053
14604
|
keyOpen: "ProtractedProblem",
|
14054
14605
|
data: longTimeSpend,
|
14055
14606
|
openProblem: openProblem,
|
14056
|
-
changeOpen: setOpenProblem
|
14607
|
+
changeOpen: setOpenProblem,
|
14608
|
+
isMyStoryStudent: isMyStoryStudent
|
14057
14609
|
}), React__default.createElement(GradesByTerritory, {
|
14058
14610
|
keyOpen: "GradesByTerritory",
|
14059
14611
|
data: categoryResponses,
|
14612
|
+
resultData: resultData,
|
14060
14613
|
openProblem: openProblem,
|
14614
|
+
isMyStoryStudent: isMyStoryStudent,
|
14061
14615
|
changeOpen: setOpenProblem
|
14062
14616
|
}))), React__default.createElement(Grid, {
|
14063
14617
|
item: true,
|
@@ -14215,10 +14769,11 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14215
14769
|
gap: "12px",
|
14216
14770
|
marginTop: "24px"
|
14217
14771
|
}, React__default.createElement(Typography, {
|
14772
|
+
className: "chart-title",
|
14218
14773
|
sx: {
|
14219
|
-
fontSize: "
|
14774
|
+
fontSize: "18px",
|
14220
14775
|
fontWeight: 700,
|
14221
|
-
color: styles.
|
14776
|
+
color: styles.gray_500
|
14222
14777
|
}
|
14223
14778
|
}, t(TabList[2].label)), React__default.createElement(CompareGrass, {
|
14224
14779
|
effectSize: effectSize,
|
@@ -14246,19 +14801,23 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14246
14801
|
data: resultData,
|
14247
14802
|
openProblem: "Vulnerable",
|
14248
14803
|
changeOpen: setOpenProblem,
|
14804
|
+
isMyStoryStudent: isMyStoryStudent,
|
14249
14805
|
isPrint: true
|
14250
14806
|
}), React__default.createElement(ProtractedProblem, {
|
14251
14807
|
keyOpen: "ProtractedProblem",
|
14252
14808
|
data: longTimeSpend,
|
14253
14809
|
openProblem: "ProtractedProblem",
|
14254
14810
|
changeOpen: setOpenProblem,
|
14255
|
-
isPrint: true
|
14811
|
+
isPrint: true,
|
14812
|
+
isMyStoryStudent: isMyStoryStudent
|
14256
14813
|
}), React__default.createElement(GradesByTerritory, {
|
14257
14814
|
keyOpen: "GradesByTerritory",
|
14258
14815
|
data: categoryResponses,
|
14816
|
+
resultData: resultData,
|
14259
14817
|
openProblem: "GradesByTerritory",
|
14260
14818
|
changeOpen: setOpenProblem,
|
14261
|
-
isPrint: true
|
14819
|
+
isPrint: true,
|
14820
|
+
isMyStoryStudent: isMyStoryStudent
|
14262
14821
|
})))), React__default.createElement(CreateNewQuestionDialog$1, {
|
14263
14822
|
examSessionId: resultData === null || resultData === void 0 ? void 0 : resultData.examSessionId,
|
14264
14823
|
handleCreateQuestion: handleCreateQuestion,
|
@@ -14293,12 +14852,25 @@ var timeSpanToLocalMoment = function timeSpanToLocalMoment(time, date) {
|
|
14293
14852
|
var value = date ? moment.utc(date).startOf("day").add(totalSeconds, "seconds").local() : moment().startOf("day").add(totalSeconds, "seconds");
|
14294
14853
|
return value;
|
14295
14854
|
};
|
14855
|
+
var convertHHMMSStoSeconds = function convertHHMMSStoSeconds(time) {
|
14856
|
+
var times = time.split(":");
|
14857
|
+
return +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
14858
|
+
};
|
14859
|
+
var getRemainTime = function getRemainTime(startTime, duration) {
|
14860
|
+
var timePass = diffFromNow(startTime, "second");
|
14861
|
+
var durationInNumber = convertHHMMSStoSeconds(duration);
|
14862
|
+
if (typeof timePass !== "number") return null;
|
14863
|
+
if (timePass > durationInNumber) return 0;
|
14864
|
+
return durationInNumber - timePass;
|
14865
|
+
};
|
14296
14866
|
|
14297
14867
|
var times = {
|
14298
14868
|
__proto__: null,
|
14299
14869
|
getLocalDayOfWeek: getLocalDayOfWeek,
|
14300
14870
|
getUtcDayOfWeek: getUtcDayOfWeek,
|
14301
|
-
timeSpanToLocalMoment: timeSpanToLocalMoment
|
14871
|
+
timeSpanToLocalMoment: timeSpanToLocalMoment,
|
14872
|
+
convertHHMMSStoSeconds: convertHHMMSStoSeconds,
|
14873
|
+
getRemainTime: getRemainTime
|
14302
14874
|
};
|
14303
14875
|
|
14304
14876
|
var SIGN_IN_SUPER_ADMIN_URL = SUPER_ADMIN_BASE_URL + "/api/auth/login";
|
@@ -14903,8 +15475,8 @@ var Header = function Header(_ref) {
|
|
14903
15475
|
homeUrl: homeRoute.path,
|
14904
15476
|
role: role,
|
14905
15477
|
history: history,
|
14906
|
-
|
14907
|
-
|
15478
|
+
onSignOut: onSignOut,
|
15479
|
+
hideAcademyName: !isLargerThanXL && headerTabs.length > 6
|
14908
15480
|
})), React__default.createElement(Stack, {
|
14909
15481
|
display: "flex",
|
14910
15482
|
flexGrow: 1,
|
@@ -14951,23 +15523,7 @@ var Header = function Header(_ref) {
|
|
14951
15523
|
})), React__default.createElement(Stack, {
|
14952
15524
|
direction: "row",
|
14953
15525
|
alignItems: "center"
|
14954
|
-
}, React__default.createElement(
|
14955
|
-
color: styles.gray_700,
|
14956
|
-
className: "fw-bold me-3 text-nowrap flex-shrink-1",
|
14957
|
-
sx: {
|
14958
|
-
minWidth: "60px",
|
14959
|
-
maxWidth: {
|
14960
|
-
md: "100px",
|
14961
|
-
xs: "60px"
|
14962
|
-
},
|
14963
|
-
fontSize: {
|
14964
|
-
md: "16px",
|
14965
|
-
xs: "14px"
|
14966
|
-
},
|
14967
|
-
overflow: "hidden",
|
14968
|
-
textOverflow: "ellipsis"
|
14969
|
-
}
|
14970
|
-
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(Link, {
|
15526
|
+
}, React__default.createElement(Link, {
|
14971
15527
|
"aria-current": "page",
|
14972
15528
|
to: homeRoute.path,
|
14973
15529
|
className: "border-none"
|
@@ -15080,7 +15636,11 @@ var AcademyCard = function AcademyCard(_ref) {
|
|
15080
15636
|
}), createElement(CardContent, null, createElement(Typography$1, {
|
15081
15637
|
variant: "h6",
|
15082
15638
|
component: "div"
|
15083
|
-
}, academy.name)), createElement(CardActions,
|
15639
|
+
}, academy.name)), createElement(CardActions, {
|
15640
|
+
sx: {
|
15641
|
+
padding: "16px"
|
15642
|
+
}
|
15643
|
+
}, createElement(Button$1, {
|
15084
15644
|
sx: {
|
15085
15645
|
bgColor: theme.palette.main_theme.dark
|
15086
15646
|
},
|
@@ -15137,5 +15697,220 @@ var AcademyList = function AcademyList(_ref) {
|
|
15137
15697
|
}, React__default.createElement("span", null, t("no_academy_available"), "."))))));
|
15138
15698
|
};
|
15139
15699
|
|
15140
|
-
|
15700
|
+
var ONE_SECOND_IN_MILLISECONDS = 1000;
|
15701
|
+
var useCountDownTimer = function useCountDownTimer(props) {
|
15702
|
+
var startTime = props.startTime,
|
15703
|
+
status = props.status,
|
15704
|
+
code = props.code,
|
15705
|
+
duration = props.duration,
|
15706
|
+
fetchedCount = props.fetchedCount,
|
15707
|
+
onFinish = props.onFinish;
|
15708
|
+
var _useState = useState(),
|
15709
|
+
remainTime = _useState[0],
|
15710
|
+
setRemainTime = _useState[1];
|
15711
|
+
var checkStatusRef = useRef(null);
|
15712
|
+
var requestRef = useRef(null);
|
15713
|
+
var checkLiveExamStatus = useCallback(function () {
|
15714
|
+
try {
|
15715
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15716
|
+
if (!code || status === ExamStatus$1.Completed) {
|
15717
|
+
return Promise.resolve();
|
15718
|
+
}
|
15719
|
+
var _temp = _catch(function () {
|
15720
|
+
return Promise.resolve(getCheckStatusExam(code)).then(function (res) {
|
15721
|
+
if (res.data.data.status === ExamStatus$1.Completed) {
|
15722
|
+
clearInterval(checkStatusRef.current);
|
15723
|
+
onFinish();
|
15724
|
+
} else {
|
15725
|
+
checkStatusRef.current = setTimeout(checkLiveExamStatus, ONE_SECOND_IN_MILLISECONDS);
|
15726
|
+
}
|
15727
|
+
});
|
15728
|
+
}, function (error) {
|
15729
|
+
console.log({
|
15730
|
+
error: error
|
15731
|
+
});
|
15732
|
+
});
|
15733
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15734
|
+
} catch (e) {
|
15735
|
+
return Promise.reject(e);
|
15736
|
+
}
|
15737
|
+
}, [code, status, onFinish]);
|
15738
|
+
useEffect(function () {
|
15739
|
+
if (status !== ExamStatus$1.InProgress) return;
|
15740
|
+
var animate = function animate() {
|
15741
|
+
if (!startTime || !duration) return;
|
15742
|
+
if (typeof remainTime === "number" && remainTime <= 0) {
|
15743
|
+
onFinish();
|
15744
|
+
return;
|
15745
|
+
}
|
15746
|
+
var remain = getRemainTime(startTime, duration);
|
15747
|
+
if (typeof remain !== "number") {
|
15748
|
+
setRemainTime(undefined);
|
15749
|
+
return;
|
15750
|
+
}
|
15751
|
+
if (remain <= 0) {
|
15752
|
+
setRemainTime(0);
|
15753
|
+
checkLiveExamStatus();
|
15754
|
+
return;
|
15755
|
+
}
|
15756
|
+
setRemainTime(remain || 0);
|
15757
|
+
requestRef.current = requestAnimationFrame(animate);
|
15758
|
+
};
|
15759
|
+
requestRef.current = requestAnimationFrame(animate);
|
15760
|
+
return function () {
|
15761
|
+
!!requestRef.current && cancelAnimationFrame(requestRef.current);
|
15762
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15763
|
+
setRemainTime(undefined);
|
15764
|
+
};
|
15765
|
+
}, [startTime, duration, fetchedCount, checkLiveExamStatus]);
|
15766
|
+
useEffect(function () {
|
15767
|
+
if (typeof remainTime === "number" && remainTime <= 0) onFinish();
|
15768
|
+
}, [remainTime, onFinish]);
|
15769
|
+
return remainTime;
|
15770
|
+
};
|
15771
|
+
|
15772
|
+
var EXAM_SESSION_URL$1 = BASE_URL + "/api/examSession";
|
15773
|
+
var getCheckStatusExam$1 = function getCheckStatusExam(examCode) {
|
15774
|
+
return api.get(EXAM_SESSION_URL$1 + "/" + examCode + "/status");
|
15775
|
+
};
|
15776
|
+
|
15777
|
+
var useCheckExam = function useCheckExam(code, status) {
|
15778
|
+
var _useState = useState({}),
|
15779
|
+
isCheckExam = _useState[0],
|
15780
|
+
setCheckExam = _useState[1];
|
15781
|
+
var isCheck = !code ? false : isCheckExam[code];
|
15782
|
+
var checkExam = function checkExam() {
|
15783
|
+
try {
|
15784
|
+
if (!code || isCheck) return Promise.resolve();
|
15785
|
+
if (status === ExamStatus$1.Completed) {
|
15786
|
+
setCheckExam(function (state) {
|
15787
|
+
var _extends2;
|
15788
|
+
return _extends({}, state, (_extends2 = {}, _extends2[code] = true, _extends2));
|
15789
|
+
});
|
15790
|
+
return Promise.resolve();
|
15791
|
+
}
|
15792
|
+
var _temp = _catch(function () {
|
15793
|
+
return Promise.resolve(getCheckStatusExam$1(code)).then(function () {
|
15794
|
+
setCheckExam(function (state) {
|
15795
|
+
var _extends3;
|
15796
|
+
return _extends({}, state, (_extends3 = {}, _extends3[code] = true, _extends3));
|
15797
|
+
});
|
15798
|
+
});
|
15799
|
+
}, function (error) {
|
15800
|
+
console.log({
|
15801
|
+
error: error
|
15802
|
+
});
|
15803
|
+
});
|
15804
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15805
|
+
} catch (e) {
|
15806
|
+
return Promise.reject(e);
|
15807
|
+
}
|
15808
|
+
};
|
15809
|
+
useEffect(function () {
|
15810
|
+
checkExam();
|
15811
|
+
}, [code]);
|
15812
|
+
return {
|
15813
|
+
isCheck: isCheck
|
15814
|
+
};
|
15815
|
+
};
|
15816
|
+
|
15817
|
+
var useLoadMore = function useLoadMore(props) {
|
15818
|
+
var onLoadMore = props.onLoadMore,
|
15819
|
+
loading = props.loading;
|
15820
|
+
var observerTarget = useRef(null);
|
15821
|
+
useEffect(function () {
|
15822
|
+
var currentTarget = observerTarget.current;
|
15823
|
+
var observer = new IntersectionObserver(function (entries) {
|
15824
|
+
if (entries[0].isIntersecting && !loading) {
|
15825
|
+
onLoadMore();
|
15826
|
+
}
|
15827
|
+
}, {
|
15828
|
+
threshold: 1
|
15829
|
+
});
|
15830
|
+
if (observerTarget.current) {
|
15831
|
+
observer.observe(observerTarget.current);
|
15832
|
+
}
|
15833
|
+
return function () {
|
15834
|
+
if (currentTarget) {
|
15835
|
+
observer.unobserve(currentTarget);
|
15836
|
+
}
|
15837
|
+
};
|
15838
|
+
}, [observerTarget, loading, onLoadMore]);
|
15839
|
+
return {
|
15840
|
+
observerTarget: observerTarget
|
15841
|
+
};
|
15842
|
+
};
|
15843
|
+
|
15844
|
+
var useVirtualizeList = function useVirtualizeList(totalItems, rowHeight, offsetRow, minRows) {
|
15845
|
+
if (offsetRow === void 0) {
|
15846
|
+
offsetRow = 1;
|
15847
|
+
}
|
15848
|
+
var _useState = useState(-1),
|
15849
|
+
startIndex = _useState[0],
|
15850
|
+
setStartIndex = _useState[1];
|
15851
|
+
var _useState2 = useState(-1),
|
15852
|
+
endIndex = _useState2[0],
|
15853
|
+
setEndIndex = _useState2[1];
|
15854
|
+
var containerRef = useRef(null);
|
15855
|
+
var handleScroll = useCallback(function () {
|
15856
|
+
if (containerRef.current) {
|
15857
|
+
var _containerRef$current = containerRef.current,
|
15858
|
+
scrollTop = _containerRef$current.scrollTop,
|
15859
|
+
clientHeight = _containerRef$current.clientHeight;
|
15860
|
+
var itemsPerPage = Math.ceil(clientHeight / rowHeight);
|
15861
|
+
var newStartIndex = Math.max(Math.floor(scrollTop / rowHeight) - offsetRow, 0);
|
15862
|
+
var newEndIndex = Math.min(newStartIndex + itemsPerPage + offsetRow, totalItems - 1);
|
15863
|
+
if (minRows) {
|
15864
|
+
if (totalItems <= minRows) {
|
15865
|
+
newStartIndex = -1;
|
15866
|
+
newEndIndex = -1;
|
15867
|
+
} else {
|
15868
|
+
var total = newEndIndex - newStartIndex;
|
15869
|
+
var diff = minRows - total;
|
15870
|
+
if (diff > 0) {
|
15871
|
+
var valS = diff / 2;
|
15872
|
+
var valE = diff - valS;
|
15873
|
+
if (newStartIndex < valS) {
|
15874
|
+
valE += valS - newStartIndex;
|
15875
|
+
newStartIndex = 0;
|
15876
|
+
}
|
15877
|
+
if (newEndIndex + valE > totalItems - 1) {
|
15878
|
+
valS += newEndIndex + valE - totalItems + 1;
|
15879
|
+
}
|
15880
|
+
newStartIndex = Math.max(newStartIndex - valS, 0);
|
15881
|
+
newEndIndex = Math.min(newEndIndex + valE, totalItems - 1);
|
15882
|
+
}
|
15883
|
+
}
|
15884
|
+
}
|
15885
|
+
setStartIndex(newStartIndex);
|
15886
|
+
setEndIndex(newEndIndex);
|
15887
|
+
}
|
15888
|
+
}, [totalItems, rowHeight, offsetRow]);
|
15889
|
+
useEffect(function () {
|
15890
|
+
var container = containerRef.current;
|
15891
|
+
if (container) {
|
15892
|
+
container.addEventListener("scroll", handleScroll);
|
15893
|
+
}
|
15894
|
+
return function () {
|
15895
|
+
if (container) {
|
15896
|
+
container.removeEventListener("scroll", handleScroll);
|
15897
|
+
}
|
15898
|
+
};
|
15899
|
+
}, [handleScroll]);
|
15900
|
+
var handleChangeStartIndex = function handleChangeStartIndex(index) {
|
15901
|
+
setStartIndex(index);
|
15902
|
+
};
|
15903
|
+
var handleChangeEndIndex = function handleChangeEndIndex(index) {
|
15904
|
+
setEndIndex(index);
|
15905
|
+
};
|
15906
|
+
return {
|
15907
|
+
startIndex: startIndex,
|
15908
|
+
endIndex: endIndex,
|
15909
|
+
containerRef: containerRef,
|
15910
|
+
handleChangeStartIndex: handleChangeStartIndex,
|
15911
|
+
handleChangeEndIndex: handleChangeEndIndex
|
15912
|
+
};
|
15913
|
+
};
|
15914
|
+
|
15915
|
+
export { ACADEMY_DOMAIN, ACCESS_TOKEN, AcademyHeaders, AcademyList, AnswerCountSelector, ArticleCategorySelector, ArticleGroupView, BASE_URL, ChatContainer, ChatItemType, types as ChatTypes, CommonDialog, ConfirmDialog, index$1 as CoreHooks, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, DEFAULT_PAGING_RESPONSE, DefaultErrorMessage, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, index as Enums, ExamDetailView, ExamEvent, ExamResultV2, Header, InputText, LANGUAGES, Language, LayoutContext, Loading, Login, SignIn as LoginWithPassword, NotFound, PUSHER_CONFIG, QuestionCountSelector, Role, SUPER_ADMIN_BASE_URL, ScoreSelector, SubjectSelector, index$2 as Textbook, TextbookViewDetail as TextbookDetail, TextbookList, TheAcademyDropdown, TheLanguageDropdown, index$3 as Types, api, apiUpload, canAccess as canAccessRoute, diffFromNow, formatTime, getAcademyDomain, getAccessToken, getErrorMessage, getOrdinalSuffix, i18n, minutesToTimeSpan, setAlert, setLanguage, setLoading, setReFetchUserAcademies, setReadyRegisterPusher, setUser, store, times as timeUtils, toISOString, useAutoAcademyDomain, useCategorySelect, useChatContainer, useCheckExam, useCountDownTimer, useGoogleSignOut, useLanguage, useLoadMore, useLogin, usePusherConversation, useSubjectSelect, useSwitchAcademy, useVirtualizeList, utcToLocalTime };
|
15141
15916
|
//# sourceMappingURL=index.modern.js.map
|