touchstudy-core 0.1.161 → 0.1.163
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/Chats/components/InputChat.d.ts +1 -2
- package/dist/components/Chats/components/TinyChatEditor.d.ts +10 -0
- package/dist/components/Icons/BpIcon.d.ts +2 -0
- package/dist/components/Selectors/QuestionAnswerTypeSelector.d.ts +9 -0
- package/dist/containers/Exams/apiClients/categoryService.d.ts +4 -0
- package/dist/containers/Exams/components/QuestionBlock.d.ts +11 -0
- package/dist/containers/Exams/components/QuestionGroupBlock.d.ts +19 -0
- package/dist/containers/Exams/components/QuestionGroupBlockBody.d.ts +24 -0
- package/dist/containers/Exams/components/QuestionShortInput.d.ts +10 -0
- package/dist/containers/Exams/configs/functions.d.ts +1 -0
- package/dist/containers/Exams/hooks/useExamOptions.d.ts +8 -0
- package/dist/containers/Exams/styles/styles.d.ts +6 -0
- package/dist/containers/Notifications/configs/types.d.ts +2 -2
- package/dist/index.js +236 -121
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +236 -121
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/enums/recentUserAction.d.ts +13 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -30,10 +30,10 @@ import 'moment/locale/en-au.js';
|
|
30
30
|
import { CellMeasurerCache, CellMeasurer, AutoSizer, List as List$1, MultiGrid } from 'react-virtualized';
|
31
31
|
export { CellMeasurerCache, MultiGrid } from 'react-virtualized';
|
32
32
|
import { Formik, Form, Field, FieldArray } from 'formik';
|
33
|
-
import { alpha } from '@mui/material/styles';
|
34
33
|
import tinymce from 'tinymce';
|
35
34
|
import '@wiris/mathtype-tinymce6';
|
36
35
|
import { Editor } from '@tinymce/tinymce-react';
|
36
|
+
import { alpha } from '@mui/material/styles';
|
37
37
|
import Grid$1 from '@mui/material/Grid';
|
38
38
|
import Typography$1 from '@mui/material/Typography';
|
39
39
|
import Card from '@mui/material/Card';
|
@@ -431,7 +431,7 @@ var question_count = "문제 갯수";
|
|
431
431
|
var multi_choice = "여러 개임";
|
432
432
|
var category = "문항 카테고리";
|
433
433
|
var korean_category = "지문 영역";
|
434
|
-
var
|
434
|
+
var korean_subcategory = "지문 세부 영역";
|
435
435
|
var _category = "카테고리";
|
436
436
|
var score = "점수";
|
437
437
|
var enter_score = "점수 입력";
|
@@ -1488,6 +1488,24 @@ var textbook_name = "교재 이름";
|
|
1488
1488
|
var korean_language = "국어";
|
1489
1489
|
var answer_cannot_be_empty = "답변은 비워둘 수 없습니다";
|
1490
1490
|
var are_you_sure_to_create_student_parent_note = "학생/학부모에게 노트를 생성하시겠습니까?";
|
1491
|
+
var notification_title = "알림 제목";
|
1492
|
+
var vieweduser = "사용자 조회";
|
1493
|
+
var updateduser = "사용자 업데이트";
|
1494
|
+
var creatednewuser = "새 사용자 생성";
|
1495
|
+
var importeduser = "사용자 가져오기";
|
1496
|
+
var viewedqna = "Q&A 조회";
|
1497
|
+
var completedqna = "Q&A 완료";
|
1498
|
+
var answeredqna = "Q&A 답변";
|
1499
|
+
var removemessageqna = "Q&A 메시지 삭제";
|
1500
|
+
var updatemessageqna = "Q&A 메시지 업데이트";
|
1501
|
+
var viewedexamresult = "시험 결과 조회";
|
1502
|
+
var printedexamresult = "시험 결과 출력";
|
1503
|
+
var viewedattendance = "출석 조회";
|
1504
|
+
var updatedattendance = "출석 업데이트";
|
1505
|
+
var addedteachertoclass = "교사 수업 추가";
|
1506
|
+
var removedteacherfromclass = "교사 수업 제거";
|
1507
|
+
var addedstudenttoclass = "학생 수업 추가";
|
1508
|
+
var removedstudentfromclass = "학생 수업 제거";
|
1491
1509
|
var lang_ko = {
|
1492
1510
|
problem_solving: problem_solving,
|
1493
1511
|
my_story: my_story,
|
@@ -1574,7 +1592,7 @@ var lang_ko = {
|
|
1574
1592
|
multi_choice: multi_choice,
|
1575
1593
|
category: category,
|
1576
1594
|
korean_category: korean_category,
|
1577
|
-
|
1595
|
+
korean_subcategory: korean_subcategory,
|
1578
1596
|
_category: _category,
|
1579
1597
|
score: score,
|
1580
1598
|
enter_score: enter_score,
|
@@ -2609,7 +2627,25 @@ var lang_ko = {
|
|
2609
2627
|
textbook_name: textbook_name,
|
2610
2628
|
korean_language: korean_language,
|
2611
2629
|
answer_cannot_be_empty: answer_cannot_be_empty,
|
2612
|
-
are_you_sure_to_create_student_parent_note: are_you_sure_to_create_student_parent_note
|
2630
|
+
are_you_sure_to_create_student_parent_note: are_you_sure_to_create_student_parent_note,
|
2631
|
+
notification_title: notification_title,
|
2632
|
+
vieweduser: vieweduser,
|
2633
|
+
updateduser: updateduser,
|
2634
|
+
creatednewuser: creatednewuser,
|
2635
|
+
importeduser: importeduser,
|
2636
|
+
viewedqna: viewedqna,
|
2637
|
+
completedqna: completedqna,
|
2638
|
+
answeredqna: answeredqna,
|
2639
|
+
removemessageqna: removemessageqna,
|
2640
|
+
updatemessageqna: updatemessageqna,
|
2641
|
+
viewedexamresult: viewedexamresult,
|
2642
|
+
printedexamresult: printedexamresult,
|
2643
|
+
viewedattendance: viewedattendance,
|
2644
|
+
updatedattendance: updatedattendance,
|
2645
|
+
addedteachertoclass: addedteachertoclass,
|
2646
|
+
removedteacherfromclass: removedteacherfromclass,
|
2647
|
+
addedstudenttoclass: addedstudenttoclass,
|
2648
|
+
removedstudentfromclass: removedstudentfromclass
|
2613
2649
|
};
|
2614
2650
|
|
2615
2651
|
var problem_solving$1 = "Problem Solving";
|
@@ -2716,7 +2752,7 @@ var number_of_answers$1 = "Number of answers";
|
|
2716
2752
|
var correct_answers$1 = "Correct answers";
|
2717
2753
|
var category$1 = "Category";
|
2718
2754
|
var korean_category$1 = "Category";
|
2719
|
-
var
|
2755
|
+
var korean_subcategory$1 = "Subcategory";
|
2720
2756
|
var _category$1 = "Category";
|
2721
2757
|
var score$1 = "Score";
|
2722
2758
|
var enter_title$1 = "Enter title";
|
@@ -3754,6 +3790,24 @@ var textbook_name$1 = "Textbook name";
|
|
3754
3790
|
var korean_language$1 = "Korean";
|
3755
3791
|
var answer_cannot_be_empty$1 = "Answer cannot be empty";
|
3756
3792
|
var are_you_sure_to_create_student_parent_note$1 = "Are you sure you want to create a note for the student/parent?";
|
3793
|
+
var notification_title$1 = "Notification title";
|
3794
|
+
var vieweduser$1 = "Viewed user";
|
3795
|
+
var updateduser$1 = "Updated user";
|
3796
|
+
var creatednewuser$1 = "Created new user";
|
3797
|
+
var importeduser$1 = "Imported user";
|
3798
|
+
var viewedqna$1 = "Viewed Q&A";
|
3799
|
+
var completedqna$1 = "Completed Q&A";
|
3800
|
+
var answeredqna$1 = "Answered Q&A";
|
3801
|
+
var removemessageqna$1 = "Remove message Q&A";
|
3802
|
+
var updatemessageqna$1 = "Update message Q&A";
|
3803
|
+
var viewedexamresult$1 = "Viewed exam result";
|
3804
|
+
var printedexamresult$1 = "Printed exam result";
|
3805
|
+
var viewedattendance$1 = "Viewed attendance";
|
3806
|
+
var updatedattendance$1 = "Updated attendance";
|
3807
|
+
var addedteachertoclass$1 = "Added teacher to class";
|
3808
|
+
var removedteacherfromclass$1 = "Removed teacher from class";
|
3809
|
+
var addedstudenttoclass$1 = "Added student to class";
|
3810
|
+
var removedstudentfromclass$1 = "Removed student from class";
|
3757
3811
|
var lang_en = {
|
3758
3812
|
problem_solving: problem_solving$1,
|
3759
3813
|
my_story: my_story$1,
|
@@ -3862,7 +3916,7 @@ var lang_en = {
|
|
3862
3916
|
correct_answers: correct_answers$1,
|
3863
3917
|
category: category$1,
|
3864
3918
|
korean_category: korean_category$1,
|
3865
|
-
|
3919
|
+
korean_subcategory: korean_subcategory$1,
|
3866
3920
|
_category: _category$1,
|
3867
3921
|
score: score$1,
|
3868
3922
|
enter_title: enter_title$1,
|
@@ -4877,7 +4931,25 @@ var lang_en = {
|
|
4877
4931
|
textbook_name: textbook_name$1,
|
4878
4932
|
korean_language: korean_language$1,
|
4879
4933
|
answer_cannot_be_empty: answer_cannot_be_empty$1,
|
4880
|
-
are_you_sure_to_create_student_parent_note: are_you_sure_to_create_student_parent_note$1
|
4934
|
+
are_you_sure_to_create_student_parent_note: are_you_sure_to_create_student_parent_note$1,
|
4935
|
+
notification_title: notification_title$1,
|
4936
|
+
vieweduser: vieweduser$1,
|
4937
|
+
updateduser: updateduser$1,
|
4938
|
+
creatednewuser: creatednewuser$1,
|
4939
|
+
importeduser: importeduser$1,
|
4940
|
+
viewedqna: viewedqna$1,
|
4941
|
+
completedqna: completedqna$1,
|
4942
|
+
answeredqna: answeredqna$1,
|
4943
|
+
removemessageqna: removemessageqna$1,
|
4944
|
+
updatemessageqna: updatemessageqna$1,
|
4945
|
+
viewedexamresult: viewedexamresult$1,
|
4946
|
+
printedexamresult: printedexamresult$1,
|
4947
|
+
viewedattendance: viewedattendance$1,
|
4948
|
+
updatedattendance: updatedattendance$1,
|
4949
|
+
addedteachertoclass: addedteachertoclass$1,
|
4950
|
+
removedteacherfromclass: removedteacherfromclass$1,
|
4951
|
+
addedstudenttoclass: addedstudenttoclass$1,
|
4952
|
+
removedstudentfromclass: removedstudentfromclass$1
|
4881
4953
|
};
|
4882
4954
|
|
4883
4955
|
i18n.use(initReactI18next).init({
|
@@ -6240,10 +6312,22 @@ var OrderType;
|
|
6240
6312
|
var RecentUserAction;
|
6241
6313
|
(function (RecentUserAction) {
|
6242
6314
|
RecentUserAction["ViewedUser"] = "ViewedUser";
|
6315
|
+
RecentUserAction["UpdatedUser"] = "UpdatedUser";
|
6316
|
+
RecentUserAction["CreatedNewUser"] = "CreatedNewUser";
|
6317
|
+
RecentUserAction["ImportedUser"] = "ImportedUser";
|
6243
6318
|
RecentUserAction["ViewedQNA"] = "ViewedQNA";
|
6319
|
+
RecentUserAction["CompletedQNA"] = "CompletedQNA";
|
6320
|
+
RecentUserAction["AnsweredQNA"] = "AnsweredQNA";
|
6321
|
+
RecentUserAction["RemoveMessageQNA"] = "RemoveMessageQNA";
|
6322
|
+
RecentUserAction["UpdateMessageQNA"] = "UpdateMessageQNA";
|
6244
6323
|
RecentUserAction["ViewedExamResult"] = "ViewedExamResult";
|
6245
6324
|
RecentUserAction["PrintedExamResult"] = "PrintedExamResult";
|
6246
6325
|
RecentUserAction["ViewedAttendance"] = "ViewedAttendance";
|
6326
|
+
RecentUserAction["UpdatedAttendance"] = "UpdatedAttendance";
|
6327
|
+
RecentUserAction["AddedTeacherToClass"] = "AddedTeacherToClass";
|
6328
|
+
RecentUserAction["RemovedTeacherFromClass"] = "RemovedTeacherFromClass";
|
6329
|
+
RecentUserAction["AddedStudentToClass"] = "AddedStudentToClass";
|
6330
|
+
RecentUserAction["RemovedStudentFromClass"] = "RemovedStudentFromClass";
|
6247
6331
|
})(RecentUserAction || (RecentUserAction = {}));
|
6248
6332
|
|
6249
6333
|
var UserSortColumn;
|
@@ -7556,6 +7640,8 @@ var getClassesApi = function getClassesApi(textSearch) {
|
|
7556
7640
|
return api.get("" + COURSE_URL, {
|
7557
7641
|
params: {
|
7558
7642
|
textSearch: textSearch,
|
7643
|
+
pageSize: 100,
|
7644
|
+
currentPage: 1,
|
7559
7645
|
roles: [Role.Admin]
|
7560
7646
|
}
|
7561
7647
|
});
|
@@ -7607,11 +7693,7 @@ var ClassSelector = function ClassSelector(_ref) {
|
|
7607
7693
|
}, [searchString]);
|
7608
7694
|
useEffect(function () {
|
7609
7695
|
timeout && timeout.current && clearTimeout(timeout.current);
|
7610
|
-
|
7611
|
-
setClasses([]);
|
7612
|
-
} else {
|
7613
|
-
timeout.current = setTimeout(loadData, 300);
|
7614
|
-
}
|
7696
|
+
timeout.current = setTimeout(loadData, 300);
|
7615
7697
|
}, [searchString]);
|
7616
7698
|
var options = classes.filter(function (classOption) {
|
7617
7699
|
return !externalClassIds || externalClassIds && !externalClassIds.includes(classOption.id);
|
@@ -7632,7 +7714,7 @@ var ClassSelector = function ClassSelector(_ref) {
|
|
7632
7714
|
return setSearchString(inputValue);
|
7633
7715
|
},
|
7634
7716
|
isLoading: isLoading,
|
7635
|
-
placeholder: t('
|
7717
|
+
placeholder: t('select_placeholder'),
|
7636
7718
|
isMulti: true,
|
7637
7719
|
value: value,
|
7638
7720
|
onChange: onChange,
|
@@ -8115,6 +8197,12 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
8115
8197
|
isOpenTooltip = _useTooltip.isOpenTooltip,
|
8116
8198
|
handleCloseTooltip = _useTooltip.handleCloseTooltip,
|
8117
8199
|
handleOpenTooltip = _useTooltip.handleOpenTooltip;
|
8200
|
+
useEffect(function () {
|
8201
|
+
if (window.MathJax) {
|
8202
|
+
var _window$MathJax;
|
8203
|
+
(_window$MathJax = window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.typeset();
|
8204
|
+
}
|
8205
|
+
}, [content]);
|
8118
8206
|
return React__default.createElement("div", null, showTimestamp && React__default.createElement(Typography, {
|
8119
8207
|
fontWeight: 500,
|
8120
8208
|
fontSize: "12px",
|
@@ -8187,17 +8275,15 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
8187
8275
|
style: {
|
8188
8276
|
"float": "inline-end",
|
8189
8277
|
maxWidth: 400,
|
8190
|
-
background: styles.less_dark
|
8191
|
-
|
8192
|
-
|
8193
|
-
|
8194
|
-
|
8195
|
-
|
8196
|
-
|
8197
|
-
sx: {
|
8198
|
-
wordBreak: "break-word"
|
8278
|
+
background: styles.less_dark,
|
8279
|
+
color: "#FFF",
|
8280
|
+
fontSize: "14px",
|
8281
|
+
fontWeight: 500
|
8282
|
+
},
|
8283
|
+
dangerouslySetInnerHTML: {
|
8284
|
+
__html: content || ""
|
8199
8285
|
}
|
8200
|
-
}
|
8286
|
+
})))));
|
8201
8287
|
};
|
8202
8288
|
|
8203
8289
|
var ChatLeftItem = function ChatLeftItem(_ref) {
|
@@ -8211,6 +8297,12 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
8211
8297
|
toggleImageDialog = _ref.toggleImageDialog;
|
8212
8298
|
var _useTranslation = useTranslation(),
|
8213
8299
|
t = _useTranslation.t;
|
8300
|
+
useEffect(function () {
|
8301
|
+
if (window.MathJax) {
|
8302
|
+
var _window$MathJax;
|
8303
|
+
(_window$MathJax = window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.typeset();
|
8304
|
+
}
|
8305
|
+
}, [content]);
|
8214
8306
|
return React__default.createElement("div", null, showTimestamp && React__default.createElement(Typography, {
|
8215
8307
|
fontWeight: 500,
|
8216
8308
|
fontSize: "12px",
|
@@ -8264,17 +8356,15 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
8264
8356
|
}) : React__default.createElement("div", {
|
8265
8357
|
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"],
|
8266
8358
|
style: {
|
8267
|
-
maxWidth: 400
|
8268
|
-
|
8269
|
-
|
8270
|
-
|
8271
|
-
|
8272
|
-
|
8273
|
-
|
8274
|
-
sx: {
|
8275
|
-
wordBreak: "break-word"
|
8359
|
+
maxWidth: 400,
|
8360
|
+
color: styles.gray_700,
|
8361
|
+
fontSize: "14px",
|
8362
|
+
fontWeight: 500
|
8363
|
+
},
|
8364
|
+
dangerouslySetInnerHTML: {
|
8365
|
+
__html: content || ""
|
8276
8366
|
}
|
8277
|
-
}
|
8367
|
+
}))));
|
8278
8368
|
};
|
8279
8369
|
|
8280
8370
|
var ImageDetailDialog = function ImageDetailDialog(_ref) {
|
@@ -8445,6 +8535,47 @@ var iconPlusCircle = function iconPlusCircle(_ref) {
|
|
8445
8535
|
}));
|
8446
8536
|
};
|
8447
8537
|
|
8538
|
+
var TinyChatEditor = function TinyChatEditor(_ref) {
|
8539
|
+
var _ref$disabled = _ref.disabled,
|
8540
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
8541
|
+
onChange = _ref.onChange,
|
8542
|
+
initValue = _ref.initValue,
|
8543
|
+
config = _ref.config;
|
8544
|
+
var isFirstChange = useRef(true);
|
8545
|
+
var _useTranslation = useTranslation(),
|
8546
|
+
t = _useTranslation.t;
|
8547
|
+
useEffect(function () {
|
8548
|
+
if (window.tinymce) {
|
8549
|
+
window.tinymce = tinymce;
|
8550
|
+
}
|
8551
|
+
}, []);
|
8552
|
+
var options = {
|
8553
|
+
height: 126,
|
8554
|
+
menubar: false,
|
8555
|
+
readonly: false,
|
8556
|
+
external_plugins: {
|
8557
|
+
tiny_mce_wiris: '/editor/wiris-for-tinymce.js'
|
8558
|
+
},
|
8559
|
+
toolbar: 'tiny_mce_wiris_formulaEditor',
|
8560
|
+
branding: false,
|
8561
|
+
extended_valid_elements: '*[.*]',
|
8562
|
+
placeholder: t("send_message")
|
8563
|
+
};
|
8564
|
+
var handleChange = function handleChange(value, _) {
|
8565
|
+
if (isFirstChange.current) {
|
8566
|
+
isFirstChange.current = false;
|
8567
|
+
return;
|
8568
|
+
}
|
8569
|
+
onChange(value);
|
8570
|
+
};
|
8571
|
+
return React__default.createElement(Editor, {
|
8572
|
+
disabled: disabled,
|
8573
|
+
init: config || options,
|
8574
|
+
value: initValue,
|
8575
|
+
onEditorChange: handleChange
|
8576
|
+
});
|
8577
|
+
};
|
8578
|
+
|
8448
8579
|
var UpdateMessageDialog = function UpdateMessageDialog(_ref) {
|
8449
8580
|
var open = _ref.open,
|
8450
8581
|
onClose = _ref.onClose,
|
@@ -8477,7 +8608,7 @@ var UpdateMessageDialog = function UpdateMessageDialog(_ref) {
|
|
8477
8608
|
handleUpdateMessage(content || "");
|
8478
8609
|
}
|
8479
8610
|
}, function (_ref2) {
|
8480
|
-
|
8611
|
+
var setFieldValue = _ref2.setFieldValue;
|
8481
8612
|
return React__default.createElement(Form, null, React__default.createElement("label", {
|
8482
8613
|
htmlFor: "content",
|
8483
8614
|
className: styles$1['form-label'] + " " + styles$1['form-label-dialog']
|
@@ -8489,7 +8620,16 @@ var UpdateMessageDialog = function UpdateMessageDialog(_ref) {
|
|
8489
8620
|
name: "content",
|
8490
8621
|
validate: validate,
|
8491
8622
|
placeholder: t('the_problem_is_difficult'),
|
8492
|
-
className: styles$1['form-control']
|
8623
|
+
className: styles$1['form-control'],
|
8624
|
+
render: function render(_ref3) {
|
8625
|
+
var field = _ref3.field;
|
8626
|
+
return React__default.createElement(TinyChatEditor, {
|
8627
|
+
initValue: field.value,
|
8628
|
+
onChange: function onChange(text) {
|
8629
|
+
return setFieldValue("content", text);
|
8630
|
+
}
|
8631
|
+
});
|
8632
|
+
}
|
8493
8633
|
}), React__default.createElement(DialogActions, {
|
8494
8634
|
sx: {
|
8495
8635
|
display: 'flex',
|
@@ -8712,7 +8852,6 @@ var iconSendMessage = function iconSendMessage(_ref) {
|
|
8712
8852
|
|
8713
8853
|
var InputChat = function InputChat(_ref) {
|
8714
8854
|
var text = _ref.text,
|
8715
|
-
inputRef = _ref.inputRef,
|
8716
8855
|
onChangeInput = _ref.onChangeInput,
|
8717
8856
|
onSubmit = _ref.onSubmit,
|
8718
8857
|
isCompleted = _ref.isCompleted,
|
@@ -8725,15 +8864,6 @@ var InputChat = function InputChat(_ref) {
|
|
8725
8864
|
var handleSubmit = function handleSubmit() {
|
8726
8865
|
onSubmit();
|
8727
8866
|
};
|
8728
|
-
var handleInputChange = function handleInputChange(event) {
|
8729
|
-
onChangeInput(event.target.value);
|
8730
|
-
};
|
8731
|
-
var handleKeyPressEnter = function handleKeyPressEnter(e) {
|
8732
|
-
if (e.key === "Enter") {
|
8733
|
-
handleSubmit();
|
8734
|
-
return;
|
8735
|
-
}
|
8736
|
-
};
|
8737
8867
|
var handleSelectedFile = function handleSelectedFile(e) {
|
8738
8868
|
var files = e.target.files;
|
8739
8869
|
handleUploadImage(files[0]);
|
@@ -8756,8 +8886,8 @@ var InputChat = function InputChat(_ref) {
|
|
8756
8886
|
width: "100%"
|
8757
8887
|
}, React__default.createElement(Box, {
|
8758
8888
|
display: "flex",
|
8759
|
-
border: "1px solid #97A1AF",
|
8760
|
-
borderRadius: "6px",
|
8889
|
+
border: selectedFile ? "1px solid #97A1AF" : undefined,
|
8890
|
+
borderRadius: selectedFile ? "6px" : undefined,
|
8761
8891
|
flexDirection: "column"
|
8762
8892
|
}, selectedFile && React__default.createElement("div", {
|
8763
8893
|
style: {
|
@@ -8783,17 +8913,9 @@ var InputChat = function InputChat(_ref) {
|
|
8783
8913
|
}, React__default.createElement(IoCloseOutline, {
|
8784
8914
|
color: "#fff",
|
8785
8915
|
size: 30
|
8786
|
-
}))), React__default.createElement(
|
8787
|
-
|
8788
|
-
|
8789
|
-
border: "none"
|
8790
|
-
},
|
8791
|
-
placeholder: t("send_message"),
|
8792
|
-
ref: inputRef,
|
8793
|
-
value: text,
|
8794
|
-
width: "100%",
|
8795
|
-
onKeyPress: handleKeyPressEnter,
|
8796
|
-
onChange: handleInputChange,
|
8916
|
+
}))), React__default.createElement(TinyChatEditor, {
|
8917
|
+
initValue: text,
|
8918
|
+
onChange: onChangeInput,
|
8797
8919
|
disabled: isCompleted
|
8798
8920
|
})), React__default.createElement(Typography, {
|
8799
8921
|
fontWeight: 500,
|
@@ -8803,8 +8925,8 @@ var InputChat = function InputChat(_ref) {
|
|
8803
8925
|
}, t('this_is_the_guidance_text'))), React__default.createElement(Box, {
|
8804
8926
|
display: "flex",
|
8805
8927
|
flexDirection: "column",
|
8806
|
-
justifyContent: "flex-
|
8807
|
-
alignItems: "flex-
|
8928
|
+
justifyContent: "flex-start",
|
8929
|
+
alignItems: "flex-end",
|
8808
8930
|
gap: "16px"
|
8809
8931
|
}, React__default.createElement(Button, {
|
8810
8932
|
variant: "contained",
|
@@ -9123,7 +9245,6 @@ var ChatContainer = function ChatContainer(_ref) {
|
|
9123
9245
|
onReachTop = _ref.onReachTop,
|
9124
9246
|
onReachBottom = _ref.onReachBottom,
|
9125
9247
|
onEndScrollToEnd = _ref.onEndScrollToEnd;
|
9126
|
-
var inputRef = useRef(null);
|
9127
9248
|
var listRef = useRef(null);
|
9128
9249
|
var listItemRef = useRef(null);
|
9129
9250
|
var scrollRef = useRef();
|
@@ -9206,9 +9327,7 @@ var ChatContainer = function ChatContainer(_ref) {
|
|
9206
9327
|
className: "d-flex justify-content-center align-items-center"
|
9207
9328
|
}, React__default.createElement(CircularProgress, null)), React__default.createElement(ChatList, Object.assign({}, chatListProps, {
|
9208
9329
|
listItemRef: listItemRef
|
9209
|
-
}))), React__default.createElement(InputChat, Object.assign({}, inputProps
|
9210
|
-
inputRef: inputRef
|
9211
|
-
})));
|
9330
|
+
}))), React__default.createElement(InputChat, Object.assign({}, inputProps)));
|
9212
9331
|
};
|
9213
9332
|
|
9214
9333
|
var MessageSortBy;
|
@@ -14385,37 +14504,12 @@ var ClassNoteDialog = function ClassNoteDialog(_ref) {
|
|
14385
14504
|
var handleSaveNote = function handleSaveNote(content) {
|
14386
14505
|
onSaveNote(content);
|
14387
14506
|
};
|
14388
|
-
var _useState = useState(false),
|
14389
|
-
keyboardOpen = _useState[0],
|
14390
|
-
setKeyboardOpen = _useState[1];
|
14391
|
-
useEffect(function () {
|
14392
|
-
var handleResize = function handleResize() {
|
14393
|
-
if (window.innerHeight < window.outerHeight) {
|
14394
|
-
setKeyboardOpen(true);
|
14395
|
-
} else {
|
14396
|
-
setKeyboardOpen(false);
|
14397
|
-
}
|
14398
|
-
};
|
14399
|
-
window.addEventListener("resize", handleResize);
|
14400
|
-
handleResize();
|
14401
|
-
return function () {
|
14402
|
-
return window.removeEventListener("resize", handleResize);
|
14403
|
-
};
|
14404
|
-
}, []);
|
14405
14507
|
return React__default.createElement(Dialog, {
|
14406
14508
|
onClose: onClose,
|
14407
14509
|
open: open,
|
14510
|
+
maxWidth: "md",
|
14408
14511
|
scroll: "body",
|
14409
|
-
|
14410
|
-
sx: {
|
14411
|
-
maxHeight: "unset",
|
14412
|
-
minWidth: "363px",
|
14413
|
-
overflowY: "auto",
|
14414
|
-
position: "relative",
|
14415
|
-
bottom: keyboardOpen ? "0" : undefined,
|
14416
|
-
transition: "top 0.3s ease"
|
14417
|
-
}
|
14418
|
-
}
|
14512
|
+
fullWidth: true
|
14419
14513
|
}, React__default.createElement(DialogTitle$1, {
|
14420
14514
|
id: "customized-dialog-title"
|
14421
14515
|
}, React__default.createElement(Typography$1, {
|
@@ -14478,7 +14572,8 @@ var ClassNoteDialog = function ClassNoteDialog(_ref) {
|
|
14478
14572
|
id: "content-question",
|
14479
14573
|
style: {
|
14480
14574
|
paddingRight: "40px",
|
14481
|
-
minHeight: "
|
14575
|
+
minHeight: "96px",
|
14576
|
+
width: "100%"
|
14482
14577
|
},
|
14483
14578
|
name: "content",
|
14484
14579
|
placeholder: t("the_problem_is_difficult"),
|
@@ -23489,6 +23584,7 @@ var Textbook = function Textbook(_ref) {
|
|
23489
23584
|
getTextbookList = _ref.getTextbookList,
|
23490
23585
|
onViewQA = _ref.onViewQA;
|
23491
23586
|
var isTabletUp = useMediaQuery(theme.breakpoints.up("lg"));
|
23587
|
+
var isStudentSite = role === Role.Student;
|
23492
23588
|
var _useDrawer = useDrawer(),
|
23493
23589
|
isOpenDialog = _useDrawer.isOpenDialog,
|
23494
23590
|
handleCloseDialog = _useDrawer.handleCloseDialog,
|
@@ -23503,6 +23599,9 @@ var Textbook = function Textbook(_ref) {
|
|
23503
23599
|
handleOpenConfirmDialog = _useTextbook.handleOpenConfirmDialog,
|
23504
23600
|
handleCloseConfirmDialog = _useTextbook.handleCloseConfirmDialog,
|
23505
23601
|
handleDeleteTextbook = _useTextbook.handleDeleteTextbook;
|
23602
|
+
var isEditable = isSuperAdmin || textbook.isShared && ((textbook === null || textbook === void 0 ? void 0 : (_textbook$createdBy = textbook.createdBy) === null || _textbook$createdBy === void 0 ? void 0 : _textbook$createdBy.id) === (user === null || user === void 0 ? void 0 : user.id) || textbook.textbookOwners.some(function (i) {
|
23603
|
+
return i.id === (user === null || user === void 0 ? void 0 : user.id);
|
23604
|
+
}));
|
23506
23605
|
return React__default.createElement(Stack, {
|
23507
23606
|
sx: {
|
23508
23607
|
border: 1,
|
@@ -23515,16 +23614,19 @@ var Textbook = function Textbook(_ref) {
|
|
23515
23614
|
sx: {
|
23516
23615
|
gap: "24px",
|
23517
23616
|
flexDirection: "row",
|
23518
|
-
alignItems: "center"
|
23519
|
-
cursor: "pointer"
|
23617
|
+
alignItems: "center"
|
23520
23618
|
}
|
23521
23619
|
}, React__default.createElement("img", {
|
23522
23620
|
style: {
|
23523
23621
|
objectFit: "contain",
|
23524
|
-
height: "100%"
|
23622
|
+
height: "100%",
|
23623
|
+
cursor: !isStudentSite ? "pointer" : undefined
|
23525
23624
|
},
|
23526
23625
|
width: 68,
|
23527
|
-
src: textbook.coverImage
|
23626
|
+
src: textbook.coverImage,
|
23627
|
+
onClick: function onClick() {
|
23628
|
+
return !isStudentSite && handleOpenDetailDialog();
|
23629
|
+
}
|
23528
23630
|
}), React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
23529
23631
|
flexDirection: "row"
|
23530
23632
|
}, React__default.createElement(Typography, {
|
@@ -23534,7 +23636,16 @@ var Textbook = function Textbook(_ref) {
|
|
23534
23636
|
}, t("test_name")), React__default.createElement(Typography, {
|
23535
23637
|
fontSize: "14px",
|
23536
23638
|
color: styles.gray_900,
|
23537
|
-
fontWeight: 700
|
23639
|
+
fontWeight: 700,
|
23640
|
+
sx: _extends({}, !isStudentSite && {
|
23641
|
+
"&:hover": {
|
23642
|
+
color: styles.less_dark
|
23643
|
+
},
|
23644
|
+
cursor: "pointer"
|
23645
|
+
}),
|
23646
|
+
onClick: function onClick() {
|
23647
|
+
return !isStudentSite && handleOpenDetailDialog();
|
23648
|
+
}
|
23538
23649
|
}, textbook.name)), React__default.createElement(Stack, {
|
23539
23650
|
flexDirection: "row"
|
23540
23651
|
}, React__default.createElement(Typography, {
|
@@ -23576,9 +23687,7 @@ var Textbook = function Textbook(_ref) {
|
|
23576
23687
|
onClick: handleOpenDialog
|
23577
23688
|
}, React__default.createElement(FaBookOpen, {
|
23578
23689
|
size: "20px"
|
23579
|
-
}), t("test_start")),
|
23580
|
-
return i.id === (user === null || user === void 0 ? void 0 : user.id);
|
23581
|
-
}))) && React__default.createElement(Button, {
|
23690
|
+
}), t("test_start")), isEditable && React__default.createElement(Button, {
|
23582
23691
|
variant: "outlined",
|
23583
23692
|
sx: {
|
23584
23693
|
width: "fit-content",
|
@@ -28487,10 +28596,10 @@ var RecentUserActionDialog = function RecentUserActionDialog(_ref) {
|
|
28487
28596
|
}
|
28488
28597
|
}, t(i.title)));
|
28489
28598
|
}))), React__default.createElement(TableBody, null, recentUserActions === null || recentUserActions === void 0 ? void 0 : recentUserActions.map(function (i, index) {
|
28490
|
-
var _i$targetUser, _i$targetUser2;
|
28599
|
+
var _i$targetUser, _i$targetUser2, _RecentUserActionName, _RecentUserActionName2;
|
28491
28600
|
return React__default.createElement(TableRow, {
|
28492
28601
|
key: i.id
|
28493
|
-
}, React__default.createElement(TableCell, null, index + 1), React__default.createElement(TableCell, null, ((_i$targetUser = i.targetUser) === null || _i$targetUser === void 0 ? void 0 : _i$targetUser.fullName) || ''), React__default.createElement(TableCell, null, formatRole((_i$targetUser2 = i.targetUser) === null || _i$targetUser2 === void 0 ? void 0 : _i$targetUser2.roles, t)), React__default.createElement(TableCell, null, t(RecentUserActionNames[i.action] || '')), React__default.createElement(TableCell, null, utcToLocalTime(i.createdAt, t("date_time_format"))));
|
28602
|
+
}, React__default.createElement(TableCell, null, index + 1), React__default.createElement(TableCell, null, ((_i$targetUser = i.targetUser) === null || _i$targetUser === void 0 ? void 0 : _i$targetUser.fullName) || ''), React__default.createElement(TableCell, null, formatRole((_i$targetUser2 = i.targetUser) === null || _i$targetUser2 === void 0 ? void 0 : _i$targetUser2.roles, t)), React__default.createElement(TableCell, null, t(((_RecentUserActionName = RecentUserActionNames[i.action]) === null || _RecentUserActionName === void 0 ? void 0 : (_RecentUserActionName2 = _RecentUserActionName.toLowerCase) === null || _RecentUserActionName2 === void 0 ? void 0 : _RecentUserActionName2.call(_RecentUserActionName)) || '')), React__default.createElement(TableCell, null, utcToLocalTime(i.createdAt, t("date_time_format"))));
|
28494
28603
|
}), !(recentUserActions !== null && recentUserActions !== void 0 && recentUserActions.length) && React__default.createElement(TableRow, null, React__default.createElement(TableCell, {
|
28495
28604
|
sx: {
|
28496
28605
|
textAlign: 'center'
|
@@ -32469,16 +32578,18 @@ var TypeNotificationEnum;
|
|
32469
32578
|
TypeNotificationEnum[TypeNotificationEnum["Class"] = 2] = "Class";
|
32470
32579
|
TypeNotificationEnum[TypeNotificationEnum["Student"] = 3] = "Student";
|
32471
32580
|
})(TypeNotificationEnum || (TypeNotificationEnum = {}));
|
32472
|
-
var optionTypeNotification =
|
32473
|
-
|
32474
|
-
|
32475
|
-
|
32476
|
-
|
32477
|
-
|
32478
|
-
|
32479
|
-
|
32480
|
-
|
32481
|
-
|
32581
|
+
var optionTypeNotification = function optionTypeNotification(t) {
|
32582
|
+
return [{
|
32583
|
+
value: TypeNotificationEnum.Academy,
|
32584
|
+
label: t("academy")
|
32585
|
+
}, {
|
32586
|
+
value: TypeNotificationEnum.Class,
|
32587
|
+
label: t("class")
|
32588
|
+
}, {
|
32589
|
+
value: TypeNotificationEnum.Student,
|
32590
|
+
label: t("student")
|
32591
|
+
}];
|
32592
|
+
};
|
32482
32593
|
var NotificationSortBy;
|
32483
32594
|
(function (NotificationSortBy) {
|
32484
32595
|
NotificationSortBy["CreatedAt"] = "CreatedAt";
|
@@ -32494,7 +32605,7 @@ var OrderBy$3;
|
|
32494
32605
|
var NOTIFICATION_HEADERS = [{
|
32495
32606
|
title: "#"
|
32496
32607
|
}, {
|
32497
|
-
title: "
|
32608
|
+
title: "notification_title",
|
32498
32609
|
sortKey: NotificationSortBy.Name
|
32499
32610
|
}, {
|
32500
32611
|
title: "type",
|
@@ -32708,6 +32819,10 @@ var NotificationForm = function NotificationForm(_ref) {
|
|
32708
32819
|
formikProp.setValues(_extends({}, DEFAULT_NOTIFICATION_REQUEST));
|
32709
32820
|
}
|
32710
32821
|
}, [JSON.stringify(data)]);
|
32822
|
+
var optionTypes = optionTypeNotification(t);
|
32823
|
+
var notificationTypes = isAdmin ? optionTypes : optionTypes.filter(function (i) {
|
32824
|
+
return i.value !== TypeNotificationEnum.Academy;
|
32825
|
+
});
|
32711
32826
|
return React__default.createElement("div", {
|
32712
32827
|
className: "d-flex flex-column"
|
32713
32828
|
}, React__default.createElement(Grid, {
|
@@ -32722,14 +32837,14 @@ var NotificationForm = function NotificationForm(_ref) {
|
|
32722
32837
|
}, React__default.createElement(FormGroup, null, React__default.createElement(FormLabel, {
|
32723
32838
|
className: "mb-2 fw-bold",
|
32724
32839
|
htmlFor: "class_name"
|
32725
|
-
}, t("
|
32840
|
+
}, t("notification_title"), " ", React__default.createElement("span", {
|
32726
32841
|
className: "text-danger"
|
32727
32842
|
}, "*")), React__default.createElement(InputText, {
|
32728
32843
|
id: "name",
|
32729
32844
|
disabled: !isAdmin && (!!id && !(data !== null && data !== void 0 && data.isOwned) || isTeacherAdmin),
|
32730
32845
|
value: formikProp.values.name,
|
32731
32846
|
onChange: handleChangeClassTitle,
|
32732
|
-
placeholder: t("
|
32847
|
+
placeholder: t("notification_title")
|
32733
32848
|
}), formikProp.touched.name && formikProp.errors.name ? React__default.createElement("div", {
|
32734
32849
|
className: "mt-1"
|
32735
32850
|
}, React__default.createElement(ErrorHandler, {
|
@@ -32764,9 +32879,7 @@ var NotificationForm = function NotificationForm(_ref) {
|
|
32764
32879
|
className: "" + styles$9["teacher-selector-wrapper"]
|
32765
32880
|
}, React__default.createElement(TypeSelector, {
|
32766
32881
|
disabled: !isAdmin && (!!id && !(data !== null && data !== void 0 && data.isOwned) || isTeacherAdmin),
|
32767
|
-
optionTypeNotification:
|
32768
|
-
return i.value !== TypeNotificationEnum.Academy;
|
32769
|
-
}),
|
32882
|
+
optionTypeNotification: notificationTypes,
|
32770
32883
|
value: formikProp.values.type,
|
32771
32884
|
onChange: handleChangeType
|
32772
32885
|
}), formikProp.touched.type && formikProp.errors.type ? React__default.createElement("div", {
|
@@ -33061,6 +33174,10 @@ var NotificationList = function NotificationList(_ref) {
|
|
33061
33174
|
handleDeleteNotification = _useNotificationList.handleDeleteNotification,
|
33062
33175
|
onChangeFilterType = _useNotificationList.onChangeFilterType;
|
33063
33176
|
var Wrapper = as || Container$1;
|
33177
|
+
var optionTypes = optionTypeNotification(t);
|
33178
|
+
var notificationTypes = isAdmin ? optionTypes : optionTypes.filter(function (i) {
|
33179
|
+
return i.value !== TypeNotificationEnum.Academy;
|
33180
|
+
});
|
33064
33181
|
return React__default.createElement(Wrapper, {
|
33065
33182
|
maxWidth: "xl",
|
33066
33183
|
className: "bg-white pt-5 p-4 rounded-4 " + className
|
@@ -33101,9 +33218,7 @@ var NotificationList = function NotificationList(_ref) {
|
|
33101
33218
|
item: true,
|
33102
33219
|
xs: 6
|
33103
33220
|
}, React__default.createElement(SelectFilterType, {
|
33104
|
-
optionTypeNotification:
|
33105
|
-
return i.value !== TypeNotificationEnum.Academy;
|
33106
|
-
}),
|
33221
|
+
optionTypeNotification: notificationTypes,
|
33107
33222
|
value: notificationFilter.type,
|
33108
33223
|
onChange: onChangeFilterType
|
33109
33224
|
})))), React__default.createElement(Grid, {
|