touchstudy-core 0.1.144 → 0.1.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/List/configs/interfaces.d.ts +1 -1
- package/dist/components/List/partials/VirtualListItem.d.ts +1 -1
- package/dist/components/Selects/CustomSelect.d.ts +1 -1
- package/dist/components/Tables/VirtualTableRowItem.d.ts +5 -6
- package/dist/components/Tables/VirtualTableView.d.ts +1 -1
- package/dist/components/Tables/configs/interfaces.d.ts +4 -11
- package/dist/containers/Notes/components/NoteItem.d.ts +0 -1
- package/dist/containers/PreparedTextbook/apiClients/textbookService.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/AcademySelector.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/ArticleBlock.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/ChapterBlock.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/ChapterBlockBody.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/CourseSelector.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/OwnerSelector.d.ts +2 -3
- package/dist/containers/PreparedTextbook/components/PreparedTextbookForm.d.ts +0 -5
- package/dist/containers/PreparedTextbook/components/QuestionBlock.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/QuestionGroupBlock.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/QuestionGroupBlockBody.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/TextbookContentsTab.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/TextbookInfoTab.d.ts +1 -3
- package/dist/containers/PreparedTextbook/components/TextbookOwnersTab.d.ts +1 -2
- package/dist/containers/PreparedTextbook/configs/constants.d.ts +0 -2
- package/dist/containers/PreparedTextbook/configs/enums.d.ts +0 -5
- package/dist/containers/PreparedTextbook/configs/functions.d.ts +3 -17
- package/dist/containers/PreparedTextbook/configs/interfaces.d.ts +0 -2
- package/dist/containers/PreparedTextbook/configs/types.d.ts +3 -5
- package/dist/containers/PreparedTextbook/hooks/useSelect.d.ts +10 -8
- package/dist/containers/PreparedTextbook/hooks/useTextbookManagement.d.ts +1 -8
- package/dist/containers/Textbooks/configs/types.d.ts +0 -2
- package/dist/containers/Textbooks/hooks/useTextbookList.d.ts +2 -5
- package/dist/containers/Textbooks/hooks/useTextbookShare.d.ts +2 -0
- package/dist/index.css +3 -3
- package/dist/index.js +749 -1342
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +761 -1345
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/constants.d.ts +10 -2
- package/dist/utils/index.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -25,9 +25,8 @@ var _$5 = _interopDefault(require('lodash'));
|
|
25
25
|
var reactGoogleLogin = require('@leecheuk/react-google-login');
|
26
26
|
require('moment/locale/ko.js');
|
27
27
|
require('moment/locale/en-au.js');
|
28
|
-
var reactVirtualized = require('react-virtualized');
|
29
28
|
var formik = require('formik');
|
30
|
-
var
|
29
|
+
var reactVirtualized = require('react-virtualized');
|
31
30
|
var tinymce = _interopDefault(require('tinymce'));
|
32
31
|
require('@wiris/mathtype-tinymce6');
|
33
32
|
var tinymceReact = require('@tinymce/tinymce-react');
|
@@ -67,6 +66,7 @@ var reactHookForm = require('react-hook-form');
|
|
67
66
|
var yup$1 = require('@hookform/resolvers/yup');
|
68
67
|
var pi = require('react-icons/pi');
|
69
68
|
var Container = _interopDefault(require('@mui/material/Container'));
|
69
|
+
var styles$c = require('@mui/material/styles');
|
70
70
|
var Slider = _interopDefault(require('react-slick'));
|
71
71
|
var gr = require('react-icons/gr');
|
72
72
|
var Popover = _interopDefault(require('@mui/material/Popover'));
|
@@ -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 = "부모 전화번호를 입력하세요";
|
@@ -1243,7 +1243,7 @@ var number_of_participants = "참가자 수";
|
|
1243
1243
|
var chapter = "챕터";
|
1244
1244
|
var published = "Published";
|
1245
1245
|
var privated = "Privated";
|
1246
|
-
var solution_results = "
|
1246
|
+
var solution_results = "버튼 텍스트";
|
1247
1247
|
var do_you_want_to_reset_your_search_criteria = "검색 조건을 초기화 하시겠습니까?";
|
1248
1248
|
var the_search_keywords_you_enter_will_be_saved = "입력한 검색 키워드는 저장됩니다.";
|
1249
1249
|
var no_search_results = "검색 결과가 없어요.";
|
@@ -1423,44 +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 = "
|
1427
|
-
var elementary_school_2nd_grade = "
|
1428
|
-
var elementary_school_3rd_grade = "
|
1429
|
-
var elementary_school_4th_grade = "
|
1430
|
-
var elementary_school_5th_grade = "
|
1431
|
-
var elementary_school_6th_grade = "
|
1432
|
-
var middle_school_1st_grade = "
|
1433
|
-
var middle_school_2nd_grade = "
|
1434
|
-
var middle_school_3rd_grade = "
|
1435
|
-
var high_school_1st_grade = "
|
1436
|
-
var high_school_2nd_grade = "
|
1437
|
-
var high_school_3rd_grade = "
|
1438
|
-
var n_year_retaker = "N수생";
|
1439
|
-
var es_1st = "초1";
|
1440
|
-
var es_2nd = "초2";
|
1441
|
-
var es_3rd = "초3";
|
1442
|
-
var es_4th = "초4";
|
1443
|
-
var es_5th = "초5";
|
1444
|
-
var es_6th = "초6";
|
1445
|
-
var ms_1st = "중1";
|
1446
|
-
var ms_2nd = "중2";
|
1447
|
-
var ms_3rd = "중3";
|
1448
|
-
var hs_1st = "고1";
|
1449
|
-
var hs_2nd = "고2";
|
1450
|
-
var hs_3rd = "고3";
|
1451
|
-
var n_retaker = "N수생";
|
1452
|
-
var today_class = "오늘 수업";
|
1453
|
-
var unit_number = "대단원 {{number}}";
|
1454
|
-
var sub_unit_number = "소단원 {{number}}";
|
1455
|
-
var text_group_n = "지문 그룹 {{n}}";
|
1456
|
-
var text_detail_n = "지문 상세 {{n}}";
|
1457
|
-
var question_group_n = "문제 그룹 {{n}}";
|
1458
|
-
var placeholder_teacher_selector = "선생님을 검색하려면 최소 2글자를 입력하세요.";
|
1459
|
-
var teacher_personal_textbook = "교사의 개인 교과서";
|
1460
|
-
var textbook_owner_email_is_required = "교재 소유자의 이메일은 필수입니다";
|
1461
|
-
var invalid_textbook_owner_email_address = "유효하지 않은 교재 소유자 이메일 주소입니다";
|
1462
|
-
var textbook_owner_academy_is_required = "교재 소유자의 학원은 필수입니다";
|
1463
|
-
var textbook_owner_course_is_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학년";
|
1464
1438
|
var lang_ko = {
|
1465
1439
|
problem_solving: problem_solving,
|
1466
1440
|
my_story: my_story,
|
@@ -2533,33 +2507,7 @@ var lang_ko = {
|
|
2533
2507
|
middle_school_3rd_grade: middle_school_3rd_grade,
|
2534
2508
|
high_school_1st_grade: high_school_1st_grade,
|
2535
2509
|
high_school_2nd_grade: high_school_2nd_grade,
|
2536
|
-
high_school_3rd_grade: high_school_3rd_grade
|
2537
|
-
n_year_retaker: n_year_retaker,
|
2538
|
-
es_1st: es_1st,
|
2539
|
-
es_2nd: es_2nd,
|
2540
|
-
es_3rd: es_3rd,
|
2541
|
-
es_4th: es_4th,
|
2542
|
-
es_5th: es_5th,
|
2543
|
-
es_6th: es_6th,
|
2544
|
-
ms_1st: ms_1st,
|
2545
|
-
ms_2nd: ms_2nd,
|
2546
|
-
ms_3rd: ms_3rd,
|
2547
|
-
hs_1st: hs_1st,
|
2548
|
-
hs_2nd: hs_2nd,
|
2549
|
-
hs_3rd: hs_3rd,
|
2550
|
-
n_retaker: n_retaker,
|
2551
|
-
today_class: today_class,
|
2552
|
-
unit_number: unit_number,
|
2553
|
-
sub_unit_number: sub_unit_number,
|
2554
|
-
text_group_n: text_group_n,
|
2555
|
-
text_detail_n: text_detail_n,
|
2556
|
-
question_group_n: question_group_n,
|
2557
|
-
placeholder_teacher_selector: placeholder_teacher_selector,
|
2558
|
-
teacher_personal_textbook: teacher_personal_textbook,
|
2559
|
-
textbook_owner_email_is_required: textbook_owner_email_is_required,
|
2560
|
-
invalid_textbook_owner_email_address: invalid_textbook_owner_email_address,
|
2561
|
-
textbook_owner_academy_is_required: textbook_owner_academy_is_required,
|
2562
|
-
textbook_owner_course_is_required: textbook_owner_course_is_required
|
2510
|
+
high_school_3rd_grade: high_school_3rd_grade
|
2563
2511
|
};
|
2564
2512
|
|
2565
2513
|
var problem_solving$1 = "Problem Solving";
|
@@ -3063,7 +3011,7 @@ var delete_users_csv$1 = "Delete users csv";
|
|
3063
3011
|
var are_you_sure_to_delete_users$1 = "Are you sure to delete users?";
|
3064
3012
|
var enter_phone_number$1 = "Enter phone number";
|
3065
3013
|
var enter_school_name$1 = "Enter school name";
|
3066
|
-
var enter_grade$1 = "Enter grade";
|
3014
|
+
var enter_grade$1 = "Enter grade (please enter school name first)";
|
3067
3015
|
var enter_major_name$1 = "Enter department name";
|
3068
3016
|
var enter_parent_name$1 = "Enter parent name";
|
3069
3017
|
var enter_parent_phone_number$1 = "Enter parent phone number";
|
@@ -3655,32 +3603,6 @@ var middle_school_3rd_grade$1 = "Middle school 3rd grade";
|
|
3655
3603
|
var high_school_1st_grade$1 = "High school 1st grade";
|
3656
3604
|
var high_school_2nd_grade$1 = "High school 2nd grade";
|
3657
3605
|
var high_school_3rd_grade$1 = "High school 3rd grade";
|
3658
|
-
var n_year_retaker$1 = "N-year retaker";
|
3659
|
-
var es_1st$1 = "1st ES";
|
3660
|
-
var es_2nd$1 = "2nd ES";
|
3661
|
-
var es_3rd$1 = "3rd ES";
|
3662
|
-
var es_4th$1 = "4th ES";
|
3663
|
-
var es_5th$1 = "5th ES";
|
3664
|
-
var es_6th$1 = "6th ES";
|
3665
|
-
var ms_1st$1 = "1st MS";
|
3666
|
-
var ms_2nd$1 = "2nd MS";
|
3667
|
-
var ms_3rd$1 = "3rd MS";
|
3668
|
-
var hs_1st$1 = "1st HS";
|
3669
|
-
var hs_2nd$1 = "2nd HS";
|
3670
|
-
var hs_3rd$1 = "3rd HS";
|
3671
|
-
var n_retaker$1 = "N-retaker";
|
3672
|
-
var today_class$1 = "Today's class";
|
3673
|
-
var unit_number$1 = "Unit {{number}}";
|
3674
|
-
var sub_unit_number$1 = "Sub-unit {{number}}";
|
3675
|
-
var text_group_n$1 = "Text group {{n}}";
|
3676
|
-
var text_detail_n$1 = "Text details {{n}}";
|
3677
|
-
var question_group_n$1 = "Question group {{n}}";
|
3678
|
-
var placeholder_teacher_selector$1 = "Type at least 2 characters to search teacher";
|
3679
|
-
var teacher_personal_textbook$1 = "Teacher personal textbook";
|
3680
|
-
var textbook_owner_email_is_required$1 = "Textbook owner email is required";
|
3681
|
-
var invalid_textbook_owner_email_address$1 = "Invalid textbook owner email address";
|
3682
|
-
var textbook_owner_academy_is_required$1 = "Textbook owner academy is required";
|
3683
|
-
var textbook_owner_course_is_required$1 = "Textbook owner class is required";
|
3684
3606
|
var lang_en = {
|
3685
3607
|
problem_solving: problem_solving$1,
|
3686
3608
|
my_story: my_story$1,
|
@@ -4755,33 +4677,7 @@ var lang_en = {
|
|
4755
4677
|
middle_school_3rd_grade: middle_school_3rd_grade$1,
|
4756
4678
|
high_school_1st_grade: high_school_1st_grade$1,
|
4757
4679
|
high_school_2nd_grade: high_school_2nd_grade$1,
|
4758
|
-
high_school_3rd_grade: high_school_3rd_grade$1
|
4759
|
-
n_year_retaker: n_year_retaker$1,
|
4760
|
-
es_1st: es_1st$1,
|
4761
|
-
es_2nd: es_2nd$1,
|
4762
|
-
es_3rd: es_3rd$1,
|
4763
|
-
es_4th: es_4th$1,
|
4764
|
-
es_5th: es_5th$1,
|
4765
|
-
es_6th: es_6th$1,
|
4766
|
-
ms_1st: ms_1st$1,
|
4767
|
-
ms_2nd: ms_2nd$1,
|
4768
|
-
ms_3rd: ms_3rd$1,
|
4769
|
-
hs_1st: hs_1st$1,
|
4770
|
-
hs_2nd: hs_2nd$1,
|
4771
|
-
hs_3rd: hs_3rd$1,
|
4772
|
-
n_retaker: n_retaker$1,
|
4773
|
-
today_class: today_class$1,
|
4774
|
-
unit_number: unit_number$1,
|
4775
|
-
sub_unit_number: sub_unit_number$1,
|
4776
|
-
text_group_n: text_group_n$1,
|
4777
|
-
text_detail_n: text_detail_n$1,
|
4778
|
-
question_group_n: question_group_n$1,
|
4779
|
-
placeholder_teacher_selector: placeholder_teacher_selector$1,
|
4780
|
-
teacher_personal_textbook: teacher_personal_textbook$1,
|
4781
|
-
textbook_owner_email_is_required: textbook_owner_email_is_required$1,
|
4782
|
-
invalid_textbook_owner_email_address: invalid_textbook_owner_email_address$1,
|
4783
|
-
textbook_owner_academy_is_required: textbook_owner_academy_is_required$1,
|
4784
|
-
textbook_owner_course_is_required: textbook_owner_course_is_required$1
|
4680
|
+
high_school_3rd_grade: high_school_3rd_grade$1
|
4785
4681
|
};
|
4786
4682
|
|
4787
4683
|
i18n__default.use(reactI18next.initReactI18next).init({
|
@@ -4808,6 +4704,63 @@ var PrintState;
|
|
4808
4704
|
PrintState[PrintState["Paused"] = 3] = "Paused";
|
4809
4705
|
})(PrintState || (PrintState = {}));
|
4810
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
|
+
|
4811
4764
|
var GOOGLE_RECAPTCHA_KEY = process.env.REACT_APP_GOOGLE_RECAPTCHA_KEY || "";
|
4812
4765
|
var GOOGLE_CLIENT_ID = process.env.REACT_APP_GOOGLE_CLIENT_ID || "";
|
4813
4766
|
var GOOGLE_RECAPTCHA_ID = process.env.REACT_APP_GOOGLE_RECAPTCHA_ID || "";
|
@@ -4876,7 +4829,17 @@ var DEFAULT_PAGING_RESPONSE = {
|
|
4876
4829
|
totalItems: 0,
|
4877
4830
|
totalPages: 0
|
4878
4831
|
};
|
4879
|
-
var
|
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 = [{
|
4880
4843
|
label: "elementary_school_1st_grade",
|
4881
4844
|
value: 1
|
4882
4845
|
}, {
|
@@ -4894,67 +4857,26 @@ var GRADE_OPTIONS = [{
|
|
4894
4857
|
}, {
|
4895
4858
|
label: "elementary_school_6th_grade",
|
4896
4859
|
value: 6
|
4897
|
-
}
|
4860
|
+
}];
|
4861
|
+
var MIDDLE_GRADES = [{
|
4898
4862
|
label: "middle_school_1st_grade",
|
4899
|
-
value:
|
4863
|
+
value: 1
|
4900
4864
|
}, {
|
4901
4865
|
label: "middle_school_2nd_grade",
|
4902
|
-
value:
|
4866
|
+
value: 2
|
4903
4867
|
}, {
|
4904
4868
|
label: "middle_school_3rd_grade",
|
4905
|
-
value:
|
4906
|
-
}, {
|
4907
|
-
label: "high_school_1st_grade",
|
4908
|
-
value: 10
|
4909
|
-
}, {
|
4910
|
-
label: "high_school_2nd_grade",
|
4911
|
-
value: 11
|
4912
|
-
}, {
|
4913
|
-
label: "high_school_3rd_grade",
|
4914
|
-
value: 12
|
4915
|
-
}, {
|
4916
|
-
label: "n_year_retaker",
|
4917
|
-
value: 13
|
4869
|
+
value: 3
|
4918
4870
|
}];
|
4919
|
-
var
|
4920
|
-
label: "
|
4871
|
+
var HIGH_GRADES = [{
|
4872
|
+
label: "high_school_1st_grade",
|
4921
4873
|
value: 1
|
4922
4874
|
}, {
|
4923
|
-
label: "
|
4875
|
+
label: "high_school_2nd_grade",
|
4924
4876
|
value: 2
|
4925
4877
|
}, {
|
4926
|
-
label: "
|
4878
|
+
label: "high_school_3rd_grade",
|
4927
4879
|
value: 3
|
4928
|
-
}, {
|
4929
|
-
label: "es_4th",
|
4930
|
-
value: 4
|
4931
|
-
}, {
|
4932
|
-
label: "es_5th",
|
4933
|
-
value: 5
|
4934
|
-
}, {
|
4935
|
-
label: "es_6th",
|
4936
|
-
value: 6
|
4937
|
-
}, {
|
4938
|
-
label: "ms_1st",
|
4939
|
-
value: 7
|
4940
|
-
}, {
|
4941
|
-
label: "ms_2nd",
|
4942
|
-
value: 8
|
4943
|
-
}, {
|
4944
|
-
label: "ms_3rd",
|
4945
|
-
value: 9
|
4946
|
-
}, {
|
4947
|
-
label: "hs_1st",
|
4948
|
-
value: 10
|
4949
|
-
}, {
|
4950
|
-
label: "hs_2nd",
|
4951
|
-
value: 11
|
4952
|
-
}, {
|
4953
|
-
label: "hs_3rd",
|
4954
|
-
value: 12
|
4955
|
-
}, {
|
4956
|
-
label: "n_retaker",
|
4957
|
-
value: 13
|
4958
4880
|
}];
|
4959
4881
|
|
4960
4882
|
var utcToLocalTime = (function (time, FORMAT) {
|
@@ -5895,7 +5817,7 @@ var CustomCreatable = function CustomCreatable(_ref) {
|
|
5895
5817
|
}, rest));
|
5896
5818
|
};
|
5897
5819
|
|
5898
|
-
var _excluded$2 = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti", "optionValue"
|
5820
|
+
var _excluded$2 = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti", "optionValue"];
|
5899
5821
|
var CustomSelect = function CustomSelect(_ref) {
|
5900
5822
|
var isDefault = _ref.isDefault,
|
5901
5823
|
options = _ref.options,
|
@@ -5904,7 +5826,6 @@ var CustomSelect = function CustomSelect(_ref) {
|
|
5904
5826
|
value = _ref.value,
|
5905
5827
|
isMulti = _ref.isMulti,
|
5906
5828
|
optionValue = _ref.optionValue,
|
5907
|
-
styles = _ref.styles,
|
5908
5829
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
5909
5830
|
var _useTranslation = reactI18next.useTranslation(),
|
5910
5831
|
t = _useTranslation.t;
|
@@ -5929,7 +5850,7 @@ var CustomSelect = function CustomSelect(_ref) {
|
|
5929
5850
|
DropdownIndicator: DropdownIndicator,
|
5930
5851
|
Option: CustomOption
|
5931
5852
|
},
|
5932
|
-
styles:
|
5853
|
+
styles: customStyles,
|
5933
5854
|
placeholder: t("select_placeholder")
|
5934
5855
|
}, rest));
|
5935
5856
|
};
|
@@ -6101,63 +6022,6 @@ function _finally(body, finalizer) {
|
|
6101
6022
|
return finalizer();
|
6102
6023
|
}
|
6103
6024
|
|
6104
|
-
(function (PreparedType) {
|
6105
|
-
PreparedType[PreparedType["csat_past_questions"] = 1] = "csat_past_questions";
|
6106
|
-
PreparedType[PreparedType["official_mock_exam"] = 2] = "official_mock_exam";
|
6107
|
-
PreparedType[PreparedType["private_mock_exam"] = 3] = "private_mock_exam";
|
6108
|
-
})(exports.PreparedType || (exports.PreparedType = {}));
|
6109
|
-
|
6110
|
-
(function (ExamEvent) {
|
6111
|
-
ExamEvent["StartExam"] = "start-exam";
|
6112
|
-
ExamEvent["TerminateExam"] = "terminate-exam";
|
6113
|
-
ExamEvent["AddExtraDuration"] = "add-extra-duration-exam";
|
6114
|
-
ExamEvent["TeacherKickOutStudent"] = "teacher-kick-out-student";
|
6115
|
-
})(exports.ExamEvent || (exports.ExamEvent = {}));
|
6116
|
-
|
6117
|
-
(function (ExamStatus) {
|
6118
|
-
ExamStatus[ExamStatus["Default"] = 0] = "Default";
|
6119
|
-
ExamStatus[ExamStatus["Pending"] = 1] = "Pending";
|
6120
|
-
ExamStatus[ExamStatus["InProgress"] = 2] = "InProgress";
|
6121
|
-
ExamStatus[ExamStatus["Completed"] = 3] = "Completed";
|
6122
|
-
})(exports.ExamStatus || (exports.ExamStatus = {}));
|
6123
|
-
(function (QuestionAnswerType) {
|
6124
|
-
QuestionAnswerType[QuestionAnswerType["SingleChoice"] = 0] = "SingleChoice";
|
6125
|
-
QuestionAnswerType[QuestionAnswerType["MultipleChoice"] = 1] = "MultipleChoice";
|
6126
|
-
QuestionAnswerType[QuestionAnswerType["ShortAnswer"] = 2] = "ShortAnswer";
|
6127
|
-
})(exports.QuestionAnswerType || (exports.QuestionAnswerType = {}));
|
6128
|
-
|
6129
|
-
(function (OrderType) {
|
6130
|
-
OrderType["ASC"] = "ASC";
|
6131
|
-
OrderType["DESC"] = "DESC";
|
6132
|
-
})(exports.OrderType || (exports.OrderType = {}));
|
6133
|
-
|
6134
|
-
(function (RecentUserAction) {
|
6135
|
-
RecentUserAction["ViewedUser"] = "ViewedUser";
|
6136
|
-
RecentUserAction["ViewedQNA"] = "ViewedQNA";
|
6137
|
-
RecentUserAction["ViewedExamResult"] = "ViewedExamResult";
|
6138
|
-
RecentUserAction["PrintedExamResult"] = "PrintedExamResult";
|
6139
|
-
RecentUserAction["ViewedAttendance"] = "ViewedAttendance";
|
6140
|
-
})(exports.RecentUserAction || (exports.RecentUserAction = {}));
|
6141
|
-
|
6142
|
-
(function (UserSortColumn) {
|
6143
|
-
UserSortColumn["CreatedAt"] = "CreatedAt";
|
6144
|
-
UserSortColumn["FullName"] = "FullName";
|
6145
|
-
UserSortColumn["PhoneNumber"] = "PhoneNumber";
|
6146
|
-
UserSortColumn["Email"] = "Email";
|
6147
|
-
UserSortColumn["SchoolName"] = "SchoolName";
|
6148
|
-
UserSortColumn["Major"] = "Major";
|
6149
|
-
UserSortColumn["ParentName"] = "ParentName";
|
6150
|
-
UserSortColumn["ParentPhoneNumber"] = "ParentPhoneNumber";
|
6151
|
-
UserSortColumn["Grade"] = "Grade";
|
6152
|
-
})(exports.UserSortColumn || (exports.UserSortColumn = {}));
|
6153
|
-
|
6154
|
-
(function (SchoolType) {
|
6155
|
-
SchoolType[SchoolType["Default"] = 0] = "Default";
|
6156
|
-
SchoolType[SchoolType["Elementary"] = 1] = "Elementary";
|
6157
|
-
SchoolType[SchoolType["Middle"] = 2] = "Middle";
|
6158
|
-
SchoolType[SchoolType["High"] = 3] = "High";
|
6159
|
-
})(exports.SchoolType || (exports.SchoolType = {}));
|
6160
|
-
|
6161
6025
|
var canAccess = function canAccess(userRoles, componentRoles) {
|
6162
6026
|
if (!Array.isArray(userRoles)) {
|
6163
6027
|
return false;
|
@@ -9619,198 +9483,7 @@ var ListView = function ListView(_ref) {
|
|
9619
9483
|
}));
|
9620
9484
|
};
|
9621
9485
|
|
9622
|
-
var
|
9623
|
-
var data = props.data,
|
9624
|
-
loading = props.loading,
|
9625
|
-
onLoadMore = props.onLoadMore;
|
9626
|
-
var handleLoadMore = function handleLoadMore() {
|
9627
|
-
if (loading) return;
|
9628
|
-
onLoadMore === null || onLoadMore === void 0 ? void 0 : onLoadMore();
|
9629
|
-
};
|
9630
|
-
var onScroll = function onScroll(_ref) {
|
9631
|
-
var scrollTop = _ref.scrollTop,
|
9632
|
-
clientHeight = _ref.clientHeight,
|
9633
|
-
scrollHeight = _ref.scrollHeight;
|
9634
|
-
if (scrollTop + clientHeight >= scrollHeight - 100) {
|
9635
|
-
handleLoadMore();
|
9636
|
-
}
|
9637
|
-
};
|
9638
|
-
var rowCount = data.length + (loading ? 1 : 0);
|
9639
|
-
return {
|
9640
|
-
rowCount: rowCount,
|
9641
|
-
onScroll: onScroll
|
9642
|
-
};
|
9643
|
-
};
|
9644
|
-
|
9645
|
-
var cellMeasurerCache = new reactVirtualized.CellMeasurerCache({
|
9646
|
-
fixedWidth: true,
|
9647
|
-
defaultHeight: 50
|
9648
|
-
});
|
9649
|
-
|
9650
|
-
var grey = {
|
9651
|
-
0: '#FFFFFF',
|
9652
|
-
50: "#FBFBF9",
|
9653
|
-
100: '#EAEAE5',
|
9654
|
-
200: '#F4F6F8',
|
9655
|
-
300: '#D0D0C8',
|
9656
|
-
400: '#C4CDD5',
|
9657
|
-
500: '#9A9A98',
|
9658
|
-
600: '#637381',
|
9659
|
-
700: '#5D5D5B',
|
9660
|
-
800: '#212B36',
|
9661
|
-
900: '#363634'
|
9662
|
-
};
|
9663
|
-
var green = {
|
9664
|
-
0: '#FFFFFF',
|
9665
|
-
100: '#F0FFF6',
|
9666
|
-
300: '#89F0B2',
|
9667
|
-
500: '#3DC674',
|
9668
|
-
700: '#349056',
|
9669
|
-
900: '#18442A'
|
9670
|
-
};
|
9671
|
-
var main_theme = {
|
9672
|
-
lighter: green[100],
|
9673
|
-
light: green[300],
|
9674
|
-
less_dark: green[500],
|
9675
|
-
dark: green[700],
|
9676
|
-
darker: green[900]
|
9677
|
-
};
|
9678
|
-
var primary = {
|
9679
|
-
lighter: '#D0ECFE',
|
9680
|
-
light: '#73BAFB',
|
9681
|
-
main: '#1877F2',
|
9682
|
-
dark: '#0C44AE',
|
9683
|
-
darker: '#042174',
|
9684
|
-
contrastText: '#FFFFFF'
|
9685
|
-
};
|
9686
|
-
var secondary = {
|
9687
|
-
lighter: '#EFD6FF',
|
9688
|
-
light: '#C684FF',
|
9689
|
-
main: '#8E33FF',
|
9690
|
-
dark: '#5119B7',
|
9691
|
-
darker: '#27097A',
|
9692
|
-
contrastText: '#FFFFFF'
|
9693
|
-
};
|
9694
|
-
var info = {
|
9695
|
-
lighter: '#CAFDF5',
|
9696
|
-
light: '#61F3F3',
|
9697
|
-
main: '#00B8D9',
|
9698
|
-
dark: '#006C9C',
|
9699
|
-
darker: '#003768',
|
9700
|
-
contrastText: '#FFFFFF'
|
9701
|
-
};
|
9702
|
-
var success = {
|
9703
|
-
lighter: '#C8FAD6',
|
9704
|
-
light: '#5BE49B',
|
9705
|
-
main: '#00A76F',
|
9706
|
-
dark: '#007867',
|
9707
|
-
darker: '#004B50',
|
9708
|
-
contrastText: '#FFFFFF'
|
9709
|
-
};
|
9710
|
-
var warning$1 = {
|
9711
|
-
lighter: '#FFF5CC',
|
9712
|
-
light: '#FFD666',
|
9713
|
-
main: '#FFAB00',
|
9714
|
-
dark: '#B76E00',
|
9715
|
-
darker: '#7A4100',
|
9716
|
-
contrastText: grey[800]
|
9717
|
-
};
|
9718
|
-
var error = {
|
9719
|
-
lighter: '#FFE9D5',
|
9720
|
-
light: '#FFAC82',
|
9721
|
-
main: '#FF5630',
|
9722
|
-
dark: '#B71D18',
|
9723
|
-
darker: '#7A0916',
|
9724
|
-
contrastText: '#FFFFFF'
|
9725
|
-
};
|
9726
|
-
var red = {
|
9727
|
-
100: '#FEF8F8',
|
9728
|
-
300: '#FEF8F8',
|
9729
|
-
500: '#F4CACA',
|
9730
|
-
900: '#DB4D4D'
|
9731
|
-
};
|
9732
|
-
var yellow = {
|
9733
|
-
900: '#FEAF06'
|
9734
|
-
};
|
9735
|
-
var green_support = {
|
9736
|
-
100: '#F6FDF7',
|
9737
|
-
500: '#AEEAB3',
|
9738
|
-
900: '#3ACB46'
|
9739
|
-
};
|
9740
|
-
var purple = {
|
9741
|
-
900: '#C3099A'
|
9742
|
-
};
|
9743
|
-
var dark_purple = {
|
9744
|
-
900: '#6B0861'
|
9745
|
-
};
|
9746
|
-
var dark_red = {
|
9747
|
-
900: '#800202'
|
9748
|
-
};
|
9749
|
-
var common = {
|
9750
|
-
black: '#000000',
|
9751
|
-
white: '#FFFFFF'
|
9752
|
-
};
|
9753
|
-
var action$2 = {
|
9754
|
-
hover: styles$c.alpha(grey[500], 0.08),
|
9755
|
-
selected: styles$c.alpha(grey[500], 0.16),
|
9756
|
-
disabled: styles$c.alpha(grey[500], 0.8),
|
9757
|
-
disabledBackground: styles$c.alpha(grey[500], 0.24),
|
9758
|
-
focus: styles$c.alpha(grey[500], 0.24),
|
9759
|
-
hoverOpacity: 0.08,
|
9760
|
-
disabledOpacity: 0.48
|
9761
|
-
};
|
9762
|
-
var base = {
|
9763
|
-
primary: primary,
|
9764
|
-
secondary: secondary,
|
9765
|
-
info: info,
|
9766
|
-
main_theme: main_theme,
|
9767
|
-
success: success,
|
9768
|
-
warning: warning$1,
|
9769
|
-
error: error,
|
9770
|
-
grey: grey,
|
9771
|
-
common: common,
|
9772
|
-
red: red,
|
9773
|
-
yellow: yellow,
|
9774
|
-
green_support: green_support,
|
9775
|
-
purple: purple,
|
9776
|
-
dark_purple: dark_purple,
|
9777
|
-
dark_red: dark_red,
|
9778
|
-
divider: styles$c.alpha(grey[500], 0.2),
|
9779
|
-
action: action$2
|
9780
|
-
};
|
9781
|
-
|
9782
|
-
var VirtualListItem = function VirtualListItem(_ref) {
|
9783
|
-
var isLoading = _ref.isLoading,
|
9784
|
-
rowData = _ref.rowData,
|
9785
|
-
style = _ref.style,
|
9786
|
-
parent = _ref.parent,
|
9787
|
-
index = _ref.index,
|
9788
|
-
renderItem = _ref.renderItem,
|
9789
|
-
loadingElement = _ref.loadingElement;
|
9790
|
-
return React__default.createElement(reactVirtualized.CellMeasurer, {
|
9791
|
-
cache: cellMeasurerCache,
|
9792
|
-
columnIndex: 0,
|
9793
|
-
rowIndex: index,
|
9794
|
-
key: rowData === null || rowData === void 0 ? void 0 : rowData.id,
|
9795
|
-
parent: parent
|
9796
|
-
}, function (_ref2) {
|
9797
|
-
var measure = _ref2.measure;
|
9798
|
-
return React__default.createElement("div", {
|
9799
|
-
key: rowData === null || rowData === void 0 ? void 0 : rowData.id,
|
9800
|
-
style: style
|
9801
|
-
}, isLoading && !!loadingElement && loadingElement, isLoading && !loadingElement && React__default.createElement(material.Box, {
|
9802
|
-
p: 1,
|
9803
|
-
className: "d-flex justify-content-center align-items-center w-100"
|
9804
|
-
}, React__default.createElement(material.CircularProgress, {
|
9805
|
-
size: 24,
|
9806
|
-
sx: {
|
9807
|
-
color: grey[700]
|
9808
|
-
}
|
9809
|
-
})), !isLoading && renderItem(rowData, index, measure));
|
9810
|
-
});
|
9811
|
-
};
|
9812
|
-
|
9813
|
-
var VirtualEmptyItem = function VirtualEmptyItem(_ref) {
|
9486
|
+
var VirtualTableEmpty = function VirtualTableEmpty(_ref) {
|
9814
9487
|
var emptyElement = _ref.emptyElement;
|
9815
9488
|
var _useTranslation = reactI18next.useTranslation(),
|
9816
9489
|
t = _useTranslation.t;
|
@@ -9823,195 +9496,70 @@ var VirtualEmptyItem = function VirtualEmptyItem(_ref) {
|
|
9823
9496
|
var VirtualListView = function VirtualListView(props) {
|
9824
9497
|
var data = props.data,
|
9825
9498
|
containerProps = props.containerProps,
|
9826
|
-
listHeight = props.listHeight,
|
9827
|
-
_props$overscanRowCou = props.overscanRowCount,
|
9828
|
-
overscanRowCount = _props$overscanRowCou === void 0 ? 5 : _props$overscanRowCou,
|
9829
9499
|
renderItem = props.renderItem,
|
9830
9500
|
emptyElement = props.emptyElement,
|
9831
|
-
|
9832
|
-
|
9833
|
-
|
9834
|
-
onScroll = _useVirtualListView.onScroll;
|
9835
|
-
var rowRenderer = function rowRenderer(props) {
|
9836
|
-
var index = props.index;
|
9837
|
-
var isLoading = index === data.length;
|
9838
|
-
var rowData = isLoading ? undefined : data[index];
|
9839
|
-
return React__default.createElement(VirtualListItem, Object.assign({}, props, {
|
9840
|
-
rowData: rowData,
|
9841
|
-
isLoading: isLoading,
|
9842
|
-
renderItem: renderItem,
|
9843
|
-
loadingElement: loadingElement
|
9844
|
-
}));
|
9845
|
-
};
|
9846
|
-
var noRowsRenderer = function noRowsRenderer() {
|
9847
|
-
return React__default.createElement(VirtualEmptyItem, {
|
9848
|
-
emptyElement: emptyElement
|
9849
|
-
});
|
9850
|
-
};
|
9501
|
+
loading = props.loading,
|
9502
|
+
loadingElement = props.loadingElement,
|
9503
|
+
listHeight = props.listHeight;
|
9851
9504
|
return React__default.createElement(material.Box, Object.assign({}, containerProps), React__default.createElement(reactVirtualized.AutoSizer, {
|
9852
9505
|
disableHeight: !!listHeight
|
9853
9506
|
}, function (_ref) {
|
9854
9507
|
var width = _ref.width,
|
9855
9508
|
height = _ref.height;
|
9856
|
-
return React__default.createElement(
|
9509
|
+
return React__default.createElement(material.Box, {
|
9857
9510
|
width: width,
|
9858
|
-
height:
|
9859
|
-
|
9860
|
-
|
9861
|
-
rowRenderer: rowRenderer,
|
9862
|
-
deferredMeasurementCache: cellMeasurerCache,
|
9863
|
-
overscanRowCount: overscanRowCount,
|
9864
|
-
noRowsRenderer: noRowsRenderer,
|
9865
|
-
onScroll: onScroll
|
9866
|
-
});
|
9867
|
-
}));
|
9868
|
-
};
|
9869
|
-
|
9870
|
-
var cellMeasurerCache$1 = new reactVirtualized.CellMeasurerCache({
|
9871
|
-
defaultWidth: 100,
|
9872
|
-
defaultHeight: 50
|
9873
|
-
});
|
9874
|
-
|
9875
|
-
var VirtualTableRowItem = function VirtualTableRowItem(_ref) {
|
9876
|
-
var isLoading = _ref.isLoading,
|
9877
|
-
style = _ref.style,
|
9878
|
-
parent = _ref.parent,
|
9879
|
-
rowIndex = _ref.rowIndex,
|
9880
|
-
columnIndex = _ref.columnIndex,
|
9881
|
-
renderItem = _ref.renderItem,
|
9882
|
-
loadingElement = _ref.loadingElement,
|
9883
|
-
cellMeasurerCache = _ref.cellMeasurerCache;
|
9884
|
-
return React__default.createElement(reactVirtualized.CellMeasurer, {
|
9885
|
-
cache: cellMeasurerCache,
|
9886
|
-
columnIndex: columnIndex,
|
9887
|
-
rowIndex: rowIndex,
|
9888
|
-
key: rowIndex + "-" + columnIndex,
|
9889
|
-
parent: parent
|
9890
|
-
}, function (_ref2) {
|
9891
|
-
var measure = _ref2.measure;
|
9892
|
-
return React__default.createElement("div", {
|
9893
|
-
style: style
|
9894
|
-
}, isLoading && !!loadingElement && loadingElement, isLoading && !loadingElement && React__default.createElement(material.Box, {
|
9511
|
+
height: height,
|
9512
|
+
overflow: "auto"
|
9513
|
+
}, loading && React__default.createElement(React.Fragment, null, loadingElement != null ? loadingElement : React__default.createElement(material.Box, {
|
9895
9514
|
p: 1,
|
9896
9515
|
className: "d-flex justify-content-center align-items-center w-100"
|
9897
9516
|
}, React__default.createElement(material.CircularProgress, {
|
9898
9517
|
size: 24,
|
9899
9518
|
sx: {
|
9900
|
-
color:
|
9519
|
+
color: "#5d5d5b"
|
9901
9520
|
}
|
9902
|
-
})), !
|
9903
|
-
|
9904
|
-
}
|
9905
|
-
|
9906
|
-
|
9907
|
-
|
9908
|
-
|
9909
|
-
var _useTranslation = reactI18next.useTranslation(),
|
9910
|
-
t = _useTranslation.t;
|
9911
|
-
if (emptyElement) return emptyElement;
|
9912
|
-
return React__default.createElement(material.Box, null, React__default.createElement(material.Typography, {
|
9913
|
-
className: "text-center text-muted"
|
9914
|
-
}, t("no_data")));
|
9915
|
-
};
|
9916
|
-
|
9917
|
-
var useVirtualTableView = function useVirtualTableView(props) {
|
9918
|
-
var itemsCount = props.itemsCount,
|
9919
|
-
loading = props.loading,
|
9920
|
-
hasHeader = props.hasHeader,
|
9921
|
-
onLoadMore = props.onLoadMore;
|
9922
|
-
var handleLoadMore = function handleLoadMore() {
|
9923
|
-
if (loading) return;
|
9924
|
-
onLoadMore === null || onLoadMore === void 0 ? void 0 : onLoadMore();
|
9925
|
-
};
|
9926
|
-
var onScroll = function onScroll(_ref) {
|
9927
|
-
var scrollTop = _ref.scrollTop,
|
9928
|
-
clientHeight = _ref.clientHeight,
|
9929
|
-
scrollHeight = _ref.scrollHeight;
|
9930
|
-
if (scrollTop + clientHeight >= scrollHeight - 100) {
|
9931
|
-
handleLoadMore();
|
9932
|
-
}
|
9933
|
-
};
|
9934
|
-
var rowCount = React.useMemo(function () {
|
9935
|
-
return itemsCount + (loading ? 1 : itemsCount === 1 && hasHeader ? 1 : 0);
|
9936
|
-
}, [itemsCount, loading, hasHeader]);
|
9937
|
-
return {
|
9938
|
-
rowCount: rowCount,
|
9939
|
-
onScroll: onScroll
|
9940
|
-
};
|
9521
|
+
}))), !loading && !data.length && React__default.createElement(VirtualTableEmpty, {
|
9522
|
+
emptyElement: emptyElement
|
9523
|
+
}), !loading && !!data.length && React__default.createElement(ListView, {
|
9524
|
+
data: data,
|
9525
|
+
render: renderItem
|
9526
|
+
}));
|
9527
|
+
}));
|
9941
9528
|
};
|
9942
9529
|
|
9943
|
-
var _excluded$5 = ["containerProps", "listHeight", "overscanRowCount", "overscanColumnCount", "renderItem", "emptyElement", "loadingElement", "fixedColumnCount", "fixedRowCount", "listWidth", "itemsCount", "cellCache", "columnWidth", "containerRef", "multiGridRef"];
|
9944
9530
|
var VirtualTableView = function VirtualTableView(props) {
|
9945
|
-
var
|
9946
|
-
|
9947
|
-
_props$overscanRowCou = props.overscanRowCount,
|
9948
|
-
overscanRowCount = _props$overscanRowCou === void 0 ? 5 : _props$overscanRowCou,
|
9949
|
-
_props$overscanColumn = props.overscanColumnCount,
|
9950
|
-
overscanColumnCount = _props$overscanColumn === void 0 ? 5 : _props$overscanColumn,
|
9531
|
+
var data = props.data,
|
9532
|
+
containerProps = props.containerProps,
|
9951
9533
|
renderItem = props.renderItem,
|
9952
9534
|
emptyElement = props.emptyElement,
|
9953
|
-
|
9954
|
-
|
9955
|
-
|
9956
|
-
|
9957
|
-
|
9958
|
-
|
9959
|
-
|
9960
|
-
|
9961
|
-
|
9962
|
-
|
9963
|
-
|
9964
|
-
var _useVirtualTableView = useVirtualTableView(props),
|
9965
|
-
rowCount = _useVirtualTableView.rowCount,
|
9966
|
-
onScroll = _useVirtualTableView.onScroll;
|
9967
|
-
var cellRenderer = function cellRenderer(props) {
|
9968
|
-
var rowIndex = props.rowIndex,
|
9969
|
-
columnIndex = props.columnIndex;
|
9970
|
-
var isLoading = rowIndex === itemsCount && columnIndex === 0;
|
9971
|
-
return React__default.createElement(VirtualTableRowItem$1, Object.assign({}, props, {
|
9972
|
-
isLoading: isLoading,
|
9973
|
-
renderItem: renderItem,
|
9974
|
-
loadingElement: loadingElement,
|
9975
|
-
cellMeasurerCache: cache
|
9535
|
+
columnCount = props.columnCount,
|
9536
|
+
loading = props.loading,
|
9537
|
+
loadingElement = props.loadingElement;
|
9538
|
+
var containerRef = React.useRef(null);
|
9539
|
+
var renderTableRow = function renderTableRow(_, index) {
|
9540
|
+
return React__default.createElement(material.Stack, {
|
9541
|
+
direction: "row"
|
9542
|
+
}, Array.from({
|
9543
|
+
length: columnCount
|
9544
|
+
}, function (_, colIndex) {
|
9545
|
+
return renderItem(index, colIndex);
|
9976
9546
|
}));
|
9977
9547
|
};
|
9978
|
-
var noRowsRenderer = function noRowsRenderer() {
|
9979
|
-
return React__default.createElement(VirtualTableEmpty, {
|
9980
|
-
emptyElement: emptyElement
|
9981
|
-
});
|
9982
|
-
};
|
9983
|
-
var columnWidthRendered = function columnWidthRendered(params) {
|
9984
|
-
if (typeof columnWidth === "number") return columnWidth;
|
9985
|
-
var cw = cache.columnWidth(params);
|
9986
|
-
if (columnWidth === undefined) return cw;
|
9987
|
-
return columnWidth(params, cache);
|
9988
|
-
};
|
9989
9548
|
return React__default.createElement(material.Box, Object.assign({
|
9990
9549
|
ref: containerRef
|
9991
|
-
}, containerProps), React__default.createElement(
|
9992
|
-
|
9993
|
-
|
9994
|
-
},
|
9995
|
-
|
9996
|
-
|
9997
|
-
|
9998
|
-
|
9999
|
-
|
10000
|
-
|
10001
|
-
|
10002
|
-
|
10003
|
-
|
10004
|
-
columnWidth: columnWidthRendered,
|
10005
|
-
height: listHeight || height,
|
10006
|
-
rowHeight: cache.rowHeight,
|
10007
|
-
deferredMeasurementCache: cache,
|
10008
|
-
rowCount: rowCount,
|
10009
|
-
width: listWidth || width,
|
10010
|
-
overscanRowCount: overscanRowCount,
|
10011
|
-
overscanColumnCount: overscanColumnCount,
|
10012
|
-
noRowsRenderer: noRowsRenderer,
|
10013
|
-
onScroll: onScroll
|
10014
|
-
}, rest));
|
9550
|
+
}, containerProps), loading && React__default.createElement(React.Fragment, null, loadingElement != null ? loadingElement : React__default.createElement(material.Box, {
|
9551
|
+
p: 1,
|
9552
|
+
className: "d-flex justify-content-center align-items-center w-100"
|
9553
|
+
}, React__default.createElement(material.CircularProgress, {
|
9554
|
+
size: 24,
|
9555
|
+
sx: {
|
9556
|
+
color: "#5d5d5b"
|
9557
|
+
}
|
9558
|
+
}))), !loading && !data.length && React__default.createElement(VirtualTableEmpty, {
|
9559
|
+
emptyElement: emptyElement
|
9560
|
+
}), !loading && !!data.length && React__default.createElement(ListView, {
|
9561
|
+
data: data,
|
9562
|
+
render: renderTableRow
|
10015
9563
|
}));
|
10016
9564
|
};
|
10017
9565
|
|
@@ -10023,7 +9571,6 @@ var MathTinyEditor = function MathTinyEditor(_ref) {
|
|
10023
9571
|
onChange = _ref.onChange,
|
10024
9572
|
initValue = _ref.initValue,
|
10025
9573
|
config = _ref.config;
|
10026
|
-
var isFirstChange = React.useRef(true);
|
10027
9574
|
React.useEffect(function () {
|
10028
9575
|
if (window.tinymce) {
|
10029
9576
|
window.tinymce = tinymce;
|
@@ -10033,23 +9580,17 @@ var MathTinyEditor = function MathTinyEditor(_ref) {
|
|
10033
9580
|
return htmlString.replace(/\s(mathcolor|mathsize|mathvariant|mathvariant|color|fontsize|style)="[^"]*"/g, "");
|
10034
9581
|
};
|
10035
9582
|
var handleChange = function handleChange(value, _) {
|
10036
|
-
if (isFirstChange.current) {
|
10037
|
-
isFirstChange.current = false;
|
10038
|
-
return;
|
10039
|
-
}
|
10040
9583
|
var textFilter = removeMathAttributes(value);
|
10041
9584
|
onChange(textFilter);
|
10042
9585
|
};
|
10043
9586
|
var options = {
|
10044
|
-
height:
|
10045
|
-
statusbar: false,
|
9587
|
+
height: 130,
|
10046
9588
|
menubar: false,
|
10047
9589
|
external_plugins: {
|
10048
9590
|
tiny_mce_wiris: '/editor/wiris-for-tinymce.js'
|
10049
9591
|
},
|
10050
9592
|
toolbar: "tiny_mce_wiris_formulaEditor tiny_mce_wiris_formulaEditorChemistry",
|
10051
9593
|
branding: false,
|
10052
|
-
resize: false,
|
10053
9594
|
extended_valid_elements: '*[.*]'
|
10054
9595
|
};
|
10055
9596
|
return React__default.createElement(tinymceReact.Editor, {
|
@@ -11573,10 +11114,10 @@ var LoginQRCode = function LoginQRCode(props) {
|
|
11573
11114
|
}));
|
11574
11115
|
};
|
11575
11116
|
|
11576
|
-
var _excluded$
|
11117
|
+
var _excluded$5 = ["history"];
|
11577
11118
|
var Login = function Login(_ref) {
|
11578
11119
|
var history = _ref.history,
|
11579
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
11120
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
11580
11121
|
var _useLogin = useLogin$1({
|
11581
11122
|
homeAcademyUrl: rest.homeAcademyUrl,
|
11582
11123
|
homeUrl: rest.homeUrl,
|
@@ -12550,11 +12091,11 @@ var DEFAULT_USER_FILTERS = {
|
|
12550
12091
|
|
12551
12092
|
var styles$2 = {"avatar":"_2rJkZ","date-picker":"_1iqE2","time-picker":"_20xtc","teacher-selector-wrapper":"_3L1Oj"};
|
12552
12093
|
|
12553
|
-
var _excluded$
|
12094
|
+
var _excluded$6 = ["teachers", "value"];
|
12554
12095
|
var TeacherSelector = function TeacherSelector(_ref) {
|
12555
12096
|
var teachers = _ref.teachers,
|
12556
12097
|
value = _ref.value,
|
12557
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
12098
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
12558
12099
|
var teacherOptions = teachers.map(function (i) {
|
12559
12100
|
return {
|
12560
12101
|
label: i.teacherName + "/" + i.teacherEmail,
|
@@ -13846,7 +13387,7 @@ var useTeacherList = function useTeacherList() {
|
|
13846
13387
|
};
|
13847
13388
|
};
|
13848
13389
|
|
13849
|
-
var _excluded$
|
13390
|
+
var _excluded$7 = ["getStudents"],
|
13850
13391
|
_excluded2 = ["getTeachers"],
|
13851
13392
|
_excluded3 = ["getLessons"];
|
13852
13393
|
var PAGE_TITLE$4 = "classes";
|
@@ -13897,7 +13438,7 @@ var useClassDetail = function useClassDetail(_ref) {
|
|
13897
13438
|
};
|
13898
13439
|
var _useStudentClassList = useStudentClassList(classId),
|
13899
13440
|
getStudents = _useStudentClassList.getStudents,
|
13900
|
-
studentListProps = _objectWithoutPropertiesLoose(_useStudentClassList, _excluded$
|
13441
|
+
studentListProps = _objectWithoutPropertiesLoose(_useStudentClassList, _excluded$7);
|
13901
13442
|
var _useTeacherClassList = useTeacherClassList(classId),
|
13902
13443
|
getTeachers = _useTeacherClassList.getTeachers,
|
13903
13444
|
teacherListProps = _objectWithoutPropertiesLoose(_useTeacherClassList, _excluded2);
|
@@ -14647,12 +14188,12 @@ var LessonList = function LessonList(_ref) {
|
|
14647
14188
|
}));
|
14648
14189
|
};
|
14649
14190
|
|
14650
|
-
var _excluded$
|
14191
|
+
var _excluded$8 = ["children", "value", "index"];
|
14651
14192
|
var CustomTabPanel = function CustomTabPanel(props) {
|
14652
14193
|
var children = props.children,
|
14653
14194
|
value = props.value,
|
14654
14195
|
index = props.index,
|
14655
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
14196
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$8);
|
14656
14197
|
return React__default.createElement("div", Object.assign({
|
14657
14198
|
role: "tabpanel",
|
14658
14199
|
hidden: value !== index,
|
@@ -20022,7 +19563,9 @@ var useNotes = function useNotes(setFilter, filter) {
|
|
20022
19563
|
}
|
20023
19564
|
setLoadingNotes(true);
|
20024
19565
|
var _temp = _catch(function () {
|
20025
|
-
return Promise.resolve(getNotesApi(
|
19566
|
+
return Promise.resolve(getNotesApi(_extends({}, filter, {
|
19567
|
+
currentPage: -1
|
19568
|
+
}))).then(function (res) {
|
20026
19569
|
var data = res.data;
|
20027
19570
|
setTotalPages((data === null || data === void 0 ? void 0 : data.totalPages) || 0);
|
20028
19571
|
var items = (data === null || data === void 0 ? void 0 : data.items) || [];
|
@@ -20088,8 +19631,7 @@ var NoteItem = function NoteItem(_ref) {
|
|
20088
19631
|
_ref$placement = _ref.placement,
|
20089
19632
|
placement = _ref$placement === void 0 ? "bottom-end" : _ref$placement,
|
20090
19633
|
onClose = _ref.onClose,
|
20091
|
-
onOpen = _ref.onOpen
|
20092
|
-
onLoad = _ref.onLoad;
|
19634
|
+
onOpen = _ref.onOpen;
|
20093
19635
|
var _useTranslation = reactI18next.useTranslation(),
|
20094
19636
|
t = _useTranslation.t;
|
20095
19637
|
var handleMoreClick = function handleMoreClick(e) {
|
@@ -20097,9 +19639,6 @@ var NoteItem = function NoteItem(_ref) {
|
|
20097
19639
|
e.stopPropagation();
|
20098
19640
|
onOpen(data);
|
20099
19641
|
};
|
20100
|
-
React.useEffect(function () {
|
20101
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
20102
|
-
}, []);
|
20103
19642
|
return React__default.createElement(material.Box, Object.assign({}, NoteItemStyles.root), React__default.createElement(material.Stack, {
|
20104
19643
|
direction: "row",
|
20105
19644
|
gap: 1,
|
@@ -20147,7 +19686,7 @@ var NotesContainer = function NotesContainer(_ref) {
|
|
20147
19686
|
itemActions = _ref.itemActions,
|
20148
19687
|
noteIdContextMenu = _ref.noteIdContextMenu,
|
20149
19688
|
containerListProps = _ref.containerListProps;
|
20150
|
-
var renderItem = function renderItem(item, _
|
19689
|
+
var renderItem = function renderItem(item, _) {
|
20151
19690
|
var isSelected = noteIdContextMenu === item.id;
|
20152
19691
|
return React__default.createElement(material.Box, {
|
20153
19692
|
key: item.id,
|
@@ -20158,8 +19697,7 @@ var NotesContainer = function NotesContainer(_ref) {
|
|
20158
19697
|
openTooltip: isSelected,
|
20159
19698
|
actions: itemActions,
|
20160
19699
|
onOpen: onOpenTooltip,
|
20161
|
-
onClose: onCloseTooltip
|
20162
|
-
onLoad: measure
|
19700
|
+
onClose: onCloseTooltip
|
20163
19701
|
}));
|
20164
19702
|
};
|
20165
19703
|
return React__default.createElement(VirtualListView, {
|
@@ -21997,14 +21535,14 @@ var CSV_PREFIX = "data:text/csv;charset=utf-8,";
|
|
21997
21535
|
|
21998
21536
|
var styles$5 = {"action-btn":"_1jXbz","action-btn--pencil":"_at4xP","icon-rotate-180":"_12gv9","drop-area":"_R4bn5"};
|
21999
21537
|
|
22000
|
-
var _excluded$
|
21538
|
+
var _excluded$9 = ["text", "isRequired", "className"];
|
22001
21539
|
var LabelRequired = function LabelRequired(_ref) {
|
22002
21540
|
var text = _ref.text,
|
22003
21541
|
_ref$isRequired = _ref.isRequired,
|
22004
21542
|
isRequired = _ref$isRequired === void 0 ? true : _ref$isRequired,
|
22005
21543
|
_ref$className = _ref.className,
|
22006
21544
|
className = _ref$className === void 0 ? "" : _ref$className,
|
22007
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
21545
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
22008
21546
|
return React__default.createElement(material.FormLabel, Object.assign({
|
22009
21547
|
className: "fw-medium mb-1 " + className
|
22010
21548
|
}, rest), text, isRequired && React__default.createElement("span", {
|
@@ -22058,7 +21596,7 @@ var deleteUserApi = function deleteUserApi(id) {
|
|
22058
21596
|
return api["delete"](USER_URL + "/delete/" + id);
|
22059
21597
|
};
|
22060
21598
|
|
22061
|
-
var _excluded$
|
21599
|
+
var _excluded$a = ["ref"],
|
22062
21600
|
_excluded2$1 = ["ref"],
|
22063
21601
|
_excluded3$1 = ["ref"],
|
22064
21602
|
_excluded4 = ["ref"],
|
@@ -22088,7 +21626,7 @@ var UserDialog = function UserDialog(_ref) {
|
|
22088
21626
|
t = _useTranslation.t;
|
22089
21627
|
var _register = register("fullName"),
|
22090
21628
|
fullNameRef = _register.ref,
|
22091
|
-
fullNameBio = _objectWithoutPropertiesLoose(_register, _excluded$
|
21629
|
+
fullNameBio = _objectWithoutPropertiesLoose(_register, _excluded$a);
|
22092
21630
|
var _register2 = register("email"),
|
22093
21631
|
emailRef = _register2.ref,
|
22094
21632
|
emailBio = _objectWithoutPropertiesLoose(_register2, _excluded2$1);
|
@@ -22133,11 +21671,24 @@ var UserDialog = function UserDialog(_ref) {
|
|
22133
21671
|
setDefaultPassCodeChanged = _useState8[1];
|
22134
21672
|
var theme = material.useTheme();
|
22135
21673
|
var gradeOptions = React.useMemo(function () {
|
22136
|
-
|
21674
|
+
var _watch;
|
21675
|
+
var schoolName = (_watch = watch("schoolName")) === null || _watch === void 0 ? void 0 : _watch.trim();
|
21676
|
+
if (schoolName !== null && schoolName !== void 0 && schoolName.includes(t("middle_school")) || schoolName !== null && schoolName !== void 0 && schoolName.includes("중학교")) return MIDDLE_GRADES.map(function (i) {
|
22137
21677
|
return _extends({}, i, {
|
22138
21678
|
label: typeof i.label === "string" ? t(i.label) : i.label
|
22139
21679
|
});
|
22140
|
-
})
|
21680
|
+
});
|
21681
|
+
if (schoolName !== null && schoolName !== void 0 && schoolName.includes(t("high_school")) || schoolName !== null && schoolName !== void 0 && schoolName.includes("고등학교")) return HIGH_GRADES.map(function (i) {
|
21682
|
+
return _extends({}, i, {
|
21683
|
+
label: t(i.label)
|
21684
|
+
});
|
21685
|
+
});
|
21686
|
+
if (schoolName !== null && schoolName !== void 0 && schoolName.includes(t("elementary_school")) || schoolName !== null && schoolName !== void 0 && schoolName.includes("초등학교")) return ELEMENTARY_GRADES.map(function (i) {
|
21687
|
+
return _extends({}, i, {
|
21688
|
+
label: typeof i.label === "string" ? t(i.label) : i.label
|
21689
|
+
});
|
21690
|
+
});
|
21691
|
+
return [];
|
22141
21692
|
}, [t, watch("schoolName")]);
|
22142
21693
|
var handleChangeRole = function handleChangeRole(role) {
|
22143
21694
|
setRoles([role]);
|
@@ -26066,12 +25617,12 @@ var ArticleDialog = function ArticleDialog(_ref) {
|
|
26066
25617
|
|
26067
25618
|
var styles$7 = {"drawer":"_11aYm","open":"_3Ydwm","drawer-overlay":"_3SQDf","drawer-header":"_2BwOx","drawer-form":"_2Zo7R","dropdown-content-academy":"_1lzjD","dropdown-change":"_1y7K9","dropdown-academy-item":"_1Y-55","dropdown-content-language":"_1fBXY","dropdown-item-language":"_3Szun","dropdown-item-language-active":"_2HhLb","item-address":"_3WYHC","item-logout":"_2-9ix","title-address":"_1r4pn","image-academy":"_2ZozT"};
|
26068
25619
|
|
26069
|
-
var _excluded$
|
25620
|
+
var _excluded$b = ["isOpen", "onClose", "handleSaveExam"];
|
26070
25621
|
var CreateExamDrawer = function CreateExamDrawer(props) {
|
26071
25622
|
var isOpen = props.isOpen,
|
26072
25623
|
onClose = props.onClose,
|
26073
25624
|
handleSaveExam = props.handleSaveExam,
|
26074
|
-
examDetailViewProps = _objectWithoutPropertiesLoose(props, _excluded$
|
25625
|
+
examDetailViewProps = _objectWithoutPropertiesLoose(props, _excluded$b);
|
26075
25626
|
var _useTranslation = reactI18next.useTranslation(),
|
26076
25627
|
t = _useTranslation.t;
|
26077
25628
|
var theme = material.useTheme();
|
@@ -26319,11 +25870,9 @@ var TextbookViewDetail = function TextbookViewDetail(props) {
|
|
26319
25870
|
|
26320
25871
|
var PAGE_TITLE$7 = "textbooks";
|
26321
25872
|
var useTextbookList = function useTextbookList(props) {
|
26322
|
-
var _user$roles, _user$roles2;
|
26323
25873
|
var onNavigateCreate = props.onNavigateCreate,
|
26324
25874
|
onNavigateDetail = props.onNavigateDetail,
|
26325
|
-
isSuperAdmin = props.isSuperAdmin
|
26326
|
-
role = props.role;
|
25875
|
+
isSuperAdmin = props.isSuperAdmin;
|
26327
25876
|
var _useList = useList(function (search) {
|
26328
25877
|
return getTextbookListApi(search, isSuperAdmin);
|
26329
25878
|
}, TextbookDefaultQuery),
|
@@ -26338,21 +25887,14 @@ var useTextbookList = function useTextbookList(props) {
|
|
26338
25887
|
calcOrderNumber = _useList.calcOrderNumber,
|
26339
25888
|
handleChangeSelectedItem = _useList.handleChangeSelectedItem,
|
26340
25889
|
getData = _useList.getData;
|
26341
|
-
var user = reactRedux.useSelector(function (state) {
|
26342
|
-
var _state$common;
|
26343
|
-
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
26344
|
-
});
|
26345
|
-
var isTeacherSite = role === exports.Role.Teacher;
|
26346
|
-
var isAdmin = !!user && ((_user$roles = user.roles) === null || _user$roles === void 0 ? void 0 : _user$roles.includes(exports.Role.Admin));
|
26347
|
-
var isTeacher = !!user && ((_user$roles2 = user.roles) === null || _user$roles2 === void 0 ? void 0 : _user$roles2.includes(exports.Role.Teacher)) && !isAdmin;
|
26348
25890
|
var _useTranslation = reactI18next.useTranslation(),
|
26349
25891
|
t = _useTranslation.t;
|
26350
25892
|
var dispatch = reactRedux.useDispatch();
|
26351
25893
|
var handleViewTextbook = function handleViewTextbook(data) {
|
26352
|
-
onNavigateDetail(data, true,
|
25894
|
+
onNavigateDetail(data, true, true);
|
26353
25895
|
};
|
26354
25896
|
var handleUpdateTextbook = function handleUpdateTextbook(data) {
|
26355
|
-
onNavigateDetail(data, false,
|
25897
|
+
onNavigateDetail(data, false, true);
|
26356
25898
|
};
|
26357
25899
|
var handleCreateTextbook = function handleCreateTextbook() {
|
26358
25900
|
onNavigateCreate === null || onNavigateCreate === void 0 ? void 0 : onNavigateCreate();
|
@@ -26388,9 +25930,6 @@ var useTextbookList = function useTextbookList(props) {
|
|
26388
25930
|
document.title = t("study_peak") + " | " + t(PAGE_TITLE$7);
|
26389
25931
|
}, [t]);
|
26390
25932
|
return {
|
26391
|
-
user: user,
|
26392
|
-
isTeacherSite: isTeacherSite,
|
26393
|
-
isTeacher: isTeacher,
|
26394
25933
|
filter: filter,
|
26395
25934
|
textSearchRef: textSearchRef,
|
26396
25935
|
getData: getData,
|
@@ -26629,6 +26168,8 @@ var useTextbookShare = function useTextbookShare(props) {
|
|
26629
26168
|
});
|
26630
26169
|
var isAdmin = infoUser && (infoUser === null || infoUser === void 0 ? void 0 : (_infoUser$roles = infoUser.roles) === null || _infoUser$roles === void 0 ? void 0 : _infoUser$roles.includes(exports.Role.Admin));
|
26631
26170
|
var isAdminSite = role === exports.Role.Admin;
|
26171
|
+
var onAcademy = !!infoUser.academyDomain;
|
26172
|
+
var isSuperAdminUser = infoUser && infoUser.isSuperAdmin;
|
26632
26173
|
React.useEffect(function () {
|
26633
26174
|
if (!isUpdate) {
|
26634
26175
|
filterTeacherNotShared(currentModel);
|
@@ -26719,6 +26260,12 @@ var useTextbookShare = function useTextbookShare(props) {
|
|
26719
26260
|
});
|
26720
26261
|
setShared(existsTeachers);
|
26721
26262
|
};
|
26263
|
+
var enabledSave = function enabledSave(textbook) {
|
26264
|
+
return onAcademy && (isAdminSite || isSuperAdmin || isSuperAdminUser || !isAdmin && textbook.isShared && textbook.createdBy.id === infoUser.id);
|
26265
|
+
};
|
26266
|
+
var enabledShare = function enabledShare(textbook) {
|
26267
|
+
return textbook.isShared && onAcademy && (isAdminSite || isSuperAdminUser || !isAdmin && textbook.createdBy.id === infoUser.id);
|
26268
|
+
};
|
26722
26269
|
var handleShareTextbook = function handleShareTextbook(teacherIds, textbookId) {
|
26723
26270
|
try {
|
26724
26271
|
var _temp2 = function _temp2() {
|
@@ -26795,117 +26342,19 @@ var useTextbookShare = function useTextbookShare(props) {
|
|
26795
26342
|
isUpdate: isUpdate,
|
26796
26343
|
handleUpdateSharedTextbook: handleUpdateSharedTextbook,
|
26797
26344
|
currentModel: currentModel,
|
26345
|
+
enabledSave: enabledSave,
|
26346
|
+
enabledShare: enabledShare,
|
26798
26347
|
isAdmin: isAdmin,
|
26799
26348
|
isAdminSite: isAdminSite
|
26800
26349
|
};
|
26801
26350
|
};
|
26802
26351
|
|
26803
|
-
var TextbookRow = function TextbookRow(_ref) {
|
26804
|
-
var _infoUser$roles, _infoUser$roles2, _data$createdBy, _data$textbookOwners, _data$createdBy2, _data$createdBy3;
|
26805
|
-
var index = _ref.index,
|
26806
|
-
data = _ref.data,
|
26807
|
-
role = _ref.role,
|
26808
|
-
isSuperAdmin = _ref.isSuperAdmin,
|
26809
|
-
calcOrderNumber = _ref.calcOrderNumber,
|
26810
|
-
onUpdateTextbook = _ref.onUpdateTextbook,
|
26811
|
-
onDeleteTextbook = _ref.onDeleteTextbook,
|
26812
|
-
onViewTextbook = _ref.onViewTextbook,
|
26813
|
-
onShareTextbook = _ref.onShareTextbook,
|
26814
|
-
onUpdateShareTextbook = _ref.onUpdateShareTextbook;
|
26815
|
-
var infoUser = reactRedux.useSelector(function (state) {
|
26816
|
-
var _state$common;
|
26817
|
-
return (state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user) || {};
|
26818
|
-
});
|
26819
|
-
var isAdmin = infoUser && (infoUser === null || infoUser === void 0 ? void 0 : (_infoUser$roles = infoUser.roles) === null || _infoUser$roles === void 0 ? void 0 : _infoUser$roles.includes(exports.Role.Admin));
|
26820
|
-
var isTeacherSite = role === exports.Role.Teacher;
|
26821
|
-
var isTeacher = !!infoUser && ((_infoUser$roles2 = infoUser.roles) === null || _infoUser$roles2 === void 0 ? void 0 : _infoUser$roles2.includes(exports.Role.Teacher)) && !isAdmin;
|
26822
|
-
var isAdminSite = role === exports.Role.Admin;
|
26823
|
-
var onAcademy = !!infoUser.academyDomain;
|
26824
|
-
var isSuperAdminUser = infoUser && infoUser.isSuperAdmin;
|
26825
|
-
var academy = reactRedux.useSelector(function (state) {
|
26826
|
-
var _state$common2;
|
26827
|
-
return state === null || state === void 0 ? void 0 : (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : _state$common2.academy;
|
26828
|
-
});
|
26829
|
-
var _useTranslation = reactI18next.useTranslation(),
|
26830
|
-
t = _useTranslation.t;
|
26831
|
-
var isEditable = !onAcademy || isAdminSite || isSuperAdmin || isSuperAdminUser || !isAdmin && data.isShared && (((_data$createdBy = data.createdBy) === null || _data$createdBy === void 0 ? void 0 : _data$createdBy.id) === (infoUser === null || infoUser === void 0 ? void 0 : infoUser.id) || ((_data$textbookOwners = data.textbookOwners) === null || _data$textbookOwners === void 0 ? void 0 : _data$textbookOwners.some(function (i) {
|
26832
|
-
var _infoUser$email, _infoUser$email$trim;
|
26833
|
-
return (i === null || i === void 0 ? void 0 : i.email.trim().toUpperCase()) === (infoUser === null || infoUser === void 0 ? void 0 : (_infoUser$email = infoUser.email) === null || _infoUser$email === void 0 ? void 0 : (_infoUser$email$trim = _infoUser$email.trim()) === null || _infoUser$email$trim === void 0 ? void 0 : _infoUser$email$trim.toUpperCase()) && (i === null || i === void 0 ? void 0 : i.academyId) === (academy === null || academy === void 0 ? void 0 : academy.id);
|
26834
|
-
})));
|
26835
|
-
var isDeleteAble = !onAcademy || isAdminSite || isSuperAdmin || isSuperAdminUser || !isAdmin && data.isShared && ((_data$createdBy2 = data.createdBy) === null || _data$createdBy2 === void 0 ? void 0 : _data$createdBy2.id) === (infoUser === null || infoUser === void 0 ? void 0 : infoUser.id);
|
26836
|
-
var isSharable = !data.isPublic && data.isShared && onAcademy && (isAdminSite || isSuperAdminUser || !isAdmin && data.createdBy.id === infoUser.id);
|
26837
|
-
var handleUpdateTextbook = function handleUpdateTextbook() {
|
26838
|
-
onUpdateTextbook(data);
|
26839
|
-
};
|
26840
|
-
var handleDeleteTextbook = function handleDeleteTextbook() {
|
26841
|
-
onDeleteTextbook(data);
|
26842
|
-
};
|
26843
|
-
var handleViewTextbook = function handleViewTextbook() {
|
26844
|
-
onViewTextbook(data);
|
26845
|
-
};
|
26846
|
-
var handleShareTextbook = function handleShareTextbook() {
|
26847
|
-
onShareTextbook(data);
|
26848
|
-
};
|
26849
|
-
var handleUpdateShareTextbook = function handleUpdateShareTextbook() {
|
26850
|
-
onUpdateShareTextbook(data);
|
26851
|
-
};
|
26852
|
-
return React__default.createElement(material.TableRow, {
|
26853
|
-
key: data.id
|
26854
|
-
}, React__default.createElement(material.TableCell, null, calcOrderNumber(index)), React__default.createElement(material.TableCell, null, data.name), React__default.createElement(material.TableCell, null, data.subject.name), React__default.createElement(material.TableCell, null, utcToLocalTime(data.createdAt, t("date_format"))), React__default.createElement(material.TableCell, null, data.totalChapters), isTeacher && isTeacherSite && React__default.createElement(material.TableCell, null, (infoUser === null || infoUser === void 0 ? void 0 : infoUser.id) === ((_data$createdBy3 = data.createdBy) === null || _data$createdBy3 === void 0 ? void 0 : _data$createdBy3.id) && data.isShared && React__default.createElement(fa.FaCheckCircle, {
|
26855
|
-
color: green[700]
|
26856
|
-
})), React__default.createElement(material.TableCell, null, !data.isPublic && data.sharedUsers.map(function (email, index) {
|
26857
|
-
return index > 2 ? null : index === 2 ? React__default.createElement("div", null, "(+", data.sharedUsers.length - 2, ")") : React__default.createElement("div", {
|
26858
|
-
key: index
|
26859
|
-
}, email.toLowerCase());
|
26860
|
-
})), React__default.createElement(material.TableCell, null, React__default.createElement(material.Stack, {
|
26861
|
-
direction: "row",
|
26862
|
-
spacing: 1,
|
26863
|
-
alignItems: "center"
|
26864
|
-
}, React__default.createElement(material.IconButton, {
|
26865
|
-
color: "default",
|
26866
|
-
className: (!isEditable ? "bg-secondary" : "bg-warning") + " text-white",
|
26867
|
-
onClick: handleUpdateTextbook,
|
26868
|
-
disabled: !isEditable
|
26869
|
-
}, React__default.createElement(fa6.FaPencil, {
|
26870
|
-
size: 12
|
26871
|
-
})), React__default.createElement(material.IconButton, {
|
26872
|
-
color: "default",
|
26873
|
-
className: "bg-primary text-white",
|
26874
|
-
onClick: handleViewTextbook
|
26875
|
-
}, React__default.createElement(fa.FaEye, {
|
26876
|
-
size: 12
|
26877
|
-
})), React__default.createElement(material.IconButton, {
|
26878
|
-
disabled: !isSharable,
|
26879
|
-
className: (!isSharable ? "bg-secondary" : "bg-info") + " text-white me-1",
|
26880
|
-
onClick: handleShareTextbook
|
26881
|
-
}, React__default.createElement(fa.FaShare, {
|
26882
|
-
size: 12
|
26883
|
-
})), React__default.createElement(material.IconButton, {
|
26884
|
-
disabled: !isSharable,
|
26885
|
-
className: (!isSharable ? "bg-secondary" : "bg-success") + " text-white me-1",
|
26886
|
-
onClick: handleUpdateShareTextbook
|
26887
|
-
}, React__default.createElement(fa.FaExchangeAlt, {
|
26888
|
-
size: 12
|
26889
|
-
})), React__default.createElement(material.IconButton, {
|
26890
|
-
color: "default",
|
26891
|
-
className: (!isDeleteAble ? "bg-secondary" : "bg-danger") + " text-white mr-1",
|
26892
|
-
onClick: handleDeleteTextbook,
|
26893
|
-
disabled: !isDeleteAble
|
26894
|
-
}, React__default.createElement(fa.FaTrash, {
|
26895
|
-
size: 12
|
26896
|
-
})))));
|
26897
|
-
};
|
26898
|
-
|
26899
26352
|
var TextbookList = function TextbookList(props) {
|
26900
26353
|
var _props$createable = props.createable,
|
26901
|
-
createable = _props$createable === void 0 ? true : _props$createable
|
26902
|
-
isSuperAdmin = props.isSuperAdmin,
|
26903
|
-
role = props.role;
|
26354
|
+
createable = _props$createable === void 0 ? true : _props$createable;
|
26904
26355
|
var _useTranslation = reactI18next.useTranslation(),
|
26905
26356
|
t = _useTranslation.t;
|
26906
26357
|
var _useTextbookList = useTextbookList(props),
|
26907
|
-
isTeacherSite = _useTextbookList.isTeacherSite,
|
26908
|
-
isTeacher = _useTextbookList.isTeacher,
|
26909
26358
|
filter = _useTextbookList.filter,
|
26910
26359
|
textbooks = _useTextbookList.textbooks,
|
26911
26360
|
paging = _useTextbookList.paging,
|
@@ -26947,14 +26396,9 @@ var TextbookList = function TextbookList(props) {
|
|
26947
26396
|
handleOpenUpdateShareDialog = _useTextbookShare.handleOpenUpdateShareDialog,
|
26948
26397
|
isUpdate = _useTextbookShare.isUpdate,
|
26949
26398
|
handleUpdateSharedTextbook = _useTextbookShare.handleUpdateSharedTextbook,
|
26950
|
-
currentModel = _useTextbookShare.currentModel
|
26951
|
-
|
26952
|
-
|
26953
|
-
if (isTeacher && isTeacherSite) headers.splice(5, 0, {
|
26954
|
-
title: "teacher_personal_textbook"
|
26955
|
-
});
|
26956
|
-
return headers;
|
26957
|
-
}, [isTeacher, isTeacherSite]);
|
26399
|
+
currentModel = _useTextbookShare.currentModel,
|
26400
|
+
enabledSave = _useTextbookShare.enabledSave,
|
26401
|
+
enabledShare = _useTextbookShare.enabledShare;
|
26958
26402
|
return React__default.createElement(LayoutList, {
|
26959
26403
|
title: t(TEXTBOOK_PAGE_TITLE)
|
26960
26404
|
}, React__default.createElement(material.Grid, {
|
@@ -26989,26 +26433,63 @@ var TextbookList = function TextbookList(props) {
|
|
26989
26433
|
xs: 12,
|
26990
26434
|
className: "mt-3"
|
26991
26435
|
}, React__default.createElement(material.Table, null, React__default.createElement(TableHeader, {
|
26992
|
-
headerTemplates:
|
26436
|
+
headerTemplates: TEXTBOOK_HEADERS,
|
26993
26437
|
filter: filter,
|
26994
26438
|
onSort: handleSort
|
26995
|
-
}), React__default.createElement(material.TableBody, null,
|
26996
|
-
|
26997
|
-
|
26998
|
-
|
26999
|
-
|
27000
|
-
|
27001
|
-
|
27002
|
-
|
27003
|
-
|
27004
|
-
|
27005
|
-
|
27006
|
-
|
27007
|
-
|
27008
|
-
|
27009
|
-
|
27010
|
-
|
27011
|
-
|
26439
|
+
}), React__default.createElement(material.TableBody, null, textbooks.map(function (i, index) {
|
26440
|
+
return React__default.createElement(material.TableRow, {
|
26441
|
+
key: i.id
|
26442
|
+
}, React__default.createElement(material.TableCell, null, calcOrderNumber(index)), React__default.createElement(material.TableCell, null, i.name), React__default.createElement(material.TableCell, null, i.subject.name), React__default.createElement(material.TableCell, null, utcToLocalTime(i.createdAt, t("date_format"))), React__default.createElement(material.TableCell, null, i.totalChapters), React__default.createElement(material.TableCell, null, i.sharedUsers.map(function (email, index) {
|
26443
|
+
return index > 2 ? null : index === 2 ? React__default.createElement("div", null, "(+", i.sharedUsers.length - 2, ")") : React__default.createElement("div", {
|
26444
|
+
key: index
|
26445
|
+
}, email.toLowerCase());
|
26446
|
+
})), React__default.createElement(material.TableCell, null, React__default.createElement(material.Stack, {
|
26447
|
+
direction: "row",
|
26448
|
+
spacing: 1,
|
26449
|
+
alignItems: "center"
|
26450
|
+
}, React__default.createElement(material.IconButton, {
|
26451
|
+
color: "default",
|
26452
|
+
className: (!enabledSave(i) ? "bg-secondary" : "bg-warning") + " text-white",
|
26453
|
+
onClick: function onClick() {
|
26454
|
+
return handleUpdateTextbook(i);
|
26455
|
+
},
|
26456
|
+
disabled: !enabledSave(i)
|
26457
|
+
}, React__default.createElement(fa6.FaPencil, {
|
26458
|
+
size: 12
|
26459
|
+
})), React__default.createElement(material.IconButton, {
|
26460
|
+
color: "default",
|
26461
|
+
className: "bg-primary text-white",
|
26462
|
+
onClick: function onClick() {
|
26463
|
+
return handleViewTextbook(i);
|
26464
|
+
}
|
26465
|
+
}, React__default.createElement(fa.FaEye, {
|
26466
|
+
size: 12
|
26467
|
+
})), React__default.createElement(material.IconButton, {
|
26468
|
+
disabled: !enabledShare(i),
|
26469
|
+
className: (!enabledShare(i) ? "bg-secondary" : "bg-info") + " text-white me-1",
|
26470
|
+
onClick: function onClick() {
|
26471
|
+
return handleOpenShareDialog(i);
|
26472
|
+
}
|
26473
|
+
}, React__default.createElement(fa.FaShare, {
|
26474
|
+
size: 12
|
26475
|
+
})), React__default.createElement(material.IconButton, {
|
26476
|
+
disabled: !enabledShare(i),
|
26477
|
+
className: (!enabledShare(i) ? "bg-secondary" : "bg-success") + " text-white me-1",
|
26478
|
+
onClick: function onClick() {
|
26479
|
+
return handleOpenUpdateShareDialog(i);
|
26480
|
+
}
|
26481
|
+
}, React__default.createElement(fa.FaExchangeAlt, {
|
26482
|
+
size: 12
|
26483
|
+
})), React__default.createElement(material.IconButton, {
|
26484
|
+
color: "default",
|
26485
|
+
className: (!enabledSave(i) ? "bg-secondary" : "bg-danger") + " text-white mr-1",
|
26486
|
+
onClick: function onClick() {
|
26487
|
+
return handleSelectDeleteTextbook(i);
|
26488
|
+
},
|
26489
|
+
disabled: !enabledSave(i)
|
26490
|
+
}, React__default.createElement(fa.FaTrash, {
|
26491
|
+
size: 12
|
26492
|
+
})))));
|
27012
26493
|
}), !textbooks.length && React__default.createElement(EmptyRow, null))), React__default.createElement("div", {
|
27013
26494
|
className: "d-flex justify-content-end mt-3"
|
27014
26495
|
}, !!paging.totalPages && React__default.createElement(material.Pagination, {
|
@@ -27206,12 +26687,12 @@ var useNotificationDetail = function useNotificationDetail(_ref) {
|
|
27206
26687
|
|
27207
26688
|
var styles$8 = {"avatar":"_8niRT"};
|
27208
26689
|
|
27209
|
-
var _excluded$
|
26690
|
+
var _excluded$c = ["value", "disabled", "optionTypeNotification"];
|
27210
26691
|
var TypeSelector = function TypeSelector(_ref) {
|
27211
26692
|
var value = _ref.value,
|
27212
26693
|
disabled = _ref.disabled,
|
27213
26694
|
optionTypeNotification = _ref.optionTypeNotification,
|
27214
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
26695
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
27215
26696
|
return React__default.createElement(CustomAsyncSelect, Object.assign({
|
27216
26697
|
options: optionTypeNotification,
|
27217
26698
|
value: value
|
@@ -27603,11 +27084,11 @@ var useNotificationList = function useNotificationList(_ref) {
|
|
27603
27084
|
};
|
27604
27085
|
};
|
27605
27086
|
|
27606
|
-
var _excluded$
|
27087
|
+
var _excluded$d = ["value", "optionTypeNotification"];
|
27607
27088
|
var SelectFilterType = function SelectFilterType(_ref) {
|
27608
27089
|
var value = _ref.value,
|
27609
27090
|
optionTypeNotification = _ref.optionTypeNotification,
|
27610
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
27091
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
27611
27092
|
return React__default.createElement(CustomAsyncSelect, Object.assign({
|
27612
27093
|
options: optionTypeNotification,
|
27613
27094
|
value: value
|
@@ -27661,8 +27142,7 @@ var NotificationList = function NotificationList(_ref) {
|
|
27661
27142
|
startIcon: React__default.createElement(fa.FaPlus, {
|
27662
27143
|
size: 12
|
27663
27144
|
}),
|
27664
|
-
onClick: handleCreateNotification
|
27665
|
-
disabled: !isAdmin && isTeacherAdmin
|
27145
|
+
onClick: handleCreateNotification
|
27666
27146
|
}, t("new_notification"))), React__default.createElement(material.Grid, {
|
27667
27147
|
container: true
|
27668
27148
|
}, React__default.createElement(material.Grid, {
|
@@ -27767,6 +27247,7 @@ var NotificationList = function NotificationList(_ref) {
|
|
27767
27247
|
};
|
27768
27248
|
|
27769
27249
|
var TEXTBOOK_URL$1 = BASE_URL + "/api/textbooks";
|
27250
|
+
var SUPER_ADMIN_TEXTBOOK_URL = SUPER_ADMIN_BASE_URL + "/api/textbook";
|
27770
27251
|
var PREPARED_TEXTBOOK_URL = BASE_URL + "/api/textbooks/prepared-textbooks";
|
27771
27252
|
var SUPER_ADMIN_PREPARED_TEXTBOOK_URL = SUPER_ADMIN_BASE_URL + "/api/textbook/prepared-textbooks";
|
27772
27253
|
var FILE_URL = BASE_URL + "/api/file/images";
|
@@ -27788,11 +27269,10 @@ var createTextbookApi$1 = function createTextbookApi(values, isAdmin) {
|
|
27788
27269
|
var updateTextbookApi$1 = function updateTextbookApi(values, id, isAdmin) {
|
27789
27270
|
return api.put((isAdmin ? SUPER_ADMIN_PREPARED_TEXTBOOK_URL : PREPARED_TEXTBOOK_URL) + "/" + id, values);
|
27790
27271
|
};
|
27791
|
-
var
|
27792
|
-
return api.get(TEXTBOOK_URL$1 + "/
|
27272
|
+
var getAcademyByTeacher = function getAcademyByTeacher(email, isAdmin) {
|
27273
|
+
return api.get((isAdmin ? SUPER_ADMIN_TEXTBOOK_URL : TEXTBOOK_URL$1) + "/academy-teacher-owner", {
|
27793
27274
|
params: {
|
27794
|
-
email: email
|
27795
|
-
academyId: academyId
|
27275
|
+
email: email
|
27796
27276
|
}
|
27797
27277
|
});
|
27798
27278
|
};
|
@@ -27801,9 +27281,8 @@ var deleteTextbookApi$1 = function deleteTextbookApi(textbookId, isAdmin) {
|
|
27801
27281
|
};
|
27802
27282
|
|
27803
27283
|
var useTextbookManagement = function useTextbookManagement(_ref) {
|
27804
|
-
var _user$roles
|
27284
|
+
var _user$roles;
|
27805
27285
|
var textbookId = _ref.textbookId,
|
27806
|
-
role = _ref.role,
|
27807
27286
|
onNavigateList = _ref.onNavigateList;
|
27808
27287
|
var _useTranslation = reactI18next.useTranslation(),
|
27809
27288
|
t = _useTranslation.t;
|
@@ -27820,28 +27299,13 @@ var useTextbookManagement = function useTextbookManagement(_ref) {
|
|
27820
27299
|
var _useState4 = React.useState(false),
|
27821
27300
|
selectedChapter = _useState4[0],
|
27822
27301
|
setSelectedChapter = _useState4[1];
|
27823
|
-
var searchParams = new URLSearchParams(location.search);
|
27824
|
-
var isReadonly = searchParams.get('readonly') === "true";
|
27825
27302
|
var dispatch = reactRedux.useDispatch();
|
27826
27303
|
var user = reactRedux.useSelector(function (state) {
|
27827
27304
|
var _state$common;
|
27828
27305
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
27829
27306
|
});
|
27830
|
-
var
|
27831
|
-
var _state$common2;
|
27832
|
-
return state === null || state === void 0 ? void 0 : (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : _state$common2.academy;
|
27833
|
-
});
|
27834
|
-
var isAdmin = user && (user === null || user === void 0 ? void 0 : (_user$roles = user.roles) === null || _user$roles === void 0 ? void 0 : _user$roles.includes(exports.Role.Admin));
|
27835
|
-
var isTeacher = user && (user === null || user === void 0 ? void 0 : (_user$roles2 = user.roles) === null || _user$roles2 === void 0 ? void 0 : _user$roles2.includes(exports.Role.Teacher)) && !isAdmin;
|
27307
|
+
var isAdmin = user === null || user === void 0 ? void 0 : (_user$roles = user.roles) === null || _user$roles === void 0 ? void 0 : _user$roles.includes(exports.Role.Admin);
|
27836
27308
|
var isSuperAdmin = !!user && !user.academyDomain;
|
27837
|
-
var isAdminSite = role === exports.Role.Admin;
|
27838
|
-
var onAcademy = !!(user !== null && user !== void 0 && user.academyDomain);
|
27839
|
-
var isSuperAdminUser = !!user && user.isSuperAdmin;
|
27840
|
-
var isEditable = !selectedTextbook || !onAcademy || isAdminSite || isSuperAdmin || isSuperAdminUser || !isAdmin && selectedTextbook.isShared && (((_selectedTextbook$cre = selectedTextbook.createdBy) === null || _selectedTextbook$cre === void 0 ? void 0 : _selectedTextbook$cre.id) === (user === null || user === void 0 ? void 0 : user.id) || selectedTextbook.textbookOwners.some(function (i) {
|
27841
|
-
var _user$email, _user$email$trim;
|
27842
|
-
return i.email.trim().toUpperCase() === (user === null || user === void 0 ? void 0 : (_user$email = user.email) === null || _user$email === void 0 ? void 0 : (_user$email$trim = _user$email.trim()) === null || _user$email$trim === void 0 ? void 0 : _user$email$trim.toUpperCase()) && i.academyId === (academy === null || academy === void 0 ? void 0 : academy.id);
|
27843
|
-
}));
|
27844
|
-
var disabledTextbookOwners = !selectedTextbook && isAdmin || selectedTextbook && (!isEditable || isTeacher && ((_selectedTextbook$cre2 = selectedTextbook.createdBy) === null || _selectedTextbook$cre2 === void 0 ? void 0 : _selectedTextbook$cre2.id) !== (user === null || user === void 0 ? void 0 : user.id) || isAdmin && !isSuperAdminUser);
|
27845
27309
|
var handleOpenConfirmDeleteChapterDialog = function handleOpenConfirmDeleteChapterDialog(chapter) {
|
27846
27310
|
setSelectedChapter(chapter);
|
27847
27311
|
};
|
@@ -27896,7 +27360,6 @@ var useTextbookManagement = function useTextbookManagement(_ref) {
|
|
27896
27360
|
var _temp3 = function _temp3() {
|
27897
27361
|
dispatch(setLoading(false));
|
27898
27362
|
};
|
27899
|
-
if (isReadonly || !isEditable) return Promise.resolve();
|
27900
27363
|
if (!coverImage && !(values !== null && values !== void 0 && values.coverImage)) {
|
27901
27364
|
reactToastify.toast.error(t("please_select_image_file"));
|
27902
27365
|
return Promise.resolve();
|
@@ -27948,16 +27411,11 @@ var useTextbookManagement = function useTextbookManagement(_ref) {
|
|
27948
27411
|
}, [textbookId]);
|
27949
27412
|
return {
|
27950
27413
|
t: t,
|
27951
|
-
isAdminSite: isAdminSite,
|
27952
|
-
disabledTextbookOwners: disabledTextbookOwners,
|
27953
|
-
isReadonly: isReadonly,
|
27954
|
-
isEditable: isEditable,
|
27955
27414
|
isAdmin: isAdmin,
|
27956
27415
|
theme: theme,
|
27957
27416
|
history: history,
|
27958
27417
|
coverImage: coverImage,
|
27959
27418
|
isSuperAdmin: isSuperAdmin,
|
27960
|
-
isSuperAdminUser: isSuperAdminUser,
|
27961
27419
|
openDialog: openDialog,
|
27962
27420
|
handleSubmit: handleSubmit,
|
27963
27421
|
selectedTextbook: selectedTextbook,
|
@@ -27988,12 +27446,6 @@ var HighSchoolGrade;
|
|
27988
27446
|
HighSchoolGrade[HighSchoolGrade["ProbabilityAndStatistics"] = 6] = "ProbabilityAndStatistics";
|
27989
27447
|
HighSchoolGrade[HighSchoolGrade["Geometry"] = 7] = "Geometry";
|
27990
27448
|
})(HighSchoolGrade || (HighSchoolGrade = {}));
|
27991
|
-
var TextbookEditorType;
|
27992
|
-
(function (TextbookEditorType) {
|
27993
|
-
TextbookEditorType[TextbookEditorType["Default"] = 0] = "Default";
|
27994
|
-
TextbookEditorType[TextbookEditorType["Korea"] = 1] = "Korea";
|
27995
|
-
TextbookEditorType[TextbookEditorType["Math"] = 2] = "Math";
|
27996
|
-
})(TextbookEditorType || (TextbookEditorType = {}));
|
27997
27449
|
|
27998
27450
|
var TextbookSortBy$1;
|
27999
27451
|
(function (TextbookSortBy) {
|
@@ -28023,7 +27475,7 @@ var TextbookState;
|
|
28023
27475
|
TextbookState[TextbookState["Article"] = 3] = "Article";
|
28024
27476
|
})(TextbookState || (TextbookState = {}));
|
28025
27477
|
|
28026
|
-
var SCHOOL_OPTIONS = [{
|
27478
|
+
var SCHOOL_OPTIONS$1 = [{
|
28027
27479
|
label: "all",
|
28028
27480
|
value: SchoolType.Default
|
28029
27481
|
}, {
|
@@ -28060,7 +27512,7 @@ var ELEMANTARY_GRADES = Array.from({
|
|
28060
27512
|
value: index
|
28061
27513
|
};
|
28062
27514
|
});
|
28063
|
-
var MIDDLE_GRADES = Array.from({
|
27515
|
+
var MIDDLE_GRADES$1 = Array.from({
|
28064
27516
|
length: 4
|
28065
27517
|
}, function (_, index) {
|
28066
27518
|
return {
|
@@ -28068,7 +27520,7 @@ var MIDDLE_GRADES = Array.from({
|
|
28068
27520
|
value: index
|
28069
27521
|
};
|
28070
27522
|
});
|
28071
|
-
var HIGH_GRADES = [{
|
27523
|
+
var HIGH_GRADES$1 = [{
|
28072
27524
|
label: "all",
|
28073
27525
|
value: HighSchoolGrade.Default
|
28074
27526
|
}, {
|
@@ -28131,13 +27583,8 @@ var preparedTextbookSchema = function preparedTextbookSchema(t) {
|
|
28131
27583
|
publicationDate: yup.string().required(t("publication_date_required")),
|
28132
27584
|
publisher: yup.string().required(t("publisher_required")),
|
28133
27585
|
isbn: yup.string().required(t("isbn_required")),
|
28134
|
-
grade: yup.number().required(t("grade_required")).
|
27586
|
+
grade: yup.number().required(t("grade_required")).positive().integer().typeError(t("must_be_number")).min(1, t("min_is_1")).max(12, t("max_is_12")),
|
28135
27587
|
type: yup.number(),
|
28136
|
-
textbookOwners: yup.array().of(yup.object().shape({
|
28137
|
-
email: yup.string().trim().email(t("invalid_textbook_owner_email_address")).required(t("textbook_owner_email_is_required")),
|
28138
|
-
academyId: yup.number().required(t("textbook_owner_academy_is_required")),
|
28139
|
-
courseId: yup.number().required(t("textbook_owner_course_is_required"))
|
28140
|
-
})),
|
28141
27588
|
chapters: yup.array().of(yup.object().shape({
|
28142
27589
|
pageFrom: yup.number().required(t("page_from_required")).integer().typeError(t("must_be_number")).min(1, t("min_is_1")),
|
28143
27590
|
pageTo: yup.number().required(t("page_to_required")).integer().typeError(t("must_be_number")).test("is-greater", t("page_to_must_be_greater_than_or_equal_to_page_from"), function (value) {
|
@@ -28210,7 +27657,7 @@ var DEFAULT_TEXTBOOK_REQUEST = {
|
|
28210
27657
|
grade: "",
|
28211
27658
|
textbookOwners: [],
|
28212
27659
|
isPrepared: true,
|
28213
|
-
type:
|
27660
|
+
type: 0
|
28214
27661
|
};
|
28215
27662
|
var DEFAULT_CHAPTER = {
|
28216
27663
|
name: "",
|
@@ -28260,169 +27707,136 @@ var CustomTextbookTab = function CustomTextbookTab(props) {
|
|
28260
27707
|
}, children));
|
28261
27708
|
};
|
28262
27709
|
|
28263
|
-
var
|
28264
|
-
|
28265
|
-
|
28266
|
-
|
28267
|
-
|
28268
|
-
|
28269
|
-
|
28270
|
-
|
28271
|
-
|
28272
|
-
|
28273
|
-
|
28274
|
-
|
28275
|
-
}
|
28276
|
-
return values;
|
27710
|
+
var grey = {
|
27711
|
+
0: '#FFFFFF',
|
27712
|
+
50: "#FBFBF9",
|
27713
|
+
100: '#EAEAE5',
|
27714
|
+
200: '#F4F6F8',
|
27715
|
+
300: '#D0D0C8',
|
27716
|
+
400: '#C4CDD5',
|
27717
|
+
500: '#9A9A98',
|
27718
|
+
600: '#637381',
|
27719
|
+
700: '#5D5D5B',
|
27720
|
+
800: '#212B36',
|
27721
|
+
900: '#363634'
|
28277
27722
|
};
|
28278
|
-
var
|
28279
|
-
|
28280
|
-
|
28281
|
-
|
28282
|
-
|
28283
|
-
|
28284
|
-
|
28285
|
-
if (values.hasOwnProperty(key)) {
|
28286
|
-
if (key === "categories" || key === "categoryOptions") {
|
28287
|
-
values[key] = [];
|
28288
|
-
} else if (key === "questionType" || key === "questionTypeId") {
|
28289
|
-
values[key] = null;
|
28290
|
-
} else if (typeof values[key] === "object" && values[key] !== null) {
|
28291
|
-
_resetAllCategoriesAndQuestionTypesBySubject(values[key]);
|
28292
|
-
}
|
28293
|
-
}
|
28294
|
-
}
|
28295
|
-
return values;
|
27723
|
+
var green = {
|
27724
|
+
0: '#FFFFFF',
|
27725
|
+
100: '#F0FFF6',
|
27726
|
+
300: '#89F0B2',
|
27727
|
+
500: '#3DC674',
|
27728
|
+
700: '#349056',
|
27729
|
+
900: '#18442A'
|
28296
27730
|
};
|
28297
|
-
var
|
28298
|
-
|
28299
|
-
|
28300
|
-
|
28301
|
-
|
28302
|
-
|
28303
|
-
subject: selectedTextbook.subject ? {
|
28304
|
-
label: selectedTextbook.subject.name,
|
28305
|
-
value: selectedTextbook.subject.id
|
28306
|
-
} : null,
|
28307
|
-
preparedType: selectedTextbook.preparedType || 0,
|
28308
|
-
grade: selectedTextbook.grade || "1",
|
28309
|
-
publicationDate: (selectedTextbook === null || selectedTextbook === void 0 ? void 0 : selectedTextbook.publicationDate) || "",
|
28310
|
-
publisher: selectedTextbook.publisher || "",
|
28311
|
-
isbn: selectedTextbook.isbn || "",
|
28312
|
-
coverImage: selectedTextbook.coverImage || "",
|
28313
|
-
textbookOwners: selectedTextbook.textbookOwners.map(function (to) {
|
28314
|
-
return _extends({}, to, {
|
28315
|
-
academy: to.academy ? {
|
28316
|
-
label: to.academy.name,
|
28317
|
-
value: to.academy.id
|
28318
|
-
} : null,
|
28319
|
-
course: to.course ? {
|
28320
|
-
label: to.course.name,
|
28321
|
-
value: to.course.id
|
28322
|
-
} : null
|
28323
|
-
});
|
28324
|
-
}),
|
28325
|
-
isPublic: selectedTextbook.isPublic || false,
|
28326
|
-
isShared: selectedTextbook.isShared || false,
|
28327
|
-
isPrepared: true,
|
28328
|
-
type: selectedTextbook.type,
|
28329
|
-
chapters: selectedTextbook.chapters.map(function (c) {
|
28330
|
-
var _c$questionGroups;
|
28331
|
-
return {
|
28332
|
-
name: c.name,
|
28333
|
-
pageFrom: c.pageFrom || 0,
|
28334
|
-
pageTo: c.pageTo || 0,
|
28335
|
-
id: c.id,
|
28336
|
-
questionGroups: ((_c$questionGroups = c.questionGroups) === null || _c$questionGroups === void 0 ? void 0 : _c$questionGroups.map(function (g) {
|
28337
|
-
var _g$questions, _g$questions$find;
|
28338
|
-
return {
|
28339
|
-
id: g.id,
|
28340
|
-
chapterId: c.id,
|
28341
|
-
questions: g.questions.map(function (q) {
|
28342
|
-
var _q$questionType;
|
28343
|
-
return _extends({}, q, {
|
28344
|
-
questionTypeId: q.questionTypeId || q.questionType.id,
|
28345
|
-
questionType: (_q$questionType = q.questionType) !== null && _q$questionType !== void 0 && _q$questionType.id ? {
|
28346
|
-
label: q.questionType.name,
|
28347
|
-
value: q.questionType.id
|
28348
|
-
} : null
|
28349
|
-
});
|
28350
|
-
}),
|
28351
|
-
articles: g.articles.map(function (a) {
|
28352
|
-
return _extends({}, a, {
|
28353
|
-
categoryOptions: a.categories.map(function (cat) {
|
28354
|
-
return {
|
28355
|
-
label: cat.name,
|
28356
|
-
value: cat.id
|
28357
|
-
};
|
28358
|
-
}),
|
28359
|
-
categories: a.categories.filter(function (cat) {
|
28360
|
-
return !!cat.id;
|
28361
|
-
}).map(function (cat) {
|
28362
|
-
return cat.id;
|
28363
|
-
})
|
28364
|
-
});
|
28365
|
-
}),
|
28366
|
-
questionCount: g.questions.length,
|
28367
|
-
answerCount: ((_g$questions = g.questions) === null || _g$questions === void 0 ? void 0 : (_g$questions$find = _g$questions.find(function (q) {
|
28368
|
-
return q.questionAnswerType !== exports.QuestionAnswerType.ShortAnswer;
|
28369
|
-
})) === null || _g$questions$find === void 0 ? void 0 : _g$questions$find.numberOfAnswers) || DEFAULT_ANSWER_COUNT$2
|
28370
|
-
};
|
28371
|
-
})) || [],
|
28372
|
-
subChapters: c.subChapters.map(function (sub) {
|
28373
|
-
var _sub$questionGroups;
|
28374
|
-
return {
|
28375
|
-
name: sub.name,
|
28376
|
-
pageFrom: sub.pageFrom || 0,
|
28377
|
-
pageTo: sub.pageTo || 0,
|
28378
|
-
id: sub.id,
|
28379
|
-
questionGroups: ((_sub$questionGroups = sub.questionGroups) === null || _sub$questionGroups === void 0 ? void 0 : _sub$questionGroups.map(function (g) {
|
28380
|
-
var _g$questions2, _g$questions2$find;
|
28381
|
-
return {
|
28382
|
-
id: g.id,
|
28383
|
-
chapterId: c.id,
|
28384
|
-
questions: g.questions.map(function (q) {
|
28385
|
-
var _q$questionType2;
|
28386
|
-
return _extends({}, q, {
|
28387
|
-
questionTypeId: q.questionTypeId || q.questionType.id,
|
28388
|
-
questionType: (_q$questionType2 = q.questionType) !== null && _q$questionType2 !== void 0 && _q$questionType2.id ? {
|
28389
|
-
label: q.questionType.name,
|
28390
|
-
value: q.questionType.id
|
28391
|
-
} : null
|
28392
|
-
});
|
28393
|
-
}),
|
28394
|
-
articles: g.articles.map(function (a) {
|
28395
|
-
return _extends({}, a, {
|
28396
|
-
categoryOptions: a.categories.map(function (cat) {
|
28397
|
-
return {
|
28398
|
-
label: cat.name,
|
28399
|
-
value: cat.id
|
28400
|
-
};
|
28401
|
-
}),
|
28402
|
-
categories: a.categories.filter(function (cat) {
|
28403
|
-
return !!cat.id;
|
28404
|
-
}).map(function (cat) {
|
28405
|
-
return cat.id;
|
28406
|
-
})
|
28407
|
-
});
|
28408
|
-
}),
|
28409
|
-
questionCount: g.questions.length,
|
28410
|
-
answerCount: ((_g$questions2 = g.questions) === null || _g$questions2 === void 0 ? void 0 : (_g$questions2$find = _g$questions2.find(function (q) {
|
28411
|
-
return q.questionAnswerType !== exports.QuestionAnswerType.ShortAnswer;
|
28412
|
-
})) === null || _g$questions2$find === void 0 ? void 0 : _g$questions2$find.numberOfAnswers) || DEFAULT_ANSWER_COUNT$2
|
28413
|
-
};
|
28414
|
-
})) || [],
|
28415
|
-
subChapters: []
|
28416
|
-
};
|
28417
|
-
})
|
28418
|
-
};
|
28419
|
-
})
|
28420
|
-
};
|
27731
|
+
var main_theme = {
|
27732
|
+
lighter: green[100],
|
27733
|
+
light: green[300],
|
27734
|
+
less_dark: green[500],
|
27735
|
+
dark: green[700],
|
27736
|
+
darker: green[900]
|
28421
27737
|
};
|
28422
|
-
var
|
28423
|
-
|
28424
|
-
|
28425
|
-
|
27738
|
+
var primary = {
|
27739
|
+
lighter: '#D0ECFE',
|
27740
|
+
light: '#73BAFB',
|
27741
|
+
main: '#1877F2',
|
27742
|
+
dark: '#0C44AE',
|
27743
|
+
darker: '#042174',
|
27744
|
+
contrastText: '#FFFFFF'
|
27745
|
+
};
|
27746
|
+
var secondary = {
|
27747
|
+
lighter: '#EFD6FF',
|
27748
|
+
light: '#C684FF',
|
27749
|
+
main: '#8E33FF',
|
27750
|
+
dark: '#5119B7',
|
27751
|
+
darker: '#27097A',
|
27752
|
+
contrastText: '#FFFFFF'
|
27753
|
+
};
|
27754
|
+
var info = {
|
27755
|
+
lighter: '#CAFDF5',
|
27756
|
+
light: '#61F3F3',
|
27757
|
+
main: '#00B8D9',
|
27758
|
+
dark: '#006C9C',
|
27759
|
+
darker: '#003768',
|
27760
|
+
contrastText: '#FFFFFF'
|
27761
|
+
};
|
27762
|
+
var success = {
|
27763
|
+
lighter: '#C8FAD6',
|
27764
|
+
light: '#5BE49B',
|
27765
|
+
main: '#00A76F',
|
27766
|
+
dark: '#007867',
|
27767
|
+
darker: '#004B50',
|
27768
|
+
contrastText: '#FFFFFF'
|
27769
|
+
};
|
27770
|
+
var warning$1 = {
|
27771
|
+
lighter: '#FFF5CC',
|
27772
|
+
light: '#FFD666',
|
27773
|
+
main: '#FFAB00',
|
27774
|
+
dark: '#B76E00',
|
27775
|
+
darker: '#7A4100',
|
27776
|
+
contrastText: grey[800]
|
27777
|
+
};
|
27778
|
+
var error = {
|
27779
|
+
lighter: '#FFE9D5',
|
27780
|
+
light: '#FFAC82',
|
27781
|
+
main: '#FF5630',
|
27782
|
+
dark: '#B71D18',
|
27783
|
+
darker: '#7A0916',
|
27784
|
+
contrastText: '#FFFFFF'
|
27785
|
+
};
|
27786
|
+
var red = {
|
27787
|
+
100: '#FEF8F8',
|
27788
|
+
300: '#FEF8F8',
|
27789
|
+
500: '#F4CACA',
|
27790
|
+
900: '#DB4D4D'
|
27791
|
+
};
|
27792
|
+
var yellow = {
|
27793
|
+
900: '#FEAF06'
|
27794
|
+
};
|
27795
|
+
var green_support = {
|
27796
|
+
100: '#F6FDF7',
|
27797
|
+
500: '#AEEAB3',
|
27798
|
+
900: '#3ACB46'
|
27799
|
+
};
|
27800
|
+
var purple = {
|
27801
|
+
900: '#C3099A'
|
27802
|
+
};
|
27803
|
+
var dark_purple = {
|
27804
|
+
900: '#6B0861'
|
27805
|
+
};
|
27806
|
+
var dark_red = {
|
27807
|
+
900: '#800202'
|
27808
|
+
};
|
27809
|
+
var common = {
|
27810
|
+
black: '#000000',
|
27811
|
+
white: '#FFFFFF'
|
27812
|
+
};
|
27813
|
+
var action$2 = {
|
27814
|
+
hover: styles$c.alpha(grey[500], 0.08),
|
27815
|
+
selected: styles$c.alpha(grey[500], 0.16),
|
27816
|
+
disabled: styles$c.alpha(grey[500], 0.8),
|
27817
|
+
disabledBackground: styles$c.alpha(grey[500], 0.24),
|
27818
|
+
focus: styles$c.alpha(grey[500], 0.24),
|
27819
|
+
hoverOpacity: 0.08,
|
27820
|
+
disabledOpacity: 0.48
|
27821
|
+
};
|
27822
|
+
var base = {
|
27823
|
+
primary: primary,
|
27824
|
+
secondary: secondary,
|
27825
|
+
info: info,
|
27826
|
+
main_theme: main_theme,
|
27827
|
+
success: success,
|
27828
|
+
warning: warning$1,
|
27829
|
+
error: error,
|
27830
|
+
grey: grey,
|
27831
|
+
common: common,
|
27832
|
+
red: red,
|
27833
|
+
yellow: yellow,
|
27834
|
+
green_support: green_support,
|
27835
|
+
purple: purple,
|
27836
|
+
dark_purple: dark_purple,
|
27837
|
+
dark_red: dark_red,
|
27838
|
+
divider: styles$c.alpha(grey[500], 0.2),
|
27839
|
+
action: action$2
|
28426
27840
|
};
|
28427
27841
|
|
28428
27842
|
var ArticleBlock = function ArticleBlock(_ref) {
|
@@ -28432,7 +27846,6 @@ var ArticleBlock = function ArticleBlock(_ref) {
|
|
28432
27846
|
path = _ref.path,
|
28433
27847
|
isLoadingCategories = _ref.isLoadingCategories,
|
28434
27848
|
optionKey = _ref.optionKey,
|
28435
|
-
disabled = _ref.disabled,
|
28436
27849
|
setFieldValue = _ref.setFieldValue,
|
28437
27850
|
onDuplicate = _ref.onDuplicate,
|
28438
27851
|
onDelete = _ref.onDelete,
|
@@ -28534,7 +27947,6 @@ var ArticleBlock = function ArticleBlock(_ref) {
|
|
28534
27947
|
onMenuClose: onCloseCategoryMenu
|
28535
27948
|
},
|
28536
27949
|
onChange: handleChangeCategory,
|
28537
|
-
isDisabled: disabled,
|
28538
27950
|
placeholder: t("select_category")
|
28539
27951
|
});
|
28540
27952
|
}
|
@@ -28572,7 +27984,7 @@ var ArticleBlock = function ArticleBlock(_ref) {
|
|
28572
27984
|
onMenuClose: onCloseCategoryMenu
|
28573
27985
|
},
|
28574
27986
|
onChange: handleChangeSubCategory,
|
28575
|
-
isDisabled:
|
27987
|
+
isDisabled: !data.categories[0],
|
28576
27988
|
placeholder: t("select_category")
|
28577
27989
|
});
|
28578
27990
|
}
|
@@ -28593,9 +28005,7 @@ var ArticleBlock = function ArticleBlock(_ref) {
|
|
28593
28005
|
return React__default.createElement(material.TextField, Object.assign({
|
28594
28006
|
placeholder: t("title")
|
28595
28007
|
}, field, {
|
28596
|
-
size: "small"
|
28597
|
-
onKeyDown: handleKeyDown,
|
28598
|
-
disabled: disabled
|
28008
|
+
size: "small"
|
28599
28009
|
}));
|
28600
28010
|
}
|
28601
28011
|
}))), React__default.createElement(material.Grid, {
|
@@ -28615,9 +28025,7 @@ var ArticleBlock = function ArticleBlock(_ref) {
|
|
28615
28025
|
return React__default.createElement(material.TextField, Object.assign({
|
28616
28026
|
placeholder: t("author")
|
28617
28027
|
}, field, {
|
28618
|
-
size: "small"
|
28619
|
-
onKeyDown: handleKeyDown,
|
28620
|
-
disabled: disabled
|
28028
|
+
size: "small"
|
28621
28029
|
}));
|
28622
28030
|
}
|
28623
28031
|
}))), React__default.createElement(material.Grid, {
|
@@ -28637,9 +28045,7 @@ var ArticleBlock = function ArticleBlock(_ref) {
|
|
28637
28045
|
return React__default.createElement(material.TextField, Object.assign({
|
28638
28046
|
placeholder: t("subject")
|
28639
28047
|
}, field, {
|
28640
|
-
size: "small"
|
28641
|
-
onKeyDown: handleKeyDown,
|
28642
|
-
disabled: disabled
|
28048
|
+
size: "small"
|
28643
28049
|
}));
|
28644
28050
|
}
|
28645
28051
|
})))), React__default.createElement(material.Stack, {
|
@@ -28652,7 +28058,6 @@ var ArticleBlock = function ArticleBlock(_ref) {
|
|
28652
28058
|
}, t("copy_items")), React__default.createElement(material.Button, {
|
28653
28059
|
variant: "contained",
|
28654
28060
|
color: "success",
|
28655
|
-
disabled: disabled,
|
28656
28061
|
onClick: handleDuplicateArticle,
|
28657
28062
|
sx: {
|
28658
28063
|
whiteSpace: "nowrap"
|
@@ -28668,7 +28073,7 @@ var isEqual = function isEqual(prev, next) {
|
|
28668
28073
|
var nextIsLoadingCategories = isNextMatched ? next.isLoadingCategories : undefined;
|
28669
28074
|
var prevCategories = isPrevMatched ? prev.categories : undefined;
|
28670
28075
|
var nextCategories = isNextMatched ? next.categories : undefined;
|
28671
|
-
return prevOptionKey === nextOptionKey && prevIsLoadingCategories === nextIsLoadingCategories && JSON.stringify(prev.data) === JSON.stringify(next.data) && JSON.stringify(prevCategories) === JSON.stringify(nextCategories) && prev.path === next.path && prev.expandedIndex == next.expandedIndex && prev.
|
28076
|
+
return prevOptionKey === nextOptionKey && prevIsLoadingCategories === nextIsLoadingCategories && JSON.stringify(prev.data) === JSON.stringify(next.data) && JSON.stringify(prevCategories) === JSON.stringify(nextCategories) && prev.path === next.path && prev.expandedIndex == next.expandedIndex && prev.onOpenCategoryMenu == next.onOpenCategoryMenu && prev.onOpenSubCategoryMenu == next.onOpenSubCategoryMenu;
|
28672
28077
|
};
|
28673
28078
|
var ArticleBlock$1 = React.memo(ArticleBlock, isEqual);
|
28674
28079
|
|
@@ -28681,7 +28086,7 @@ var labelStyle = {
|
|
28681
28086
|
whiteSpace: "nowrap"
|
28682
28087
|
};
|
28683
28088
|
|
28684
|
-
var _excluded$
|
28089
|
+
var _excluded$e = ["onChange"];
|
28685
28090
|
var BpIcon$1 = material.styled("span")(function (_ref) {
|
28686
28091
|
var theme = _ref.theme;
|
28687
28092
|
return {
|
@@ -28714,7 +28119,7 @@ var BpCheckedIcon$1 = material.styled(BpIcon$1)({
|
|
28714
28119
|
var QuestionBlock = function QuestionBlock(_ref2) {
|
28715
28120
|
var answerCount = _ref2.answerCount,
|
28716
28121
|
isMath = _ref2.isMath,
|
28717
|
-
|
28122
|
+
isDisabled = _ref2.isDisabled,
|
28718
28123
|
path = _ref2.path,
|
28719
28124
|
data = _ref2.data,
|
28720
28125
|
questionTitleStyle = _ref2.questionTitleStyle,
|
@@ -28759,8 +28164,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28759
28164
|
var field = _ref3.field;
|
28760
28165
|
return React__default.createElement(material.TextField, Object.assign({}, field, {
|
28761
28166
|
size: "small",
|
28762
|
-
placeholder: t("textual_answer")
|
28763
|
-
onKeyDown: handleKeyDown
|
28167
|
+
placeholder: t("textual_answer")
|
28764
28168
|
}));
|
28765
28169
|
}
|
28766
28170
|
}));
|
@@ -28779,7 +28183,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28779
28183
|
className: styles$9["question-label"] + " w-fit",
|
28780
28184
|
labelPlacement: "top",
|
28781
28185
|
value: i,
|
28782
|
-
disabled:
|
28186
|
+
disabled: isDisabled,
|
28783
28187
|
control: React__default.createElement(material.Checkbox, {
|
28784
28188
|
checked: data.correctAnswers.includes(i),
|
28785
28189
|
onChange: function onChange(e) {
|
@@ -28815,7 +28219,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28815
28219
|
onChange: function onChange(e) {
|
28816
28220
|
return setFieldValue(path + ".correctAnswers", [+e.target.value]);
|
28817
28221
|
},
|
28818
|
-
disabled:
|
28222
|
+
disabled: isDisabled,
|
28819
28223
|
control: React__default.createElement(material.Radio, {
|
28820
28224
|
size: "small",
|
28821
28225
|
checked: +i === data.correctAnswers[0],
|
@@ -28851,7 +28255,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28851
28255
|
};
|
28852
28256
|
});
|
28853
28257
|
var theme = material.useTheme();
|
28854
|
-
var isTabletUp = material.useMediaQuery(theme.breakpoints.up(
|
28258
|
+
var isTabletUp = material.useMediaQuery(theme.breakpoints.up('lg'));
|
28855
28259
|
return React__default.createElement(material.Stack, {
|
28856
28260
|
direction: "row",
|
28857
28261
|
alignItems: "center",
|
@@ -28865,10 +28269,8 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28865
28269
|
}, React__default.createElement(material.Box, null, React__default.createElement(material.Box, {
|
28866
28270
|
className: styles$9["question-title"] + " me-2 text-nowrap",
|
28867
28271
|
sx: questionTitleStyle
|
28868
|
-
},
|
28272
|
+
}, t("problem_number_question", {
|
28869
28273
|
number: data.questionOrder + 1
|
28870
|
-
}) : t("text_detail_n", {
|
28871
|
-
n: data.questionOrder + 1
|
28872
28274
|
}))), React__default.createElement(material.Box, {
|
28873
28275
|
flexGrow: 1
|
28874
28276
|
}, renderAnswer())), React__default.createElement(material.Stack, {
|
@@ -28888,7 +28290,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28888
28290
|
render: function render(_ref4) {
|
28889
28291
|
var field = _ref4.field;
|
28890
28292
|
return React__default.createElement(ScoreSelector, Object.assign({}, field, {
|
28891
|
-
isDisabled:
|
28293
|
+
isDisabled: isDisabled,
|
28892
28294
|
onChange: function onChange(value) {
|
28893
28295
|
setFieldValue(path + ".score", (value === null || value === void 0 ? void 0 : value.value) || 0);
|
28894
28296
|
}
|
@@ -28907,9 +28309,9 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28907
28309
|
name: path + ".questionTypeId",
|
28908
28310
|
render: function render(_ref5) {
|
28909
28311
|
var _ref5$field = _ref5.field,
|
28910
|
-
field = _objectWithoutPropertiesLoose(_ref5$field, _excluded$
|
28312
|
+
field = _objectWithoutPropertiesLoose(_ref5$field, _excluded$e);
|
28911
28313
|
return React__default.createElement(CustomSelectOption, Object.assign({}, field, {
|
28912
|
-
isDisabled:
|
28314
|
+
isDisabled: isDisabled,
|
28913
28315
|
value: data.questionType,
|
28914
28316
|
options: questionTypes,
|
28915
28317
|
isLoading: optionKey === path + ".questionTypeId" ? isLoadingQuestionTypes : false,
|
@@ -28934,7 +28336,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28934
28336
|
var field = _ref6.field;
|
28935
28337
|
return React__default.createElement(CustomSelect, Object.assign({}, field, {
|
28936
28338
|
value: data.questionAnswerType,
|
28937
|
-
isDisabled:
|
28339
|
+
isDisabled: isDisabled,
|
28938
28340
|
options: answerTypeOptions,
|
28939
28341
|
onChange: handleChangeQuestionAnswerType
|
28940
28342
|
}));
|
@@ -28950,11 +28352,11 @@ var isEqual$1 = function isEqual(prev, next) {
|
|
28950
28352
|
var nextIsLoadingQuestionTypes = isNextMatched ? next.isLoadingQuestionTypes : undefined;
|
28951
28353
|
var prevQuestionTypes = isPrevMatched ? prev.questionTypes : undefined;
|
28952
28354
|
var nextQuestionTypes = isNextMatched ? next.questionTypes : undefined;
|
28953
|
-
return prevOptionKey === nextOptionKey && prevIsLoadingQuestionTypes === nextIsLoadingQuestionTypes && JSON.stringify(prev.data) === JSON.stringify(next.data) && JSON.stringify(prevQuestionTypes) === JSON.stringify(nextQuestionTypes) && prev.path === next.path && prev.isMath == next.isMath && prev.answerCount == next.answerCount && prev.
|
28355
|
+
return prevOptionKey === nextOptionKey && prevIsLoadingQuestionTypes === nextIsLoadingQuestionTypes && JSON.stringify(prev.data) === JSON.stringify(next.data) && JSON.stringify(prevQuestionTypes) === JSON.stringify(nextQuestionTypes) && prev.path === next.path && prev.isMath == next.isMath && prev.answerCount == next.answerCount && prev.isDisabled == next.isDisabled && JSON.stringify(prev.questionTitleStyle) === JSON.stringify(next.questionTitleStyle) && prev.onOpenQuestionTypeMenu == next.onOpenQuestionTypeMenu;
|
28954
28356
|
};
|
28955
28357
|
var QuestionBlock$1 = React.memo(QuestionBlock, isEqual$1);
|
28956
28358
|
|
28957
|
-
var _excluded$
|
28359
|
+
var _excluded$f = ["data", "path", "isMath", "open", "isLoadingCategories", "isLoadingQuestionTypes", "optionKey", "categories", "questionTypes", "onDelete", "onOpenSubCategoryMenu", "onOpenCategoryMenu", "onCloseCategoryMenu", "onCloseQuestionTypeMenu", "onOpenQuestionTypeMenu"];
|
28958
28360
|
var _ = _$5;
|
28959
28361
|
var QuestionGroupBlockBody = function QuestionGroupBlockBody(_ref) {
|
28960
28362
|
var _data$articles$3, _data$articles$3$cate, _data$articles$4, _data$articles$4$cate;
|
@@ -28967,16 +28369,14 @@ var QuestionGroupBlockBody = function QuestionGroupBlockBody(_ref) {
|
|
28967
28369
|
optionKey = _ref.optionKey,
|
28968
28370
|
categories = _ref.categories,
|
28969
28371
|
questionTypes = _ref.questionTypes,
|
28970
|
-
disabled = _ref.disabled,
|
28971
28372
|
onDelete = _ref.onDelete,
|
28972
28373
|
onOpenSubCategoryMenu = _ref.onOpenSubCategoryMenu,
|
28973
28374
|
onOpenCategoryMenu = _ref.onOpenCategoryMenu,
|
28974
28375
|
onCloseCategoryMenu = _ref.onCloseCategoryMenu,
|
28975
28376
|
onCloseQuestionTypeMenu = _ref.onCloseQuestionTypeMenu,
|
28976
28377
|
onOpenQuestionTypeMenu = _ref.onOpenQuestionTypeMenu,
|
28977
|
-
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
28378
|
+
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
28978
28379
|
var errors = formikProps.errors;
|
28979
|
-
var theme = material.useTheme();
|
28980
28380
|
var articles = data.articles,
|
28981
28381
|
questions = data.questions;
|
28982
28382
|
var blockErrors = _.get(errors, path);
|
@@ -28997,7 +28397,7 @@ var QuestionGroupBlockBody = function QuestionGroupBlockBody(_ref) {
|
|
28997
28397
|
gap: 2
|
28998
28398
|
}, !isMath && React__default.createElement(material.Stack, {
|
28999
28399
|
sx: {
|
29000
|
-
border: "
|
28400
|
+
border: "1px solid " + (blockErrors ? open ? error.main : error.light : open ? main_theme.less_dark : main_theme.light),
|
29001
28401
|
borderRadius: 2
|
29002
28402
|
},
|
29003
28403
|
gap: 1,
|
@@ -29011,7 +28411,6 @@ var QuestionGroupBlockBody = function QuestionGroupBlockBody(_ref) {
|
|
29011
28411
|
expandedIndex: index,
|
29012
28412
|
data: article,
|
29013
28413
|
path: path + ".articles[" + index + "]",
|
29014
|
-
disabled: disabled,
|
29015
28414
|
onDuplicate: handleDuplicateArticle,
|
29016
28415
|
onDelete: onDelete,
|
29017
28416
|
optionKey: optionKey,
|
@@ -29027,7 +28426,6 @@ var QuestionGroupBlockBody = function QuestionGroupBlockBody(_ref) {
|
|
29027
28426
|
width: "fit-content"
|
29028
28427
|
},
|
29029
28428
|
variant: "contained",
|
29030
|
-
disabled: disabled,
|
29031
28429
|
startIcon: React__default.createElement(io.IoIosAdd, null),
|
29032
28430
|
onClick: function onClick() {
|
29033
28431
|
arrayHelpers.push(DEFAULT_ARTICLE);
|
@@ -29047,7 +28445,6 @@ var QuestionGroupBlockBody = function QuestionGroupBlockBody(_ref) {
|
|
29047
28445
|
questionTypes: questionTypes,
|
29048
28446
|
isLoadingQuestionTypes: isLoadingQuestionTypes,
|
29049
28447
|
optionKey: optionKey,
|
29050
|
-
disabled: disabled,
|
29051
28448
|
onOpenQuestionTypeMenu: handleOpenQuestionTypeMenu,
|
29052
28449
|
onCloseQuestionTypeMenu: onCloseQuestionTypeMenu
|
29053
28450
|
}, formikProps));
|
@@ -29077,11 +28474,11 @@ var isEqual$2 = function isEqual(prev, next) {
|
|
29077
28474
|
var nextOnOpenSubCategoryMenu = next.onOpenSubCategoryMenu;
|
29078
28475
|
var prevOnOpenQuestionTypeMenu = prev.onOpenQuestionTypeMenu;
|
29079
28476
|
var nextOnOpenQuestionTypeMenu = next.onOpenQuestionTypeMenu;
|
29080
|
-
return prevOptionKey === nextOptionKey && prevIsLoadingCategories === nextIsLoadingCategories && JSON.stringify(prevCategories) === JSON.stringify(nextCategories) && prevIsLoadingQuestionTypes === nextIsLoadingQuestionTypes && JSON.stringify(prevQuestionTypes) === JSON.stringify(nextQuestionTypes) && prev.path === next.path && prev.isMath === next.isMath && prev.open === next.open &&
|
28477
|
+
return prevOptionKey === nextOptionKey && prevIsLoadingCategories === nextIsLoadingCategories && JSON.stringify(prevCategories) === JSON.stringify(nextCategories) && prevIsLoadingQuestionTypes === nextIsLoadingQuestionTypes && JSON.stringify(prevQuestionTypes) === JSON.stringify(nextQuestionTypes) && prev.path === next.path && prev.isMath === next.isMath && prev.open === next.open && JSON.stringify(prev.data) === JSON.stringify(next.data) && JSON.stringify(prevBlockErrors) === JSON.stringify(nextBlockErrors) && prevOnOpenCategoryMenu === nextOnOpenCategoryMenu && prevOnOpenSubCategoryMenu === nextOnOpenSubCategoryMenu && prevOnOpenQuestionTypeMenu === nextOnOpenQuestionTypeMenu;
|
29081
28478
|
};
|
29082
28479
|
var QuestionGroupBlockBody$1 = React.memo(QuestionGroupBlockBody, isEqual$2);
|
29083
28480
|
|
29084
|
-
var _excluded$
|
28481
|
+
var _excluded$g = ["expandedIndex", "open", "paths", "path", "isMath", "data", "categories", "isLoadingCategories", "isLoadingQuestionTypes", "questionTypes", "optionKey", "isDisabled", "onToggle", "onQuestionCountChange", "onDelete", "onOpenSubCategoryMenu", "onOpenCategoryMenu", "onCloseCategoryMenu", "onCopiedPrevQuestionGroup", "onCloseQuestionTypeMenu", "onOpenQuestionTypeMenu"];
|
29085
28482
|
var _$1 = _$5;
|
29086
28483
|
var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
29087
28484
|
var _data$articles$2, _data$articles$2$cate, _data$articles$2$cate2, _data$articles$3, _data$articles$3$cate, _data$articles$3$cate2;
|
@@ -29096,7 +28493,7 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29096
28493
|
isLoadingQuestionTypes = _ref.isLoadingQuestionTypes,
|
29097
28494
|
questionTypes = _ref.questionTypes,
|
29098
28495
|
optionKey = _ref.optionKey,
|
29099
|
-
|
28496
|
+
isDisabled = _ref.isDisabled,
|
29100
28497
|
onToggle = _ref.onToggle,
|
29101
28498
|
onQuestionCountChange = _ref.onQuestionCountChange,
|
29102
28499
|
onDelete = _ref.onDelete,
|
@@ -29106,13 +28503,13 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29106
28503
|
onCopiedPrevQuestionGroup = _ref.onCopiedPrevQuestionGroup,
|
29107
28504
|
onCloseQuestionTypeMenu = _ref.onCloseQuestionTypeMenu,
|
29108
28505
|
onOpenQuestionTypeMenu = _ref.onOpenQuestionTypeMenu,
|
29109
|
-
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
28506
|
+
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
29110
28507
|
var errors = formikProps.errors,
|
29111
28508
|
setFieldValue = formikProps.setFieldValue;
|
29112
28509
|
var _useTranslation = reactI18next.useTranslation(),
|
29113
28510
|
t = _useTranslation.t;
|
29114
28511
|
var key = paths.join(".");
|
29115
|
-
var title = t(
|
28512
|
+
var title = t("group_n", {
|
29116
28513
|
n: expandedIndex + 1
|
29117
28514
|
});
|
29118
28515
|
var handleToggle = function handleToggle() {
|
@@ -29194,7 +28591,7 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29194
28591
|
expanded: open,
|
29195
28592
|
onChange: handleToggle,
|
29196
28593
|
sx: {
|
29197
|
-
border: "
|
28594
|
+
border: "1px solid " + (blockErrors ? open ? error.main : error.light : open ? main_theme.less_dark : main_theme.light)
|
29198
28595
|
}
|
29199
28596
|
}, React__default.createElement(material.AccordionSummary, {
|
29200
28597
|
expandIcon: React__default.createElement(md.MdExpandMore, {
|
@@ -29223,7 +28620,6 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29223
28620
|
}, React__default.createElement(fa6.FaTrashCan, {
|
29224
28621
|
size: 12
|
29225
28622
|
})), React__default.createElement(material.Typography, {
|
29226
|
-
fontSize: "18px",
|
29227
28623
|
fontWeight: 700,
|
29228
28624
|
whiteSpace: "nowrap"
|
29229
28625
|
}, title, !open && ":")), React__default.createElement(material.Box, {
|
@@ -29255,8 +28651,7 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29255
28651
|
render: function render(_ref2) {
|
29256
28652
|
var field = _ref2.field;
|
29257
28653
|
return React__default.createElement(QuestionCountSelector, Object.assign({}, field, {
|
29258
|
-
onChange: handleChangeQuestionCount
|
29259
|
-
isDisabled: disabled
|
28654
|
+
onChange: handleChangeQuestionCount
|
29260
28655
|
}));
|
29261
28656
|
}
|
29262
28657
|
}))), isMath && React__default.createElement(material.Grid, {
|
@@ -29294,7 +28689,6 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29294
28689
|
onMenuClose: onCloseCategoryMenu
|
29295
28690
|
},
|
29296
28691
|
onChange: handleChangeCategory,
|
29297
|
-
isDisabled: disabled,
|
29298
28692
|
placeholder: t("select_category")
|
29299
28693
|
});
|
29300
28694
|
}
|
@@ -29335,7 +28729,7 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29335
28729
|
onMenuClose: onCloseCategoryMenu
|
29336
28730
|
},
|
29337
28731
|
onChange: handleChangeSubCategory,
|
29338
|
-
isDisabled:
|
28732
|
+
isDisabled: isDisabled || !((_data$articles$4 = data.articles[0]) !== null && _data$articles$4 !== void 0 && (_data$articles$4$cate = _data$articles$4.categories) !== null && _data$articles$4$cate !== void 0 && _data$articles$4$cate[0]),
|
29339
28733
|
placeholder: t("select_category")
|
29340
28734
|
});
|
29341
28735
|
}
|
@@ -29354,8 +28748,7 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29354
28748
|
render: function render(_ref5) {
|
29355
28749
|
var field = _ref5.field;
|
29356
28750
|
return React__default.createElement(AnswerCountSelector, Object.assign({}, field, {
|
29357
|
-
onChange: handleChangeAnswerCount
|
29358
|
-
isDisabled: disabled
|
28751
|
+
onChange: handleChangeAnswerCount
|
29359
28752
|
}));
|
29360
28753
|
}
|
29361
28754
|
})))), isMath && React__default.createElement(material.Box, {
|
@@ -29368,7 +28761,6 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29368
28761
|
}, React__default.createElement(material.Button, {
|
29369
28762
|
variant: "contained",
|
29370
28763
|
color: "success",
|
29371
|
-
disabled: disabled,
|
29372
28764
|
onClick: handleCopyCategories,
|
29373
28765
|
sx: {
|
29374
28766
|
whiteSpace: "nowrap"
|
@@ -29394,7 +28786,6 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29394
28786
|
isLoadingCategories: isLoadingCategories,
|
29395
28787
|
isLoadingQuestionTypes: isLoadingQuestionTypes,
|
29396
28788
|
optionKey: optionKey,
|
29397
|
-
disabled: disabled,
|
29398
28789
|
onDelete: onDelete,
|
29399
28790
|
onOpenSubCategoryMenu: onOpenSubCategoryMenu,
|
29400
28791
|
onOpenCategoryMenu: onOpenCategoryMenu,
|
@@ -29404,7 +28795,7 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
29404
28795
|
}, formikProps)))));
|
29405
28796
|
};
|
29406
28797
|
|
29407
|
-
var _excluded$
|
28798
|
+
var _excluded$h = ["path", "paths", "isMath", "isLoadingCategories", "isLoadingQuestionTypes", "optionKey", "questionGroups", "subChapters", "categories", "questionTypes", "onDelete", "onOpenSubCategoryMenu", "onOpenCategoryMenu", "onCloseCategoryMenu", "onCopiedPrevQuestionGroup", "onCloseQuestionTypeMenu", "onOpenQuestionTypeMenu"];
|
29408
28799
|
var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
29409
28800
|
var path = _ref.path,
|
29410
28801
|
paths = _ref.paths,
|
@@ -29416,7 +28807,6 @@ var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
|
29416
28807
|
subChapters = _ref.subChapters,
|
29417
28808
|
categories = _ref.categories,
|
29418
28809
|
questionTypes = _ref.questionTypes,
|
29419
|
-
disabled = _ref.disabled,
|
29420
28810
|
onDelete = _ref.onDelete,
|
29421
28811
|
onOpenSubCategoryMenu = _ref.onOpenSubCategoryMenu,
|
29422
28812
|
onOpenCategoryMenu = _ref.onOpenCategoryMenu,
|
@@ -29424,7 +28814,7 @@ var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
|
29424
28814
|
onCopiedPrevQuestionGroup = _ref.onCopiedPrevQuestionGroup,
|
29425
28815
|
onCloseQuestionTypeMenu = _ref.onCloseQuestionTypeMenu,
|
29426
28816
|
onOpenQuestionTypeMenu = _ref.onOpenQuestionTypeMenu,
|
29427
|
-
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
28817
|
+
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
29428
28818
|
var _useTranslation = reactI18next.useTranslation(),
|
29429
28819
|
t = _useTranslation.t;
|
29430
28820
|
var setFieldValue = formikProps.setFieldValue;
|
@@ -29528,7 +28918,6 @@ var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
|
29528
28918
|
categories: categories,
|
29529
28919
|
isLoadingQuestionTypes: isLoadingQuestionTypes,
|
29530
28920
|
questionTypes: questionTypes,
|
29531
|
-
disabled: disabled,
|
29532
28921
|
onToggle: handleToggle,
|
29533
28922
|
onDelete: onDelete,
|
29534
28923
|
onOpenCategoryMenu: onOpenCategoryMenu,
|
@@ -29543,7 +28932,6 @@ var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
|
29543
28932
|
},
|
29544
28933
|
variant: "contained",
|
29545
28934
|
startIcon: React__default.createElement(io.IoIosAdd, null),
|
29546
|
-
disabled: disabled,
|
29547
28935
|
onClick: function onClick() {
|
29548
28936
|
{
|
29549
28937
|
var length = subChapters.length;
|
@@ -29574,7 +28962,6 @@ var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
|
29574
28962
|
optionKey: optionKey,
|
29575
28963
|
isLoadingCategories: isLoadingCategories,
|
29576
28964
|
categories: categories,
|
29577
|
-
disabled: disabled,
|
29578
28965
|
onOpenCategoryMenu: onOpenCategoryMenu,
|
29579
28966
|
onOpenSubCategoryMenu: onOpenSubCategoryMenu,
|
29580
28967
|
onCloseCategoryMenu: onCloseCategoryMenu,
|
@@ -29590,7 +28977,6 @@ var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
|
29590
28977
|
},
|
29591
28978
|
variant: "contained",
|
29592
28979
|
startIcon: React__default.createElement(io.IoIosAdd, null),
|
29593
|
-
disabled: disabled,
|
29594
28980
|
onClick: function onClick() {
|
29595
28981
|
var length = questionGroups.length;
|
29596
28982
|
var addedGroup = handleGetNewQuestionGroup();
|
@@ -29602,7 +28988,7 @@ var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
|
29602
28988
|
}));
|
29603
28989
|
};
|
29604
28990
|
|
29605
|
-
var _excluded$
|
28991
|
+
var _excluded$i = ["data", "expandedIndex", "open", "path", "paths", "isMath", "isLoadingCategories", "isLoadingQuestionTypes", "categories", "questionTypes", "optionKey", "onToggle", "onDelete", "onCopiedPrevQuestionGroup", "onCloseCategoryMenu", "onOpenCategoryMenu", "onOpenSubCategoryMenu", "onOpenQuestionTypeMenu", "onCloseQuestionTypeMenu"];
|
29606
28992
|
var _$2 = _$5;
|
29607
28993
|
var ChapterBlock = function ChapterBlock(_ref) {
|
29608
28994
|
var data = _ref.data,
|
@@ -29616,7 +29002,6 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
29616
29002
|
categories = _ref.categories,
|
29617
29003
|
questionTypes = _ref.questionTypes,
|
29618
29004
|
optionKey = _ref.optionKey,
|
29619
|
-
disabled = _ref.disabled,
|
29620
29005
|
onToggle = _ref.onToggle,
|
29621
29006
|
onDelete = _ref.onDelete,
|
29622
29007
|
onCopiedPrevQuestionGroup = _ref.onCopiedPrevQuestionGroup,
|
@@ -29625,13 +29010,12 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
29625
29010
|
onOpenSubCategoryMenu = _ref.onOpenSubCategoryMenu,
|
29626
29011
|
onOpenQuestionTypeMenu = _ref.onOpenQuestionTypeMenu,
|
29627
29012
|
onCloseQuestionTypeMenu = _ref.onCloseQuestionTypeMenu,
|
29628
|
-
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
29013
|
+
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
29629
29014
|
var errors = formikProps.errors;
|
29630
29015
|
var _useTranslation = reactI18next.useTranslation(),
|
29631
29016
|
t = _useTranslation.t;
|
29632
|
-
var theme = material.useTheme();
|
29633
29017
|
var key = paths.join(".");
|
29634
|
-
var title = t(
|
29018
|
+
var title = t("chapter_number", {
|
29635
29019
|
number: paths.join(".")
|
29636
29020
|
});
|
29637
29021
|
var handleToggle = function handleToggle() {
|
@@ -29651,7 +29035,7 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
29651
29035
|
expanded: open,
|
29652
29036
|
onChange: handleToggle,
|
29653
29037
|
sx: {
|
29654
|
-
border: "
|
29038
|
+
border: "1px solid " + (blockErrors ? open ? error.main : error.light : open ? main_theme.less_dark : main_theme.light)
|
29655
29039
|
}
|
29656
29040
|
}, React__default.createElement(material.AccordionSummary, {
|
29657
29041
|
expandIcon: React__default.createElement(md.MdExpandMore, {
|
@@ -29674,12 +29058,10 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
29674
29058
|
color: "default",
|
29675
29059
|
size: "small",
|
29676
29060
|
className: "bg-danger text-white",
|
29677
|
-
disabled: disabled,
|
29678
29061
|
onClick: handleClickDeleteChapter
|
29679
29062
|
}, React__default.createElement(fa6.FaTrashCan, {
|
29680
29063
|
size: 12
|
29681
29064
|
})), React__default.createElement(material.Typography, {
|
29682
|
-
fontSize: (paths === null || paths === void 0 ? void 0 : paths.length) > 1 ? "24px" : "36px",
|
29683
29065
|
fontWeight: 700,
|
29684
29066
|
whiteSpace: "nowrap"
|
29685
29067
|
}, title)), React__default.createElement(material.Box, {
|
@@ -29701,9 +29083,7 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
29701
29083
|
return React__default.createElement(material.TextField, Object.assign({
|
29702
29084
|
placeholder: t("name")
|
29703
29085
|
}, field, {
|
29704
|
-
size: "small"
|
29705
|
-
onKeyDown: handleKeyDown,
|
29706
|
-
disabled: disabled
|
29086
|
+
size: "small"
|
29707
29087
|
}));
|
29708
29088
|
}
|
29709
29089
|
}), !!pageNameError && React__default.createElement(material.Typography, {
|
@@ -29724,9 +29104,7 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
29724
29104
|
placeholder: t("page_from"),
|
29725
29105
|
type: "number"
|
29726
29106
|
}, field, {
|
29727
|
-
size: "small"
|
29728
|
-
onKeyDown: handleKeyDown,
|
29729
|
-
disabled: disabled
|
29107
|
+
size: "small"
|
29730
29108
|
}));
|
29731
29109
|
}
|
29732
29110
|
}), !!pageFromError && React__default.createElement(material.Typography, {
|
@@ -29747,9 +29125,7 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
29747
29125
|
placeholder: t("page_to"),
|
29748
29126
|
type: "number"
|
29749
29127
|
}, field, {
|
29750
|
-
size: "small"
|
29751
|
-
onKeyDown: handleKeyDown,
|
29752
|
-
disabled: disabled
|
29128
|
+
size: "small"
|
29753
29129
|
}));
|
29754
29130
|
}
|
29755
29131
|
}), !!pageToError && React__default.createElement(material.Typography, {
|
@@ -29768,7 +29144,6 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
29768
29144
|
isLoadingQuestionTypes: isLoadingQuestionTypes,
|
29769
29145
|
isLoadingCategories: isLoadingCategories,
|
29770
29146
|
optionKey: optionKey,
|
29771
|
-
disabled: disabled,
|
29772
29147
|
onDelete: onDelete,
|
29773
29148
|
onCopiedPrevQuestionGroup: onCopiedPrevQuestionGroup,
|
29774
29149
|
onOpenSubCategoryMenu: onOpenSubCategoryMenu,
|
@@ -29816,7 +29191,7 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29816
29191
|
}));
|
29817
29192
|
if (inputRef.current) inputRef.current.value = "";
|
29818
29193
|
};
|
29819
|
-
var schoolOptions = SCHOOL_OPTIONS.map(function (i) {
|
29194
|
+
var schoolOptions = SCHOOL_OPTIONS$1.map(function (i) {
|
29820
29195
|
return _extends({}, i, {
|
29821
29196
|
label: t(i.label)
|
29822
29197
|
});
|
@@ -29824,13 +29199,13 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29824
29199
|
var gradeOptions = React.useMemo(function () {
|
29825
29200
|
switch (filter === null || filter === void 0 ? void 0 : filter.schoolType) {
|
29826
29201
|
case SchoolType.Middle:
|
29827
|
-
return MIDDLE_GRADES.map(function (i) {
|
29202
|
+
return MIDDLE_GRADES$1.map(function (i) {
|
29828
29203
|
return _extends({}, i, {
|
29829
29204
|
label: typeof i.label === "string" ? t(i.label) : i.label
|
29830
29205
|
});
|
29831
29206
|
});
|
29832
29207
|
case SchoolType.High:
|
29833
|
-
return HIGH_GRADES.map(function (i) {
|
29208
|
+
return HIGH_GRADES$1.map(function (i) {
|
29834
29209
|
return _extends({}, i, {
|
29835
29210
|
label: t(i.label)
|
29836
29211
|
});
|
@@ -29900,8 +29275,7 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29900
29275
|
}, React__default.createElement(material.FormLabel, null, t("search")), React__default.createElement(material.TextField, {
|
29901
29276
|
placeholder: t("question_type_search_keyword"),
|
29902
29277
|
size: "small",
|
29903
|
-
inputRef: inputRef
|
29904
|
-
onKeyDown: handleKeyDown
|
29278
|
+
inputRef: inputRef
|
29905
29279
|
})), React__default.createElement(material.FormGroup, {
|
29906
29280
|
sx: {
|
29907
29281
|
display: "flex",
|
@@ -30140,10 +29514,9 @@ var useTextbookOptions = function useTextbookOptions(subjectId, isMath, filter,
|
|
30140
29514
|
|
30141
29515
|
var _$3 = _$5;
|
30142
29516
|
var TextbookContentsTab = function TextbookContentsTab(props) {
|
30143
|
-
var
|
30144
|
-
values = props.values,
|
29517
|
+
var values = props.values,
|
30145
29518
|
setFieldValue = props.setFieldValue;
|
30146
|
-
var isMath = values.type ===
|
29519
|
+
var isMath = values.type === 2;
|
30147
29520
|
var _useTranslation = reactI18next.useTranslation(),
|
30148
29521
|
t = _useTranslation.t;
|
30149
29522
|
var _useState = React.useState(""),
|
@@ -30254,7 +29627,7 @@ var TextbookContentsTab = function TextbookContentsTab(props) {
|
|
30254
29627
|
return React__default.createElement(material.Stack, {
|
30255
29628
|
direction: "column",
|
30256
29629
|
gap: 3
|
30257
|
-
}, isMath &&
|
29630
|
+
}, isMath && React__default.createElement(material.Box, null, React__default.createElement(QuestionTypeFilter, {
|
30258
29631
|
filter: filter,
|
30259
29632
|
setFilter: setFilter,
|
30260
29633
|
inputRef: inputRef,
|
@@ -30275,7 +29648,6 @@ var TextbookContentsTab = function TextbookContentsTab(props) {
|
|
30275
29648
|
categories: categories,
|
30276
29649
|
isLoadingQuestionTypes: isLoadingQuestionTypes,
|
30277
29650
|
questionTypes: questionTypes,
|
30278
|
-
disabled: disabled,
|
30279
29651
|
onToggle: handleToggleBlock,
|
30280
29652
|
onDelete: handleOpenConfirmDelete,
|
30281
29653
|
onCopiedPrevQuestionGroup: handleCopiedPrevQuestionGroup,
|
@@ -30291,7 +29663,6 @@ var TextbookContentsTab = function TextbookContentsTab(props) {
|
|
30291
29663
|
width: "fit-content"
|
30292
29664
|
},
|
30293
29665
|
variant: "contained",
|
30294
|
-
disabled: disabled,
|
30295
29666
|
startIcon: React__default.createElement(io.IoIosAdd, null),
|
30296
29667
|
onClick: function onClick() {
|
30297
29668
|
var length = values.chapters.length;
|
@@ -30310,7 +29681,8 @@ var TextbookContentsTab = function TextbookContentsTab(props) {
|
|
30310
29681
|
}));
|
30311
29682
|
};
|
30312
29683
|
|
30313
|
-
var _excluded$
|
29684
|
+
var _excluded$j = ["value"],
|
29685
|
+
_excluded2$2 = ["onChange"];
|
30314
29686
|
var VisuallyHiddenInput = material.styled("input")({
|
30315
29687
|
clip: "rect(0 0 0 0)",
|
30316
29688
|
clipPath: "inset(50%)",
|
@@ -30321,67 +29693,16 @@ var VisuallyHiddenInput = material.styled("input")({
|
|
30321
29693
|
whiteSpace: "nowrap",
|
30322
29694
|
width: "100%"
|
30323
29695
|
});
|
30324
|
-
var customSelectStyles = {
|
30325
|
-
control: function control(baseStyles, state) {
|
30326
|
-
return _extends({}, baseStyles, {
|
30327
|
-
fontSize: "16px",
|
30328
|
-
fontWeight: baseStyles.fontWeight,
|
30329
|
-
color: styles.darker,
|
30330
|
-
borderColor: state.isFocused ? styles.dark : baseStyles.borderColor,
|
30331
|
-
boxShadow: state.isFocused ? "0 0 0 1px " + styles.dark + "4D" : baseStyles.boxShadow,
|
30332
|
-
"&:active": {
|
30333
|
-
borderColor: state.isFocused ? styles.dark : baseStyles.borderColor
|
30334
|
-
},
|
30335
|
-
"&:hover": {
|
30336
|
-
borderColor: state.isFocused ? styles.dark : baseStyles.borderColor
|
30337
|
-
},
|
30338
|
-
paddingBlock: '8px'
|
30339
|
-
});
|
30340
|
-
},
|
30341
|
-
singleValue: function singleValue(baseStyles) {
|
30342
|
-
return _extends({}, baseStyles, {
|
30343
|
-
fontSize: "16px",
|
30344
|
-
fontWeight: baseStyles.fontWeight,
|
30345
|
-
color: styles.darker
|
30346
|
-
});
|
30347
|
-
}
|
30348
|
-
};
|
30349
29696
|
var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
30350
|
-
var
|
30351
|
-
var isCreatedByAdmin = _ref.isCreatedByAdmin,
|
30352
|
-
setFieldValue = _ref.setFieldValue,
|
29697
|
+
var setFieldValue = _ref.setFieldValue,
|
30353
29698
|
values = _ref.values,
|
30354
29699
|
errors = _ref.errors,
|
30355
29700
|
coverImage = _ref.coverImage,
|
30356
|
-
|
29701
|
+
isAdmin = _ref.isAdmin,
|
30357
29702
|
textbookId = _ref.textbookId,
|
30358
|
-
disabled = _ref.disabled,
|
30359
29703
|
handleUploadImage = _ref.handleUploadImage;
|
30360
29704
|
var _useTranslation = reactI18next.useTranslation(),
|
30361
29705
|
t = _useTranslation.t;
|
30362
|
-
var user = reactRedux.useSelector(function (state) {
|
30363
|
-
var _state$common;
|
30364
|
-
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
30365
|
-
});
|
30366
|
-
var isTeacher = user && (user === null || user === void 0 ? void 0 : (_user$roles = user.roles) === null || _user$roles === void 0 ? void 0 : _user$roles.includes(exports.Role.Teacher));
|
30367
|
-
var gradeOptions = GRADE_OPTIONS.map(function (i) {
|
30368
|
-
return {
|
30369
|
-
label: t(i.label),
|
30370
|
-
value: i.value
|
30371
|
-
};
|
30372
|
-
});
|
30373
|
-
var preparedTypeOptions = Object.entries(exports.PreparedType).filter(function (_ref2) {
|
30374
|
-
var key = _ref2[0];
|
30375
|
-
return isNaN(Number(key));
|
30376
|
-
}).map(function (_ref3) {
|
30377
|
-
var key = _ref3[0],
|
30378
|
-
value = _ref3[1];
|
30379
|
-
return {
|
30380
|
-
label: t(key),
|
30381
|
-
value: value
|
30382
|
-
};
|
30383
|
-
});
|
30384
|
-
var hidePublicField = !textbookId && isSuperAdminUser || textbookId && isCreatedByAdmin;
|
30385
29706
|
return React__default.createElement(material.Grid, {
|
30386
29707
|
padding: 3,
|
30387
29708
|
container: true,
|
@@ -30411,26 +29732,24 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30411
29732
|
style: {
|
30412
29733
|
padding: 4,
|
30413
29734
|
color: "#fff",
|
30414
|
-
background:
|
29735
|
+
background: styles.less_dark,
|
30415
29736
|
width: "150px",
|
30416
29737
|
borderRadius: "6px",
|
30417
29738
|
alignItems: "center",
|
30418
29739
|
justifyContent: "center",
|
30419
29740
|
position: "relative",
|
30420
29741
|
display: "flex",
|
30421
|
-
cursor:
|
29742
|
+
cursor: "pointer"
|
30422
29743
|
}
|
30423
29744
|
}, t("change_file"), React__default.createElement(VisuallyHiddenInput, {
|
30424
29745
|
id: "coverImage",
|
30425
29746
|
type: "file",
|
30426
29747
|
accept: "image/*",
|
30427
29748
|
onChange: function onChange(event) {
|
30428
|
-
return
|
29749
|
+
return handleUploadImage(event);
|
30429
29750
|
},
|
30430
29751
|
onClick: function onClick(e) {
|
30431
|
-
|
30432
|
-
e.target.value = "";
|
30433
|
-
}
|
29752
|
+
e.target.value = "";
|
30434
29753
|
}
|
30435
29754
|
}))) : React__default.createElement("label", {
|
30436
29755
|
htmlFor: "coverImage",
|
@@ -30443,19 +29762,17 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30443
29762
|
justifyContent: "center",
|
30444
29763
|
position: "relative",
|
30445
29764
|
display: "flex",
|
30446
|
-
cursor:
|
29765
|
+
cursor: "pointer"
|
30447
29766
|
}
|
30448
29767
|
}, React__default.createElement(io.IoIosAdd, null), React__default.createElement(VisuallyHiddenInput, {
|
30449
29768
|
id: "coverImage",
|
30450
29769
|
type: "file",
|
30451
29770
|
accept: "image/*",
|
30452
29771
|
onChange: function onChange(event) {
|
30453
|
-
return
|
29772
|
+
return handleUploadImage(event);
|
30454
29773
|
},
|
30455
29774
|
onClick: function onClick(e) {
|
30456
|
-
|
30457
|
-
e.target.value = "";
|
30458
|
-
}
|
29775
|
+
e.target.value = "";
|
30459
29776
|
}
|
30460
29777
|
})))), React__default.createElement(material.Grid, {
|
30461
29778
|
item: true,
|
@@ -30474,10 +29791,10 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30474
29791
|
htmlFor: "publicationDate"
|
30475
29792
|
}, t("publication_date")), React__default.createElement(formik.Field, {
|
30476
29793
|
name: "publicationDate",
|
30477
|
-
render: function render(
|
30478
|
-
var
|
30479
|
-
value =
|
30480
|
-
action = _objectWithoutPropertiesLoose(
|
29794
|
+
render: function render(_ref2) {
|
29795
|
+
var _ref2$field = _ref2.field,
|
29796
|
+
value = _ref2$field.value,
|
29797
|
+
action = _objectWithoutPropertiesLoose(_ref2$field, _excluded$j);
|
30481
29798
|
return React__default.createElement(xDatePickers.LocalizationProvider, {
|
30482
29799
|
dateAdapter: AdapterMoment.AdapterMoment
|
30483
29800
|
}, React__default.createElement(xDatePickers.DatePicker, Object.assign({}, action, {
|
@@ -30489,8 +29806,7 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30489
29806
|
value: moment(value),
|
30490
29807
|
onChange: function onChange(value) {
|
30491
29808
|
return setFieldValue("publicationDate", moment(value).format(DATE_FORMAT));
|
30492
|
-
}
|
30493
|
-
disabled: disabled
|
29809
|
+
}
|
30494
29810
|
})));
|
30495
29811
|
}
|
30496
29812
|
}), !!(errors !== null && errors !== void 0 && errors.publicationDate) && React__default.createElement(material.Typography, {
|
@@ -30508,12 +29824,9 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30508
29824
|
htmlFor: "publisher"
|
30509
29825
|
}, t("publisher")), React__default.createElement(formik.Field, {
|
30510
29826
|
name: "publisher",
|
30511
|
-
render: function render(
|
30512
|
-
var field =
|
30513
|
-
return React__default.createElement(material.TextField, Object.assign({}, field
|
30514
|
-
onKeyDown: handleKeyDown,
|
30515
|
-
disabled: disabled
|
30516
|
-
}));
|
29827
|
+
render: function render(_ref3) {
|
29828
|
+
var field = _ref3.field;
|
29829
|
+
return React__default.createElement(material.TextField, Object.assign({}, field));
|
30517
29830
|
}
|
30518
29831
|
}), !!(errors !== null && errors !== void 0 && errors.publisher) && React__default.createElement(material.Typography, {
|
30519
29832
|
fontWeight: 500,
|
@@ -30530,17 +29843,25 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30530
29843
|
htmlFor: "preparedType"
|
30531
29844
|
}, t("type")), React__default.createElement(formik.Field, {
|
30532
29845
|
name: "preparedType",
|
30533
|
-
render: function render(
|
30534
|
-
var field =
|
30535
|
-
return React__default.createElement(
|
30536
|
-
|
30537
|
-
|
30538
|
-
|
30539
|
-
|
30540
|
-
|
30541
|
-
|
30542
|
-
|
30543
|
-
|
29846
|
+
render: function render(_ref4) {
|
29847
|
+
var field = _ref4.field;
|
29848
|
+
return React__default.createElement(material.Select, Object.assign({
|
29849
|
+
displayEmpty: true
|
29850
|
+
}, field), Object.entries(_extends({}, exports.PreparedType)).filter(function (_ref5) {
|
29851
|
+
var label = _ref5[0];
|
29852
|
+
return !Number(label);
|
29853
|
+
}).map(function (_ref6, index) {
|
29854
|
+
var label = _ref6[0],
|
29855
|
+
value = _ref6[1];
|
29856
|
+
if (Number(label)) return;
|
29857
|
+
if (label === "my_created_questions" || label === "academy_questions") return React__default.createElement(material.MenuItem, {
|
29858
|
+
key: index,
|
29859
|
+
value: value
|
29860
|
+
}, t(label));
|
29861
|
+
return React__default.createElement(material.MenuItem, {
|
29862
|
+
key: index,
|
29863
|
+
value: index + 1
|
29864
|
+
}, t(label));
|
30544
29865
|
}));
|
30545
29866
|
}
|
30546
29867
|
}), !!(errors !== null && errors !== void 0 && errors.preparedType) && React__default.createElement(material.Typography, {
|
@@ -30560,20 +29881,17 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30560
29881
|
name: "isbn",
|
30561
29882
|
render: function render(_ref7) {
|
30562
29883
|
var field = _ref7.field;
|
30563
|
-
return React__default.createElement(material.TextField, Object.assign({}, field
|
30564
|
-
onKeyDown: handleKeyDown,
|
30565
|
-
disabled: disabled
|
30566
|
-
}));
|
29884
|
+
return React__default.createElement(material.TextField, Object.assign({}, field));
|
30567
29885
|
}
|
30568
29886
|
}), !!(errors !== null && errors !== void 0 && errors.isbn) && React__default.createElement(material.Typography, {
|
30569
29887
|
fontWeight: 500,
|
30570
29888
|
fontSize: "10px",
|
30571
29889
|
lineHeight: "11.93px",
|
30572
29890
|
color: !(errors !== null && errors !== void 0 && errors.isbn) ? "#97A1AF" : "#F34B4B"
|
30573
|
-
}, errors === null || errors === void 0 ? void 0 : errors.isbn))), React__default.createElement(material.Grid, {
|
29891
|
+
}, errors === null || errors === void 0 ? void 0 : errors.isbn))), !(isAdmin && !textbookId) && React__default.createElement(material.Grid, {
|
30574
29892
|
item: true,
|
30575
29893
|
xs: 6
|
30576
|
-
},
|
29894
|
+
}, React__default.createElement(material.Stack, {
|
30577
29895
|
flexDirection: "column",
|
30578
29896
|
gap: 1,
|
30579
29897
|
alignItems: "start"
|
@@ -30585,13 +29903,7 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30585
29903
|
var field = _ref8.field;
|
30586
29904
|
return React__default.createElement(material.Checkbox, Object.assign({
|
30587
29905
|
checked: field === null || field === void 0 ? void 0 : field.value
|
30588
|
-
}, field
|
30589
|
-
onChange: function onChange(e, checked) {
|
30590
|
-
field.onChange(e, checked);
|
30591
|
-
if (checked) setFieldValue("textbookOwners", []);
|
30592
|
-
},
|
30593
|
-
disabled: disabled
|
30594
|
-
}));
|
29906
|
+
}, field));
|
30595
29907
|
}
|
30596
29908
|
}), !!(errors !== null && errors !== void 0 && errors.isPublic) && React__default.createElement(material.Typography, {
|
30597
29909
|
fontWeight: 500,
|
@@ -30609,16 +29921,15 @@ var TextbookInfoTab = function TextbookInfoTab(_ref) {
|
|
30609
29921
|
}, t("grade")), React__default.createElement(formik.Field, {
|
30610
29922
|
name: "grade",
|
30611
29923
|
render: function render(_ref9) {
|
30612
|
-
var field = _ref9.field
|
30613
|
-
|
30614
|
-
|
30615
|
-
|
30616
|
-
|
30617
|
-
|
30618
|
-
|
30619
|
-
}
|
30620
|
-
|
30621
|
-
}));
|
29924
|
+
var _ref9$field = _ref9.field,
|
29925
|
+
_onChange = _ref9$field.onChange,
|
29926
|
+
action = _objectWithoutPropertiesLoose(_ref9$field, _excluded2$2);
|
29927
|
+
return React__default.createElement(material.TextField, Object.assign({
|
29928
|
+
onChange: function onChange(e) {
|
29929
|
+
e.target.value = e.target.value.replace(/[^\d]/g, "");
|
29930
|
+
_onChange(e);
|
29931
|
+
}
|
29932
|
+
}, action));
|
30622
29933
|
}
|
30623
29934
|
}), !!(errors !== null && errors !== void 0 && errors.grade) && React__default.createElement(material.Typography, {
|
30624
29935
|
fontWeight: 500,
|
@@ -30634,16 +29945,19 @@ var AcademySelector = function AcademySelector(_ref) {
|
|
30634
29945
|
title = _ref.title,
|
30635
29946
|
options = _ref.options,
|
30636
29947
|
isLoading = _ref.isLoading,
|
29948
|
+
valueById = _ref.valueById,
|
30637
29949
|
isMultiple = _ref.isMultiple,
|
30638
29950
|
_ref$isClearable = _ref.isClearable,
|
30639
29951
|
isClearable = _ref$isClearable === void 0 ? true : _ref$isClearable,
|
30640
|
-
disabled = _ref.disabled
|
30641
|
-
defaultValue = _ref.defaultValue;
|
29952
|
+
disabled = _ref.disabled;
|
30642
29953
|
var _useState = React.useState(""),
|
30643
29954
|
searchString = _useState[0],
|
30644
29955
|
setSearchString = _useState[1];
|
30645
29956
|
var _useTranslation = reactI18next.useTranslation(),
|
30646
29957
|
t = _useTranslation.t;
|
29958
|
+
var valueOption = valueById !== null && typeof valueById !== "undefined" ? (options === null || options === void 0 ? void 0 : options.find(function (option) {
|
29959
|
+
return option.value == valueById;
|
29960
|
+
})) || null : null;
|
30647
29961
|
return React__default.createElement(material.FormGroup, null, !!title && React__default.createElement("label", {
|
30648
29962
|
className: "text-muted"
|
30649
29963
|
}, title), React__default.createElement(CustomSelectOption, {
|
@@ -30655,11 +29969,10 @@ var AcademySelector = function AcademySelector(_ref) {
|
|
30655
29969
|
isLoading: isLoading,
|
30656
29970
|
placeholder: t('please_select'),
|
30657
29971
|
isMulti: isMultiple,
|
30658
|
-
value: value,
|
29972
|
+
value: valueOption || value,
|
30659
29973
|
onChange: onChange,
|
30660
29974
|
isDisabled: disabled,
|
30661
|
-
isClearable: isClearable
|
30662
|
-
defaultValue: defaultValue
|
29975
|
+
isClearable: isClearable
|
30663
29976
|
}));
|
30664
29977
|
};
|
30665
29978
|
|
@@ -30673,12 +29986,15 @@ var CourseSelector = function CourseSelector(_ref) {
|
|
30673
29986
|
minimumTextSearchLength = _ref.minimumTextSearchLength,
|
30674
29987
|
placeholder = _ref.placeholder,
|
30675
29988
|
isClearable = _ref.isClearable,
|
30676
|
-
|
29989
|
+
valueById = _ref.valueById;
|
30677
29990
|
var _useState = React.useState(""),
|
30678
29991
|
searchString = _useState[0],
|
30679
29992
|
setSearchString = _useState[1];
|
30680
29993
|
var _useTranslation = reactI18next.useTranslation(),
|
30681
29994
|
t = _useTranslation.t;
|
29995
|
+
var valueOption = valueById !== null && typeof valueById !== "undefined" ? (options === null || options === void 0 ? void 0 : options.find(function (option) {
|
29996
|
+
return option.value == valueById;
|
29997
|
+
})) || null : null;
|
30682
29998
|
return React__default.createElement(material.FormGroup, null, !!title && React__default.createElement("label", null, title), React__default.createElement(CustomSelectOption, {
|
30683
29999
|
options: options,
|
30684
30000
|
inputValue: searchString,
|
@@ -30690,95 +30006,98 @@ var CourseSelector = function CourseSelector(_ref) {
|
|
30690
30006
|
number: minimumTextSearchLength
|
30691
30007
|
}) : t("select_class_placeholder")),
|
30692
30008
|
isMulti: isMulti,
|
30693
|
-
value: value,
|
30009
|
+
value: valueOption || value,
|
30694
30010
|
onChange: onChange,
|
30695
|
-
isClearable: isClearable
|
30696
|
-
isDisabled: isDisabled
|
30011
|
+
isClearable: isClearable
|
30697
30012
|
}));
|
30698
30013
|
};
|
30699
30014
|
|
30700
30015
|
var useSelect = function useSelect(_ref) {
|
30701
|
-
var
|
30016
|
+
var academyId = _ref.academyId,
|
30017
|
+
handleChangeEmail = _ref.handleChangeEmail;
|
30702
30018
|
var _useTranslation = reactI18next.useTranslation(),
|
30703
30019
|
t = _useTranslation.t;
|
30704
|
-
var academy = reactRedux.useSelector(function (state) {
|
30705
|
-
var _state$common;
|
30706
|
-
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.academy;
|
30707
|
-
});
|
30708
|
-
var formattedAcademy = academy ? {
|
30709
|
-
label: academy.name,
|
30710
|
-
value: academy.id
|
30711
|
-
} : null;
|
30712
|
-
var academies = formattedAcademy ? [formattedAcademy] : [];
|
30713
30020
|
var _useState = React.useState([]),
|
30714
|
-
|
30715
|
-
|
30021
|
+
academies = _useState[0],
|
30022
|
+
setAcademies = _useState[1];
|
30716
30023
|
var _useState2 = React.useState(false),
|
30717
30024
|
isLoading = _useState2[0],
|
30718
30025
|
setLoading = _useState2[1];
|
30719
|
-
|
30720
|
-
|
30721
|
-
|
30722
|
-
|
30723
|
-
|
30724
|
-
|
30725
|
-
|
30726
|
-
|
30727
|
-
|
30728
|
-
|
30729
|
-
|
30730
|
-
|
30731
|
-
|
30732
|
-
|
30733
|
-
|
30734
|
-
|
30735
|
-
|
30736
|
-
setCourses(formattedCourses);
|
30737
|
-
});
|
30738
|
-
}, function (err) {
|
30739
|
-
reactToastify.toast.error(getErrorMessage(t, err));
|
30026
|
+
var user = reactRedux.useSelector(function (state) {
|
30027
|
+
var _state$common;
|
30028
|
+
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
30029
|
+
});
|
30030
|
+
var isSuperAdmin = !!user && !user.academyDomain;
|
30031
|
+
var loadData = _$5.debounce(function (e) {
|
30032
|
+
try {
|
30033
|
+
var _temp2 = function _temp2() {
|
30034
|
+
setLoading(false);
|
30035
|
+
};
|
30036
|
+
var value = e.target.value;
|
30037
|
+
setLoading(true);
|
30038
|
+
var _temp = _catch(function () {
|
30039
|
+
handleChangeEmail(value);
|
30040
|
+
return Promise.resolve(getAcademyByTeacher(value, isSuperAdmin)).then(function (_ref2) {
|
30041
|
+
var data = _ref2.data;
|
30042
|
+
setAcademies(data.data);
|
30740
30043
|
});
|
30741
|
-
|
30742
|
-
|
30743
|
-
|
30744
|
-
|
30745
|
-
}
|
30746
|
-
|
30747
|
-
|
30748
|
-
|
30749
|
-
|
30750
|
-
|
30044
|
+
}, function (err) {
|
30045
|
+
reactToastify.toast.error(getErrorMessage(t, err));
|
30046
|
+
});
|
30047
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
|
30048
|
+
} catch (e) {
|
30049
|
+
return Promise.reject(e);
|
30050
|
+
}
|
30051
|
+
}, 1000);
|
30052
|
+
var academyOptions = React.useMemo(function () {
|
30053
|
+
if (!(academies !== null && academies !== void 0 && academies.length)) return [];
|
30054
|
+
return academies === null || academies === void 0 ? void 0 : academies.map(function (academy) {
|
30055
|
+
return {
|
30056
|
+
label: academy.name,
|
30057
|
+
value: academy.id
|
30058
|
+
};
|
30059
|
+
});
|
30060
|
+
}, [JSON.stringify(academies)]);
|
30061
|
+
var courseOptions = React.useMemo(function () {
|
30062
|
+
var _academy$courses;
|
30063
|
+
if (!academyId) return [];
|
30064
|
+
var academy = academies === null || academies === void 0 ? void 0 : academies.find(function (academy) {
|
30065
|
+
return academy.id === academyId;
|
30066
|
+
});
|
30067
|
+
return academy === null || academy === void 0 ? void 0 : (_academy$courses = academy.courses) === null || _academy$courses === void 0 ? void 0 : _academy$courses.map(function (course) {
|
30068
|
+
return {
|
30069
|
+
label: course.name,
|
30070
|
+
value: course.id
|
30071
|
+
};
|
30072
|
+
});
|
30073
|
+
}, [JSON.stringify(academies), academyId]);
|
30751
30074
|
return {
|
30752
30075
|
t: t,
|
30076
|
+
loadData: loadData,
|
30753
30077
|
isLoading: isLoading,
|
30754
|
-
|
30755
|
-
|
30078
|
+
academyOptions: academyOptions,
|
30079
|
+
courseOptions: courseOptions
|
30756
30080
|
};
|
30757
30081
|
};
|
30758
30082
|
|
30759
30083
|
var OwnerSelector = function OwnerSelector(_ref) {
|
30760
|
-
var _values$textbookOwner, _errors$textbookOwner, _errors$textbookOwner2, _values$
|
30084
|
+
var _values$textbookOwner, _errors$textbookOwner, _errors$textbookOwner2, _values$textbookOwner2, _errors$textbookOwner3, _errors$textbookOwner4;
|
30761
30085
|
var values = _ref.values,
|
30762
30086
|
errors = _ref.errors,
|
30763
30087
|
index = _ref.index,
|
30764
|
-
|
30765
|
-
onChangeFieldValue = _ref.onChangeFieldValue
|
30766
|
-
|
30088
|
+
academyId = _ref.academyId,
|
30089
|
+
onChangeFieldValue = _ref.onChangeFieldValue;
|
30090
|
+
var handleChangeEmail = function handleChangeEmail(value) {
|
30091
|
+
onChangeFieldValue("textbookOwners[" + index + "].email", value);
|
30092
|
+
};
|
30767
30093
|
var _useSelect = useSelect({
|
30768
|
-
|
30094
|
+
academyId: academyId,
|
30095
|
+
handleChangeEmail: handleChangeEmail
|
30769
30096
|
}),
|
30770
30097
|
t = _useSelect.t,
|
30771
30098
|
isLoading = _useSelect.isLoading,
|
30772
|
-
|
30773
|
-
|
30774
|
-
var handleChangeAcademy = function handleChangeAcademy(val) {
|
30775
|
-
onChangeFieldValue("textbookOwners[" + index + "].academyId", val === null || val === void 0 ? void 0 : val.value);
|
30776
|
-
onChangeFieldValue("textbookOwners[" + index + "].academy", val);
|
30777
|
-
};
|
30778
|
-
var handleChangeCourse = function handleChangeCourse(val) {
|
30779
|
-
onChangeFieldValue("textbookOwners[" + index + "].courseId", val === null || val === void 0 ? void 0 : val.value);
|
30780
|
-
onChangeFieldValue("textbookOwners[" + index + "].course", val);
|
30781
|
-
};
|
30099
|
+
academyOptions = _useSelect.academyOptions,
|
30100
|
+
courseOptions = _useSelect.courseOptions;
|
30782
30101
|
return React__default.createElement(React__default.Fragment, null, (values === null || values === void 0 ? void 0 : (_values$textbookOwner = values.textbookOwners) === null || _values$textbookOwner === void 0 ? void 0 : _values$textbookOwner[index].email) && React__default.createElement(material.Stack, {
|
30783
30102
|
flexDirection: "column",
|
30784
30103
|
gap: 1,
|
@@ -30788,16 +30107,14 @@ var OwnerSelector = function OwnerSelector(_ref) {
|
|
30788
30107
|
}, t("academy")), React__default.createElement(formik.Field, {
|
30789
30108
|
name: "textbookOwners[" + index + "].academyId",
|
30790
30109
|
render: function render(_ref2) {
|
30791
|
-
var _values$textbookOwner2;
|
30792
30110
|
var field = _ref2.field;
|
30793
30111
|
return React__default.createElement(AcademySelector, Object.assign({}, field, {
|
30794
|
-
options:
|
30795
|
-
disabled: true,
|
30796
|
-
value: (_values$textbookOwner2 = values.textbookOwners[index]) === null || _values$textbookOwner2 === void 0 ? void 0 : _values$textbookOwner2.academy,
|
30112
|
+
options: academyOptions,
|
30797
30113
|
isLoading: isLoading,
|
30798
30114
|
valueById: field === null || field === void 0 ? void 0 : field.value,
|
30799
|
-
onChange:
|
30800
|
-
|
30115
|
+
onChange: function onChange(val) {
|
30116
|
+
return onChangeFieldValue("textbookOwners[" + index + "].academyId", val === null || val === void 0 ? void 0 : val.value);
|
30117
|
+
}
|
30801
30118
|
}));
|
30802
30119
|
}
|
30803
30120
|
}), !!(errors !== null && errors !== void 0 && (_errors$textbookOwner = errors.textbookOwners) !== null && _errors$textbookOwner !== void 0 && (_errors$textbookOwner2 = _errors$textbookOwner[index]) !== null && _errors$textbookOwner2 !== void 0 && _errors$textbookOwner2.academyId) && React__default.createElement(material.Typography, {
|
@@ -30805,7 +30122,7 @@ var OwnerSelector = function OwnerSelector(_ref) {
|
|
30805
30122
|
fontSize: "10px",
|
30806
30123
|
lineHeight: "11.93px",
|
30807
30124
|
color: !(errors !== null && errors !== void 0 && errors.textbookOwners[index].academyId) ? "#97A1AF" : "#F34B4B"
|
30808
|
-
}, errors === null || errors === void 0 ? void 0 : errors.textbookOwners[index].academyId)), (values === null || values === void 0 ? void 0 : (_values$
|
30125
|
+
}, errors === null || errors === void 0 ? void 0 : errors.textbookOwners[index].academyId)), (values === null || values === void 0 ? void 0 : (_values$textbookOwner2 = values.textbookOwners) === null || _values$textbookOwner2 === void 0 ? void 0 : _values$textbookOwner2[index].email) && React__default.createElement(material.Stack, {
|
30809
30126
|
flexDirection: "column",
|
30810
30127
|
gap: 1,
|
30811
30128
|
width: 1
|
@@ -30814,14 +30131,14 @@ var OwnerSelector = function OwnerSelector(_ref) {
|
|
30814
30131
|
}, t("class")), React__default.createElement(formik.Field, {
|
30815
30132
|
name: "textbookOwners[" + index + "].courseId",
|
30816
30133
|
render: function render(_ref3) {
|
30817
|
-
var _values$textbookOwner4;
|
30818
30134
|
var field = _ref3.field;
|
30819
30135
|
return React__default.createElement(CourseSelector, Object.assign({}, field, {
|
30820
|
-
options:
|
30136
|
+
options: courseOptions,
|
30821
30137
|
isLoading: isLoading,
|
30822
|
-
|
30823
|
-
onChange:
|
30824
|
-
|
30138
|
+
valueById: field === null || field === void 0 ? void 0 : field.value,
|
30139
|
+
onChange: function onChange(val) {
|
30140
|
+
return onChangeFieldValue("textbookOwners[" + index + "].courseId", val === null || val === void 0 ? void 0 : val.value);
|
30141
|
+
}
|
30825
30142
|
}));
|
30826
30143
|
}
|
30827
30144
|
}), !!(errors !== null && errors !== void 0 && (_errors$textbookOwner3 = errors.textbookOwners) !== null && _errors$textbookOwner3 !== void 0 && (_errors$textbookOwner4 = _errors$textbookOwner3[index]) !== null && _errors$textbookOwner4 !== void 0 && _errors$textbookOwner4.courseId) && React__default.createElement(material.Typography, {
|
@@ -30836,16 +30153,10 @@ var _$4 = _$5;
|
|
30836
30153
|
var TextbookOwnersTab = function TextbookOwnersTab(_ref) {
|
30837
30154
|
var errors = _ref.errors,
|
30838
30155
|
values = _ref.values,
|
30839
|
-
disabled = _ref.disabled,
|
30840
30156
|
setFieldValue = _ref.setFieldValue;
|
30841
30157
|
var textbookOwners = values.textbookOwners;
|
30842
|
-
var academy = reactRedux.useSelector(function (state) {
|
30843
|
-
var _state$common;
|
30844
|
-
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.academy;
|
30845
|
-
});
|
30846
30158
|
var _useTranslation = reactI18next.useTranslation(),
|
30847
30159
|
t = _useTranslation.t;
|
30848
|
-
var hasErrors = errors.textbookOwners;
|
30849
30160
|
return React__default.createElement(material.Box, {
|
30850
30161
|
className: "bg-white mt-2",
|
30851
30162
|
sx: {
|
@@ -30858,15 +30169,15 @@ var TextbookOwnersTab = function TextbookOwnersTab(_ref) {
|
|
30858
30169
|
return React__default.createElement(material.Grid, {
|
30859
30170
|
container: true,
|
30860
30171
|
spacing: "16px"
|
30861
|
-
}, textbookOwners === null || textbookOwners === void 0 ? void 0 : textbookOwners.map(function (
|
30862
|
-
var
|
30172
|
+
}, textbookOwners === null || textbookOwners === void 0 ? void 0 : textbookOwners.map(function (_val, index) {
|
30173
|
+
var _values$textbookOwner, _values$textbookOwner2, _values$textbookOwner3;
|
30863
30174
|
return React__default.createElement(material.Grid, {
|
30864
30175
|
item: true,
|
30865
30176
|
xs: 6,
|
30866
|
-
lg:
|
30177
|
+
lg: 2
|
30867
30178
|
}, React__default.createElement(material.Stack, {
|
30868
30179
|
sx: {
|
30869
|
-
border: "1px solid " +
|
30180
|
+
border: "1px solid " + styles.gray_300,
|
30870
30181
|
borderRadius: "6px",
|
30871
30182
|
width: "100%",
|
30872
30183
|
height: "350px",
|
@@ -30884,7 +30195,6 @@ var TextbookOwnersTab = function TextbookOwnersTab(_ref) {
|
|
30884
30195
|
top: 8,
|
30885
30196
|
color: styles.gray_500
|
30886
30197
|
},
|
30887
|
-
disabled: disabled || !!val.academyId && val.academyId !== (academy === null || academy === void 0 ? void 0 : academy.id),
|
30888
30198
|
onClick: function onClick() {
|
30889
30199
|
arrayHelpers.remove(index);
|
30890
30200
|
}
|
@@ -30900,28 +30210,24 @@ var TextbookOwnersTab = function TextbookOwnersTab(_ref) {
|
|
30900
30210
|
var field = _ref2.field;
|
30901
30211
|
return React__default.createElement(material.TextField, Object.assign({
|
30902
30212
|
fullWidth: true
|
30903
|
-
}, field
|
30904
|
-
onKeyDown: handleKeyDown,
|
30905
|
-
disabled: disabled || !!val.academyId && val.academyId !== (academy === null || academy === void 0 ? void 0 : academy.id)
|
30906
|
-
}));
|
30213
|
+
}, field));
|
30907
30214
|
}
|
30908
30215
|
}), _$4.get(errors, "textbookOwners[" + index + "].email") && React__default.createElement(material.Typography, {
|
30909
30216
|
fontWeight: 500,
|
30910
30217
|
fontSize: "10px",
|
30911
30218
|
lineHeight: "11.93px",
|
30912
|
-
color: "#F34B4B"
|
30219
|
+
color: _$4.get(errors, "textbookOwners[" + index + "].email") ? "#97A1AF" : "#F34B4B"
|
30913
30220
|
}, _$4.get(errors, "textbookOwners[" + index + "].email"))), !!(values !== null && values !== void 0 && (_values$textbookOwner = values.textbookOwners) !== null && _values$textbookOwner !== void 0 && _values$textbookOwner[index].email) && React__default.createElement(OwnerSelector, {
|
30914
30221
|
values: values,
|
30915
30222
|
errors: errors,
|
30916
30223
|
index: index,
|
30917
|
-
email: values === null || values === void 0 ? void 0 : (_values$textbookOwner2 = values.textbookOwners) === null || _values$textbookOwner2 === void 0 ? void 0 : _values$textbookOwner2[index].email,
|
30918
30224
|
onChangeFieldValue: setFieldValue,
|
30919
|
-
|
30225
|
+
academyId: values === null || values === void 0 ? void 0 : (_values$textbookOwner2 = values.textbookOwners) === null || _values$textbookOwner2 === void 0 ? void 0 : (_values$textbookOwner3 = _values$textbookOwner2[index]) === null || _values$textbookOwner3 === void 0 ? void 0 : _values$textbookOwner3.academyId
|
30920
30226
|
})));
|
30921
|
-
}),
|
30227
|
+
}), React__default.createElement(material.Grid, {
|
30922
30228
|
item: true,
|
30923
30229
|
xs: 6,
|
30924
|
-
lg:
|
30230
|
+
lg: 2
|
30925
30231
|
}, React__default.createElement("div", {
|
30926
30232
|
style: {
|
30927
30233
|
display: "flex",
|
@@ -30935,14 +30241,7 @@ var TextbookOwnersTab = function TextbookOwnersTab(_ref) {
|
|
30935
30241
|
background: styles.gray_50
|
30936
30242
|
},
|
30937
30243
|
onClick: function onClick() {
|
30938
|
-
|
30939
|
-
arrayHelpers.push(_extends({}, DefaultTextbookOwner, {
|
30940
|
-
academy: academy ? {
|
30941
|
-
label: academy.name,
|
30942
|
-
value: academy.id
|
30943
|
-
} : null,
|
30944
|
-
academyId: (_academy$id = academy === null || academy === void 0 ? void 0 : academy.id) != null ? _academy$id : null
|
30945
|
-
}));
|
30244
|
+
return arrayHelpers.push(DefaultTextbookOwner);
|
30946
30245
|
}
|
30947
30246
|
}, React__default.createElement(material.Stack, null, React__default.createElement(io.IoMdAdd, {
|
30948
30247
|
size: 24
|
@@ -30951,20 +30250,160 @@ var TextbookOwnersTab = function TextbookOwnersTab(_ref) {
|
|
30951
30250
|
}));
|
30952
30251
|
};
|
30953
30252
|
|
30954
|
-
var
|
30253
|
+
var _reduceToMathArticles = function reduceToMathArticles(textbook, isMath) {
|
30254
|
+
var values = isMath !== undefined ? _$5.cloneDeep(textbook) : textbook;
|
30255
|
+
if (isMath !== undefined) values.type = isMath;
|
30256
|
+
for (var key in values) {
|
30257
|
+
if (values.hasOwnProperty(key)) {
|
30258
|
+
if (key === "articles") {
|
30259
|
+
var _values$key;
|
30260
|
+
values[key] = (_values$key = values[key]) !== null && _values$key !== void 0 && _values$key.length ? [values[key][0]] : [DEFAULT_ARTICLE];
|
30261
|
+
} else if (typeof values[key] === "object" && values[key] !== null) {
|
30262
|
+
_reduceToMathArticles(values[key]);
|
30263
|
+
}
|
30264
|
+
}
|
30265
|
+
}
|
30266
|
+
return values;
|
30267
|
+
};
|
30268
|
+
var _resetAllCategoriesAndQuestionTypesBySubject = function resetAllCategoriesAndQuestionTypesBySubject(textbook, subject) {
|
30269
|
+
var values = subject ? _$5.cloneDeep(textbook) : textbook;
|
30270
|
+
if (subject) {
|
30271
|
+
values.subjectId = subject === null || subject === void 0 ? void 0 : subject.value;
|
30272
|
+
values.subject = subject;
|
30273
|
+
}
|
30274
|
+
for (var key in values) {
|
30275
|
+
if (values.hasOwnProperty(key)) {
|
30276
|
+
if (key === "categories" || key === "categoryOptions") {
|
30277
|
+
values[key] = [];
|
30278
|
+
} else if (key === "questionType" || key === "questionTypeId") {
|
30279
|
+
values[key] = null;
|
30280
|
+
} else if (typeof values[key] === "object" && values[key] !== null) {
|
30281
|
+
_resetAllCategoriesAndQuestionTypesBySubject(values[key]);
|
30282
|
+
}
|
30283
|
+
}
|
30284
|
+
}
|
30285
|
+
return values;
|
30286
|
+
};
|
30287
|
+
var convertResponseToRequest = function convertResponseToRequest(selectedTextbook) {
|
30288
|
+
var _selectedTextbook$sub;
|
30289
|
+
if (!selectedTextbook) return DEFAULT_TEXTBOOK_REQUEST;
|
30290
|
+
return {
|
30291
|
+
name: selectedTextbook.name || "",
|
30292
|
+
subjectId: ((_selectedTextbook$sub = selectedTextbook.subject) === null || _selectedTextbook$sub === void 0 ? void 0 : _selectedTextbook$sub.id) || 0,
|
30293
|
+
subject: selectedTextbook.subject ? {
|
30294
|
+
label: selectedTextbook.subject.name,
|
30295
|
+
value: selectedTextbook.subject.id
|
30296
|
+
} : null,
|
30297
|
+
preparedType: selectedTextbook.preparedType || 0,
|
30298
|
+
grade: selectedTextbook.grade || "1",
|
30299
|
+
publicationDate: (selectedTextbook === null || selectedTextbook === void 0 ? void 0 : selectedTextbook.publicationDate) || "",
|
30300
|
+
publisher: selectedTextbook.publisher || "",
|
30301
|
+
isbn: selectedTextbook.isbn || "",
|
30302
|
+
coverImage: selectedTextbook.coverImage || "",
|
30303
|
+
textbookOwners: selectedTextbook.textbookOwners,
|
30304
|
+
isPublic: selectedTextbook.isPublic || false,
|
30305
|
+
isShared: selectedTextbook.isShared || false,
|
30306
|
+
isPrepared: true,
|
30307
|
+
type: selectedTextbook.type,
|
30308
|
+
chapters: selectedTextbook.chapters.map(function (c) {
|
30309
|
+
var _c$questionGroups;
|
30310
|
+
return {
|
30311
|
+
name: c.name,
|
30312
|
+
pageFrom: c.pageFrom || 0,
|
30313
|
+
pageTo: c.pageTo || 0,
|
30314
|
+
id: c.id,
|
30315
|
+
questionGroups: ((_c$questionGroups = c.questionGroups) === null || _c$questionGroups === void 0 ? void 0 : _c$questionGroups.map(function (g) {
|
30316
|
+
var _g$questions$;
|
30317
|
+
return {
|
30318
|
+
id: g.id,
|
30319
|
+
chapterId: c.id,
|
30320
|
+
questions: g.questions.map(function (q) {
|
30321
|
+
var _q$questionType;
|
30322
|
+
return _extends({}, q, {
|
30323
|
+
questionTypeId: q.questionTypeId || q.questionType.id,
|
30324
|
+
questionType: (_q$questionType = q.questionType) !== null && _q$questionType !== void 0 && _q$questionType.id ? {
|
30325
|
+
label: q.questionType.name,
|
30326
|
+
value: q.questionType.id
|
30327
|
+
} : null
|
30328
|
+
});
|
30329
|
+
}),
|
30330
|
+
articles: g.articles.map(function (a) {
|
30331
|
+
return _extends({}, a, {
|
30332
|
+
categoryOptions: a.categories.map(function (cat) {
|
30333
|
+
return {
|
30334
|
+
label: cat.name,
|
30335
|
+
value: cat.id
|
30336
|
+
};
|
30337
|
+
}),
|
30338
|
+
categories: a.categories.filter(function (cat) {
|
30339
|
+
return !!cat.id;
|
30340
|
+
}).map(function (cat) {
|
30341
|
+
return cat.id;
|
30342
|
+
})
|
30343
|
+
});
|
30344
|
+
}),
|
30345
|
+
questionCount: g.questions.length,
|
30346
|
+
answerCount: ((_g$questions$ = g.questions[0]) === null || _g$questions$ === void 0 ? void 0 : _g$questions$.numberOfAnswers) || 5
|
30347
|
+
};
|
30348
|
+
})) || [],
|
30349
|
+
subChapters: c.subChapters.map(function (sub) {
|
30350
|
+
var _sub$questionGroups;
|
30351
|
+
return {
|
30352
|
+
name: sub.name,
|
30353
|
+
pageFrom: sub.pageFrom || 0,
|
30354
|
+
pageTo: sub.pageTo || 0,
|
30355
|
+
id: sub.id,
|
30356
|
+
questionGroups: ((_sub$questionGroups = sub.questionGroups) === null || _sub$questionGroups === void 0 ? void 0 : _sub$questionGroups.map(function (g) {
|
30357
|
+
var _g$questions$2;
|
30358
|
+
return {
|
30359
|
+
id: g.id,
|
30360
|
+
chapterId: c.id,
|
30361
|
+
questions: g.questions.map(function (q) {
|
30362
|
+
var _q$questionType2;
|
30363
|
+
return _extends({}, q, {
|
30364
|
+
questionTypeId: q.questionTypeId || q.questionType.id,
|
30365
|
+
questionType: (_q$questionType2 = q.questionType) !== null && _q$questionType2 !== void 0 && _q$questionType2.id ? {
|
30366
|
+
label: q.questionType.name,
|
30367
|
+
value: q.questionType.id
|
30368
|
+
} : null
|
30369
|
+
});
|
30370
|
+
}),
|
30371
|
+
articles: g.articles.map(function (a) {
|
30372
|
+
return _extends({}, a, {
|
30373
|
+
categoryOptions: a.categories.map(function (cat) {
|
30374
|
+
return {
|
30375
|
+
label: cat.name,
|
30376
|
+
value: cat.id
|
30377
|
+
};
|
30378
|
+
}),
|
30379
|
+
categories: a.categories.filter(function (cat) {
|
30380
|
+
return !!cat.id;
|
30381
|
+
}).map(function (cat) {
|
30382
|
+
return cat.id;
|
30383
|
+
})
|
30384
|
+
});
|
30385
|
+
}),
|
30386
|
+
questionCount: g.questions.length,
|
30387
|
+
answerCount: ((_g$questions$2 = g.questions[0]) === null || _g$questions$2 === void 0 ? void 0 : _g$questions$2.numberOfAnswers) || 5
|
30388
|
+
};
|
30389
|
+
})) || [],
|
30390
|
+
subChapters: []
|
30391
|
+
};
|
30392
|
+
})
|
30393
|
+
};
|
30394
|
+
})
|
30395
|
+
};
|
30396
|
+
};
|
30397
|
+
|
30398
|
+
var _excluded$k = ["isAdmin", "textbookId", "selected", "coverImage", "onChangeTab", "onUploadImage"];
|
30955
30399
|
var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
30956
|
-
var
|
30957
|
-
isSuperAdminUser = _ref.isSuperAdminUser,
|
30958
|
-
isSuperAdmin = _ref.isSuperAdmin,
|
30959
|
-
isAdmin = _ref.isAdmin,
|
30400
|
+
var isAdmin = _ref.isAdmin,
|
30960
30401
|
textbookId = _ref.textbookId,
|
30961
30402
|
selected = _ref.selected,
|
30962
30403
|
coverImage = _ref.coverImage,
|
30963
|
-
disabled = _ref.disabled,
|
30964
|
-
ownersDisabled = _ref.ownersDisabled,
|
30965
30404
|
onChangeTab = _ref.onChangeTab,
|
30966
30405
|
onUploadImage = _ref.onUploadImage,
|
30967
|
-
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
30406
|
+
formikProps = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
30968
30407
|
var values = formikProps.values,
|
30969
30408
|
errors = formikProps.errors,
|
30970
30409
|
dirty = formikProps.dirty,
|
@@ -30982,7 +30421,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
30982
30421
|
};
|
30983
30422
|
}, [dirty, i18n.t]);
|
30984
30423
|
var handleChangeTextbookType = function handleChangeTextbookType() {
|
30985
|
-
var isMath = values.type ===
|
30424
|
+
var isMath = values.type === 2 ? 1 : 2;
|
30986
30425
|
var newValues = _reduceToMathArticles(values, isMath);
|
30987
30426
|
setValues(newValues);
|
30988
30427
|
};
|
@@ -31019,9 +30458,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
31019
30458
|
return React__default.createElement(material.TextField, Object.assign({
|
31020
30459
|
placeholder: i18n.t("title")
|
31021
30460
|
}, field, {
|
31022
|
-
size: "small"
|
31023
|
-
disabled: disabled,
|
31024
|
-
onKeyDown: handleKeyDown
|
30461
|
+
size: "small"
|
31025
30462
|
}));
|
31026
30463
|
}
|
31027
30464
|
}), !!(errors !== null && errors !== void 0 && errors.name) && React__default.createElement(material.Typography, {
|
@@ -31041,7 +30478,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
31041
30478
|
var field = _ref3.field;
|
31042
30479
|
return React__default.createElement(SubjectSelector, Object.assign({}, field, {
|
31043
30480
|
value: values.subject,
|
31044
|
-
isDisabled: !!textbookId
|
30481
|
+
isDisabled: !!textbookId,
|
31045
30482
|
onChange: handleChangeSubject
|
31046
30483
|
}));
|
31047
30484
|
}
|
@@ -31063,7 +30500,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
31063
30500
|
var field = _ref4.field;
|
31064
30501
|
return React__default.createElement(material.Switch, Object.assign({}, field, {
|
31065
30502
|
color: "success",
|
31066
|
-
disabled: !!textbookId
|
30503
|
+
disabled: !!textbookId,
|
31067
30504
|
checked: values.type === 2,
|
31068
30505
|
onChange: handleChangeTextbookType
|
31069
30506
|
}));
|
@@ -31074,7 +30511,6 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
31074
30511
|
width: "fit-content"
|
31075
30512
|
},
|
31076
30513
|
variant: "contained",
|
31077
|
-
disabled: disabled,
|
31078
30514
|
onClick: function onClick() {
|
31079
30515
|
if (!_$5.isEmpty(errors)) {
|
31080
30516
|
reactToastify.toast.error(i18n.t("please_fill_in_the_blank_fields"));
|
@@ -31117,7 +30553,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
31117
30553
|
sx: {
|
31118
30554
|
color: contentsErrors && submitCount ? error.main + "!important" : "gray"
|
31119
30555
|
}
|
31120
|
-
}, a11yProps(1))), !(values !== null && values !== void 0 && values.isPublic) && (!
|
30556
|
+
}, 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({
|
31121
30557
|
label: i18n.t("textbook.owners"),
|
31122
30558
|
sx: {
|
31123
30559
|
color: textbookOwnersErrors && submitCount ? error.main + "!important" : "gray"
|
@@ -31129,20 +30565,14 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
31129
30565
|
coverImage: coverImage,
|
31130
30566
|
handleUploadImage: onUploadImage,
|
31131
30567
|
textbookId: textbookId,
|
31132
|
-
|
31133
|
-
isCreatedByAdmin: isCreatedByAdmin,
|
31134
|
-
isSuperAdminUser: isSuperAdminUser
|
30568
|
+
isAdmin: isAdmin
|
31135
30569
|
}))), React__default.createElement(CustomTextbookTab, {
|
31136
30570
|
value: selected,
|
31137
30571
|
index: 1
|
31138
|
-
}, React__default.createElement(TextbookContentsTab, Object.assign({}, formikProps, {
|
31139
|
-
disabled: disabled
|
31140
|
-
}))), React__default.createElement(CustomTextbookTab, {
|
30572
|
+
}, React__default.createElement(TextbookContentsTab, Object.assign({}, formikProps))), React__default.createElement(CustomTextbookTab, {
|
31141
30573
|
value: selected,
|
31142
30574
|
index: 2
|
31143
|
-
}, React__default.createElement(TextbookOwnersTab, Object.assign({}, formikProps
|
31144
|
-
disabled: ownersDisabled
|
31145
|
-
}))))));
|
30575
|
+
}, React__default.createElement(TextbookOwnersTab, Object.assign({}, formikProps))))));
|
31146
30576
|
};
|
31147
30577
|
var a11yProps = function a11yProps(index) {
|
31148
30578
|
return {
|
@@ -31152,8 +30582,7 @@ var a11yProps = function a11yProps(index) {
|
|
31152
30582
|
};
|
31153
30583
|
|
31154
30584
|
var PreparedTextbookView = function PreparedTextbookView(_ref) {
|
31155
|
-
var
|
31156
|
-
notFoundView = _ref.notFoundView,
|
30585
|
+
var notFoundView = _ref.notFoundView,
|
31157
30586
|
onBackToList = _ref.onBackToList,
|
31158
30587
|
textbookId = _ref.textbookId;
|
31159
30588
|
var _useState = React.useState(0),
|
@@ -31164,15 +30593,9 @@ var PreparedTextbookView = function PreparedTextbookView(_ref) {
|
|
31164
30593
|
};
|
31165
30594
|
var _useTextbookManagemen = useTextbookManagement({
|
31166
30595
|
onNavigateList: onBackToList,
|
31167
|
-
textbookId: textbookId
|
31168
|
-
role: role
|
30596
|
+
textbookId: textbookId
|
31169
30597
|
}),
|
31170
30598
|
t = _useTextbookManagemen.t,
|
31171
|
-
disabledTextbookOwners = _useTextbookManagemen.disabledTextbookOwners,
|
31172
|
-
isReadonly = _useTextbookManagemen.isReadonly,
|
31173
|
-
isEditable = _useTextbookManagemen.isEditable,
|
31174
|
-
isSuperAdmin = _useTextbookManagemen.isSuperAdmin,
|
31175
|
-
isSuperAdminUser = _useTextbookManagemen.isSuperAdminUser,
|
31176
30599
|
isAdmin = _useTextbookManagemen.isAdmin,
|
31177
30600
|
coverImage = _useTextbookManagemen.coverImage,
|
31178
30601
|
selectedTextbook = _useTextbookManagemen.selectedTextbook,
|
@@ -31181,7 +30604,6 @@ var PreparedTextbookView = function PreparedTextbookView(_ref) {
|
|
31181
30604
|
var textbookRequest = React.useMemo(function () {
|
31182
30605
|
return convertResponseToRequest(selectedTextbook);
|
31183
30606
|
}, [JSON.stringify(selectedTextbook)]);
|
31184
|
-
var isCreatedByAdmin = selectedTextbook === null || selectedTextbook === void 0 ? void 0 : selectedTextbook.isCreatedByAdmin;
|
31185
30607
|
if (textbookId && selectedTextbook && !selectedTextbook.isPrepared) return notFoundView;
|
31186
30608
|
return React__default.createElement(material.Box, null, React__default.createElement(formik.Formik, {
|
31187
30609
|
initialValues: textbookRequest,
|
@@ -31192,17 +30614,12 @@ var PreparedTextbookView = function PreparedTextbookView(_ref) {
|
|
31192
30614
|
onSubmit: handleSubmit
|
31193
30615
|
}, function (props) {
|
31194
30616
|
return React__default.createElement(PreparedTextbookForm, Object.assign({
|
31195
|
-
isCreatedByAdmin: isCreatedByAdmin,
|
31196
|
-
isSuperAdminUser: isSuperAdminUser,
|
31197
30617
|
isAdmin: isAdmin,
|
31198
|
-
isSuperAdmin: isSuperAdmin,
|
31199
30618
|
selected: selected,
|
31200
30619
|
textbookId: textbookId,
|
31201
30620
|
onChangeTab: handleChangeTab,
|
31202
30621
|
onUploadImage: handleUploadImage,
|
31203
|
-
coverImage: coverImage
|
31204
|
-
disabled: isReadonly || !isEditable,
|
31205
|
-
ownersDisabled: isReadonly || disabledTextbookOwners
|
30622
|
+
coverImage: coverImage
|
31206
30623
|
}, props));
|
31207
30624
|
}));
|
31208
30625
|
};
|
@@ -32435,7 +31852,7 @@ var ChapterProblemSolvingResultsDialog = function ChapterProblemSolvingResultsDi
|
|
32435
31852
|
}, t("cancel"))))));
|
32436
31853
|
};
|
32437
31854
|
|
32438
|
-
var _excluded$
|
31855
|
+
var _excluded$l = ["onChange"];
|
32439
31856
|
var StartPageDialog = function StartPageDialog(_ref) {
|
32440
31857
|
var t = _ref.t,
|
32441
31858
|
onClose = _ref.onClose,
|
@@ -32496,7 +31913,7 @@ var StartPageDialog = function StartPageDialog(_ref) {
|
|
32496
31913
|
}, t("page_to_start_with")), React__default.createElement(formik.Field, {
|
32497
31914
|
name: "startPage",
|
32498
31915
|
render: function render(_ref3) {
|
32499
|
-
var field = _objectWithoutPropertiesLoose(_ref3, _excluded$
|
31916
|
+
var field = _objectWithoutPropertiesLoose(_ref3, _excluded$l);
|
32500
31917
|
return React__default.createElement(CustomSelectOption, Object.assign({
|
32501
31918
|
menuPosition: "fixed",
|
32502
31919
|
onChange: function onChange(option) {
|
@@ -35146,18 +34563,6 @@ Object.defineProperty(exports, 'DemoContainer', {
|
|
35146
34563
|
}
|
35147
34564
|
});
|
35148
34565
|
exports.moment = moment;
|
35149
|
-
Object.defineProperty(exports, 'CellMeasurerCache', {
|
35150
|
-
enumerable: true,
|
35151
|
-
get: function () {
|
35152
|
-
return reactVirtualized.CellMeasurerCache;
|
35153
|
-
}
|
35154
|
-
});
|
35155
|
-
Object.defineProperty(exports, 'MultiGrid', {
|
35156
|
-
enumerable: true,
|
35157
|
-
get: function () {
|
35158
|
-
return reactVirtualized.MultiGrid;
|
35159
|
-
}
|
35160
|
-
});
|
35161
34566
|
exports.ACADEMY_DOMAIN = ACADEMY_DOMAIN;
|
35162
34567
|
exports.ACCESS_TOKEN = ACCESS_TOKEN;
|
35163
34568
|
exports.AcademyHeaders = AcademyHeaders;
|
@@ -35169,7 +34574,6 @@ exports.ArticleCategorySelector = ArticleCategorySelector;
|
|
35169
34574
|
exports.ArticleDialog = ArticleDialog;
|
35170
34575
|
exports.ArticleGroupView = ArticleGroupView;
|
35171
34576
|
exports.BASE_URL = BASE_URL;
|
35172
|
-
exports.BRIEF_GRADE_OPTIONS = BRIEF_GRADE_OPTIONS;
|
35173
34577
|
exports.ChapterBox = _ChapterBox;
|
35174
34578
|
exports.ChatContainer = ChatContainer;
|
35175
34579
|
exports.ChatTypes = types;
|
@@ -35190,6 +34594,7 @@ exports.DATE_TIME_MIN_VALUE = DATE_TIME_MIN_VALUE;
|
|
35190
34594
|
exports.DEFAULT_NOTE_FILTER = DEFAULT_NOTE_FILTER;
|
35191
34595
|
exports.DEFAULT_PAGING_RESPONSE = DEFAULT_PAGING_RESPONSE;
|
35192
34596
|
exports.DefaultErrorMessage = DefaultErrorMessage;
|
34597
|
+
exports.ELEMENTARY_GRADES = ELEMENTARY_GRADES;
|
35193
34598
|
exports.EXAM_CHANNEL = EXAM_CHANNEL;
|
35194
34599
|
exports.EXAM_STUDENT_CHANNEL = EXAM_STUDENT_CHANNEL;
|
35195
34600
|
exports.ExamDetailView = ExamDetailView;
|
@@ -35199,7 +34604,7 @@ exports.GOOGLE_CLIENT_ID = GOOGLE_CLIENT_ID;
|
|
35199
34604
|
exports.GOOGLE_RECAPTCHA_ID = GOOGLE_RECAPTCHA_ID;
|
35200
34605
|
exports.GOOGLE_RECAPTCHA_KEY = GOOGLE_RECAPTCHA_KEY;
|
35201
34606
|
exports.GOOGLE_RECAPTCHA_SECRET = GOOGLE_RECAPTCHA_SECRET;
|
35202
|
-
exports.
|
34607
|
+
exports.HIGH_GRADES = HIGH_GRADES;
|
35203
34608
|
exports.Header = Header;
|
35204
34609
|
exports.InputText = InputText;
|
35205
34610
|
exports.LANGUAGE = LANGUAGE;
|
@@ -35213,6 +34618,7 @@ exports.Login = Login;
|
|
35213
34618
|
exports.LoginQRCode = LoginQRCode;
|
35214
34619
|
exports.LoginWithEmail = LoginWithEmail;
|
35215
34620
|
exports.LoginWithPassword = SignIn;
|
34621
|
+
exports.MIDDLE_GRADES = MIDDLE_GRADES;
|
35216
34622
|
exports.MathJaxContainer = MathJaxContainer;
|
35217
34623
|
exports.MathTinyEditor = MathTinyEditor;
|
35218
34624
|
exports.NewNoteButton = NewNoteButton;
|
@@ -35240,6 +34646,7 @@ exports.REDIRECT_URL = REDIRECT_URL;
|
|
35240
34646
|
exports.RELEASE_DATE = RELEASE_DATE;
|
35241
34647
|
exports.RecentUserActionNames = RecentUserActionNames;
|
35242
34648
|
exports.ReleaseAlert = ReleaseAlert;
|
34649
|
+
exports.SCHOOL_OPTIONS = SCHOOL_OPTIONS;
|
35243
34650
|
exports.SUPER_ADMIN_BASE_URL = SUPER_ADMIN_BASE_URL;
|
35244
34651
|
exports.ScoreSelector = ScoreSelector;
|
35245
34652
|
exports.SearchInput = SearchInput;
|