touchstudy-core 0.1.136 → 0.1.137
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/README.md +46 -46
- package/dist/.DS_Store +0 -0
- package/dist/components/.DS_Store +0 -0
- package/dist/components/Commons/NotFound.d.ts +1 -4
- package/dist/components/Print/PrintExamView2.d.ts +1 -2
- package/dist/containers/.DS_Store +0 -0
- package/dist/containers/Classes/configs/constants.d.ts +8 -1
- package/dist/containers/Classes/configs/types.d.ts +2 -0
- package/dist/containers/PreparedTextbook/components/Article.d.ts +3 -2
- package/dist/containers/PreparedTextbook/configs/enums.d.ts +1 -1
- package/dist/containers/PreparedTextbook/configs/functions.d.ts +2 -1
- package/dist/containers/PreparedTextbook/configs/types.d.ts +1 -0
- package/dist/containers/Users/configs/types.d.ts +2 -2
- package/dist/index.css +9 -9
- package/dist/index.js +1194 -1032
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1209 -1050
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/.DS_Store +0 -0
- package/dist/rootReducer.d.ts +2 -2
- package/dist/utils/.DS_Store +0 -0
- package/dist/utils/constants.d.ts +16 -0
- package/dist/utils/enums/academy.d.ts +6 -0
- package/dist/utils/enums/index.d.ts +1 -0
- package/dist/utils/hooks/useLanguage.d.ts +1 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/package.json +102 -102
- package/dist/StudyTouch_Character_v1_Question~jLFvuYmI.png +0 -0
- package/dist/components/Chats/ChatHeader.d.ts +0 -25
- package/dist/components/Chats/ChatItem.d.ts +0 -31
- package/dist/components/Chats/ChatLeftItem.d.ts +0 -4
- package/dist/components/Chats/ChatList.d.ts +0 -14
- package/dist/components/Chats/ChatRightItem.d.ts +0 -4
- package/dist/components/Chats/InputChat.d.ts +0 -16
- package/dist/components/Chats/components/CustomTooltip.d.ts +0 -2
- package/dist/components/CkEditor/CkEditor.d.ts +0 -19
- package/dist/components/CkEditor/config.d.ts +0 -19
- package/dist/components/CkEditor/index.d.ts +0 -2
- package/dist/components/ErrorHandler.d.ts +0 -6
- package/dist/components/LabelRequired.d.ts +0 -8
- package/dist/components/Selectors/InActiveAcademySelector.d.ts +0 -16
- package/dist/containers/Academies/hooks/usePassCodeDialog.d.ts +0 -10
- package/dist/containers/ExamResult/components/MyAnswer/components/CreateNewQuestion.d.ts +0 -15
- package/dist/containers/Exams/configs/types.d.ts +0 -22
- package/dist/containers/PreparedTextbook/apiClients/academyService.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/TextbookOwners.d.ts +0 -13
- package/dist/containers/Users/components/Dialogs/DeleteUserCsvDialog.d.ts +0 -10
- package/dist/containers/Users/components/Dialogs/RecentUserActionDialog.d.ts +0 -9
- package/dist/containers/Users/components/Dialogs/UserDialog.d.ts +0 -12
- package/dist/tests/performances/do-exam-session-list-student.d.ts +0 -19
- package/dist/tests/performances/do-exam-session-request-answer-one-time.d.ts +0 -19
- package/dist/tests/performances/do-exam-session-skip-answer.d.ts +0 -19
- package/dist/tests/performances/do-exam-session2.d.ts +0 -19
- package/dist/utils/canAccessRoute.d.ts +0 -2
- package/dist/utils/diffFromNow.d.ts +0 -3
- package/dist/utils/encodeParams.d.ts +0 -2
- package/dist/utils/formatTime.d.ts +0 -4
- package/dist/utils/getAcademyDomain.d.ts +0 -2
- package/dist/utils/getAccessToken.d.ts +0 -2
- package/dist/utils/getErrorMessage.d.ts +0 -1
- package/dist/utils/getLanguage.d.ts +0 -2
- package/dist/utils/getLearningSpace.d.ts +0 -2
- package/dist/utils/getRedirectUrl.d.ts +0 -2
- package/dist/utils/helpers.d.ts +0 -22
- package/dist/utils/isLocalHost.d.ts +0 -2
- package/dist/utils/minutesToTimeSpan.d.ts +0 -2
- package/dist/utils/pusherTo.d.ts +0 -1
- package/dist/utils/times.d.ts +0 -6
- package/dist/utils/toISOString.d.ts +0 -2
- package/dist/utils/toLocalTime.d.ts +0 -1
- package/dist/utils/types/checkSuperUrl.d.ts +0 -1
- package/dist/utils/types.d.ts +0 -9
- package/dist/utils/utcToLocalTime.d.ts +0 -2
package/dist/index.js
CHANGED
@@ -12,19 +12,19 @@ var demo = require('@mui/x-date-pickers/internals/demo');
|
|
12
12
|
var React = require('react');
|
13
13
|
var React__default = _interopDefault(React);
|
14
14
|
var material = require('@mui/material');
|
15
|
-
var reactRedux = require('react-redux');
|
16
15
|
var moment = _interopDefault(require('moment'));
|
17
|
-
require('moment/locale/ko.js');
|
18
|
-
require('moment/locale/en-au.js');
|
19
|
-
var _$5 = _interopDefault(require('lodash'));
|
20
16
|
var fa = require('react-icons/fa');
|
21
17
|
var io = require('react-icons/io');
|
22
18
|
var io5 = require('react-icons/io5');
|
19
|
+
var reactRedux = require('react-redux');
|
23
20
|
var Select = require('react-select');
|
24
21
|
var Select__default = _interopDefault(Select);
|
25
22
|
var CreatableSelect = _interopDefault(require('react-select/creatable'));
|
26
23
|
var axios = _interopDefault(require('axios'));
|
24
|
+
var _$5 = _interopDefault(require('lodash'));
|
27
25
|
var reactGoogleLogin = require('@leecheuk/react-google-login');
|
26
|
+
require('moment/locale/ko.js');
|
27
|
+
require('moment/locale/en-au.js');
|
28
28
|
var formik = require('formik');
|
29
29
|
var reactVirtualized = require('react-virtualized');
|
30
30
|
var tinymce = _interopDefault(require('tinymce'));
|
@@ -821,7 +821,7 @@ var delete_users_csv = "사용자 CSV 삭제";
|
|
821
821
|
var are_you_sure_to_delete_users = "사용자를 삭제하시겠습니까?";
|
822
822
|
var enter_phone_number = "전화번호를 입력하세요";
|
823
823
|
var enter_school_name = "학교 이름을 입력하세요";
|
824
|
-
var enter_grade = "성적 입력";
|
824
|
+
var enter_grade = "성적 입력 (먼저 학교 이름을 입력하세요)";
|
825
825
|
var enter_major_name = "부서명을 입력하세요";
|
826
826
|
var enter_parent_name = "부모 이름을 입력하세요";
|
827
827
|
var enter_parent_phone_number = "부모 전화번호를 입력하세요";
|
@@ -1398,7 +1398,7 @@ var math = "수학";
|
|
1398
1398
|
var korea = "한국";
|
1399
1399
|
var fix_this_information_for_this_book = "이 책에 대한 정보 수정";
|
1400
1400
|
var slect_school = "학교를 선택하세요";
|
1401
|
-
var
|
1401
|
+
var elementary_school = "초등학교";
|
1402
1402
|
var middle_school = "중학교";
|
1403
1403
|
var high_school = "고등학교";
|
1404
1404
|
var question_type_search_keyword = "질문 유형 검색 키워드";
|
@@ -1423,6 +1423,18 @@ var current_correct_answer_entered = "현재 입력한 정답";
|
|
1423
1423
|
var correct_answer_is_required = "정답은 필수입니다.";
|
1424
1424
|
var cancel_2 = "취소하기";
|
1425
1425
|
var article_required = "기사가 필요합니다";
|
1426
|
+
var elementary_school_1st_grade = "초등학교 1학년";
|
1427
|
+
var elementary_school_2nd_grade = "초등학교 2학년";
|
1428
|
+
var elementary_school_3rd_grade = "초등학교 3학년";
|
1429
|
+
var elementary_school_4th_grade = "초등학교 4학년";
|
1430
|
+
var elementary_school_5th_grade = "초등학교 5학년";
|
1431
|
+
var elementary_school_6th_grade = "초등학교 6학년";
|
1432
|
+
var middle_school_1st_grade = "중학교 1학년";
|
1433
|
+
var middle_school_2nd_grade = "중학교 2학년";
|
1434
|
+
var middle_school_3rd_grade = "중학교 3학년";
|
1435
|
+
var high_school_1st_grade = "고등학교 1학년";
|
1436
|
+
var high_school_2nd_grade = "고등학교 2학년";
|
1437
|
+
var high_school_3rd_grade = "고등학교 3학년";
|
1426
1438
|
var lang_ko = {
|
1427
1439
|
problem_solving: problem_solving,
|
1428
1440
|
my_story: my_story,
|
@@ -2459,7 +2471,7 @@ var lang_ko = {
|
|
2459
2471
|
korea: korea,
|
2460
2472
|
fix_this_information_for_this_book: fix_this_information_for_this_book,
|
2461
2473
|
slect_school: slect_school,
|
2462
|
-
|
2474
|
+
elementary_school: elementary_school,
|
2463
2475
|
middle_school: middle_school,
|
2464
2476
|
high_school: high_school,
|
2465
2477
|
question_type_search_keyword: question_type_search_keyword,
|
@@ -2483,7 +2495,19 @@ var lang_ko = {
|
|
2483
2495
|
current_correct_answer_entered: current_correct_answer_entered,
|
2484
2496
|
correct_answer_is_required: correct_answer_is_required,
|
2485
2497
|
cancel_2: cancel_2,
|
2486
|
-
article_required: article_required
|
2498
|
+
article_required: article_required,
|
2499
|
+
elementary_school_1st_grade: elementary_school_1st_grade,
|
2500
|
+
elementary_school_2nd_grade: elementary_school_2nd_grade,
|
2501
|
+
elementary_school_3rd_grade: elementary_school_3rd_grade,
|
2502
|
+
elementary_school_4th_grade: elementary_school_4th_grade,
|
2503
|
+
elementary_school_5th_grade: elementary_school_5th_grade,
|
2504
|
+
elementary_school_6th_grade: elementary_school_6th_grade,
|
2505
|
+
middle_school_1st_grade: middle_school_1st_grade,
|
2506
|
+
middle_school_2nd_grade: middle_school_2nd_grade,
|
2507
|
+
middle_school_3rd_grade: middle_school_3rd_grade,
|
2508
|
+
high_school_1st_grade: high_school_1st_grade,
|
2509
|
+
high_school_2nd_grade: high_school_2nd_grade,
|
2510
|
+
high_school_3rd_grade: high_school_3rd_grade
|
2487
2511
|
};
|
2488
2512
|
|
2489
2513
|
var problem_solving$1 = "Problem Solving";
|
@@ -2987,7 +3011,7 @@ var delete_users_csv$1 = "Delete users csv";
|
|
2987
3011
|
var are_you_sure_to_delete_users$1 = "Are you sure to delete users?";
|
2988
3012
|
var enter_phone_number$1 = "Enter phone number";
|
2989
3013
|
var enter_school_name$1 = "Enter school name";
|
2990
|
-
var enter_grade$1 = "Enter grade";
|
3014
|
+
var enter_grade$1 = "Enter grade (please enter school name first)";
|
2991
3015
|
var enter_major_name$1 = "Enter department name";
|
2992
3016
|
var enter_parent_name$1 = "Enter parent name";
|
2993
3017
|
var enter_parent_phone_number$1 = "Enter parent phone number";
|
@@ -3542,7 +3566,7 @@ var math$1 = "Math";
|
|
3542
3566
|
var korea$1 = "Korea";
|
3543
3567
|
var fix_this_information_for_this_book$1 = "Fix this information for this book";
|
3544
3568
|
var slect_school$1 = "Select school";
|
3545
|
-
var
|
3569
|
+
var elementary_school$1 = "Elementary School";
|
3546
3570
|
var middle_school$1 = "Middle School";
|
3547
3571
|
var high_school$1 = "High School";
|
3548
3572
|
var question_type_search_keyword$1 = "Question type search keyword";
|
@@ -3567,6 +3591,18 @@ var current_correct_answer_entered$1 = "Current correct answer entered";
|
|
3567
3591
|
var correct_answer_is_required$1 = "Correct answer is required";
|
3568
3592
|
var cancel_2$1 = "Cancel";
|
3569
3593
|
var article_required$1 = "Article is required";
|
3594
|
+
var elementary_school_1st_grade$1 = "Elementary school 1st grade";
|
3595
|
+
var elementary_school_2nd_grade$1 = "Elementary school 2nd grade";
|
3596
|
+
var elementary_school_3rd_grade$1 = "Elementary school 3rd grade";
|
3597
|
+
var elementary_school_4th_grade$1 = "Elementary school 4th grade";
|
3598
|
+
var elementary_school_5th_grade$1 = "Elementary school 5th grade";
|
3599
|
+
var elementary_school_6th_grade$1 = "Elementary school th grade";
|
3600
|
+
var middle_school_1st_grade$1 = "Middle school 1st grade";
|
3601
|
+
var middle_school_2nd_grade$1 = "Middle school 2nd grade";
|
3602
|
+
var middle_school_3rd_grade$1 = "Middle school 3rd grade";
|
3603
|
+
var high_school_1st_grade$1 = "High school 1st grade";
|
3604
|
+
var high_school_2nd_grade$1 = "High school 2nd grade";
|
3605
|
+
var high_school_3rd_grade$1 = "High school 3rd grade";
|
3570
3606
|
var lang_en = {
|
3571
3607
|
problem_solving: problem_solving$1,
|
3572
3608
|
my_story: my_story$1,
|
@@ -4605,7 +4641,7 @@ var lang_en = {
|
|
4605
4641
|
korea: korea$1,
|
4606
4642
|
fix_this_information_for_this_book: fix_this_information_for_this_book$1,
|
4607
4643
|
slect_school: slect_school$1,
|
4608
|
-
|
4644
|
+
elementary_school: elementary_school$1,
|
4609
4645
|
middle_school: middle_school$1,
|
4610
4646
|
high_school: high_school$1,
|
4611
4647
|
question_type_search_keyword: question_type_search_keyword$1,
|
@@ -4629,7 +4665,19 @@ var lang_en = {
|
|
4629
4665
|
current_correct_answer_entered: current_correct_answer_entered$1,
|
4630
4666
|
correct_answer_is_required: correct_answer_is_required$1,
|
4631
4667
|
cancel_2: cancel_2$1,
|
4632
|
-
article_required: article_required$1
|
4668
|
+
article_required: article_required$1,
|
4669
|
+
elementary_school_1st_grade: elementary_school_1st_grade$1,
|
4670
|
+
elementary_school_2nd_grade: elementary_school_2nd_grade$1,
|
4671
|
+
elementary_school_3rd_grade: elementary_school_3rd_grade$1,
|
4672
|
+
elementary_school_4th_grade: elementary_school_4th_grade$1,
|
4673
|
+
elementary_school_5th_grade: elementary_school_5th_grade$1,
|
4674
|
+
elementary_school_6th_grade: elementary_school_6th_grade$1,
|
4675
|
+
middle_school_1st_grade: middle_school_1st_grade$1,
|
4676
|
+
middle_school_2nd_grade: middle_school_2nd_grade$1,
|
4677
|
+
middle_school_3rd_grade: middle_school_3rd_grade$1,
|
4678
|
+
high_school_1st_grade: high_school_1st_grade$1,
|
4679
|
+
high_school_2nd_grade: high_school_2nd_grade$1,
|
4680
|
+
high_school_3rd_grade: high_school_3rd_grade$1
|
4633
4681
|
};
|
4634
4682
|
|
4635
4683
|
i18n__default.use(reactI18next.initReactI18next).init({
|
@@ -4648,30 +4696,488 @@ i18n__default.use(reactI18next.initReactI18next).init({
|
|
4648
4696
|
}
|
4649
4697
|
});
|
4650
4698
|
|
4651
|
-
|
4652
|
-
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4699
|
+
var PrintState;
|
4700
|
+
(function (PrintState) {
|
4701
|
+
PrintState[PrintState["Idling"] = 0] = "Idling";
|
4702
|
+
PrintState[PrintState["Stopped"] = 1] = "Stopped";
|
4703
|
+
PrintState[PrintState["Printing"] = 2] = "Printing";
|
4704
|
+
PrintState[PrintState["Paused"] = 3] = "Paused";
|
4705
|
+
})(PrintState || (PrintState = {}));
|
4706
|
+
|
4707
|
+
(function (PreparedType) {
|
4708
|
+
PreparedType[PreparedType["csat_past_questions"] = 1] = "csat_past_questions";
|
4709
|
+
PreparedType[PreparedType["official_mock_exam"] = 2] = "official_mock_exam";
|
4710
|
+
PreparedType[PreparedType["private_mock_exam"] = 3] = "private_mock_exam";
|
4711
|
+
})(exports.PreparedType || (exports.PreparedType = {}));
|
4712
|
+
|
4713
|
+
(function (ExamEvent) {
|
4714
|
+
ExamEvent["StartExam"] = "start-exam";
|
4715
|
+
ExamEvent["TerminateExam"] = "terminate-exam";
|
4716
|
+
ExamEvent["AddExtraDuration"] = "add-extra-duration-exam";
|
4717
|
+
ExamEvent["TeacherKickOutStudent"] = "teacher-kick-out-student";
|
4718
|
+
})(exports.ExamEvent || (exports.ExamEvent = {}));
|
4719
|
+
|
4720
|
+
(function (ExamStatus) {
|
4721
|
+
ExamStatus[ExamStatus["Default"] = 0] = "Default";
|
4722
|
+
ExamStatus[ExamStatus["Pending"] = 1] = "Pending";
|
4723
|
+
ExamStatus[ExamStatus["InProgress"] = 2] = "InProgress";
|
4724
|
+
ExamStatus[ExamStatus["Completed"] = 3] = "Completed";
|
4725
|
+
})(exports.ExamStatus || (exports.ExamStatus = {}));
|
4726
|
+
(function (QuestionAnswerType) {
|
4727
|
+
QuestionAnswerType[QuestionAnswerType["SingleChoice"] = 0] = "SingleChoice";
|
4728
|
+
QuestionAnswerType[QuestionAnswerType["MultipleChoice"] = 1] = "MultipleChoice";
|
4729
|
+
QuestionAnswerType[QuestionAnswerType["ShortAnswer"] = 2] = "ShortAnswer";
|
4730
|
+
})(exports.QuestionAnswerType || (exports.QuestionAnswerType = {}));
|
4731
|
+
|
4732
|
+
(function (OrderType) {
|
4733
|
+
OrderType["ASC"] = "ASC";
|
4734
|
+
OrderType["DESC"] = "DESC";
|
4735
|
+
})(exports.OrderType || (exports.OrderType = {}));
|
4736
|
+
|
4737
|
+
(function (RecentUserAction) {
|
4738
|
+
RecentUserAction["ViewedUser"] = "ViewedUser";
|
4739
|
+
RecentUserAction["ViewedQNA"] = "ViewedQNA";
|
4740
|
+
RecentUserAction["ViewedExamResult"] = "ViewedExamResult";
|
4741
|
+
RecentUserAction["PrintedExamResult"] = "PrintedExamResult";
|
4742
|
+
RecentUserAction["ViewedAttendance"] = "ViewedAttendance";
|
4743
|
+
})(exports.RecentUserAction || (exports.RecentUserAction = {}));
|
4744
|
+
|
4745
|
+
(function (UserSortColumn) {
|
4746
|
+
UserSortColumn["CreatedAt"] = "CreatedAt";
|
4747
|
+
UserSortColumn["FullName"] = "FullName";
|
4748
|
+
UserSortColumn["PhoneNumber"] = "PhoneNumber";
|
4749
|
+
UserSortColumn["Email"] = "Email";
|
4750
|
+
UserSortColumn["SchoolName"] = "SchoolName";
|
4751
|
+
UserSortColumn["Major"] = "Major";
|
4752
|
+
UserSortColumn["ParentName"] = "ParentName";
|
4753
|
+
UserSortColumn["ParentPhoneNumber"] = "ParentPhoneNumber";
|
4754
|
+
UserSortColumn["Grade"] = "Grade";
|
4755
|
+
})(exports.UserSortColumn || (exports.UserSortColumn = {}));
|
4756
|
+
|
4757
|
+
(function (SchoolType) {
|
4758
|
+
SchoolType[SchoolType["Default"] = 0] = "Default";
|
4759
|
+
SchoolType[SchoolType["Elementary"] = 1] = "Elementary";
|
4760
|
+
SchoolType[SchoolType["Middle"] = 2] = "Middle";
|
4761
|
+
SchoolType[SchoolType["High"] = 3] = "High";
|
4762
|
+
})(exports.SchoolType || (exports.SchoolType = {}));
|
4763
|
+
|
4764
|
+
var GOOGLE_RECAPTCHA_KEY = process.env.REACT_APP_GOOGLE_RECAPTCHA_KEY || "";
|
4765
|
+
var GOOGLE_CLIENT_ID = process.env.REACT_APP_GOOGLE_CLIENT_ID || "";
|
4766
|
+
var GOOGLE_RECAPTCHA_ID = process.env.REACT_APP_GOOGLE_RECAPTCHA_ID || "";
|
4767
|
+
var GOOGLE_RECAPTCHA_SECRET = process.env.REACT_APP_GOOGLE_RECAPTCHA_SECRET || "";
|
4768
|
+
var BASE_URL = process.env.REACT_APP_BASE_URL || "";
|
4769
|
+
var SUPER_ADMIN_BASE_URL = process.env.REACT_APP_SUPER_ADMIN_BASE_URL || "";
|
4770
|
+
var PUSHER_CONFIG = {
|
4771
|
+
cluster: process.env.REACT_APP_PUSHER_CONFIG_CLUSTER || "",
|
4772
|
+
key: process.env.REACT_APP_PUSHER_CONFIG_KEY || ""
|
4773
|
+
};
|
4774
|
+
var RELEASE_DATE = process.env.REACT_APP_RELEASE_VERSION || "";
|
4775
|
+
var ACCESS_TOKEN = "ACCESS_TOKEN";
|
4776
|
+
var ACADEMY_DOMAIN = "ACADEMY_DOMAIN";
|
4777
|
+
var LEARNING_SPACE = "LEARNING_SPACE";
|
4778
|
+
var REDIRECT_URL = "REDIRECT_URL";
|
4779
|
+
var PRE_REDIRECT_URL = "PRE_REDIRECT_URL";
|
4780
|
+
var LANGUAGE = "LANGUAGE";
|
4781
|
+
var AcademyHeaders = "Academy-Headers";
|
4782
|
+
var AcceptNoAcademy = "AcceptNoAcademy";
|
4783
|
+
var LanguageHeaders = "Accept-Language";
|
4784
|
+
var NoAcademyHeaders = "Accept-No-Academy";
|
4785
|
+
var DefaultErrorMessage = "an_unexpected_error_has_occurred";
|
4786
|
+
var DATE_MIN_VALUE = "0001-01-01T00:00:00+00:00";
|
4787
|
+
var DATE_TIME_MIN_VALUE = "0001-01-01T00:00:00";
|
4788
|
+
var EXAM_CHANNEL = "presence-exam-channel";
|
4789
|
+
var EXAM_STUDENT_CHANNEL = "EXAM-CHANNEL-{examCode}-STUDENT-{studentId}";
|
4790
|
+
(function (Role) {
|
4791
|
+
Role["Student"] = "Student";
|
4792
|
+
Role["Teacher"] = "Teacher";
|
4793
|
+
Role["Admin"] = "Admin";
|
4794
|
+
Role["AcademyAdmin"] = "AcademyAdmin";
|
4795
|
+
Role["AcademyAdminTeacher"] = "AcademyAdmin/Teacher";
|
4796
|
+
})(exports.Role || (exports.Role = {}));
|
4797
|
+
(function (Language) {
|
4798
|
+
Language["ko"] = "ko";
|
4799
|
+
Language["en"] = "en";
|
4800
|
+
})(exports.Language || (exports.Language = {}));
|
4801
|
+
var RecentUserActionNames = {
|
4802
|
+
ViewedUser: "viewed_user",
|
4803
|
+
ViewedQNA: "viewed_QNA",
|
4804
|
+
ViewedExamResult: "viewed_exam_result",
|
4805
|
+
PrintedExamResult: "printed_exam_result",
|
4806
|
+
ViewedAttendance: "viewed_attendance",
|
4807
|
+
UpdatedUser: "updated_user",
|
4808
|
+
CreatedNewUser: "created_new_user",
|
4809
|
+
ImportedUser: "imported_user",
|
4810
|
+
ImportedRemoveUser: "imported_remove_user",
|
4811
|
+
DeletedUser: "deleted_user",
|
4812
|
+
CompletedQNA: "completed_QNA",
|
4813
|
+
AnsweredQNA: "answered_QNA",
|
4814
|
+
RemoveMessageQNA: "remove_message_QNA",
|
4815
|
+
UpdateMessageQNA: "update_message_QNA",
|
4816
|
+
UpdatedAttendance: "updated_attendance",
|
4817
|
+
AddedTeacherToClass: "added_teacher_to_class",
|
4818
|
+
RemovedTeacherFromClass: "removed_teacher_from_class",
|
4819
|
+
AddedStudentToClass: "added_student_to_class",
|
4820
|
+
RemovedStudentFromClass: "removed_student_from_class"
|
4821
|
+
};
|
4822
|
+
var PrintHeaderClassName = "print-header";
|
4823
|
+
var PrintTitleClassName = "print-title";
|
4824
|
+
var PrintContentClassName = "print-content";
|
4825
|
+
var PrintContainerClassName = "print-container";
|
4826
|
+
var DEFAULT_PAGING_RESPONSE = {
|
4827
|
+
page: 0,
|
4828
|
+
limit: 0,
|
4829
|
+
totalItems: 0,
|
4830
|
+
totalPages: 0
|
4831
|
+
};
|
4832
|
+
var SCHOOL_OPTIONS = [{
|
4833
|
+
label: "elementary_school",
|
4834
|
+
value: exports.SchoolType.Elementary
|
4835
|
+
}, {
|
4836
|
+
label: "middle_school",
|
4837
|
+
value: exports.SchoolType.Middle
|
4838
|
+
}, {
|
4839
|
+
label: "high_school",
|
4840
|
+
value: exports.SchoolType.High
|
4841
|
+
}];
|
4842
|
+
var ELEMENTARY_GRADES = [{
|
4843
|
+
label: "elementary_school_1st_grade",
|
4844
|
+
value: 1
|
4845
|
+
}, {
|
4846
|
+
label: "elementary_school_2nd_grade",
|
4847
|
+
value: 2
|
4848
|
+
}, {
|
4849
|
+
label: "elementary_school_3rd_grade",
|
4850
|
+
value: 3
|
4851
|
+
}, {
|
4852
|
+
label: "elementary_school_4th_grade",
|
4853
|
+
value: 4
|
4854
|
+
}, {
|
4855
|
+
label: "elementary_school_5th_grade",
|
4856
|
+
value: 5
|
4857
|
+
}, {
|
4858
|
+
label: "elementary_school_6th_grade",
|
4859
|
+
value: 6
|
4860
|
+
}];
|
4861
|
+
var MIDDLE_GRADES = [{
|
4862
|
+
label: "middle_school_1st_grade",
|
4863
|
+
value: 1
|
4864
|
+
}, {
|
4865
|
+
label: "middle_school_2nd_grade",
|
4866
|
+
value: 2
|
4867
|
+
}, {
|
4868
|
+
label: "middle_school_3rd_grade",
|
4869
|
+
value: 3
|
4870
|
+
}];
|
4871
|
+
var HIGH_GRADES = [{
|
4872
|
+
label: "high_school_1st_grade",
|
4873
|
+
value: 1
|
4874
|
+
}, {
|
4875
|
+
label: "high_school_2nd_grade",
|
4876
|
+
value: 2
|
4877
|
+
}, {
|
4878
|
+
label: "high_school_3rd_grade",
|
4879
|
+
value: 3
|
4880
|
+
}];
|
4881
|
+
|
4882
|
+
var utcToLocalTime = (function (time, FORMAT) {
|
4883
|
+
if (time === DATE_MIN_VALUE || time === DATE_TIME_MIN_VALUE) return "";
|
4884
|
+
try {
|
4885
|
+
return moment.utc(time).local().format(FORMAT || "yyyy-MM-DD");
|
4886
|
+
} catch (_unused) {
|
4887
|
+
return "";
|
4888
|
+
}
|
4889
|
+
});
|
4890
|
+
|
4891
|
+
var TabList = [{
|
4892
|
+
label: "comprehensive_analysis",
|
4893
|
+
value: 0
|
4894
|
+
}, {
|
4895
|
+
label: "solution_order",
|
4896
|
+
value: 1
|
4897
|
+
}, {
|
4898
|
+
label: "compare_solution",
|
4899
|
+
value: 2
|
4900
|
+
}, {
|
4901
|
+
label: "problem_analysis",
|
4902
|
+
value: 3
|
4903
|
+
}];
|
4904
|
+
|
4905
|
+
var TOTAL = 3;
|
4906
|
+
var PrintExamView2 = function PrintExamView2(_ref) {
|
4907
|
+
var role = _ref.role,
|
4908
|
+
dataExamSession = _ref.dataExamSession;
|
4909
|
+
var _useTranslation = reactI18next.useTranslation(),
|
4910
|
+
t = _useTranslation.t;
|
4911
|
+
var isTeacher = exports.Role.Teacher === role;
|
4912
|
+
var dataProps = isTeacher ? dataExamSession.map(function (i) {
|
4913
|
+
return {
|
4914
|
+
studentId: i === null || i === void 0 ? void 0 : i.studentId,
|
4915
|
+
examSessionId: i === null || i === void 0 ? void 0 : i.examSessionId
|
4916
|
+
};
|
4917
|
+
}) : dataExamSession.map(function (i) {
|
4918
|
+
return {
|
4919
|
+
code: i === null || i === void 0 ? void 0 : i.code
|
4920
|
+
};
|
4921
|
+
});
|
4922
|
+
var _useState = React.useState(dataProps),
|
4923
|
+
data = _useState[0],
|
4924
|
+
setData = _useState[1];
|
4925
|
+
var _useState2 = React.useState([]),
|
4926
|
+
completed = _useState2[0],
|
4927
|
+
setCompleted = _useState2[1];
|
4928
|
+
var _useState3 = React.useState([]),
|
4929
|
+
inprogress = _useState3[0],
|
4930
|
+
setInProgress = _useState3[1];
|
4931
|
+
var _useState4 = React.useState(PrintState.Idling),
|
4932
|
+
state = _useState4[0],
|
4933
|
+
setState = _useState4[1];
|
4934
|
+
var _useState5 = React.useState([]),
|
4935
|
+
errorLinks = _useState5[0],
|
4936
|
+
setErrorLinks = _useState5[1];
|
4937
|
+
var _useState6 = React.useState([]),
|
4938
|
+
status = _useState6[0],
|
4939
|
+
setStatus = _useState6[1];
|
4940
|
+
var theme = material.useTheme();
|
4941
|
+
var handleChangeStatus = function handleChangeStatus(event) {
|
4942
|
+
if (event.target.checked) {
|
4943
|
+
setStatus(function (prev) {
|
4944
|
+
var _event$target;
|
4945
|
+
return [].concat(prev, [(_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value]);
|
4946
|
+
});
|
4947
|
+
} else setStatus(function (prev) {
|
4948
|
+
return prev === null || prev === void 0 ? void 0 : prev.filter(function (i) {
|
4949
|
+
var _event$target2;
|
4950
|
+
return i !== ((_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.value);
|
4951
|
+
});
|
4952
|
+
});
|
4953
|
+
};
|
4954
|
+
var handleProgressPrint = function handleProgressPrint() {
|
4955
|
+
setData(dataProps);
|
4956
|
+
setCompleted([]);
|
4957
|
+
setInProgress([]);
|
4958
|
+
setErrorLinks([]);
|
4959
|
+
setState(PrintState.Printing);
|
4960
|
+
};
|
4961
|
+
var print = function print(_ref2) {
|
4962
|
+
var examSessionId = _ref2.examSessionId,
|
4963
|
+
studentId = _ref2.studentId,
|
4964
|
+
code = _ref2.code;
|
4965
|
+
var width = 200;
|
4966
|
+
var height = 200;
|
4967
|
+
var left = window.screenX + window.outerWidth / 2 - width / 2;
|
4968
|
+
var top = window.screenY + window.outerHeight / 2 - height / 2;
|
4969
|
+
var url = isTeacher ? window.location.origin + "/teacher/exam-results/" + examSessionId + "/students/" + studentId + "/print?status=" + status.join(",") : window.location.origin + "/student/exam-results/" + code + "/print";
|
4970
|
+
var windowName = isTeacher ? "popup-" + examSessionId + "-" + studentId : "popup-" + code;
|
4971
|
+
var windowSpecs = "left=" + left + ",top=" + top + ",width=" + width + ",height=" + height + ",location=yes,resizable=yes,scrollbars=yes,status=yes";
|
4972
|
+
var childWindow = window.open(url, windowName, windowSpecs);
|
4973
|
+
if (childWindow == null) {
|
4974
|
+
setErrorLinks(function (prev) {
|
4975
|
+
return [].concat(prev, [{
|
4976
|
+
code: code,
|
4977
|
+
examSessionId: "" + examSessionId,
|
4978
|
+
studentId: "" + studentId,
|
4979
|
+
message: isTeacher ? "/teacher/exam-results/" + examSessionId + "/students/" + studentId + "/print?status=" + status.join(",") : "/student/exam-results/" + code + "/print"
|
4980
|
+
}]);
|
4981
|
+
});
|
4982
|
+
if (!isTeacher) {
|
4983
|
+
setData(function (es) {
|
4984
|
+
return [].concat(es.filter(function (i) {
|
4985
|
+
return i.code !== code;
|
4986
|
+
}));
|
4987
|
+
});
|
4988
|
+
} else {
|
4989
|
+
setData(function (es) {
|
4990
|
+
return [].concat(es.filter(function (i) {
|
4991
|
+
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
4992
|
+
}));
|
4993
|
+
});
|
4994
|
+
}
|
4995
|
+
return;
|
4656
4996
|
}
|
4657
|
-
|
4658
|
-
|
4659
|
-
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4665
|
-
|
4666
|
-
|
4667
|
-
|
4668
|
-
|
4997
|
+
if (!isTeacher) {
|
4998
|
+
setInProgress(function (es) {
|
4999
|
+
return [].concat(es.filter(function (i) {
|
5000
|
+
return i.code !== code;
|
5001
|
+
}), [{
|
5002
|
+
code: code
|
5003
|
+
}]);
|
5004
|
+
});
|
5005
|
+
setData(function (es) {
|
5006
|
+
return [].concat(es.filter(function (i) {
|
5007
|
+
return i.code !== code;
|
5008
|
+
}));
|
5009
|
+
});
|
5010
|
+
} else {
|
5011
|
+
setInProgress(function (es) {
|
5012
|
+
return [].concat(es.filter(function (i) {
|
5013
|
+
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5014
|
+
}), [{
|
5015
|
+
examSessionId: examSessionId,
|
5016
|
+
studentId: studentId
|
5017
|
+
}]);
|
5018
|
+
});
|
5019
|
+
setData(function (es) {
|
5020
|
+
return [].concat(es.filter(function (i) {
|
5021
|
+
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5022
|
+
}));
|
5023
|
+
});
|
5024
|
+
}
|
5025
|
+
window.addEventListener("message", function (event) {
|
5026
|
+
var isCheck = isTeacher ? event.data.examSessionId !== "" + examSessionId || event.data.studentId !== "" + studentId : event.data.code !== "" + code;
|
5027
|
+
if (event.origin !== window.location.origin || isCheck) {
|
5028
|
+
return;
|
5029
|
+
}
|
5030
|
+
if (event.data.succeed) {
|
5031
|
+
if (!isTeacher) {
|
5032
|
+
setCompleted(function (es) {
|
5033
|
+
return [].concat(es.filter(function (i) {
|
5034
|
+
return i.code !== code;
|
5035
|
+
}), [{
|
5036
|
+
code: code
|
5037
|
+
}]);
|
5038
|
+
});
|
5039
|
+
setInProgress(function (es) {
|
5040
|
+
return [].concat(es.filter(function (i) {
|
5041
|
+
return i.code !== code;
|
5042
|
+
}));
|
5043
|
+
});
|
5044
|
+
} else {
|
5045
|
+
setCompleted(function (es) {
|
5046
|
+
return [].concat(es.filter(function (i) {
|
5047
|
+
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5048
|
+
}), [{
|
5049
|
+
examSessionId: examSessionId,
|
5050
|
+
studentId: studentId
|
5051
|
+
}]);
|
5052
|
+
});
|
5053
|
+
setInProgress(function (es) {
|
5054
|
+
return [].concat(es.filter(function (i) {
|
5055
|
+
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5056
|
+
}));
|
5057
|
+
});
|
5058
|
+
}
|
5059
|
+
} else {
|
5060
|
+
setErrorLinks(function (prev) {
|
5061
|
+
var _event$data, _event$data2;
|
5062
|
+
return [].concat(prev, [{
|
5063
|
+
code: (_event$data = event.data) === null || _event$data === void 0 ? void 0 : _event$data.code,
|
5064
|
+
examSessionId: (_event$data2 = event.data) === null || _event$data2 === void 0 ? void 0 : _event$data2.examSessionId,
|
5065
|
+
studentId: "" + studentId,
|
5066
|
+
message: isTeacher ? "/teacher/exam-results/" + event.data.examSessionId + "/students/" + event.data.studentId + "/print?status=" + status.join(",") : "/student/exam-results/" + event.data.code + "/print"
|
5067
|
+
}]);
|
5068
|
+
});
|
5069
|
+
}
|
5070
|
+
childWindow === null || childWindow === void 0 ? void 0 : childWindow.close();
|
5071
|
+
});
|
5072
|
+
};
|
5073
|
+
React.useEffect(function () {
|
5074
|
+
if (inprogress.length < TOTAL && data.length > 0 && state === PrintState.Printing) {
|
5075
|
+
var item = data[0];
|
5076
|
+
print({
|
5077
|
+
examSessionId: item === null || item === void 0 ? void 0 : item.examSessionId,
|
5078
|
+
studentId: item === null || item === void 0 ? void 0 : item.studentId,
|
5079
|
+
code: item === null || item === void 0 ? void 0 : item.code
|
5080
|
+
});
|
5081
|
+
}
|
5082
|
+
}, [inprogress.length, completed.length, data.length, state, data]);
|
5083
|
+
return React__default.createElement(material.Container, null, state === PrintState.Idling ? React__default.createElement(material.Typography, null, t("total_number_of_selected_results") + ": ", " ", React__default.createElement("span", {
|
5084
|
+
className: "fw-bold"
|
5085
|
+
}, t("number_results", {
|
5086
|
+
number: ("" + data.length).padStart(2, "0")
|
5087
|
+
}))) : React__default.createElement(React.Fragment, null, React__default.createElement(material.Typography, null, t("completed") + ": ", React__default.createElement("span", {
|
5088
|
+
className: "fw-bold"
|
5089
|
+
}, t("number_results", {
|
5090
|
+
number: ("" + completed.length).padStart(2, "0")
|
5091
|
+
}))), React__default.createElement(material.Typography, null, t("in_progress") + ": ", React__default.createElement("span", {
|
5092
|
+
className: "fw-bold"
|
5093
|
+
}, t("number_results", {
|
5094
|
+
number: ("" + inprogress.length).padStart(2, "0")
|
5095
|
+
}))), React__default.createElement(material.Typography, null, t("remaining") + ": ", React__default.createElement("span", {
|
5096
|
+
className: "fw-bold"
|
5097
|
+
}, t("number_results", {
|
5098
|
+
number: ("" + data.length).padStart(2, "0")
|
5099
|
+
})))), !!errorLinks.length && React__default.createElement(material.Stack, {
|
5100
|
+
className: "mt-2"
|
5101
|
+
}, React__default.createElement(material.Typography, {
|
5102
|
+
fontWeight: 700
|
5103
|
+
}, t("download_failed"), ":"), Array.from(new Set(errorLinks)).map(function (i, index) {
|
5104
|
+
var _info$createdBy;
|
5105
|
+
var info = isTeacher ? dataExamSession.find(function (exam) {
|
5106
|
+
return "" + (exam === null || exam === void 0 ? void 0 : exam.examSessionId) === "" + (i === null || i === void 0 ? void 0 : i.examSessionId) && "" + (exam === null || exam === void 0 ? void 0 : exam.studentId) === "" + (i === null || i === void 0 ? void 0 : i.studentId);
|
5107
|
+
}) : dataExamSession.find(function (exam) {
|
5108
|
+
return (exam === null || exam === void 0 ? void 0 : exam.code) === (i === null || i === void 0 ? void 0 : i.code);
|
5109
|
+
});
|
5110
|
+
return React__default.createElement(material.Stack, {
|
5111
|
+
key: index,
|
5112
|
+
borderBottom: 1,
|
5113
|
+
borderColor: theme.palette.grey[500]
|
5114
|
+
}, React__default.createElement("a", {
|
5115
|
+
href: i.message,
|
5116
|
+
target: "_blank",
|
5117
|
+
rel: "noopener noreferrer"
|
5118
|
+
}, (info === null || info === void 0 ? void 0 : info.studentName) || (info === null || info === void 0 ? void 0 : (_info$createdBy = info.createdBy) === null || _info$createdBy === void 0 ? void 0 : _info$createdBy.fullName)), (info === null || info === void 0 ? void 0 : info.title) && React__default.createElement(material.Typography, null, t("exam") + ": " + (info === null || info === void 0 ? void 0 : info.title)), (info === null || info === void 0 ? void 0 : info.startTime) && React__default.createElement(material.Typography, null, t("start_time") + ": " + utcToLocalTime(info === null || info === void 0 ? void 0 : info.startTime, t("date_time_format"))));
|
5119
|
+
})), React__default.createElement(material.Stack, {
|
5120
|
+
direction: "column",
|
5121
|
+
className: "mt-3"
|
5122
|
+
}, React__default.createElement(material.Stack, null, React__default.createElement(material.Typography, {
|
5123
|
+
className: "fw-bold"
|
5124
|
+
}, React__default.createElement("span", {
|
5125
|
+
className: "text-danger me-1"
|
5126
|
+
}, "*"), t("your_browser_must"), ":"), React__default.createElement(material.List, {
|
5127
|
+
className: "ps-3 pt-0"
|
5128
|
+
}, React__default.createElement(material.ListItem, {
|
5129
|
+
disablePadding: true
|
5130
|
+
}, t("allowed_to_send_pop_ups_and_use_redirects")), React__default.createElement(material.ListItem, {
|
5131
|
+
disablePadding: true
|
5132
|
+
}, t("disable_ask_where_to_save_each_file_before_downloading")))), isTeacher && React__default.createElement(material.Stack, null, React__default.createElement(material.Typography, {
|
5133
|
+
fontWeight: 700
|
5134
|
+
}, t("choose_to_print"), ":"), React__default.createElement(material.FormGroup, {
|
5135
|
+
sx: {
|
5136
|
+
display: "flex",
|
5137
|
+
flexDirection: "row",
|
5138
|
+
gap: 1,
|
5139
|
+
flexWrap: "wrap"
|
5140
|
+
}
|
5141
|
+
}, TabList.map(function (_ref3, index) {
|
5142
|
+
var label = _ref3.label,
|
5143
|
+
value = _ref3.value;
|
5144
|
+
return React__default.createElement(material.FormControlLabel, {
|
5145
|
+
key: index,
|
5146
|
+
control: React__default.createElement(material.Checkbox, {
|
5147
|
+
onChange: handleChangeStatus,
|
5148
|
+
value: value,
|
5149
|
+
checked: status.some(function (i) {
|
5150
|
+
return i === value.toString();
|
5151
|
+
})
|
5152
|
+
}),
|
5153
|
+
label: t(label)
|
5154
|
+
});
|
5155
|
+
}))), React__default.createElement(material.Button, {
|
5156
|
+
className: "mt-3",
|
5157
|
+
variant: "contained",
|
5158
|
+
onClick: handleProgressPrint
|
5159
|
+
}, t("print_pdf"))));
|
5160
|
+
};
|
5161
|
+
|
5162
|
+
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","red_900":"#DB4D4D","green_support_900":"#3ACB46","yellow_900":"#FEAF06","purple_900":"#C3099A","btn-login-google":"_2HqmH","math-jax":"_3Pfdk","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"};
|
5163
|
+
|
5164
|
+
var config = {
|
5165
|
+
loader: {
|
5166
|
+
load: ["input/tex", "output/svg"]
|
4669
5167
|
}
|
4670
|
-
|
4671
|
-
|
4672
|
-
|
4673
|
-
return
|
4674
|
-
|
5168
|
+
};
|
5169
|
+
var MathJaxContainer = function MathJaxContainer(_ref) {
|
5170
|
+
var content = _ref.content;
|
5171
|
+
return React__default.createElement(betterReactMathjax.MathJaxContext, {
|
5172
|
+
config: config,
|
5173
|
+
asyncLoad: true
|
5174
|
+
}, React__default.createElement(betterReactMathjax.MathJax, {
|
5175
|
+
id: "" + styles["math-jax"],
|
5176
|
+
dangerouslySetInnerHTML: {
|
5177
|
+
__html: content
|
5178
|
+
}
|
5179
|
+
}));
|
5180
|
+
};
|
4675
5181
|
|
4676
5182
|
var LANGUAGES = [{
|
4677
5183
|
code: "ko",
|
@@ -4693,793 +5199,6 @@ var LANGUAGES = [{
|
|
4693
5199
|
var DEFAULT_LANGUAGE = LANGUAGES[0];
|
4694
5200
|
var LOGIN_URL = "/login";
|
4695
5201
|
|
4696
|
-
var pushTo = function pushTo(history, data, isReplace) {
|
4697
|
-
if (isReplace === void 0) {
|
4698
|
-
isReplace = false;
|
4699
|
-
}
|
4700
|
-
if (history.push && !isReplace || history.replace && isReplace) {
|
4701
|
-
!isReplace && history.push(data);
|
4702
|
-
isReplace && history.replace(data);
|
4703
|
-
} else history(data, {
|
4704
|
-
replace: isReplace
|
4705
|
-
});
|
4706
|
-
};
|
4707
|
-
|
4708
|
-
var canAccess = function canAccess(userRoles, componentRoles) {
|
4709
|
-
if (!Array.isArray(userRoles)) {
|
4710
|
-
return false;
|
4711
|
-
}
|
4712
|
-
if (Array.isArray(componentRoles)) {
|
4713
|
-
var intersects = userRoles.filter(function (i) {
|
4714
|
-
return componentRoles.includes(i);
|
4715
|
-
});
|
4716
|
-
return intersects.length > 0;
|
4717
|
-
}
|
4718
|
-
return true;
|
4719
|
-
};
|
4720
|
-
|
4721
|
-
var checkSuperUrl = function checkSuperUrl(superUrls, pathname) {
|
4722
|
-
return superUrls.some(function (i) {
|
4723
|
-
if (i.includes(":")) {
|
4724
|
-
var urls = i.split("/");
|
4725
|
-
var names = pathname.split("/");
|
4726
|
-
if (urls.length != names.length) return false;
|
4727
|
-
var isMatches = true;
|
4728
|
-
urls.forEach(function (u, index) {
|
4729
|
-
if (u != names[index] && !u.startsWith(":")) isMatches = false;
|
4730
|
-
});
|
4731
|
-
return isMatches;
|
4732
|
-
}
|
4733
|
-
return pathname.startsWith(i);
|
4734
|
-
});
|
4735
|
-
};
|
4736
|
-
|
4737
|
-
var GOOGLE_RECAPTCHA_KEY = process.env.REACT_APP_GOOGLE_RECAPTCHA_KEY || "";
|
4738
|
-
var GOOGLE_CLIENT_ID = process.env.REACT_APP_GOOGLE_CLIENT_ID || "";
|
4739
|
-
var GOOGLE_RECAPTCHA_ID = process.env.REACT_APP_GOOGLE_RECAPTCHA_ID || "";
|
4740
|
-
var GOOGLE_RECAPTCHA_SECRET = process.env.REACT_APP_GOOGLE_RECAPTCHA_SECRET || "";
|
4741
|
-
var BASE_URL = process.env.REACT_APP_BASE_URL || "";
|
4742
|
-
var SUPER_ADMIN_BASE_URL = process.env.REACT_APP_SUPER_ADMIN_BASE_URL || "";
|
4743
|
-
var PUSHER_CONFIG = {
|
4744
|
-
cluster: process.env.REACT_APP_PUSHER_CONFIG_CLUSTER || "",
|
4745
|
-
key: process.env.REACT_APP_PUSHER_CONFIG_KEY || ""
|
4746
|
-
};
|
4747
|
-
var RELEASE_DATE = process.env.REACT_APP_RELEASE_VERSION || "";
|
4748
|
-
var ACCESS_TOKEN = "ACCESS_TOKEN";
|
4749
|
-
var ACADEMY_DOMAIN = "ACADEMY_DOMAIN";
|
4750
|
-
var LEARNING_SPACE = "LEARNING_SPACE";
|
4751
|
-
var REDIRECT_URL = "REDIRECT_URL";
|
4752
|
-
var PRE_REDIRECT_URL = "PRE_REDIRECT_URL";
|
4753
|
-
var LANGUAGE = "LANGUAGE";
|
4754
|
-
var AcademyHeaders = "Academy-Headers";
|
4755
|
-
var AcceptNoAcademy = "AcceptNoAcademy";
|
4756
|
-
var LanguageHeaders = "Accept-Language";
|
4757
|
-
var NoAcademyHeaders = "Accept-No-Academy";
|
4758
|
-
var DefaultErrorMessage = "an_unexpected_error_has_occurred";
|
4759
|
-
var DATE_MIN_VALUE = "0001-01-01T00:00:00+00:00";
|
4760
|
-
var DATE_TIME_MIN_VALUE = "0001-01-01T00:00:00";
|
4761
|
-
var EXAM_CHANNEL = "presence-exam-channel";
|
4762
|
-
var EXAM_STUDENT_CHANNEL = "EXAM-CHANNEL-{examCode}-STUDENT-{studentId}";
|
4763
|
-
(function (Role) {
|
4764
|
-
Role["Student"] = "Student";
|
4765
|
-
Role["Teacher"] = "Teacher";
|
4766
|
-
Role["Admin"] = "Admin";
|
4767
|
-
Role["AcademyAdmin"] = "AcademyAdmin";
|
4768
|
-
Role["AcademyAdminTeacher"] = "AcademyAdmin/Teacher";
|
4769
|
-
})(exports.Role || (exports.Role = {}));
|
4770
|
-
(function (Language) {
|
4771
|
-
Language["ko"] = "ko";
|
4772
|
-
Language["en"] = "en";
|
4773
|
-
})(exports.Language || (exports.Language = {}));
|
4774
|
-
var RecentUserActionNames = {
|
4775
|
-
ViewedUser: "viewed_user",
|
4776
|
-
ViewedQNA: "viewed_QNA",
|
4777
|
-
ViewedExamResult: "viewed_exam_result",
|
4778
|
-
PrintedExamResult: "printed_exam_result",
|
4779
|
-
ViewedAttendance: "viewed_attendance",
|
4780
|
-
UpdatedUser: "updated_user",
|
4781
|
-
CreatedNewUser: "created_new_user",
|
4782
|
-
ImportedUser: "imported_user",
|
4783
|
-
ImportedRemoveUser: "imported_remove_user",
|
4784
|
-
DeletedUser: "deleted_user",
|
4785
|
-
CompletedQNA: "completed_QNA",
|
4786
|
-
AnsweredQNA: "answered_QNA",
|
4787
|
-
RemoveMessageQNA: "remove_message_QNA",
|
4788
|
-
UpdateMessageQNA: "update_message_QNA",
|
4789
|
-
UpdatedAttendance: "updated_attendance",
|
4790
|
-
AddedTeacherToClass: "added_teacher_to_class",
|
4791
|
-
RemovedTeacherFromClass: "removed_teacher_from_class",
|
4792
|
-
AddedStudentToClass: "added_student_to_class",
|
4793
|
-
RemovedStudentFromClass: "removed_student_from_class"
|
4794
|
-
};
|
4795
|
-
var PrintHeaderClassName = "print-header";
|
4796
|
-
var PrintTitleClassName = "print-title";
|
4797
|
-
var PrintContentClassName = "print-content";
|
4798
|
-
var PrintContainerClassName = "print-container";
|
4799
|
-
var DEFAULT_PAGING_RESPONSE = {
|
4800
|
-
page: 0,
|
4801
|
-
limit: 0,
|
4802
|
-
totalItems: 0,
|
4803
|
-
totalPages: 0
|
4804
|
-
};
|
4805
|
-
|
4806
|
-
var diffFromNow = (function (time, unitOfTime, targetTime) {
|
4807
|
-
if (time === DATE_MIN_VALUE || targetTime === DATE_MIN_VALUE) return 0;
|
4808
|
-
try {
|
4809
|
-
var now = !targetTime ? moment() : moment.utc(targetTime).local();
|
4810
|
-
return now.diff(moment.utc(time).local(), unitOfTime);
|
4811
|
-
} catch (_unused) {
|
4812
|
-
return "";
|
4813
|
-
}
|
4814
|
-
});
|
4815
|
-
|
4816
|
-
var encodeParams = (function (params) {
|
4817
|
-
return Object.keys(params).filter(function (key) {
|
4818
|
-
return params[key] || params[key] === 0 || params[key] === false;
|
4819
|
-
}).map(function (key) {
|
4820
|
-
if (Array.isArray(params[key])) {
|
4821
|
-
return params[key].map(function (i) {
|
4822
|
-
return encodeURIComponent(key) + "=" + encodeURIComponent(i);
|
4823
|
-
}).join('&');
|
4824
|
-
}
|
4825
|
-
return encodeURIComponent(key) + "=" + encodeURIComponent(params[key]);
|
4826
|
-
}).join('&');
|
4827
|
-
});
|
4828
|
-
|
4829
|
-
var formatTime = (function (time, ORIGINAL_FORMAT, FORMAT) {
|
4830
|
-
if (time === DATE_MIN_VALUE) return "";
|
4831
|
-
try {
|
4832
|
-
return moment(time, ORIGINAL_FORMAT).format(FORMAT || "yyyy-MM-DD");
|
4833
|
-
} catch (_unused) {
|
4834
|
-
return "";
|
4835
|
-
}
|
4836
|
-
});
|
4837
|
-
var compareTimeSpanFromMoment = function compareTimeSpanFromMoment(time1, time2) {
|
4838
|
-
var totalMinutes1 = time1.get("hour") * 60 + time1.get("minute");
|
4839
|
-
var totalMinutes2 = time2.get("hour") * 60 + time2.get("minute");
|
4840
|
-
return totalMinutes1 > totalMinutes2 ? 1 : totalMinutes1 < totalMinutes2 ? -1 : 0;
|
4841
|
-
};
|
4842
|
-
|
4843
|
-
var getAcademyDomain = function getAcademyDomain() {
|
4844
|
-
try {
|
4845
|
-
return localStorage.getItem(ACADEMY_DOMAIN);
|
4846
|
-
} catch (err) {
|
4847
|
-
return null;
|
4848
|
-
}
|
4849
|
-
};
|
4850
|
-
|
4851
|
-
var getAccessToken = (function () {
|
4852
|
-
try {
|
4853
|
-
return localStorage.getItem(ACCESS_TOKEN);
|
4854
|
-
} catch (err) {
|
4855
|
-
return null;
|
4856
|
-
}
|
4857
|
-
});
|
4858
|
-
|
4859
|
-
var getErrorMessage = function getErrorMessage(t, error, defaultErrorMessage) {
|
4860
|
-
var _error$response, _error$response$data, _error$response2, _error$response3, _error$response3$data;
|
4861
|
-
var errorMessage = error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : _error$response$data.title;
|
4862
|
-
if ((error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.status) === 500) return defaultErrorMessage || t(DefaultErrorMessage);
|
4863
|
-
if (typeof errorMessage === "string") return decodeURIComponent(errorMessage);
|
4864
|
-
errorMessage = (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : _error$response3$data.message);
|
4865
|
-
if (typeof errorMessage === "string") return errorMessage;
|
4866
|
-
return defaultErrorMessage || t(DefaultErrorMessage);
|
4867
|
-
};
|
4868
|
-
|
4869
|
-
var getLanguage = (function () {
|
4870
|
-
try {
|
4871
|
-
return localStorage.getItem(LANGUAGE);
|
4872
|
-
} catch (err) {
|
4873
|
-
return null;
|
4874
|
-
}
|
4875
|
-
});
|
4876
|
-
|
4877
|
-
var getRedirectUrl = function getRedirectUrl() {
|
4878
|
-
try {
|
4879
|
-
return localStorage.getItem(REDIRECT_URL);
|
4880
|
-
} catch (err) {
|
4881
|
-
return undefined;
|
4882
|
-
}
|
4883
|
-
};
|
4884
|
-
|
4885
|
-
var isLocalHost = Boolean(window.location.hostname === "localhost" || window.location.hostname === "[::1]" || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
|
4886
|
-
|
4887
|
-
var getLearningSpace = function getLearningSpace() {
|
4888
|
-
try {
|
4889
|
-
return localStorage.getItem(LEARNING_SPACE) === "true";
|
4890
|
-
} catch (err) {
|
4891
|
-
return false;
|
4892
|
-
}
|
4893
|
-
};
|
4894
|
-
|
4895
|
-
var minutesToTimeSpan = (function (time) {
|
4896
|
-
var h = Math.floor(time / 60);
|
4897
|
-
var m = time % 60;
|
4898
|
-
return h.toString().padStart(2, "0") + ":" + m.toString().padStart(2, "0") + ":00";
|
4899
|
-
});
|
4900
|
-
|
4901
|
-
var timAgo = function timAgo(date, t) {
|
4902
|
-
if (date === DATE_MIN_VALUE || date === DATE_TIME_MIN_VALUE) return '';
|
4903
|
-
var time = moment.utc(date).local();
|
4904
|
-
var days = moment().diff(time, 'days');
|
4905
|
-
if (days === 0) return t('less_than_a_day');
|
4906
|
-
var months = days / 30;
|
4907
|
-
var years = months / 12;
|
4908
|
-
if (years > 0) return years > 1 ? t('n_years_ago') : t("one_year_ago");
|
4909
|
-
if (months > 0) return months > 1 ? t('n_months_ago') : t("one_month_ago");
|
4910
|
-
return days > 1 ? t('n_days_ago') : t("one_day_ago");
|
4911
|
-
};
|
4912
|
-
|
4913
|
-
var toISOString = (function (time) {
|
4914
|
-
try {
|
4915
|
-
return moment(time).toISOString();
|
4916
|
-
} catch (_unused) {
|
4917
|
-
return "";
|
4918
|
-
}
|
4919
|
-
});
|
4920
|
-
|
4921
|
-
var toLocalTime = function toLocalTime(time, FORMAT) {
|
4922
|
-
if (time === DATE_MIN_VALUE || time === DATE_TIME_MIN_VALUE) return "";
|
4923
|
-
try {
|
4924
|
-
return moment.utc(time).local().format(FORMAT || "yyyy-MM-DD");
|
4925
|
-
} catch (_unused) {
|
4926
|
-
return "";
|
4927
|
-
}
|
4928
|
-
};
|
4929
|
-
|
4930
|
-
var utcToLocalTime = (function (time, FORMAT) {
|
4931
|
-
if (time === DATE_MIN_VALUE || time === DATE_TIME_MIN_VALUE) return "";
|
4932
|
-
try {
|
4933
|
-
return moment.utc(time).local().format(FORMAT || "yyyy-MM-DD");
|
4934
|
-
} catch (_unused) {
|
4935
|
-
return "";
|
4936
|
-
}
|
4937
|
-
});
|
4938
|
-
|
4939
|
-
var getLocalDayOfWeek = function getLocalDayOfWeek(utcDateTime, dayOfWeek) {
|
4940
|
-
var currentDayOfWeek = moment.utc(utcDateTime).weekday();
|
4941
|
-
var diff = dayOfWeek - currentDayOfWeek;
|
4942
|
-
if (diff < 0) diff += 7;
|
4943
|
-
return moment.utc(utcDateTime).add(diff, "days").local().weekday();
|
4944
|
-
};
|
4945
|
-
var getUtcDayOfWeek = function getUtcDayOfWeek(localDateTime, dayOfWeek) {
|
4946
|
-
var currentDayOfWeek = _$5.cloneDeep(localDateTime).local().weekday();
|
4947
|
-
var diff = dayOfWeek - currentDayOfWeek;
|
4948
|
-
if (diff < 0) diff += 7;
|
4949
|
-
return localDateTime.add(diff, "days").utc().weekday();
|
4950
|
-
};
|
4951
|
-
var timeSpanToLocalMoment = function timeSpanToLocalMoment(time, date) {
|
4952
|
-
if (!time) return null;
|
4953
|
-
var times = time.split(":");
|
4954
|
-
if (times.length !== 3) return null;
|
4955
|
-
var totalSeconds = +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
4956
|
-
var startOfDay = moment.utc(date).startOf("day");
|
4957
|
-
var dateTime = date ? startOfDay.add(totalSeconds, "seconds") : moment().startOf("day");
|
4958
|
-
if (date && dateTime.isBefore(moment.utc(date))) dateTime = dateTime.add(1, "day");
|
4959
|
-
return dateTime.local();
|
4960
|
-
};
|
4961
|
-
var convertHHMMSStoSeconds = function convertHHMMSStoSeconds(time) {
|
4962
|
-
var times = time.split(":");
|
4963
|
-
return +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
4964
|
-
};
|
4965
|
-
var getRemainTime = function getRemainTime(startTime, duration) {
|
4966
|
-
var timePass = diffFromNow(startTime, "second");
|
4967
|
-
var durationInNumber = convertHHMMSStoSeconds(duration);
|
4968
|
-
if (typeof timePass !== "number") return null;
|
4969
|
-
if (timePass > durationInNumber) return 0;
|
4970
|
-
return durationInNumber - timePass;
|
4971
|
-
};
|
4972
|
-
|
4973
|
-
var formatDateTime = function formatDateTime(inputDate) {
|
4974
|
-
var date = new Date(inputDate);
|
4975
|
-
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
4976
|
-
var month = monthNames[date.getMonth()];
|
4977
|
-
var day = date.getDate();
|
4978
|
-
var year = date.getFullYear();
|
4979
|
-
var hour = (date.getHours() < 10 ? "0" : "") + date.getHours();
|
4980
|
-
var minute = (date.getMinutes() < 10 ? "0" : "") + date.getMinutes();
|
4981
|
-
var formattedDate = month + " " + day + ", " + year + " " + hour + ":" + minute;
|
4982
|
-
return formattedDate;
|
4983
|
-
};
|
4984
|
-
var ellipsisText = function ellipsisText(text, maxLength) {
|
4985
|
-
if (!text) return text;
|
4986
|
-
return (text === null || text === void 0 ? void 0 : text.length) > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
4987
|
-
};
|
4988
|
-
var getOrdinalSuffix = function getOrdinalSuffix(number, lang) {
|
4989
|
-
var suffixes = {
|
4990
|
-
en: ['th', 'st', 'nd', 'rd'],
|
4991
|
-
ko: ['']
|
4992
|
-
};
|
4993
|
-
switch (lang) {
|
4994
|
-
case 'en':
|
4995
|
-
var j = number % 10;
|
4996
|
-
var k = number % 100;
|
4997
|
-
if (j === 1 && k !== 11) {
|
4998
|
-
return suffixes.en[1];
|
4999
|
-
}
|
5000
|
-
if (j === 2 && k !== 12) {
|
5001
|
-
return suffixes.en[2];
|
5002
|
-
}
|
5003
|
-
if (j === 3 && k !== 13) {
|
5004
|
-
return suffixes.en[3];
|
5005
|
-
}
|
5006
|
-
return suffixes.en[0];
|
5007
|
-
case 'ko':
|
5008
|
-
return suffixes.ko[0];
|
5009
|
-
default:
|
5010
|
-
return '';
|
5011
|
-
}
|
5012
|
-
};
|
5013
|
-
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
5014
|
-
var uniqueCategories = new Set();
|
5015
|
-
var filterCategories = categories.filter(function (category) {
|
5016
|
-
if (!uniqueCategories.has(category.name)) {
|
5017
|
-
uniqueCategories.add(category.name);
|
5018
|
-
return true;
|
5019
|
-
}
|
5020
|
-
return false;
|
5021
|
-
});
|
5022
|
-
var questionsByCategory = filterCategories.map(function (category) {
|
5023
|
-
return {
|
5024
|
-
category: category,
|
5025
|
-
questions: inputData.questions.filter(function (question) {
|
5026
|
-
return question.category.name === category.name;
|
5027
|
-
})
|
5028
|
-
};
|
5029
|
-
});
|
5030
|
-
return questionsByCategory;
|
5031
|
-
};
|
5032
|
-
var formatTextbookDataMyAnswer = function formatTextbookDataMyAnswer(inputData, categories) {
|
5033
|
-
var uniqueCategories = new Set();
|
5034
|
-
var filterCategories = categories.filter(function (category) {
|
5035
|
-
if (!uniqueCategories.has(category.name)) {
|
5036
|
-
uniqueCategories.add(category.name);
|
5037
|
-
return true;
|
5038
|
-
}
|
5039
|
-
return false;
|
5040
|
-
});
|
5041
|
-
var questionsByCategory = filterCategories.map(function (category) {
|
5042
|
-
return {
|
5043
|
-
category: category,
|
5044
|
-
questions: inputData.studentQuestionResults.filter(function (question) {
|
5045
|
-
return !!question.categories.find(function (i) {
|
5046
|
-
return i.name === category.name;
|
5047
|
-
});
|
5048
|
-
})
|
5049
|
-
};
|
5050
|
-
});
|
5051
|
-
return questionsByCategory;
|
5052
|
-
};
|
5053
|
-
var totalSolveTimeCategories = function totalSolveTimeCategories(inputData, categories) {
|
5054
|
-
var uniqueCategories = new Set();
|
5055
|
-
var filterCategories = categories.filter(function (category) {
|
5056
|
-
if (!uniqueCategories.has(category.name)) {
|
5057
|
-
uniqueCategories.add(category.name);
|
5058
|
-
return true;
|
5059
|
-
}
|
5060
|
-
return false;
|
5061
|
-
});
|
5062
|
-
var questionsByCategory = filterCategories.map(function (category) {
|
5063
|
-
return _extends({}, category, {
|
5064
|
-
totalSolveTime: inputData.questions.reduce(function (init, question) {
|
5065
|
-
return question.category.name === category.name ? init += question.duration : init;
|
5066
|
-
}, 0)
|
5067
|
-
});
|
5068
|
-
});
|
5069
|
-
return questionsByCategory;
|
5070
|
-
};
|
5071
|
-
var totalTextbookSolveTimeCategories = function totalTextbookSolveTimeCategories(inputData, categories) {
|
5072
|
-
var uniqueCategories = new Set();
|
5073
|
-
var filterCategories = categories.filter(function (category) {
|
5074
|
-
if (!uniqueCategories.has(category.name)) {
|
5075
|
-
uniqueCategories.add(category.name);
|
5076
|
-
return true;
|
5077
|
-
}
|
5078
|
-
return false;
|
5079
|
-
});
|
5080
|
-
var questionsByCategory = filterCategories.map(function (category) {
|
5081
|
-
return _extends({}, category, {
|
5082
|
-
totalSolveTime: inputData.studentQuestionResults.reduce(function (init, question) {
|
5083
|
-
return !!question.categories.find(function (i) {
|
5084
|
-
return i.name === category.name;
|
5085
|
-
}) ? init += question.duration : init;
|
5086
|
-
}, 0)
|
5087
|
-
});
|
5088
|
-
});
|
5089
|
-
return questionsByCategory;
|
5090
|
-
};
|
5091
|
-
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
5092
|
-
duration = Math.round(duration);
|
5093
|
-
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
5094
|
-
mins: Math.floor(duration / 60),
|
5095
|
-
seconds: duration % 60
|
5096
|
-
}));
|
5097
|
-
};
|
5098
|
-
var formatRole = function formatRole(roles, t) {
|
5099
|
-
if (roles.includes(exports.Role.Admin)) return t("admin");
|
5100
|
-
if (roles.includes(exports.Role.AcademyAdminTeacher)) return t("academy_admin_teacher");
|
5101
|
-
if (roles.includes(exports.Role.AcademyAdmin)) return t("academy_admin");
|
5102
|
-
if (roles.includes(exports.Role.Teacher)) return t("teacher");
|
5103
|
-
if (roles.includes(exports.Role.Student)) return t("student");
|
5104
|
-
return "";
|
5105
|
-
};
|
5106
|
-
var getRole = function getRole(roles) {
|
5107
|
-
if (roles.includes(exports.Role.AcademyAdminTeacher)) return exports.Role.AcademyAdminTeacher;
|
5108
|
-
if (roles.includes(exports.Role.Admin)) return exports.Role.Admin;
|
5109
|
-
if (roles.includes(exports.Role.AcademyAdmin)) return exports.Role.AcademyAdmin;
|
5110
|
-
if (roles.includes(exports.Role.Teacher)) return exports.Role.Teacher;
|
5111
|
-
if (roles.includes(exports.Role.Student)) return exports.Role.Student;
|
5112
|
-
return null;
|
5113
|
-
};
|
5114
|
-
|
5115
|
-
var useLanguage = function useLanguage(history) {
|
5116
|
-
var dispatch = reactRedux.useDispatch();
|
5117
|
-
var _useTranslation = reactI18next.useTranslation(),
|
5118
|
-
i18n = _useTranslation.i18n;
|
5119
|
-
var _useState = React.useState(false),
|
5120
|
-
dropdownOpen = _useState[0],
|
5121
|
-
setDropdownOpen = _useState[1];
|
5122
|
-
var _useState2 = React.useState(),
|
5123
|
-
currentLanguage = _useState2[0],
|
5124
|
-
setCurrentLanguage = _useState2[1];
|
5125
|
-
var toggle = function toggle() {
|
5126
|
-
return setDropdownOpen(function (prevState) {
|
5127
|
-
return !prevState;
|
5128
|
-
});
|
5129
|
-
};
|
5130
|
-
var changeLanguageApp = function changeLanguageApp(languageItem) {
|
5131
|
-
var search = window.location.search;
|
5132
|
-
var searchParams = new URLSearchParams(search);
|
5133
|
-
if (!languageItem) {
|
5134
|
-
var _navigator$language, _navigator$language$s;
|
5135
|
-
var storedLanguage = getLanguage();
|
5136
|
-
var browserLanguage = (_navigator$language = navigator.language) === null || _navigator$language === void 0 ? void 0 : (_navigator$language$s = _navigator$language.split("-")) === null || _navigator$language$s === void 0 ? void 0 : _navigator$language$s[0];
|
5137
|
-
var defaultLanguageCode = storedLanguage || browserLanguage;
|
5138
|
-
languageItem = LANGUAGES.find(function (i) {
|
5139
|
-
return i.code === defaultLanguageCode;
|
5140
|
-
}) || currentLanguage || DEFAULT_LANGUAGE;
|
5141
|
-
}
|
5142
|
-
setCurrentLanguage(languageItem);
|
5143
|
-
i18n.changeLanguage(languageItem.code);
|
5144
|
-
moment.locale(languageItem.momentLangCode);
|
5145
|
-
localStorage.setItem(LANGUAGE, languageItem.code);
|
5146
|
-
dispatch(setLanguage(languageItem.code));
|
5147
|
-
if (window.location.pathname === LOGIN_URL) searchParams["delete"]("lang");else searchParams.set("lang", languageItem.code);
|
5148
|
-
pushTo(history, _extends({}, window.location, {
|
5149
|
-
search: searchParams.toString()
|
5150
|
-
}), true);
|
5151
|
-
};
|
5152
|
-
var handleChangeLanguageParam = function handleChangeLanguageParam() {
|
5153
|
-
var search = window.location.search;
|
5154
|
-
var searchParams = new URLSearchParams(search);
|
5155
|
-
var langParam = searchParams.get("lang");
|
5156
|
-
var languageItem = undefined;
|
5157
|
-
if (langParam) {
|
5158
|
-
var languageParamItem = LANGUAGES.find(function (i) {
|
5159
|
-
return i.code === langParam;
|
5160
|
-
});
|
5161
|
-
languageItem = languageParamItem || languageItem;
|
5162
|
-
}
|
5163
|
-
changeLanguageApp(languageItem);
|
5164
|
-
};
|
5165
|
-
var handleChangeItemLanguage = function handleChangeItemLanguage(lang) {
|
5166
|
-
var languageItem = LANGUAGES.find(function (i) {
|
5167
|
-
return i.code === lang;
|
5168
|
-
});
|
5169
|
-
changeLanguageApp(languageItem);
|
5170
|
-
};
|
5171
|
-
React.useEffect(function () {
|
5172
|
-
handleChangeLanguageParam();
|
5173
|
-
}, [window.location.pathname, window.location.search]);
|
5174
|
-
return {
|
5175
|
-
dropdownOpen: dropdownOpen,
|
5176
|
-
currentLanguage: currentLanguage,
|
5177
|
-
toggle: toggle,
|
5178
|
-
handleChangeItemLanguage: handleChangeItemLanguage
|
5179
|
-
};
|
5180
|
-
};
|
5181
|
-
|
5182
|
-
var PrintState;
|
5183
|
-
(function (PrintState) {
|
5184
|
-
PrintState[PrintState["Idling"] = 0] = "Idling";
|
5185
|
-
PrintState[PrintState["Stopped"] = 1] = "Stopped";
|
5186
|
-
PrintState[PrintState["Printing"] = 2] = "Printing";
|
5187
|
-
PrintState[PrintState["Paused"] = 3] = "Paused";
|
5188
|
-
})(PrintState || (PrintState = {}));
|
5189
|
-
|
5190
|
-
var TabList = [{
|
5191
|
-
label: "comprehensive_analysis",
|
5192
|
-
value: 0
|
5193
|
-
}, {
|
5194
|
-
label: "solution_order",
|
5195
|
-
value: 1
|
5196
|
-
}, {
|
5197
|
-
label: "compare_solution",
|
5198
|
-
value: 2
|
5199
|
-
}, {
|
5200
|
-
label: "problem_analysis",
|
5201
|
-
value: 3
|
5202
|
-
}];
|
5203
|
-
|
5204
|
-
var TOTAL = 3;
|
5205
|
-
var PrintExamView2 = function PrintExamView2(_ref) {
|
5206
|
-
var history = _ref.history,
|
5207
|
-
role = _ref.role,
|
5208
|
-
dataExamSession = _ref.dataExamSession;
|
5209
|
-
var _useTranslation = reactI18next.useTranslation(),
|
5210
|
-
t = _useTranslation.t;
|
5211
|
-
var isTeacher = exports.Role.Teacher === role;
|
5212
|
-
var dataProps = isTeacher ? dataExamSession.map(function (i) {
|
5213
|
-
return {
|
5214
|
-
studentId: i === null || i === void 0 ? void 0 : i.studentId,
|
5215
|
-
examSessionId: i === null || i === void 0 ? void 0 : i.examSessionId
|
5216
|
-
};
|
5217
|
-
}) : dataExamSession.map(function (i) {
|
5218
|
-
return {
|
5219
|
-
code: i === null || i === void 0 ? void 0 : i.code
|
5220
|
-
};
|
5221
|
-
});
|
5222
|
-
useLanguage(history);
|
5223
|
-
var _useState = React.useState(dataProps),
|
5224
|
-
data = _useState[0],
|
5225
|
-
setData = _useState[1];
|
5226
|
-
var _useState2 = React.useState([]),
|
5227
|
-
completed = _useState2[0],
|
5228
|
-
setCompleted = _useState2[1];
|
5229
|
-
var _useState3 = React.useState([]),
|
5230
|
-
inprogress = _useState3[0],
|
5231
|
-
setInProgress = _useState3[1];
|
5232
|
-
var _useState4 = React.useState(PrintState.Idling),
|
5233
|
-
state = _useState4[0],
|
5234
|
-
setState = _useState4[1];
|
5235
|
-
var _useState5 = React.useState([]),
|
5236
|
-
errorLinks = _useState5[0],
|
5237
|
-
setErrorLinks = _useState5[1];
|
5238
|
-
var _useState6 = React.useState([]),
|
5239
|
-
status = _useState6[0],
|
5240
|
-
setStatus = _useState6[1];
|
5241
|
-
var theme = material.useTheme();
|
5242
|
-
var handleChangeStatus = function handleChangeStatus(event) {
|
5243
|
-
if (event.target.checked) {
|
5244
|
-
setStatus(function (prev) {
|
5245
|
-
var _event$target;
|
5246
|
-
return [].concat(prev, [(_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value]);
|
5247
|
-
});
|
5248
|
-
} else setStatus(function (prev) {
|
5249
|
-
return prev === null || prev === void 0 ? void 0 : prev.filter(function (i) {
|
5250
|
-
var _event$target2;
|
5251
|
-
return i !== ((_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.value);
|
5252
|
-
});
|
5253
|
-
});
|
5254
|
-
};
|
5255
|
-
var handleProgressPrint = function handleProgressPrint() {
|
5256
|
-
setData(dataProps);
|
5257
|
-
setCompleted([]);
|
5258
|
-
setInProgress([]);
|
5259
|
-
setErrorLinks([]);
|
5260
|
-
setState(PrintState.Printing);
|
5261
|
-
};
|
5262
|
-
var print = function print(_ref2) {
|
5263
|
-
var examSessionId = _ref2.examSessionId,
|
5264
|
-
studentId = _ref2.studentId,
|
5265
|
-
code = _ref2.code;
|
5266
|
-
var width = 200;
|
5267
|
-
var height = 200;
|
5268
|
-
var left = window.screenX + window.outerWidth / 2 - width / 2;
|
5269
|
-
var top = window.screenY + window.outerHeight / 2 - height / 2;
|
5270
|
-
var url = isTeacher ? window.location.origin + "/teacher/exam-results/" + examSessionId + "/students/" + studentId + "/print?status=" + status.join(",") : window.location.origin + "/student/exam-results/" + code + "/print";
|
5271
|
-
var windowName = isTeacher ? "popup-" + examSessionId + "-" + studentId : "popup-" + code;
|
5272
|
-
var windowSpecs = "left=" + left + ",top=" + top + ",width=" + width + ",height=" + height + ",location=yes,resizable=yes,scrollbars=yes,status=yes";
|
5273
|
-
var childWindow = window.open(url, windowName, windowSpecs);
|
5274
|
-
if (childWindow == null) {
|
5275
|
-
setErrorLinks(function (prev) {
|
5276
|
-
return [].concat(prev, [{
|
5277
|
-
code: code,
|
5278
|
-
examSessionId: "" + examSessionId,
|
5279
|
-
studentId: "" + studentId,
|
5280
|
-
message: isTeacher ? "/teacher/exam-results/" + examSessionId + "/students/" + studentId + "/print?status=" + status.join(",") : "/student/exam-results/" + code + "/print"
|
5281
|
-
}]);
|
5282
|
-
});
|
5283
|
-
if (!isTeacher) {
|
5284
|
-
setData(function (es) {
|
5285
|
-
return [].concat(es.filter(function (i) {
|
5286
|
-
return i.code !== code;
|
5287
|
-
}));
|
5288
|
-
});
|
5289
|
-
} else {
|
5290
|
-
setData(function (es) {
|
5291
|
-
return [].concat(es.filter(function (i) {
|
5292
|
-
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5293
|
-
}));
|
5294
|
-
});
|
5295
|
-
}
|
5296
|
-
return;
|
5297
|
-
}
|
5298
|
-
if (!isTeacher) {
|
5299
|
-
setInProgress(function (es) {
|
5300
|
-
return [].concat(es.filter(function (i) {
|
5301
|
-
return i.code !== code;
|
5302
|
-
}), [{
|
5303
|
-
code: code
|
5304
|
-
}]);
|
5305
|
-
});
|
5306
|
-
setData(function (es) {
|
5307
|
-
return [].concat(es.filter(function (i) {
|
5308
|
-
return i.code !== code;
|
5309
|
-
}));
|
5310
|
-
});
|
5311
|
-
} else {
|
5312
|
-
setInProgress(function (es) {
|
5313
|
-
return [].concat(es.filter(function (i) {
|
5314
|
-
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5315
|
-
}), [{
|
5316
|
-
examSessionId: examSessionId,
|
5317
|
-
studentId: studentId
|
5318
|
-
}]);
|
5319
|
-
});
|
5320
|
-
setData(function (es) {
|
5321
|
-
return [].concat(es.filter(function (i) {
|
5322
|
-
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5323
|
-
}));
|
5324
|
-
});
|
5325
|
-
}
|
5326
|
-
window.addEventListener("message", function (event) {
|
5327
|
-
var isCheck = isTeacher ? event.data.examSessionId !== "" + examSessionId || event.data.studentId !== "" + studentId : event.data.code !== "" + code;
|
5328
|
-
if (event.origin !== window.location.origin || isCheck) {
|
5329
|
-
return;
|
5330
|
-
}
|
5331
|
-
if (event.data.succeed) {
|
5332
|
-
if (!isTeacher) {
|
5333
|
-
setCompleted(function (es) {
|
5334
|
-
return [].concat(es.filter(function (i) {
|
5335
|
-
return i.code !== code;
|
5336
|
-
}), [{
|
5337
|
-
code: code
|
5338
|
-
}]);
|
5339
|
-
});
|
5340
|
-
setInProgress(function (es) {
|
5341
|
-
return [].concat(es.filter(function (i) {
|
5342
|
-
return i.code !== code;
|
5343
|
-
}));
|
5344
|
-
});
|
5345
|
-
} else {
|
5346
|
-
setCompleted(function (es) {
|
5347
|
-
return [].concat(es.filter(function (i) {
|
5348
|
-
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5349
|
-
}), [{
|
5350
|
-
examSessionId: examSessionId,
|
5351
|
-
studentId: studentId
|
5352
|
-
}]);
|
5353
|
-
});
|
5354
|
-
setInProgress(function (es) {
|
5355
|
-
return [].concat(es.filter(function (i) {
|
5356
|
-
return i.examSessionId !== examSessionId || i.studentId !== studentId;
|
5357
|
-
}));
|
5358
|
-
});
|
5359
|
-
}
|
5360
|
-
} else {
|
5361
|
-
setErrorLinks(function (prev) {
|
5362
|
-
var _event$data, _event$data2;
|
5363
|
-
return [].concat(prev, [{
|
5364
|
-
code: (_event$data = event.data) === null || _event$data === void 0 ? void 0 : _event$data.code,
|
5365
|
-
examSessionId: (_event$data2 = event.data) === null || _event$data2 === void 0 ? void 0 : _event$data2.examSessionId,
|
5366
|
-
studentId: "" + studentId,
|
5367
|
-
message: isTeacher ? "/teacher/exam-results/" + event.data.examSessionId + "/students/" + event.data.studentId + "/print?status=" + status.join(",") : "/student/exam-results/" + event.data.code + "/print"
|
5368
|
-
}]);
|
5369
|
-
});
|
5370
|
-
}
|
5371
|
-
childWindow === null || childWindow === void 0 ? void 0 : childWindow.close();
|
5372
|
-
});
|
5373
|
-
};
|
5374
|
-
React.useEffect(function () {
|
5375
|
-
if (inprogress.length < TOTAL && data.length > 0 && state === PrintState.Printing) {
|
5376
|
-
var item = data[0];
|
5377
|
-
print({
|
5378
|
-
examSessionId: item === null || item === void 0 ? void 0 : item.examSessionId,
|
5379
|
-
studentId: item === null || item === void 0 ? void 0 : item.studentId,
|
5380
|
-
code: item === null || item === void 0 ? void 0 : item.code
|
5381
|
-
});
|
5382
|
-
}
|
5383
|
-
}, [inprogress.length, completed.length, data.length, state, data]);
|
5384
|
-
return React__default.createElement(material.Container, null, state === PrintState.Idling ? React__default.createElement(material.Typography, null, t("total_number_of_selected_results") + ": ", " ", React__default.createElement("span", {
|
5385
|
-
className: "fw-bold"
|
5386
|
-
}, t("number_results", {
|
5387
|
-
number: ("" + data.length).padStart(2, "0")
|
5388
|
-
}))) : React__default.createElement(React.Fragment, null, React__default.createElement(material.Typography, null, t("completed") + ": ", React__default.createElement("span", {
|
5389
|
-
className: "fw-bold"
|
5390
|
-
}, t("number_results", {
|
5391
|
-
number: ("" + completed.length).padStart(2, "0")
|
5392
|
-
}))), React__default.createElement(material.Typography, null, t("in_progress") + ": ", React__default.createElement("span", {
|
5393
|
-
className: "fw-bold"
|
5394
|
-
}, t("number_results", {
|
5395
|
-
number: ("" + inprogress.length).padStart(2, "0")
|
5396
|
-
}))), React__default.createElement(material.Typography, null, t("remaining") + ": ", React__default.createElement("span", {
|
5397
|
-
className: "fw-bold"
|
5398
|
-
}, t("number_results", {
|
5399
|
-
number: ("" + data.length).padStart(2, "0")
|
5400
|
-
})))), !!errorLinks.length && React__default.createElement(material.Stack, {
|
5401
|
-
className: "mt-2"
|
5402
|
-
}, React__default.createElement(material.Typography, {
|
5403
|
-
fontWeight: 700
|
5404
|
-
}, t("download_failed"), ":"), Array.from(new Set(errorLinks)).map(function (i, index) {
|
5405
|
-
var _info$createdBy;
|
5406
|
-
var info = isTeacher ? dataExamSession.find(function (exam) {
|
5407
|
-
return "" + (exam === null || exam === void 0 ? void 0 : exam.examSessionId) === "" + (i === null || i === void 0 ? void 0 : i.examSessionId) && "" + (exam === null || exam === void 0 ? void 0 : exam.studentId) === "" + (i === null || i === void 0 ? void 0 : i.studentId);
|
5408
|
-
}) : dataExamSession.find(function (exam) {
|
5409
|
-
return (exam === null || exam === void 0 ? void 0 : exam.code) === (i === null || i === void 0 ? void 0 : i.code);
|
5410
|
-
});
|
5411
|
-
return React__default.createElement(material.Stack, {
|
5412
|
-
key: index,
|
5413
|
-
borderBottom: 1,
|
5414
|
-
borderColor: theme.palette.grey[500]
|
5415
|
-
}, React__default.createElement("a", {
|
5416
|
-
href: i.message,
|
5417
|
-
target: "_blank",
|
5418
|
-
rel: "noopener noreferrer"
|
5419
|
-
}, (info === null || info === void 0 ? void 0 : info.studentName) || (info === null || info === void 0 ? void 0 : (_info$createdBy = info.createdBy) === null || _info$createdBy === void 0 ? void 0 : _info$createdBy.fullName)), (info === null || info === void 0 ? void 0 : info.title) && React__default.createElement(material.Typography, null, t("exam") + ": " + (info === null || info === void 0 ? void 0 : info.title)), (info === null || info === void 0 ? void 0 : info.startTime) && React__default.createElement(material.Typography, null, t("start_time") + ": " + utcToLocalTime(info === null || info === void 0 ? void 0 : info.startTime, t("date_time_format"))));
|
5420
|
-
})), React__default.createElement(material.Stack, {
|
5421
|
-
direction: "column",
|
5422
|
-
className: "mt-3"
|
5423
|
-
}, React__default.createElement(material.Stack, null, React__default.createElement(material.Typography, {
|
5424
|
-
className: "fw-bold"
|
5425
|
-
}, React__default.createElement("span", {
|
5426
|
-
className: "text-danger me-1"
|
5427
|
-
}, "*"), t("your_browser_must"), ":"), React__default.createElement(material.List, {
|
5428
|
-
className: "ps-3 pt-0"
|
5429
|
-
}, React__default.createElement(material.ListItem, {
|
5430
|
-
disablePadding: true
|
5431
|
-
}, t("allowed_to_send_pop_ups_and_use_redirects")), React__default.createElement(material.ListItem, {
|
5432
|
-
disablePadding: true
|
5433
|
-
}, t("disable_ask_where_to_save_each_file_before_downloading")))), isTeacher && React__default.createElement(material.Stack, null, React__default.createElement(material.Typography, {
|
5434
|
-
fontWeight: 700
|
5435
|
-
}, t("choose_to_print"), ":"), React__default.createElement(material.FormGroup, {
|
5436
|
-
sx: {
|
5437
|
-
display: "flex",
|
5438
|
-
flexDirection: "row",
|
5439
|
-
gap: 1,
|
5440
|
-
flexWrap: "wrap"
|
5441
|
-
}
|
5442
|
-
}, TabList.map(function (_ref3, index) {
|
5443
|
-
var label = _ref3.label,
|
5444
|
-
value = _ref3.value;
|
5445
|
-
return React__default.createElement(material.FormControlLabel, {
|
5446
|
-
key: index,
|
5447
|
-
control: React__default.createElement(material.Checkbox, {
|
5448
|
-
onChange: handleChangeStatus,
|
5449
|
-
value: value,
|
5450
|
-
checked: status.some(function (i) {
|
5451
|
-
return i === value.toString();
|
5452
|
-
})
|
5453
|
-
}),
|
5454
|
-
label: t(label)
|
5455
|
-
});
|
5456
|
-
}))), React__default.createElement(material.Button, {
|
5457
|
-
className: "mt-3",
|
5458
|
-
variant: "contained",
|
5459
|
-
onClick: handleProgressPrint
|
5460
|
-
}, t("print_pdf"))));
|
5461
|
-
};
|
5462
|
-
|
5463
|
-
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","red_900":"#DB4D4D","green_support_900":"#3ACB46","yellow_900":"#FEAF06","purple_900":"#C3099A","btn-login-google":"_2HqmH","math-jax":"_3Pfdk","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"};
|
5464
|
-
|
5465
|
-
var config = {
|
5466
|
-
loader: {
|
5467
|
-
load: ["input/tex", "output/svg"]
|
5468
|
-
}
|
5469
|
-
};
|
5470
|
-
var MathJaxContainer = function MathJaxContainer(_ref) {
|
5471
|
-
var content = _ref.content;
|
5472
|
-
return React__default.createElement(betterReactMathjax.MathJaxContext, {
|
5473
|
-
config: config,
|
5474
|
-
asyncLoad: true
|
5475
|
-
}, React__default.createElement(betterReactMathjax.MathJax, {
|
5476
|
-
id: "" + styles["math-jax"],
|
5477
|
-
dangerouslySetInnerHTML: {
|
5478
|
-
__html: content
|
5479
|
-
}
|
5480
|
-
}));
|
5481
|
-
};
|
5482
|
-
|
5483
5202
|
var ReleaseAlert = function ReleaseAlert() {
|
5484
5203
|
var _useTranslation = reactI18next.useTranslation(),
|
5485
5204
|
t = _useTranslation.t;
|
@@ -5553,11 +5272,9 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
5553
5272
|
};
|
5554
5273
|
|
5555
5274
|
var TITLE = "not_found";
|
5556
|
-
var NotFound = function NotFound(
|
5557
|
-
var history = _ref.history;
|
5275
|
+
var NotFound = function NotFound() {
|
5558
5276
|
var _useTranslation = reactI18next.useTranslation(),
|
5559
5277
|
t = _useTranslation.t;
|
5560
|
-
history && useLanguage(history);
|
5561
5278
|
React.useEffect(function () {
|
5562
5279
|
document.title = t("study_peak") + " | " + t(TITLE);
|
5563
5280
|
}, [t]);
|
@@ -5625,6 +5342,31 @@ var CommonDialog = function CommonDialog(_ref) {
|
|
5625
5342
|
}, title)), children);
|
5626
5343
|
};
|
5627
5344
|
|
5345
|
+
function _extends() {
|
5346
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
5347
|
+
for (var e = 1; e < arguments.length; e++) {
|
5348
|
+
var t = arguments[e];
|
5349
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
5350
|
+
}
|
5351
|
+
return n;
|
5352
|
+
}, _extends.apply(null, arguments);
|
5353
|
+
}
|
5354
|
+
function _objectDestructuringEmpty(t) {
|
5355
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
5356
|
+
}
|
5357
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
5358
|
+
if (null == r) return {};
|
5359
|
+
var t = {};
|
5360
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
5361
|
+
if (-1 !== e.indexOf(n)) continue;
|
5362
|
+
t[n] = r[n];
|
5363
|
+
}
|
5364
|
+
return t;
|
5365
|
+
}
|
5366
|
+
function _taggedTemplateLiteralLoose(e, t) {
|
5367
|
+
return t || (t = e.slice(0)), e.raw = t, e;
|
5368
|
+
}
|
5369
|
+
|
5628
5370
|
var confirmDialogTextStyle = {
|
5629
5371
|
color: "#363634",
|
5630
5372
|
fontSize: 16,
|
@@ -5988,6 +5730,7 @@ var customStyles = {
|
|
5988
5730
|
},
|
5989
5731
|
option: function option(baseStyles, state) {
|
5990
5732
|
return _extends({}, baseStyles, {
|
5733
|
+
zIndex: 999,
|
5991
5734
|
backgroundColor: state.isSelected ? styles.dark : state.isFocused ? styles.light : 'white',
|
5992
5735
|
"&:active": {
|
5993
5736
|
backgroundColor: state.isSelected ? styles.dark : state.isFocused ? styles.less_dark : baseStyles.backgroundColor
|
@@ -6108,8 +5851,7 @@ var CustomSelect = function CustomSelect(_ref) {
|
|
6108
5851
|
Option: CustomOption
|
6109
5852
|
},
|
6110
5853
|
styles: customStyles,
|
6111
|
-
placeholder: t("select_placeholder")
|
6112
|
-
menuPortalTarget: document.body
|
5854
|
+
placeholder: t("select_placeholder")
|
6113
5855
|
}, rest));
|
6114
5856
|
};
|
6115
5857
|
|
@@ -6211,124 +5953,415 @@ var AnswerCountSelector = function AnswerCountSelector(_ref) {
|
|
6211
5953
|
});
|
6212
5954
|
};
|
6213
5955
|
|
6214
|
-
var ArticleCategorySelector = function ArticleCategorySelector(_ref) {
|
6215
|
-
var id = _ref.id,
|
6216
|
-
value = _ref.value,
|
6217
|
-
optionValue = _ref.optionValue,
|
6218
|
-
onChange = _ref.onChange,
|
6219
|
-
isDisabled = _ref.isDisabled,
|
6220
|
-
options = _ref.options,
|
6221
|
-
isMulti = _ref.isMulti,
|
6222
|
-
placeholder = _ref.placeholder,
|
6223
|
-
rest = _ref.rest;
|
6224
|
-
var _useTranslation = reactI18next.useTranslation(),
|
6225
|
-
t = _useTranslation.t;
|
6226
|
-
return React__default.createElement(CustomSelect, Object.assign({
|
6227
|
-
isMulti: isMulti,
|
6228
|
-
inputId: id,
|
6229
|
-
value: value,
|
6230
|
-
options: options,
|
6231
|
-
onChange: onChange,
|
6232
|
-
isDisabled: isDisabled,
|
6233
|
-
placeholder: placeholder || t("select_category"),
|
6234
|
-
optionValue: optionValue
|
6235
|
-
}, rest));
|
5956
|
+
var ArticleCategorySelector = function ArticleCategorySelector(_ref) {
|
5957
|
+
var id = _ref.id,
|
5958
|
+
value = _ref.value,
|
5959
|
+
optionValue = _ref.optionValue,
|
5960
|
+
onChange = _ref.onChange,
|
5961
|
+
isDisabled = _ref.isDisabled,
|
5962
|
+
options = _ref.options,
|
5963
|
+
isMulti = _ref.isMulti,
|
5964
|
+
placeholder = _ref.placeholder,
|
5965
|
+
rest = _ref.rest;
|
5966
|
+
var _useTranslation = reactI18next.useTranslation(),
|
5967
|
+
t = _useTranslation.t;
|
5968
|
+
return React__default.createElement(CustomSelect, Object.assign({
|
5969
|
+
isMulti: isMulti,
|
5970
|
+
inputId: id,
|
5971
|
+
value: value,
|
5972
|
+
options: options,
|
5973
|
+
onChange: onChange,
|
5974
|
+
isDisabled: isDisabled,
|
5975
|
+
placeholder: placeholder || t("select_category"),
|
5976
|
+
optionValue: optionValue
|
5977
|
+
}, rest));
|
5978
|
+
};
|
5979
|
+
|
5980
|
+
// A type of promise-like that resolves synchronously and supports only one observer
|
5981
|
+
|
5982
|
+
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
5983
|
+
|
5984
|
+
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
5985
|
+
|
5986
|
+
// Asynchronously call a function and send errors to recovery continuation
|
5987
|
+
function _catch(body, recover) {
|
5988
|
+
try {
|
5989
|
+
var result = body();
|
5990
|
+
} catch(e) {
|
5991
|
+
return recover(e);
|
5992
|
+
}
|
5993
|
+
if (result && result.then) {
|
5994
|
+
return result.then(void 0, recover);
|
5995
|
+
}
|
5996
|
+
return result;
|
5997
|
+
}
|
5998
|
+
|
5999
|
+
// Asynchronously await a promise and pass the result to a finally continuation
|
6000
|
+
function _finallyRethrows(body, finalizer) {
|
6001
|
+
try {
|
6002
|
+
var result = body();
|
6003
|
+
} catch (e) {
|
6004
|
+
return finalizer(true, e);
|
6005
|
+
}
|
6006
|
+
if (result && result.then) {
|
6007
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
6008
|
+
}
|
6009
|
+
return finalizer(false, result);
|
6010
|
+
}
|
6011
|
+
|
6012
|
+
// Asynchronously await a promise and invoke a finally continuation that always overrides the result
|
6013
|
+
function _finally(body, finalizer) {
|
6014
|
+
try {
|
6015
|
+
var result = body();
|
6016
|
+
} catch (e) {
|
6017
|
+
return finalizer();
|
6018
|
+
}
|
6019
|
+
if (result && result.then) {
|
6020
|
+
return result.then(finalizer, finalizer);
|
6021
|
+
}
|
6022
|
+
return finalizer();
|
6023
|
+
}
|
6024
|
+
|
6025
|
+
var canAccess = function canAccess(userRoles, componentRoles) {
|
6026
|
+
if (!Array.isArray(userRoles)) {
|
6027
|
+
return false;
|
6028
|
+
}
|
6029
|
+
if (Array.isArray(componentRoles)) {
|
6030
|
+
var intersects = userRoles.filter(function (i) {
|
6031
|
+
return componentRoles.includes(i);
|
6032
|
+
});
|
6033
|
+
return intersects.length > 0;
|
6034
|
+
}
|
6035
|
+
return true;
|
6036
|
+
};
|
6037
|
+
|
6038
|
+
var checkSuperUrl = function checkSuperUrl(superUrls, pathname) {
|
6039
|
+
return superUrls.some(function (i) {
|
6040
|
+
if (i.includes(":")) {
|
6041
|
+
var urls = i.split("/");
|
6042
|
+
var names = pathname.split("/");
|
6043
|
+
if (urls.length != names.length) return false;
|
6044
|
+
var isMatches = true;
|
6045
|
+
urls.forEach(function (u, index) {
|
6046
|
+
if (u != names[index] && !u.startsWith(":")) isMatches = false;
|
6047
|
+
});
|
6048
|
+
return isMatches;
|
6049
|
+
}
|
6050
|
+
return pathname.startsWith(i);
|
6051
|
+
});
|
6052
|
+
};
|
6053
|
+
|
6054
|
+
var diffFromNow = (function (time, unitOfTime, targetTime) {
|
6055
|
+
if (time === DATE_MIN_VALUE || targetTime === DATE_MIN_VALUE) return 0;
|
6056
|
+
try {
|
6057
|
+
var now = !targetTime ? moment() : moment.utc(targetTime).local();
|
6058
|
+
return now.diff(moment.utc(time).local(), unitOfTime);
|
6059
|
+
} catch (_unused) {
|
6060
|
+
return "";
|
6061
|
+
}
|
6062
|
+
});
|
6063
|
+
|
6064
|
+
var encodeParams = (function (params) {
|
6065
|
+
return Object.keys(params).filter(function (key) {
|
6066
|
+
return params[key] || params[key] === 0 || params[key] === false;
|
6067
|
+
}).map(function (key) {
|
6068
|
+
if (Array.isArray(params[key])) {
|
6069
|
+
return params[key].map(function (i) {
|
6070
|
+
return encodeURIComponent(key) + "=" + encodeURIComponent(i);
|
6071
|
+
}).join('&');
|
6072
|
+
}
|
6073
|
+
return encodeURIComponent(key) + "=" + encodeURIComponent(params[key]);
|
6074
|
+
}).join('&');
|
6075
|
+
});
|
6076
|
+
|
6077
|
+
var formatTime = (function (time, ORIGINAL_FORMAT, FORMAT) {
|
6078
|
+
if (time === DATE_MIN_VALUE) return "";
|
6079
|
+
try {
|
6080
|
+
return moment(time, ORIGINAL_FORMAT).format(FORMAT || "yyyy-MM-DD");
|
6081
|
+
} catch (_unused) {
|
6082
|
+
return "";
|
6083
|
+
}
|
6084
|
+
});
|
6085
|
+
var compareTimeSpanFromMoment = function compareTimeSpanFromMoment(time1, time2) {
|
6086
|
+
var totalMinutes1 = time1.get("hour") * 60 + time1.get("minute");
|
6087
|
+
var totalMinutes2 = time2.get("hour") * 60 + time2.get("minute");
|
6088
|
+
return totalMinutes1 > totalMinutes2 ? 1 : totalMinutes1 < totalMinutes2 ? -1 : 0;
|
6089
|
+
};
|
6090
|
+
|
6091
|
+
var getAcademyDomain = function getAcademyDomain() {
|
6092
|
+
try {
|
6093
|
+
return localStorage.getItem(ACADEMY_DOMAIN);
|
6094
|
+
} catch (err) {
|
6095
|
+
return null;
|
6096
|
+
}
|
6236
6097
|
};
|
6237
6098
|
|
6238
|
-
|
6099
|
+
var getAccessToken = (function () {
|
6100
|
+
try {
|
6101
|
+
return localStorage.getItem(ACCESS_TOKEN);
|
6102
|
+
} catch (err) {
|
6103
|
+
return null;
|
6104
|
+
}
|
6105
|
+
});
|
6239
6106
|
|
6240
|
-
|
6107
|
+
var getErrorMessage = function getErrorMessage(t, error, defaultErrorMessage) {
|
6108
|
+
var _error$response, _error$response$data, _error$response2, _error$response3, _error$response3$data;
|
6109
|
+
var errorMessage = error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : _error$response$data.title;
|
6110
|
+
if ((error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.status) === 500) return defaultErrorMessage || t(DefaultErrorMessage);
|
6111
|
+
if (typeof errorMessage === "string") return decodeURIComponent(errorMessage);
|
6112
|
+
errorMessage = (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : _error$response3$data.message);
|
6113
|
+
if (typeof errorMessage === "string") return errorMessage;
|
6114
|
+
return defaultErrorMessage || t(DefaultErrorMessage);
|
6115
|
+
};
|
6241
6116
|
|
6242
|
-
|
6117
|
+
var getLanguage = (function () {
|
6118
|
+
try {
|
6119
|
+
return localStorage.getItem(LANGUAGE);
|
6120
|
+
} catch (err) {
|
6121
|
+
return null;
|
6122
|
+
}
|
6123
|
+
});
|
6243
6124
|
|
6244
|
-
|
6245
|
-
|
6246
|
-
|
6247
|
-
|
6248
|
-
|
6249
|
-
|
6250
|
-
|
6251
|
-
if (result && result.then) {
|
6252
|
-
return result.then(void 0, recover);
|
6253
|
-
}
|
6254
|
-
return result;
|
6255
|
-
}
|
6125
|
+
var getRedirectUrl = function getRedirectUrl() {
|
6126
|
+
try {
|
6127
|
+
return localStorage.getItem(REDIRECT_URL);
|
6128
|
+
} catch (err) {
|
6129
|
+
return undefined;
|
6130
|
+
}
|
6131
|
+
};
|
6256
6132
|
|
6257
|
-
|
6258
|
-
function _finallyRethrows(body, finalizer) {
|
6259
|
-
try {
|
6260
|
-
var result = body();
|
6261
|
-
} catch (e) {
|
6262
|
-
return finalizer(true, e);
|
6263
|
-
}
|
6264
|
-
if (result && result.then) {
|
6265
|
-
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
6266
|
-
}
|
6267
|
-
return finalizer(false, result);
|
6268
|
-
}
|
6133
|
+
var isLocalHost = Boolean(window.location.hostname === "localhost" || window.location.hostname === "[::1]" || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
|
6269
6134
|
|
6270
|
-
|
6271
|
-
|
6272
|
-
|
6273
|
-
|
6274
|
-
|
6275
|
-
|
6276
|
-
|
6277
|
-
if (result && result.then) {
|
6278
|
-
return result.then(finalizer, finalizer);
|
6279
|
-
}
|
6280
|
-
return finalizer();
|
6281
|
-
}
|
6135
|
+
var getLearningSpace = function getLearningSpace() {
|
6136
|
+
try {
|
6137
|
+
return localStorage.getItem(LEARNING_SPACE) === "true";
|
6138
|
+
} catch (err) {
|
6139
|
+
return false;
|
6140
|
+
}
|
6141
|
+
};
|
6282
6142
|
|
6283
|
-
(function (
|
6284
|
-
|
6285
|
-
|
6286
|
-
|
6287
|
-
})
|
6143
|
+
var minutesToTimeSpan = (function (time) {
|
6144
|
+
var h = Math.floor(time / 60);
|
6145
|
+
var m = time % 60;
|
6146
|
+
return h.toString().padStart(2, "0") + ":" + m.toString().padStart(2, "0") + ":00";
|
6147
|
+
});
|
6288
6148
|
|
6289
|
-
|
6290
|
-
|
6291
|
-
|
6292
|
-
|
6293
|
-
|
6294
|
-
|
6149
|
+
var pushTo = function pushTo(history, data, isReplace) {
|
6150
|
+
if (isReplace === void 0) {
|
6151
|
+
isReplace = false;
|
6152
|
+
}
|
6153
|
+
if (history.push && !isReplace || history.replace && isReplace) {
|
6154
|
+
!isReplace && history.push(data);
|
6155
|
+
isReplace && history.replace(data);
|
6156
|
+
} else history(data, {
|
6157
|
+
replace: isReplace
|
6158
|
+
});
|
6159
|
+
};
|
6295
6160
|
|
6296
|
-
|
6297
|
-
|
6298
|
-
|
6299
|
-
|
6300
|
-
|
6301
|
-
|
6302
|
-
|
6303
|
-
|
6304
|
-
|
6305
|
-
|
6306
|
-
}
|
6161
|
+
var timAgo = function timAgo(date, t) {
|
6162
|
+
if (date === DATE_MIN_VALUE || date === DATE_TIME_MIN_VALUE) return '';
|
6163
|
+
var time = moment.utc(date).local();
|
6164
|
+
var days = moment().diff(time, 'days');
|
6165
|
+
if (days === 0) return t('less_than_a_day');
|
6166
|
+
var months = days / 30;
|
6167
|
+
var years = months / 12;
|
6168
|
+
if (years > 0) return years > 1 ? t('n_years_ago') : t("one_year_ago");
|
6169
|
+
if (months > 0) return months > 1 ? t('n_months_ago') : t("one_month_ago");
|
6170
|
+
return days > 1 ? t('n_days_ago') : t("one_day_ago");
|
6171
|
+
};
|
6307
6172
|
|
6308
|
-
(function (
|
6309
|
-
|
6310
|
-
|
6311
|
-
}
|
6173
|
+
var toISOString = (function (time) {
|
6174
|
+
try {
|
6175
|
+
return moment(time).toISOString();
|
6176
|
+
} catch (_unused) {
|
6177
|
+
return "";
|
6178
|
+
}
|
6179
|
+
});
|
6312
6180
|
|
6313
|
-
|
6314
|
-
|
6315
|
-
|
6316
|
-
|
6317
|
-
|
6318
|
-
|
6319
|
-
}
|
6181
|
+
var toLocalTime = function toLocalTime(time, FORMAT) {
|
6182
|
+
if (time === DATE_MIN_VALUE || time === DATE_TIME_MIN_VALUE) return "";
|
6183
|
+
try {
|
6184
|
+
return moment.utc(time).local().format(FORMAT || "yyyy-MM-DD");
|
6185
|
+
} catch (_unused) {
|
6186
|
+
return "";
|
6187
|
+
}
|
6188
|
+
};
|
6320
6189
|
|
6321
|
-
|
6322
|
-
|
6323
|
-
|
6324
|
-
|
6325
|
-
|
6326
|
-
|
6327
|
-
|
6328
|
-
|
6329
|
-
|
6330
|
-
|
6331
|
-
|
6190
|
+
var getLocalDayOfWeek = function getLocalDayOfWeek(utcDateTime, dayOfWeek) {
|
6191
|
+
var currentDayOfWeek = moment.utc(utcDateTime).weekday();
|
6192
|
+
var diff = dayOfWeek - currentDayOfWeek;
|
6193
|
+
if (diff < 0) diff += 7;
|
6194
|
+
return moment.utc(utcDateTime).add(diff, "days").local().weekday();
|
6195
|
+
};
|
6196
|
+
var getUtcDayOfWeek = function getUtcDayOfWeek(localDateTime, dayOfWeek) {
|
6197
|
+
var currentDayOfWeek = _$5.cloneDeep(localDateTime).local().weekday();
|
6198
|
+
var diff = dayOfWeek - currentDayOfWeek;
|
6199
|
+
if (diff < 0) diff += 7;
|
6200
|
+
return localDateTime.add(diff, "days").utc().weekday();
|
6201
|
+
};
|
6202
|
+
var timeSpanToLocalMoment = function timeSpanToLocalMoment(time, date) {
|
6203
|
+
if (!time) return null;
|
6204
|
+
var times = time.split(":");
|
6205
|
+
if (times.length !== 3) return null;
|
6206
|
+
var totalSeconds = +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
6207
|
+
var startOfDay = moment.utc(date).startOf("day");
|
6208
|
+
var dateTime = date ? startOfDay.add(totalSeconds, "seconds") : moment().startOf("day");
|
6209
|
+
if (date && dateTime.isBefore(moment.utc(date))) dateTime = dateTime.add(1, "day");
|
6210
|
+
return dateTime.local();
|
6211
|
+
};
|
6212
|
+
var convertHHMMSStoSeconds = function convertHHMMSStoSeconds(time) {
|
6213
|
+
var times = time.split(":");
|
6214
|
+
return +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
6215
|
+
};
|
6216
|
+
var getRemainTime = function getRemainTime(startTime, duration) {
|
6217
|
+
var timePass = diffFromNow(startTime, "second");
|
6218
|
+
var durationInNumber = convertHHMMSStoSeconds(duration);
|
6219
|
+
if (typeof timePass !== "number") return null;
|
6220
|
+
if (timePass > durationInNumber) return 0;
|
6221
|
+
return durationInNumber - timePass;
|
6222
|
+
};
|
6223
|
+
|
6224
|
+
var formatDateTime = function formatDateTime(inputDate) {
|
6225
|
+
var date = new Date(inputDate);
|
6226
|
+
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
6227
|
+
var month = monthNames[date.getMonth()];
|
6228
|
+
var day = date.getDate();
|
6229
|
+
var year = date.getFullYear();
|
6230
|
+
var hour = (date.getHours() < 10 ? "0" : "") + date.getHours();
|
6231
|
+
var minute = (date.getMinutes() < 10 ? "0" : "") + date.getMinutes();
|
6232
|
+
var formattedDate = month + " " + day + ", " + year + " " + hour + ":" + minute;
|
6233
|
+
return formattedDate;
|
6234
|
+
};
|
6235
|
+
var ellipsisText = function ellipsisText(text, maxLength) {
|
6236
|
+
if (!text) return text;
|
6237
|
+
return (text === null || text === void 0 ? void 0 : text.length) > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
6238
|
+
};
|
6239
|
+
var getOrdinalSuffix = function getOrdinalSuffix(number, lang) {
|
6240
|
+
var suffixes = {
|
6241
|
+
en: ['th', 'st', 'nd', 'rd'],
|
6242
|
+
ko: ['']
|
6243
|
+
};
|
6244
|
+
switch (lang) {
|
6245
|
+
case 'en':
|
6246
|
+
var j = number % 10;
|
6247
|
+
var k = number % 100;
|
6248
|
+
if (j === 1 && k !== 11) {
|
6249
|
+
return suffixes.en[1];
|
6250
|
+
}
|
6251
|
+
if (j === 2 && k !== 12) {
|
6252
|
+
return suffixes.en[2];
|
6253
|
+
}
|
6254
|
+
if (j === 3 && k !== 13) {
|
6255
|
+
return suffixes.en[3];
|
6256
|
+
}
|
6257
|
+
return suffixes.en[0];
|
6258
|
+
case 'ko':
|
6259
|
+
return suffixes.ko[0];
|
6260
|
+
default:
|
6261
|
+
return '';
|
6262
|
+
}
|
6263
|
+
};
|
6264
|
+
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
6265
|
+
var uniqueCategories = new Set();
|
6266
|
+
var filterCategories = categories.filter(function (category) {
|
6267
|
+
if (!uniqueCategories.has(category.name)) {
|
6268
|
+
uniqueCategories.add(category.name);
|
6269
|
+
return true;
|
6270
|
+
}
|
6271
|
+
return false;
|
6272
|
+
});
|
6273
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6274
|
+
return {
|
6275
|
+
category: category,
|
6276
|
+
questions: inputData.questions.filter(function (question) {
|
6277
|
+
return question.category.name === category.name;
|
6278
|
+
})
|
6279
|
+
};
|
6280
|
+
});
|
6281
|
+
return questionsByCategory;
|
6282
|
+
};
|
6283
|
+
var formatTextbookDataMyAnswer = function formatTextbookDataMyAnswer(inputData, categories) {
|
6284
|
+
var uniqueCategories = new Set();
|
6285
|
+
var filterCategories = categories.filter(function (category) {
|
6286
|
+
if (!uniqueCategories.has(category.name)) {
|
6287
|
+
uniqueCategories.add(category.name);
|
6288
|
+
return true;
|
6289
|
+
}
|
6290
|
+
return false;
|
6291
|
+
});
|
6292
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6293
|
+
return {
|
6294
|
+
category: category,
|
6295
|
+
questions: inputData.studentQuestionResults.filter(function (question) {
|
6296
|
+
return !!question.categories.find(function (i) {
|
6297
|
+
return i.name === category.name;
|
6298
|
+
});
|
6299
|
+
})
|
6300
|
+
};
|
6301
|
+
});
|
6302
|
+
return questionsByCategory;
|
6303
|
+
};
|
6304
|
+
var totalSolveTimeCategories = function totalSolveTimeCategories(inputData, categories) {
|
6305
|
+
var uniqueCategories = new Set();
|
6306
|
+
var filterCategories = categories.filter(function (category) {
|
6307
|
+
if (!uniqueCategories.has(category.name)) {
|
6308
|
+
uniqueCategories.add(category.name);
|
6309
|
+
return true;
|
6310
|
+
}
|
6311
|
+
return false;
|
6312
|
+
});
|
6313
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6314
|
+
return _extends({}, category, {
|
6315
|
+
totalSolveTime: inputData.questions.reduce(function (init, question) {
|
6316
|
+
return question.category.name === category.name ? init += question.duration : init;
|
6317
|
+
}, 0)
|
6318
|
+
});
|
6319
|
+
});
|
6320
|
+
return questionsByCategory;
|
6321
|
+
};
|
6322
|
+
var totalTextbookSolveTimeCategories = function totalTextbookSolveTimeCategories(inputData, categories) {
|
6323
|
+
var uniqueCategories = new Set();
|
6324
|
+
var filterCategories = categories.filter(function (category) {
|
6325
|
+
if (!uniqueCategories.has(category.name)) {
|
6326
|
+
uniqueCategories.add(category.name);
|
6327
|
+
return true;
|
6328
|
+
}
|
6329
|
+
return false;
|
6330
|
+
});
|
6331
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6332
|
+
return _extends({}, category, {
|
6333
|
+
totalSolveTime: inputData.studentQuestionResults.reduce(function (init, question) {
|
6334
|
+
return !!question.categories.find(function (i) {
|
6335
|
+
return i.name === category.name;
|
6336
|
+
}) ? init += question.duration : init;
|
6337
|
+
}, 0)
|
6338
|
+
});
|
6339
|
+
});
|
6340
|
+
return questionsByCategory;
|
6341
|
+
};
|
6342
|
+
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
6343
|
+
duration = Math.round(duration);
|
6344
|
+
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
6345
|
+
mins: Math.floor(duration / 60),
|
6346
|
+
seconds: duration % 60
|
6347
|
+
}));
|
6348
|
+
};
|
6349
|
+
var formatRole = function formatRole(roles, t) {
|
6350
|
+
if (roles.includes(exports.Role.Admin)) return t("admin");
|
6351
|
+
if (roles.includes(exports.Role.AcademyAdminTeacher)) return t("academy_admin_teacher");
|
6352
|
+
if (roles.includes(exports.Role.AcademyAdmin)) return t("academy_admin");
|
6353
|
+
if (roles.includes(exports.Role.Teacher)) return t("teacher");
|
6354
|
+
if (roles.includes(exports.Role.Student)) return t("student");
|
6355
|
+
return "";
|
6356
|
+
};
|
6357
|
+
var getRole = function getRole(roles) {
|
6358
|
+
if (roles.includes(exports.Role.AcademyAdminTeacher)) return exports.Role.AcademyAdminTeacher;
|
6359
|
+
if (roles.includes(exports.Role.Admin)) return exports.Role.Admin;
|
6360
|
+
if (roles.includes(exports.Role.AcademyAdmin)) return exports.Role.AcademyAdmin;
|
6361
|
+
if (roles.includes(exports.Role.Teacher)) return exports.Role.Teacher;
|
6362
|
+
if (roles.includes(exports.Role.Student)) return exports.Role.Student;
|
6363
|
+
return null;
|
6364
|
+
};
|
6332
6365
|
|
6333
6366
|
var useAutoAcademyDomain = function useAutoAcademyDomain(_, history, superUrls, homeUrl, homeAcademyUrl, isAuthPage) {
|
6334
6367
|
if (isAuthPage === void 0) {
|
@@ -6516,6 +6549,78 @@ var useGoogleSignOut = function useGoogleSignOut(props) {
|
|
6516
6549
|
};
|
6517
6550
|
};
|
6518
6551
|
|
6552
|
+
var useLanguage = function useLanguage(history) {
|
6553
|
+
var language = reactRedux.useSelector(function (state) {
|
6554
|
+
var _state$common;
|
6555
|
+
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.language;
|
6556
|
+
});
|
6557
|
+
var dispatch = reactRedux.useDispatch();
|
6558
|
+
var _useTranslation = reactI18next.useTranslation(),
|
6559
|
+
i18n = _useTranslation.i18n;
|
6560
|
+
var _useState = React.useState(false),
|
6561
|
+
dropdownOpen = _useState[0],
|
6562
|
+
setDropdownOpen = _useState[1];
|
6563
|
+
var _useState2 = React.useState(),
|
6564
|
+
currentLanguage = _useState2[0],
|
6565
|
+
setCurrentLanguage = _useState2[1];
|
6566
|
+
var toggle = function toggle() {
|
6567
|
+
return setDropdownOpen(function (prevState) {
|
6568
|
+
return !prevState;
|
6569
|
+
});
|
6570
|
+
};
|
6571
|
+
var changeLanguageApp = function changeLanguageApp(languageItem) {
|
6572
|
+
var search = window.location.search;
|
6573
|
+
var searchParams = new URLSearchParams(search);
|
6574
|
+
if (!languageItem) {
|
6575
|
+
var _navigator$language, _navigator$language$s;
|
6576
|
+
var storedLanguage = getLanguage();
|
6577
|
+
var browserLanguage = (_navigator$language = navigator.language) === null || _navigator$language === void 0 ? void 0 : (_navigator$language$s = _navigator$language.split("-")) === null || _navigator$language$s === void 0 ? void 0 : _navigator$language$s[0];
|
6578
|
+
var defaultLanguageCode = storedLanguage || browserLanguage;
|
6579
|
+
languageItem = LANGUAGES.find(function (i) {
|
6580
|
+
return i.code === defaultLanguageCode;
|
6581
|
+
}) || currentLanguage || DEFAULT_LANGUAGE;
|
6582
|
+
}
|
6583
|
+
setCurrentLanguage(languageItem);
|
6584
|
+
i18n.changeLanguage(languageItem.code);
|
6585
|
+
moment.locale(languageItem.momentLangCode);
|
6586
|
+
localStorage.setItem(LANGUAGE, languageItem.code);
|
6587
|
+
dispatch(setLanguage(languageItem.code));
|
6588
|
+
if (window.location.pathname === LOGIN_URL) searchParams["delete"]("lang");else searchParams.set("lang", languageItem.code);
|
6589
|
+
pushTo(history, _extends({}, window.location, {
|
6590
|
+
search: searchParams.toString()
|
6591
|
+
}), true);
|
6592
|
+
};
|
6593
|
+
var handleChangeLanguageParam = function handleChangeLanguageParam() {
|
6594
|
+
var search = window.location.search;
|
6595
|
+
var searchParams = new URLSearchParams(search);
|
6596
|
+
var langParam = searchParams.get("lang");
|
6597
|
+
var languageItem = undefined;
|
6598
|
+
if (langParam) {
|
6599
|
+
var languageParamItem = LANGUAGES.find(function (i) {
|
6600
|
+
return i.code === langParam;
|
6601
|
+
});
|
6602
|
+
languageItem = languageParamItem || languageItem;
|
6603
|
+
}
|
6604
|
+
changeLanguageApp(languageItem);
|
6605
|
+
};
|
6606
|
+
var handleChangeItemLanguage = function handleChangeItemLanguage(lang) {
|
6607
|
+
var languageItem = LANGUAGES.find(function (i) {
|
6608
|
+
return i.code === lang;
|
6609
|
+
});
|
6610
|
+
changeLanguageApp(languageItem);
|
6611
|
+
};
|
6612
|
+
React.useEffect(function () {
|
6613
|
+
handleChangeLanguageParam();
|
6614
|
+
}, [window.location.pathname, window.location.search]);
|
6615
|
+
return {
|
6616
|
+
language: language,
|
6617
|
+
dropdownOpen: dropdownOpen,
|
6618
|
+
currentLanguage: currentLanguage,
|
6619
|
+
toggle: toggle,
|
6620
|
+
handleChangeItemLanguage: handleChangeItemLanguage
|
6621
|
+
};
|
6622
|
+
};
|
6623
|
+
|
6519
6624
|
var useList = function useList(fetchData, defaultQuery) {
|
6520
6625
|
var dispatch = reactRedux.useDispatch();
|
6521
6626
|
var _useState = React.useState(defaultQuery),
|
@@ -11046,7 +11151,6 @@ var Login = function Login(_ref) {
|
|
11046
11151
|
var isStudent = rest.role === exports.Role.Student;
|
11047
11152
|
var theme = material.useTheme();
|
11048
11153
|
var isMobileUp = material.useMediaQuery(theme.breakpoints.up("md"));
|
11049
|
-
useLanguage(history);
|
11050
11154
|
return React__default.createElement("div", {
|
11051
11155
|
className: styles["login"] + " font-family-lato"
|
11052
11156
|
}, React__default.createElement(material.Grid, {
|
@@ -11289,7 +11393,6 @@ function SignIn(_ref) {
|
|
11289
11393
|
homeAcademyUrl = _ref.homeAcademyUrl,
|
11290
11394
|
homeUrl = _ref.homeUrl,
|
11291
11395
|
registerUrl = _ref.registerUrl;
|
11292
|
-
useLanguage(history);
|
11293
11396
|
var _useTranslation = reactI18next.useTranslation(),
|
11294
11397
|
t = _useTranslation.t;
|
11295
11398
|
var _useLoginWithPassword = useLogin$2({
|
@@ -11748,6 +11851,7 @@ var UserClassSortBy;
|
|
11748
11851
|
(function (UserClassSortBy) {
|
11749
11852
|
UserClassSortBy["CreatedAt"] = "CreatedAt";
|
11750
11853
|
UserClassSortBy["PhoneNumber"] = "PhoneNumber";
|
11854
|
+
UserClassSortBy["ParentPhoneNumber"] = "ParentPhoneNumber";
|
11751
11855
|
UserClassSortBy["FullName"] = "FullName";
|
11752
11856
|
UserClassSortBy["Email"] = "Email";
|
11753
11857
|
})(UserClassSortBy || (UserClassSortBy = {}));
|
@@ -11786,7 +11890,22 @@ var CLASS_HEADERS = [{
|
|
11786
11890
|
}, {
|
11787
11891
|
title: "actions"
|
11788
11892
|
}];
|
11789
|
-
var
|
11893
|
+
var TEACHER_USER_HEADERS = [{
|
11894
|
+
title: "#"
|
11895
|
+
}, {
|
11896
|
+
title: "email",
|
11897
|
+
sortKey: exports.UserSortColumn.Email
|
11898
|
+
}, {
|
11899
|
+
title: "full_name",
|
11900
|
+
sortKey: exports.UserSortColumn.FullName
|
11901
|
+
}, {
|
11902
|
+
title: "phone_number",
|
11903
|
+
sortKey: exports.UserSortColumn.PhoneNumber
|
11904
|
+
}, {
|
11905
|
+
title: "created_at",
|
11906
|
+
sortKey: exports.UserSortColumn.CreatedAt
|
11907
|
+
}];
|
11908
|
+
var STUDENT_USER_HEADERS = [{
|
11790
11909
|
title: "#"
|
11791
11910
|
}, {
|
11792
11911
|
title: "email",
|
@@ -11797,6 +11916,9 @@ var USER_HEADERS = [{
|
|
11797
11916
|
}, {
|
11798
11917
|
title: "phone_number",
|
11799
11918
|
sortKey: exports.UserSortColumn.PhoneNumber
|
11919
|
+
}, {
|
11920
|
+
title: "parent_phone_number",
|
11921
|
+
sortKey: exports.UserSortColumn.ParentPhoneNumber
|
11800
11922
|
}, {
|
11801
11923
|
title: "created_at",
|
11802
11924
|
sortKey: exports.UserSortColumn.CreatedAt
|
@@ -11882,6 +12004,9 @@ var STUDENT_CLASS_HEADERS = [{
|
|
11882
12004
|
}, {
|
11883
12005
|
title: "phone_number",
|
11884
12006
|
sortKey: UserClassSortBy.PhoneNumber
|
12007
|
+
}, {
|
12008
|
+
title: "parent_phone_number",
|
12009
|
+
sortKey: UserClassSortBy.ParentPhoneNumber
|
11885
12010
|
}, {
|
11886
12011
|
title: "created_at",
|
11887
12012
|
sortKey: UserClassSortBy.CreatedAt
|
@@ -12497,7 +12622,7 @@ var StudentList = function StudentList(_ref) {
|
|
12497
12622
|
}))), React__default.createElement(material.TableBody, null, classList.map(function (i, index) {
|
12498
12623
|
return React__default.createElement(material.TableRow, {
|
12499
12624
|
key: i.id
|
12500
|
-
}, React__default.createElement(material.TableCell, null, (paging.page - 1) * paging.limit + index + 1), React__default.createElement(material.TableCell, null, i.studentName), React__default.createElement(material.TableCell, null, i.studentEmail), React__default.createElement(material.TableCell, null, i.studentPhoneNumber), React__default.createElement(material.TableCell, null, utcToLocalTime(i.studentCreatedAt, t("date_time_format"))), React__default.createElement(material.TableCell, null, formatRole(i.roles, t)), React__default.createElement(material.TableCell, null, React__default.createElement("div", {
|
12625
|
+
}, React__default.createElement(material.TableCell, null, (paging.page - 1) * paging.limit + index + 1), React__default.createElement(material.TableCell, null, i.studentName), React__default.createElement(material.TableCell, null, i.studentEmail), React__default.createElement(material.TableCell, null, i.studentPhoneNumber), React__default.createElement(material.TableCell, null, i.studentParentPhoneNumber), React__default.createElement(material.TableCell, null, utcToLocalTime(i.studentCreatedAt, t("date_time_format"))), React__default.createElement(material.TableCell, null, formatRole(i.roles, t)), React__default.createElement(material.TableCell, null, React__default.createElement("div", {
|
12501
12626
|
className: "d-flex"
|
12502
12627
|
}, React__default.createElement(material.IconButton, {
|
12503
12628
|
color: "default",
|
@@ -12563,6 +12688,7 @@ var SelectDialog = function SelectDialog(_ref) {
|
|
12563
12688
|
}
|
12564
12689
|
handleClear();
|
12565
12690
|
}, [open]);
|
12691
|
+
var USER_HEADERS = isStudent ? STUDENT_USER_HEADERS : TEACHER_USER_HEADERS;
|
12566
12692
|
return React__default.createElement(CommonDialog, {
|
12567
12693
|
open: open,
|
12568
12694
|
onClose: onClose,
|
@@ -12617,7 +12743,7 @@ var SelectDialog = function SelectDialog(_ref) {
|
|
12617
12743
|
},
|
12618
12744
|
color: "primary",
|
12619
12745
|
checked: isItemSelected
|
12620
|
-
})), React__default.createElement(material.TableCell, null, (paging.page - 1) * paging.limit + index + 1), React__default.createElement(material.TableCell, null, i === null || i === void 0 ? void 0 : i.studentEmail), React__default.createElement(material.TableCell, null, i === null || i === void 0 ? void 0 : i.studentName), React__default.createElement(material.TableCell, null, i === null || i === void 0 ? void 0 : i.studentPhoneNumber), React__default.createElement(material.TableCell, null, utcToLocalTime(i === null || i === void 0 ? void 0 : i.studentCreatedAt, t("date_time_format"))));
|
12746
|
+
})), React__default.createElement(material.TableCell, null, (paging.page - 1) * paging.limit + index + 1), React__default.createElement(material.TableCell, null, i === null || i === void 0 ? void 0 : i.studentEmail), React__default.createElement(material.TableCell, null, i === null || i === void 0 ? void 0 : i.studentName), React__default.createElement(material.TableCell, null, i === null || i === void 0 ? void 0 : i.studentPhoneNumber), React__default.createElement(material.TableCell, null, i === null || i === void 0 ? void 0 : i.studentParentPhoneNumber), React__default.createElement(material.TableCell, null, utcToLocalTime(i === null || i === void 0 ? void 0 : i.studentCreatedAt, t("date_time_format"))));
|
12621
12747
|
}) : userList.map(function (i, index) {
|
12622
12748
|
var isItemSelected = isSelected(i.teacherId);
|
12623
12749
|
return React__default.createElement(material.TableRow, {
|
@@ -21258,7 +21384,7 @@ var PrintExamResultView = function PrintExamResultView(_ref) {
|
|
21258
21384
|
})));
|
21259
21385
|
};
|
21260
21386
|
|
21261
|
-
var USER_HEADERS
|
21387
|
+
var USER_HEADERS = [{
|
21262
21388
|
title: "#",
|
21263
21389
|
roles: [exports.Role.Teacher, exports.Role.Admin]
|
21264
21390
|
}, {
|
@@ -21487,10 +21613,9 @@ var _excluded$a = ["ref"],
|
|
21487
21613
|
_excluded4 = ["ref"],
|
21488
21614
|
_excluded5 = ["ref"],
|
21489
21615
|
_excluded6 = ["ref"],
|
21490
|
-
_excluded7 = ["ref"]
|
21491
|
-
_excluded8 = ["ref"];
|
21616
|
+
_excluded7 = ["ref"];
|
21492
21617
|
var UserDialog = function UserDialog(_ref) {
|
21493
|
-
var _errors$fullName, _errors$fullName2, _errors$fullName3, _errors$email, _errors$email2, _errors$email3, _errors$phoneNumber, _errors$phoneNumber2, _errors$phoneNumber3, _errors$schoolName, _errors$schoolName2, _errors$schoolName3, _errors$subjectId, _errors$subjectId2, _errors$grade, _errors$grade2, _errors$
|
21618
|
+
var _errors$fullName, _errors$fullName2, _errors$fullName3, _errors$email, _errors$email2, _errors$email3, _errors$phoneNumber, _errors$phoneNumber2, _errors$phoneNumber3, _errors$schoolName, _errors$schoolName2, _errors$schoolName3, _errors$subjectId, _errors$subjectId2, _errors$grade, _errors$grade2, _errors$major, _errors$major2, _errors$major3, _errors$parentName, _errors$parentName2, _errors$parentName3, _errors$parentPhoneNu, _errors$parentPhoneNu2, _errors$parentPhoneNu3;
|
21494
21619
|
var open = _ref.open,
|
21495
21620
|
data = _ref.data,
|
21496
21621
|
disabled = _ref.disabled,
|
@@ -21506,6 +21631,7 @@ var UserDialog = function UserDialog(_ref) {
|
|
21506
21631
|
setValue = _useForm.setValue,
|
21507
21632
|
getValues = _useForm.getValues,
|
21508
21633
|
clearErrors = _useForm.clearErrors,
|
21634
|
+
watch = _useForm.watch,
|
21509
21635
|
errors = _useForm.formState.errors;
|
21510
21636
|
var _useTranslation = reactI18next.useTranslation(),
|
21511
21637
|
t = _useTranslation.t;
|
@@ -21521,18 +21647,15 @@ var UserDialog = function UserDialog(_ref) {
|
|
21521
21647
|
var _register4 = register("schoolName"),
|
21522
21648
|
schoolNameRef = _register4.ref,
|
21523
21649
|
schoolNameBio = _objectWithoutPropertiesLoose(_register4, _excluded4);
|
21524
|
-
var _register5 = register("
|
21525
|
-
|
21526
|
-
|
21527
|
-
var _register6 = register("
|
21528
|
-
|
21529
|
-
|
21530
|
-
var _register7 = register("
|
21531
|
-
|
21532
|
-
|
21533
|
-
var _register8 = register("parentPhoneNumber"),
|
21534
|
-
parentPhoneNumberRef = _register8.ref,
|
21535
|
-
parentPhoneNumberBio = _objectWithoutPropertiesLoose(_register8, _excluded8);
|
21650
|
+
var _register5 = register("major"),
|
21651
|
+
majorRef = _register5.ref,
|
21652
|
+
majorBio = _objectWithoutPropertiesLoose(_register5, _excluded5);
|
21653
|
+
var _register6 = register("parentName"),
|
21654
|
+
parentNameRef = _register6.ref,
|
21655
|
+
parentNameBio = _objectWithoutPropertiesLoose(_register6, _excluded6);
|
21656
|
+
var _register7 = register("parentPhoneNumber"),
|
21657
|
+
parentPhoneNumberRef = _register7.ref,
|
21658
|
+
parentPhoneNumberBio = _objectWithoutPropertiesLoose(_register7, _excluded7);
|
21536
21659
|
var _useState = React.useState([]),
|
21537
21660
|
roles = _useState[0],
|
21538
21661
|
setRoles = _useState[1];
|
@@ -21558,6 +21681,29 @@ var UserDialog = function UserDialog(_ref) {
|
|
21558
21681
|
isDefaultPassCodeChanged = _useState8[0],
|
21559
21682
|
setDefaultPassCodeChanged = _useState8[1];
|
21560
21683
|
var theme = material.useTheme();
|
21684
|
+
var gradeOptions = React.useMemo(function () {
|
21685
|
+
var _watch;
|
21686
|
+
var schoolName = (_watch = watch("schoolName")) === null || _watch === void 0 ? void 0 : _watch.trim();
|
21687
|
+
if (schoolName !== null && schoolName !== void 0 && schoolName.includes(t("middle_school")) || schoolName !== null && schoolName !== void 0 && schoolName.includes("중학교")) return MIDDLE_GRADES.map(function (i) {
|
21688
|
+
return _extends({}, i, {
|
21689
|
+
label: typeof i.label === "string" ? t(i.label) : i.label
|
21690
|
+
});
|
21691
|
+
});
|
21692
|
+
if (schoolName !== null && schoolName !== void 0 && schoolName.includes(t("high_school")) || schoolName !== null && schoolName !== void 0 && schoolName.includes("고등학교")) return HIGH_GRADES.map(function (i) {
|
21693
|
+
return _extends({}, i, {
|
21694
|
+
label: t(i.label)
|
21695
|
+
});
|
21696
|
+
});
|
21697
|
+
if (schoolName !== null && schoolName !== void 0 && schoolName.includes(t("elementary_school")) || schoolName !== null && schoolName !== void 0 && schoolName.includes("초등학교")) return ELEMENTARY_GRADES.map(function (i) {
|
21698
|
+
return _extends({}, i, {
|
21699
|
+
label: typeof i.label === "string" ? t(i.label) : i.label
|
21700
|
+
});
|
21701
|
+
});
|
21702
|
+
return [];
|
21703
|
+
}, [t, watch("schoolName")]);
|
21704
|
+
console.log({
|
21705
|
+
bang: watch("grade")
|
21706
|
+
});
|
21561
21707
|
var handleChangeRole = function handleChangeRole(role) {
|
21562
21708
|
setRoles([role]);
|
21563
21709
|
setValue("role", role);
|
@@ -21809,22 +21955,18 @@ var UserDialog = function UserDialog(_ref) {
|
|
21809
21955
|
className: "mb-1",
|
21810
21956
|
htmlFor: "grade",
|
21811
21957
|
text: t("grade")
|
21812
|
-
}), React__default.createElement(
|
21958
|
+
}), React__default.createElement(CustomSelect, {
|
21813
21959
|
id: "grade",
|
21814
21960
|
placeholder: t("enter_grade"),
|
21815
|
-
|
21816
|
-
|
21817
|
-
|
21818
|
-
|
21819
|
-
|
21820
|
-
|
21821
|
-
}
|
21822
|
-
}
|
21823
|
-
}, gradeBio, {
|
21824
|
-
error: !!((_errors$grade = errors.grade) !== null && _errors$grade !== void 0 && _errors$grade.message),
|
21961
|
+
options: gradeOptions,
|
21962
|
+
isClearable: false,
|
21963
|
+
value: watch("grade"),
|
21964
|
+
onChange: function onChange(value) {
|
21965
|
+
return setValue('grade', value === null || value === void 0 ? void 0 : value.value);
|
21966
|
+
},
|
21825
21967
|
disabled: disabled
|
21826
|
-
})
|
21827
|
-
text: t((_errors$
|
21968
|
+
}), ((_errors$grade = errors.grade) === null || _errors$grade === void 0 ? void 0 : _errors$grade.message) && React__default.createElement(ErrorHandler, {
|
21969
|
+
text: t((_errors$grade2 = errors.grade) === null || _errors$grade2 === void 0 ? void 0 : _errors$grade2.message)
|
21828
21970
|
}))), React__default.createElement(material.Grid, {
|
21829
21971
|
item: true,
|
21830
21972
|
xs: 6
|
@@ -22379,7 +22521,7 @@ var useUserList = function useUserList(role) {
|
|
22379
22521
|
React.useEffect(function () {
|
22380
22522
|
getUserById((selectedUser === null || selectedUser === void 0 ? void 0 : selectedUser.id) || 0);
|
22381
22523
|
}, [selectedUser === null || selectedUser === void 0 ? void 0 : selectedUser.id]);
|
22382
|
-
var userHeaders = USER_HEADERS
|
22524
|
+
var userHeaders = USER_HEADERS.filter(function (i) {
|
22383
22525
|
return i.roles.includes(role);
|
22384
22526
|
});
|
22385
22527
|
return {
|
@@ -25538,8 +25680,7 @@ var CreateExamDrawer = function CreateExamDrawer(props) {
|
|
25538
25680
|
|
25539
25681
|
var TextbookViewDetail = function TextbookViewDetail(props) {
|
25540
25682
|
var _textbook$chapters;
|
25541
|
-
var
|
25542
|
-
as = props.as,
|
25683
|
+
var as = props.as,
|
25543
25684
|
className = props.className,
|
25544
25685
|
onNavigateDetail = props.onNavigateDetail;
|
25545
25686
|
var _useTextbookDetail = useTextbookDetail(props),
|
@@ -25590,9 +25731,7 @@ var TextbookViewDetail = function TextbookViewDetail(props) {
|
|
25590
25731
|
}),
|
25591
25732
|
categoryOptions = _useCategorySelect.categoryOptions;
|
25592
25733
|
var Wrapper = as || material.Container;
|
25593
|
-
if (isNotFound || id && textbook.isPrepared) return React__default.createElement(NotFound,
|
25594
|
-
history: navigate
|
25595
|
-
});
|
25734
|
+
if (isNotFound || id && textbook.isPrepared) return React__default.createElement(NotFound, null);
|
25596
25735
|
return React__default.createElement(Wrapper, {
|
25597
25736
|
maxWidth: "xl",
|
25598
25737
|
className: "bg-white py-5 p-4 rounded-4 h-100 d-flex flex-column " + className
|
@@ -27309,7 +27448,7 @@ var useTextbookManagement = function useTextbookManagement(_ref) {
|
|
27309
27448
|
var SchoolType;
|
27310
27449
|
(function (SchoolType) {
|
27311
27450
|
SchoolType[SchoolType["Default"] = 0] = "Default";
|
27312
|
-
SchoolType[SchoolType["
|
27451
|
+
SchoolType[SchoolType["Elementary"] = 1] = "Elementary";
|
27313
27452
|
SchoolType[SchoolType["Middle"] = 2] = "Middle";
|
27314
27453
|
SchoolType[SchoolType["High"] = 3] = "High";
|
27315
27454
|
})(SchoolType || (SchoolType = {}));
|
@@ -27353,12 +27492,12 @@ var TextbookState;
|
|
27353
27492
|
TextbookState[TextbookState["Article"] = 3] = "Article";
|
27354
27493
|
})(TextbookState || (TextbookState = {}));
|
27355
27494
|
|
27356
|
-
var SCHOOL_OPTIONS = [{
|
27495
|
+
var SCHOOL_OPTIONS$1 = [{
|
27357
27496
|
label: "all",
|
27358
27497
|
value: SchoolType.Default
|
27359
27498
|
}, {
|
27360
|
-
label: "
|
27361
|
-
value: SchoolType.
|
27499
|
+
label: "elementary_school",
|
27500
|
+
value: SchoolType.Elementary
|
27362
27501
|
}, {
|
27363
27502
|
label: "middle_school",
|
27364
27503
|
value: SchoolType.Middle
|
@@ -27390,7 +27529,7 @@ var ELEMANTARY_GRADES = Array.from({
|
|
27390
27529
|
value: index
|
27391
27530
|
};
|
27392
27531
|
});
|
27393
|
-
var MIDDLE_GRADES = Array.from({
|
27532
|
+
var MIDDLE_GRADES$1 = Array.from({
|
27394
27533
|
length: 4
|
27395
27534
|
}, function (_, index) {
|
27396
27535
|
return {
|
@@ -27398,7 +27537,7 @@ var MIDDLE_GRADES = Array.from({
|
|
27398
27537
|
value: index
|
27399
27538
|
};
|
27400
27539
|
});
|
27401
|
-
var HIGH_GRADES = [{
|
27540
|
+
var HIGH_GRADES$1 = [{
|
27402
27541
|
label: "all",
|
27403
27542
|
value: HighSchoolGrade.Default
|
27404
27543
|
}, {
|
@@ -27755,8 +27894,8 @@ var ArticleBlock = function ArticleBlock(_ref) {
|
|
27755
27894
|
setFieldValue(path + ".categories", [val === null || val === void 0 ? void 0 : val.value]);
|
27756
27895
|
};
|
27757
27896
|
var handleChangeSubCategory = function handleChangeSubCategory(val) {
|
27758
|
-
setFieldValue(path + ".categoryOptions[1]",
|
27759
|
-
setFieldValue(path + ".categories[1]",
|
27897
|
+
setFieldValue(path + ".categoryOptions[1]", val);
|
27898
|
+
setFieldValue(path + ".categories[1]", val === null || val === void 0 ? void 0 : val.value);
|
27760
27899
|
};
|
27761
27900
|
return React__default.createElement(material.Stack, {
|
27762
27901
|
direction: "row",
|
@@ -29063,7 +29202,7 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29063
29202
|
}));
|
29064
29203
|
if (inputRef.current) inputRef.current.value = "";
|
29065
29204
|
};
|
29066
|
-
var schoolOptions = SCHOOL_OPTIONS.map(function (i) {
|
29205
|
+
var schoolOptions = SCHOOL_OPTIONS$1.map(function (i) {
|
29067
29206
|
return _extends({}, i, {
|
29068
29207
|
label: t(i.label)
|
29069
29208
|
});
|
@@ -29071,13 +29210,13 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29071
29210
|
var gradeOptions = React.useMemo(function () {
|
29072
29211
|
switch (filter === null || filter === void 0 ? void 0 : filter.schoolType) {
|
29073
29212
|
case SchoolType.Middle:
|
29074
|
-
return MIDDLE_GRADES.map(function (i) {
|
29213
|
+
return MIDDLE_GRADES$1.map(function (i) {
|
29075
29214
|
return _extends({}, i, {
|
29076
29215
|
label: typeof i.label === "string" ? t(i.label) : i.label
|
29077
29216
|
});
|
29078
29217
|
});
|
29079
29218
|
case SchoolType.High:
|
29080
|
-
return HIGH_GRADES.map(function (i) {
|
29219
|
+
return HIGH_GRADES$1.map(function (i) {
|
29081
29220
|
return _extends({}, i, {
|
29082
29221
|
label: t(i.label)
|
29083
29222
|
});
|
@@ -29122,7 +29261,7 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29122
29261
|
options: gradeOptions,
|
29123
29262
|
isClearable: false,
|
29124
29263
|
onChange: handleGradeChange
|
29125
|
-
})), (!(filter !== null && filter !== void 0 && filter.schoolType) || (filter === null || filter === void 0 ? void 0 : filter.schoolType) === SchoolType.
|
29264
|
+
})), (!(filter !== null && filter !== void 0 && filter.schoolType) || (filter === null || filter === void 0 ? void 0 : filter.schoolType) === SchoolType.Elementary) && React__default.createElement(material.FormGroup, {
|
29126
29265
|
sx: {
|
29127
29266
|
flexGrow: 1
|
29128
29267
|
}
|
@@ -29131,7 +29270,7 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29131
29270
|
options: semesterOptions,
|
29132
29271
|
isClearable: false,
|
29133
29272
|
onChange: handleSemesterChange
|
29134
|
-
})), (!(filter !== null && filter !== void 0 && filter.schoolType) || (filter === null || filter === void 0 ? void 0 : filter.schoolType) === SchoolType.
|
29273
|
+
})), (!(filter !== null && filter !== void 0 && filter.schoolType) || (filter === null || filter === void 0 ? void 0 : filter.schoolType) === SchoolType.Elementary) && React__default.createElement(material.FormGroup, {
|
29135
29274
|
sx: {
|
29136
29275
|
flexGrow: 1
|
29137
29276
|
}
|
@@ -29267,9 +29406,11 @@ var useTextbookOptions = function useTextbookOptions(subjectId, isMath, filter,
|
|
29267
29406
|
}
|
29268
29407
|
return isMath ? _temp(_getCategoryQuestionT) : Promise.resolve(isSuperAdmin ? getCategoryListAdminApi$1(_extends({}, questionTypeFilters, {
|
29269
29408
|
subjectId: subjectId,
|
29409
|
+
isRootCategory: true,
|
29270
29410
|
textSearch: (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value
|
29271
29411
|
})) : getCategoryListApi$1(_extends({}, questionTypeFilters, {
|
29272
29412
|
subjectId: subjectId,
|
29413
|
+
isRootCategory: true,
|
29273
29414
|
textSearch: (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.value
|
29274
29415
|
}))).then(_temp);
|
29275
29416
|
}
|
@@ -30172,6 +30313,7 @@ var convertResponseToRequest = function convertResponseToRequest(selectedTextboo
|
|
30172
30313
|
coverImage: selectedTextbook.coverImage || "",
|
30173
30314
|
textbookOwners: selectedTextbook.textbookOwners,
|
30174
30315
|
isPublic: selectedTextbook.isPublic || false,
|
30316
|
+
isShared: selectedTextbook.isShared || false,
|
30175
30317
|
isPrepared: true,
|
30176
30318
|
type: selectedTextbook.type,
|
30177
30319
|
chapters: selectedTextbook.chapters.map(function (c) {
|
@@ -30230,7 +30372,7 @@ var convertResponseToRequest = function convertResponseToRequest(selectedTextboo
|
|
30230
30372
|
questions: g.questions.map(function (q) {
|
30231
30373
|
var _q$questionType2;
|
30232
30374
|
return _extends({}, q, {
|
30233
|
-
questionTypeId: q.questionTypeId,
|
30375
|
+
questionTypeId: q.questionTypeId || q.questionType.id,
|
30234
30376
|
questionType: (_q$questionType2 = q.questionType) !== null && _q$questionType2 !== void 0 && _q$questionType2.id ? {
|
30235
30377
|
label: q.questionType.name,
|
30236
30378
|
value: q.questionType.id
|
@@ -30278,6 +30420,10 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
30278
30420
|
dirty = formikProps.dirty,
|
30279
30421
|
submitCount = formikProps.submitCount,
|
30280
30422
|
setValues = formikProps.setValues;
|
30423
|
+
console.log({
|
30424
|
+
values: values,
|
30425
|
+
errors: errors
|
30426
|
+
});
|
30281
30427
|
React.useEffect(function () {
|
30282
30428
|
var handleBeforeUnload = function handleBeforeUnload(event) {
|
30283
30429
|
var message = i18n.t("are_you_sure_you_want_to_quit_yours_changes_may_not_be_saved");
|
@@ -30422,7 +30568,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
30422
30568
|
sx: {
|
30423
30569
|
color: contentsErrors && submitCount ? error.main + "!important" : "gray"
|
30424
30570
|
}
|
30425
|
-
}, a11yProps(1))), React__default.createElement(material.Tab, Object.assign({
|
30571
|
+
}, a11yProps(1))), !(values !== null && values !== void 0 && values.isPublic) && (!isAdmin || textbookId) && (!textbookId || (values === null || values === void 0 ? void 0 : values.isShared)) && React__default.createElement(material.Tab, Object.assign({
|
30426
30572
|
label: i18n.t("textbook.owners"),
|
30427
30573
|
sx: {
|
30428
30574
|
color: textbookOwnersErrors && submitCount ? error.main + "!important" : "gray"
|
@@ -31579,7 +31725,7 @@ var ChapterDetail = function ChapterDetail(_ref) {
|
|
31579
31725
|
fontSize: "12px",
|
31580
31726
|
fontWeight: 600,
|
31581
31727
|
color: styles.gray_500
|
31582
|
-
}, chapter.totalChapterQuestions + " " + t("questions")), expanded ? React__default.createElement(io5.IoChevronUpOutline, {
|
31728
|
+
}, (chapter.totalChapterQuestions || 0) + " " + t("questions")), expanded ? React__default.createElement(io5.IoChevronUpOutline, {
|
31583
31729
|
onClick: handleToggleExpand
|
31584
31730
|
}) : React__default.createElement(io5.IoChevronDownOutline, {
|
31585
31731
|
onClick: handleToggleExpand
|
@@ -31630,7 +31776,7 @@ var ChapterDetail = function ChapterDetail(_ref) {
|
|
31630
31776
|
fontWeight: 600,
|
31631
31777
|
color: styles.gray_500
|
31632
31778
|
}, t("chapter_progress", {
|
31633
|
-
total: chapter === null || chapter === void 0 ? void 0 : chapter.totalChapterQuestions
|
31779
|
+
total: (chapter === null || chapter === void 0 ? void 0 : chapter.totalChapterQuestions) || 0
|
31634
31780
|
}))) : React__default.createElement(material.Stack, {
|
31635
31781
|
flexDirection: "row",
|
31636
31782
|
gap: "4px"
|
@@ -31639,7 +31785,7 @@ var ChapterDetail = function ChapterDetail(_ref) {
|
|
31639
31785
|
fontWeight: 600,
|
31640
31786
|
color: styles.gray_500
|
31641
31787
|
}, t("chapter_progress", {
|
31642
|
-
total: chapter === null || chapter === void 0 ? void 0 : chapter.totalChapterQuestions
|
31788
|
+
total: (chapter === null || chapter === void 0 ? void 0 : chapter.totalChapterQuestions) || 0
|
31643
31789
|
})), React__default.createElement(material.Typography, {
|
31644
31790
|
fontSize: "13px",
|
31645
31791
|
fontWeight: 600,
|
@@ -31852,7 +31998,7 @@ var Statistic = function Statistic(_ref) {
|
|
31852
31998
|
fontWeight: 600,
|
31853
31999
|
color: styles.gray_500
|
31854
32000
|
}, t("chapter_progress", {
|
31855
|
-
total: chapter === null || chapter === void 0 ? void 0 : chapter.totalChapterQuestions
|
32001
|
+
total: (chapter === null || chapter === void 0 ? void 0 : chapter.totalChapterQuestions) || 0
|
31856
32002
|
}))) : React__default.createElement(material.Stack, {
|
31857
32003
|
flexDirection: "row",
|
31858
32004
|
gap: "4px"
|
@@ -31861,7 +32007,7 @@ var Statistic = function Statistic(_ref) {
|
|
31861
32007
|
fontWeight: 600,
|
31862
32008
|
color: styles.gray_500
|
31863
32009
|
}, t("chapter_progress", {
|
31864
|
-
total: chapter === null || chapter === void 0 ? void 0 : chapter.totalChapterQuestions
|
32010
|
+
total: (chapter === null || chapter === void 0 ? void 0 : chapter.totalChapterQuestions) || 0
|
31865
32011
|
})), React__default.createElement(material.Typography, {
|
31866
32012
|
fontSize: "13px",
|
31867
32013
|
fontWeight: 600,
|
@@ -31912,7 +32058,7 @@ var Statistic = function Statistic(_ref) {
|
|
31912
32058
|
sx: {
|
31913
32059
|
width: "1px",
|
31914
32060
|
position: "absolute",
|
31915
|
-
left: (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 + "%",
|
32061
|
+
left: ((chapter.totalChapterQuestions || 0) != 0 ? (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 : 0) + "%",
|
31916
32062
|
background: styles.darker,
|
31917
32063
|
height: "100%"
|
31918
32064
|
}
|
@@ -31933,27 +32079,27 @@ var Statistic = function Statistic(_ref) {
|
|
31933
32079
|
}, React__default.createElement(material.Stack, {
|
31934
32080
|
sx: {
|
31935
32081
|
background: styles.dark,
|
31936
|
-
width: (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 + "%",
|
32082
|
+
width: ((chapter.totalChapterQuestions || 0) != 0 ? (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 : 0) + "%",
|
31937
32083
|
height: "100%"
|
31938
32084
|
}
|
31939
32085
|
}), React__default.createElement(material.Stack, {
|
31940
32086
|
sx: {
|
31941
32087
|
width: "1px",
|
31942
32088
|
position: "absolute",
|
31943
|
-
left: (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 + "%",
|
32089
|
+
left: ((chapter.totalChapterQuestions || 0) != 0 ? (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 : 0) + "%",
|
31944
32090
|
background: styles.darker,
|
31945
32091
|
height: "100%"
|
31946
32092
|
}
|
31947
32093
|
}), React__default.createElement(material.Stack, {
|
31948
32094
|
sx: {
|
31949
32095
|
position: "absolute",
|
31950
|
-
left: (chapter.
|
32096
|
+
left: (chapter.totalChapterQuestions || 0) != 0 ? (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 : ((chapter.totalChapterQuestions || 0) != 0 ? (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 : 0) + 5 + "%"
|
31951
32097
|
}
|
31952
32098
|
}, React__default.createElement(material.Typography, {
|
31953
32099
|
fontSize: "12px",
|
31954
32100
|
fontWeight: 500,
|
31955
32101
|
color: styles.darker
|
31956
|
-
}, ((chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100).toFixed(2) + "%")), React__default.createElement(material.Stack, {
|
32102
|
+
}, ((chapter.totalChapterQuestions || 0) != 0 ? (chapter.completedChapterQuestions || 0) / (chapter.totalChapterQuestions || 0) * 100 : 0).toFixed(2) + "%")), React__default.createElement(material.Stack, {
|
31957
32103
|
sx: {
|
31958
32104
|
width: "1px",
|
31959
32105
|
position: "absolute",
|
@@ -34066,7 +34212,6 @@ var Header = function Header(_ref) {
|
|
34066
34212
|
return language === exports.Language.en ? React__default.createElement(studentFullLogoEn, null) : React__default.createElement(studentFullLogoKo, null);
|
34067
34213
|
}
|
34068
34214
|
}, [isTeacherSide, language]);
|
34069
|
-
var pathname = location.pathname.toLowerCase();
|
34070
34215
|
return React__default.createElement(material.Stack, {
|
34071
34216
|
width: "100%",
|
34072
34217
|
display: "flex",
|
@@ -34097,41 +34242,43 @@ var Header = function Header(_ref) {
|
|
34097
34242
|
flexDirection: "row",
|
34098
34243
|
gap: '12px',
|
34099
34244
|
className: "" + styles["routerBox"]
|
34100
|
-
},
|
34101
|
-
|
34102
|
-
|
34103
|
-
|
34104
|
-
|
34105
|
-
|
34106
|
-
|
34107
|
-
|
34108
|
-
|
34109
|
-
|
34110
|
-
|
34111
|
-
|
34112
|
-
|
34113
|
-
|
34114
|
-
|
34115
|
-
|
34116
|
-
|
34117
|
-
|
34118
|
-
|
34119
|
-
|
34120
|
-
|
34121
|
-
|
34122
|
-
|
34123
|
-
|
34124
|
-
|
34125
|
-
|
34126
|
-
|
34127
|
-
|
34128
|
-
|
34129
|
-
|
34130
|
-
|
34131
|
-
|
34132
|
-
|
34133
|
-
|
34134
|
-
|
34245
|
+
}, React__default.createElement(ListView, {
|
34246
|
+
data: headerTabs,
|
34247
|
+
render: function render(data, index) {
|
34248
|
+
return React__default.createElement(HeaderLink, {
|
34249
|
+
key: index,
|
34250
|
+
data: data,
|
34251
|
+
render: function render(_ref2, isActive) {
|
34252
|
+
var path = _ref2.path,
|
34253
|
+
icon = _ref2.icon,
|
34254
|
+
label = _ref2.label;
|
34255
|
+
return React__default.createElement(Link, {
|
34256
|
+
key: path,
|
34257
|
+
"aria-current": "page",
|
34258
|
+
to: !isAcademy ? "#" : path,
|
34259
|
+
className: "text-decoration-none " + (isActive ? "" + styles["router-link-active"] : "") + " " + styles["tabText"] + " " + (!isAcademy ? styles["disabled-link"] : "")
|
34260
|
+
}, React__default.createElement(material.Stack, {
|
34261
|
+
sx: {
|
34262
|
+
justifyContent: "center",
|
34263
|
+
flexDirection: "row",
|
34264
|
+
alignItems: "center",
|
34265
|
+
textOverflow: "ellipsis",
|
34266
|
+
overflow: "hidden",
|
34267
|
+
display: "flex",
|
34268
|
+
flexWrap: "nowrap",
|
34269
|
+
padding: isActive ? "6px 12px" : "6px 24px"
|
34270
|
+
}
|
34271
|
+
}, icon, React__default.createElement(material.Typography, {
|
34272
|
+
sx: {
|
34273
|
+
textWrap: "nowrap",
|
34274
|
+
fontWeight: 700,
|
34275
|
+
fontSize: "14px",
|
34276
|
+
display: isActive ? 'block' : 'none'
|
34277
|
+
}
|
34278
|
+
}, t(label))));
|
34279
|
+
}
|
34280
|
+
});
|
34281
|
+
}
|
34135
34282
|
})), React__default.createElement(material.Stack, {
|
34136
34283
|
direction: "row",
|
34137
34284
|
alignItems: "center"
|
@@ -34154,6 +34301,17 @@ var Header = function Header(_ref) {
|
|
34154
34301
|
history: history
|
34155
34302
|
}))));
|
34156
34303
|
};
|
34304
|
+
var HeaderLink = function HeaderLink(_ref3) {
|
34305
|
+
var data = _ref3.data,
|
34306
|
+
render = _ref3.render;
|
34307
|
+
var activePaths = data.activePaths,
|
34308
|
+
path = data.path;
|
34309
|
+
var pathname = location.pathname.toLowerCase();
|
34310
|
+
var isActive = (activePaths === null || activePaths === void 0 ? void 0 : activePaths.some(function (a) {
|
34311
|
+
return pathname.startsWith(a);
|
34312
|
+
})) || pathname.startsWith(path);
|
34313
|
+
return React__default.createElement(React.Fragment, null, render(data, isActive));
|
34314
|
+
};
|
34157
34315
|
|
34158
34316
|
var useLayoutContext = function useLayoutContext(role, pusherRegisterUrls, showLoadingAcademy, domain) {
|
34159
34317
|
var _currentPusher$connec2;
|
@@ -34457,6 +34615,7 @@ exports.DATE_TIME_MIN_VALUE = DATE_TIME_MIN_VALUE;
|
|
34457
34615
|
exports.DEFAULT_NOTE_FILTER = DEFAULT_NOTE_FILTER;
|
34458
34616
|
exports.DEFAULT_PAGING_RESPONSE = DEFAULT_PAGING_RESPONSE;
|
34459
34617
|
exports.DefaultErrorMessage = DefaultErrorMessage;
|
34618
|
+
exports.ELEMENTARY_GRADES = ELEMENTARY_GRADES;
|
34460
34619
|
exports.EXAM_CHANNEL = EXAM_CHANNEL;
|
34461
34620
|
exports.EXAM_STUDENT_CHANNEL = EXAM_STUDENT_CHANNEL;
|
34462
34621
|
exports.ExamDetailView = ExamDetailView;
|
@@ -34466,6 +34625,7 @@ exports.GOOGLE_CLIENT_ID = GOOGLE_CLIENT_ID;
|
|
34466
34625
|
exports.GOOGLE_RECAPTCHA_ID = GOOGLE_RECAPTCHA_ID;
|
34467
34626
|
exports.GOOGLE_RECAPTCHA_KEY = GOOGLE_RECAPTCHA_KEY;
|
34468
34627
|
exports.GOOGLE_RECAPTCHA_SECRET = GOOGLE_RECAPTCHA_SECRET;
|
34628
|
+
exports.HIGH_GRADES = HIGH_GRADES;
|
34469
34629
|
exports.Header = Header;
|
34470
34630
|
exports.InputText = InputText;
|
34471
34631
|
exports.LANGUAGE = LANGUAGE;
|
@@ -34479,6 +34639,7 @@ exports.Login = Login;
|
|
34479
34639
|
exports.LoginQRCode = LoginQRCode;
|
34480
34640
|
exports.LoginWithEmail = LoginWithEmail;
|
34481
34641
|
exports.LoginWithPassword = SignIn;
|
34642
|
+
exports.MIDDLE_GRADES = MIDDLE_GRADES;
|
34482
34643
|
exports.MathJaxContainer = MathJaxContainer;
|
34483
34644
|
exports.MathTinyEditor = MathTinyEditor;
|
34484
34645
|
exports.NewNoteButton = NewNoteButton;
|
@@ -34506,6 +34667,7 @@ exports.REDIRECT_URL = REDIRECT_URL;
|
|
34506
34667
|
exports.RELEASE_DATE = RELEASE_DATE;
|
34507
34668
|
exports.RecentUserActionNames = RecentUserActionNames;
|
34508
34669
|
exports.ReleaseAlert = ReleaseAlert;
|
34670
|
+
exports.SCHOOL_OPTIONS = SCHOOL_OPTIONS;
|
34509
34671
|
exports.SUPER_ADMIN_BASE_URL = SUPER_ADMIN_BASE_URL;
|
34510
34672
|
exports.ScoreSelector = ScoreSelector;
|
34511
34673
|
exports.SearchInput = SearchInput;
|