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.js
CHANGED
@@ -27,10 +27,10 @@ require('moment/locale/ko.js');
|
|
27
27
|
require('moment/locale/en-au.js');
|
28
28
|
var reactVirtualized = require('react-virtualized');
|
29
29
|
var formik = require('formik');
|
30
|
-
var styles$c = require('@mui/material/styles');
|
31
30
|
var tinymce = _interopDefault(require('tinymce'));
|
32
31
|
require('@wiris/mathtype-tinymce6');
|
33
32
|
var tinymceReact = require('@tinymce/tinymce-react');
|
33
|
+
var styles$c = require('@mui/material/styles');
|
34
34
|
var Grid = _interopDefault(require('@mui/material/Grid'));
|
35
35
|
var Typography = _interopDefault(require('@mui/material/Typography'));
|
36
36
|
var Card = _interopDefault(require('@mui/material/Card'));
|
@@ -427,7 +427,7 @@ var question_count = "문제 갯수";
|
|
427
427
|
var multi_choice = "여러 개임";
|
428
428
|
var category = "문항 카테고리";
|
429
429
|
var korean_category = "지문 영역";
|
430
|
-
var
|
430
|
+
var korean_subcategory = "지문 세부 영역";
|
431
431
|
var _category = "카테고리";
|
432
432
|
var score = "점수";
|
433
433
|
var enter_score = "점수 입력";
|
@@ -1484,6 +1484,24 @@ var textbook_name = "교재 이름";
|
|
1484
1484
|
var korean_language = "국어";
|
1485
1485
|
var answer_cannot_be_empty = "답변은 비워둘 수 없습니다";
|
1486
1486
|
var are_you_sure_to_create_student_parent_note = "학생/학부모에게 노트를 생성하시겠습니까?";
|
1487
|
+
var notification_title = "알림 제목";
|
1488
|
+
var vieweduser = "사용자 조회";
|
1489
|
+
var updateduser = "사용자 업데이트";
|
1490
|
+
var creatednewuser = "새 사용자 생성";
|
1491
|
+
var importeduser = "사용자 가져오기";
|
1492
|
+
var viewedqna = "Q&A 조회";
|
1493
|
+
var completedqna = "Q&A 완료";
|
1494
|
+
var answeredqna = "Q&A 답변";
|
1495
|
+
var removemessageqna = "Q&A 메시지 삭제";
|
1496
|
+
var updatemessageqna = "Q&A 메시지 업데이트";
|
1497
|
+
var viewedexamresult = "시험 결과 조회";
|
1498
|
+
var printedexamresult = "시험 결과 출력";
|
1499
|
+
var viewedattendance = "출석 조회";
|
1500
|
+
var updatedattendance = "출석 업데이트";
|
1501
|
+
var addedteachertoclass = "교사 수업 추가";
|
1502
|
+
var removedteacherfromclass = "교사 수업 제거";
|
1503
|
+
var addedstudenttoclass = "학생 수업 추가";
|
1504
|
+
var removedstudentfromclass = "학생 수업 제거";
|
1487
1505
|
var lang_ko = {
|
1488
1506
|
problem_solving: problem_solving,
|
1489
1507
|
my_story: my_story,
|
@@ -1570,7 +1588,7 @@ var lang_ko = {
|
|
1570
1588
|
multi_choice: multi_choice,
|
1571
1589
|
category: category,
|
1572
1590
|
korean_category: korean_category,
|
1573
|
-
|
1591
|
+
korean_subcategory: korean_subcategory,
|
1574
1592
|
_category: _category,
|
1575
1593
|
score: score,
|
1576
1594
|
enter_score: enter_score,
|
@@ -2605,7 +2623,25 @@ var lang_ko = {
|
|
2605
2623
|
textbook_name: textbook_name,
|
2606
2624
|
korean_language: korean_language,
|
2607
2625
|
answer_cannot_be_empty: answer_cannot_be_empty,
|
2608
|
-
are_you_sure_to_create_student_parent_note: are_you_sure_to_create_student_parent_note
|
2626
|
+
are_you_sure_to_create_student_parent_note: are_you_sure_to_create_student_parent_note,
|
2627
|
+
notification_title: notification_title,
|
2628
|
+
vieweduser: vieweduser,
|
2629
|
+
updateduser: updateduser,
|
2630
|
+
creatednewuser: creatednewuser,
|
2631
|
+
importeduser: importeduser,
|
2632
|
+
viewedqna: viewedqna,
|
2633
|
+
completedqna: completedqna,
|
2634
|
+
answeredqna: answeredqna,
|
2635
|
+
removemessageqna: removemessageqna,
|
2636
|
+
updatemessageqna: updatemessageqna,
|
2637
|
+
viewedexamresult: viewedexamresult,
|
2638
|
+
printedexamresult: printedexamresult,
|
2639
|
+
viewedattendance: viewedattendance,
|
2640
|
+
updatedattendance: updatedattendance,
|
2641
|
+
addedteachertoclass: addedteachertoclass,
|
2642
|
+
removedteacherfromclass: removedteacherfromclass,
|
2643
|
+
addedstudenttoclass: addedstudenttoclass,
|
2644
|
+
removedstudentfromclass: removedstudentfromclass
|
2609
2645
|
};
|
2610
2646
|
|
2611
2647
|
var problem_solving$1 = "Problem Solving";
|
@@ -2712,7 +2748,7 @@ var number_of_answers$1 = "Number of answers";
|
|
2712
2748
|
var correct_answers$1 = "Correct answers";
|
2713
2749
|
var category$1 = "Category";
|
2714
2750
|
var korean_category$1 = "Category";
|
2715
|
-
var
|
2751
|
+
var korean_subcategory$1 = "Subcategory";
|
2716
2752
|
var _category$1 = "Category";
|
2717
2753
|
var score$1 = "Score";
|
2718
2754
|
var enter_title$1 = "Enter title";
|
@@ -3750,6 +3786,24 @@ var textbook_name$1 = "Textbook name";
|
|
3750
3786
|
var korean_language$1 = "Korean";
|
3751
3787
|
var answer_cannot_be_empty$1 = "Answer cannot be empty";
|
3752
3788
|
var are_you_sure_to_create_student_parent_note$1 = "Are you sure you want to create a note for the student/parent?";
|
3789
|
+
var notification_title$1 = "Notification title";
|
3790
|
+
var vieweduser$1 = "Viewed user";
|
3791
|
+
var updateduser$1 = "Updated user";
|
3792
|
+
var creatednewuser$1 = "Created new user";
|
3793
|
+
var importeduser$1 = "Imported user";
|
3794
|
+
var viewedqna$1 = "Viewed Q&A";
|
3795
|
+
var completedqna$1 = "Completed Q&A";
|
3796
|
+
var answeredqna$1 = "Answered Q&A";
|
3797
|
+
var removemessageqna$1 = "Remove message Q&A";
|
3798
|
+
var updatemessageqna$1 = "Update message Q&A";
|
3799
|
+
var viewedexamresult$1 = "Viewed exam result";
|
3800
|
+
var printedexamresult$1 = "Printed exam result";
|
3801
|
+
var viewedattendance$1 = "Viewed attendance";
|
3802
|
+
var updatedattendance$1 = "Updated attendance";
|
3803
|
+
var addedteachertoclass$1 = "Added teacher to class";
|
3804
|
+
var removedteacherfromclass$1 = "Removed teacher from class";
|
3805
|
+
var addedstudenttoclass$1 = "Added student to class";
|
3806
|
+
var removedstudentfromclass$1 = "Removed student from class";
|
3753
3807
|
var lang_en = {
|
3754
3808
|
problem_solving: problem_solving$1,
|
3755
3809
|
my_story: my_story$1,
|
@@ -3858,7 +3912,7 @@ var lang_en = {
|
|
3858
3912
|
correct_answers: correct_answers$1,
|
3859
3913
|
category: category$1,
|
3860
3914
|
korean_category: korean_category$1,
|
3861
|
-
|
3915
|
+
korean_subcategory: korean_subcategory$1,
|
3862
3916
|
_category: _category$1,
|
3863
3917
|
score: score$1,
|
3864
3918
|
enter_title: enter_title$1,
|
@@ -4873,7 +4927,25 @@ var lang_en = {
|
|
4873
4927
|
textbook_name: textbook_name$1,
|
4874
4928
|
korean_language: korean_language$1,
|
4875
4929
|
answer_cannot_be_empty: answer_cannot_be_empty$1,
|
4876
|
-
are_you_sure_to_create_student_parent_note: are_you_sure_to_create_student_parent_note$1
|
4930
|
+
are_you_sure_to_create_student_parent_note: are_you_sure_to_create_student_parent_note$1,
|
4931
|
+
notification_title: notification_title$1,
|
4932
|
+
vieweduser: vieweduser$1,
|
4933
|
+
updateduser: updateduser$1,
|
4934
|
+
creatednewuser: creatednewuser$1,
|
4935
|
+
importeduser: importeduser$1,
|
4936
|
+
viewedqna: viewedqna$1,
|
4937
|
+
completedqna: completedqna$1,
|
4938
|
+
answeredqna: answeredqna$1,
|
4939
|
+
removemessageqna: removemessageqna$1,
|
4940
|
+
updatemessageqna: updatemessageqna$1,
|
4941
|
+
viewedexamresult: viewedexamresult$1,
|
4942
|
+
printedexamresult: printedexamresult$1,
|
4943
|
+
viewedattendance: viewedattendance$1,
|
4944
|
+
updatedattendance: updatedattendance$1,
|
4945
|
+
addedteachertoclass: addedteachertoclass$1,
|
4946
|
+
removedteacherfromclass: removedteacherfromclass$1,
|
4947
|
+
addedstudenttoclass: addedstudenttoclass$1,
|
4948
|
+
removedstudentfromclass: removedstudentfromclass$1
|
4877
4949
|
};
|
4878
4950
|
|
4879
4951
|
i18n__default.use(reactI18next.initReactI18next).init({
|
@@ -6228,10 +6300,22 @@ function _finally(body, finalizer) {
|
|
6228
6300
|
|
6229
6301
|
(function (RecentUserAction) {
|
6230
6302
|
RecentUserAction["ViewedUser"] = "ViewedUser";
|
6303
|
+
RecentUserAction["UpdatedUser"] = "UpdatedUser";
|
6304
|
+
RecentUserAction["CreatedNewUser"] = "CreatedNewUser";
|
6305
|
+
RecentUserAction["ImportedUser"] = "ImportedUser";
|
6231
6306
|
RecentUserAction["ViewedQNA"] = "ViewedQNA";
|
6307
|
+
RecentUserAction["CompletedQNA"] = "CompletedQNA";
|
6308
|
+
RecentUserAction["AnsweredQNA"] = "AnsweredQNA";
|
6309
|
+
RecentUserAction["RemoveMessageQNA"] = "RemoveMessageQNA";
|
6310
|
+
RecentUserAction["UpdateMessageQNA"] = "UpdateMessageQNA";
|
6232
6311
|
RecentUserAction["ViewedExamResult"] = "ViewedExamResult";
|
6233
6312
|
RecentUserAction["PrintedExamResult"] = "PrintedExamResult";
|
6234
6313
|
RecentUserAction["ViewedAttendance"] = "ViewedAttendance";
|
6314
|
+
RecentUserAction["UpdatedAttendance"] = "UpdatedAttendance";
|
6315
|
+
RecentUserAction["AddedTeacherToClass"] = "AddedTeacherToClass";
|
6316
|
+
RecentUserAction["RemovedTeacherFromClass"] = "RemovedTeacherFromClass";
|
6317
|
+
RecentUserAction["AddedStudentToClass"] = "AddedStudentToClass";
|
6318
|
+
RecentUserAction["RemovedStudentFromClass"] = "RemovedStudentFromClass";
|
6235
6319
|
})(exports.RecentUserAction || (exports.RecentUserAction = {}));
|
6236
6320
|
|
6237
6321
|
(function (UserSortColumn) {
|
@@ -7538,6 +7622,8 @@ var getClassesApi = function getClassesApi(textSearch) {
|
|
7538
7622
|
return api.get("" + COURSE_URL, {
|
7539
7623
|
params: {
|
7540
7624
|
textSearch: textSearch,
|
7625
|
+
pageSize: 100,
|
7626
|
+
currentPage: 1,
|
7541
7627
|
roles: [exports.Role.Admin]
|
7542
7628
|
}
|
7543
7629
|
});
|
@@ -7589,11 +7675,7 @@ var ClassSelector = function ClassSelector(_ref) {
|
|
7589
7675
|
}, [searchString]);
|
7590
7676
|
React.useEffect(function () {
|
7591
7677
|
timeout && timeout.current && clearTimeout(timeout.current);
|
7592
|
-
|
7593
|
-
setClasses([]);
|
7594
|
-
} else {
|
7595
|
-
timeout.current = setTimeout(loadData, 300);
|
7596
|
-
}
|
7678
|
+
timeout.current = setTimeout(loadData, 300);
|
7597
7679
|
}, [searchString]);
|
7598
7680
|
var options = classes.filter(function (classOption) {
|
7599
7681
|
return !externalClassIds || externalClassIds && !externalClassIds.includes(classOption.id);
|
@@ -7614,7 +7696,7 @@ var ClassSelector = function ClassSelector(_ref) {
|
|
7614
7696
|
return setSearchString(inputValue);
|
7615
7697
|
},
|
7616
7698
|
isLoading: isLoading,
|
7617
|
-
placeholder: t('
|
7699
|
+
placeholder: t('select_placeholder'),
|
7618
7700
|
isMulti: true,
|
7619
7701
|
value: value,
|
7620
7702
|
onChange: onChange,
|
@@ -8097,6 +8179,12 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
8097
8179
|
isOpenTooltip = _useTooltip.isOpenTooltip,
|
8098
8180
|
handleCloseTooltip = _useTooltip.handleCloseTooltip,
|
8099
8181
|
handleOpenTooltip = _useTooltip.handleOpenTooltip;
|
8182
|
+
React.useEffect(function () {
|
8183
|
+
if (window.MathJax) {
|
8184
|
+
var _window$MathJax;
|
8185
|
+
(_window$MathJax = window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.typeset();
|
8186
|
+
}
|
8187
|
+
}, [content]);
|
8100
8188
|
return React__default.createElement("div", null, showTimestamp && React__default.createElement(material.Typography, {
|
8101
8189
|
fontWeight: 500,
|
8102
8190
|
fontSize: "12px",
|
@@ -8169,17 +8257,15 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
8169
8257
|
style: {
|
8170
8258
|
"float": "inline-end",
|
8171
8259
|
maxWidth: 400,
|
8172
|
-
background: styles.less_dark
|
8173
|
-
|
8174
|
-
|
8175
|
-
|
8176
|
-
|
8177
|
-
|
8178
|
-
|
8179
|
-
sx: {
|
8180
|
-
wordBreak: "break-word"
|
8260
|
+
background: styles.less_dark,
|
8261
|
+
color: "#FFF",
|
8262
|
+
fontSize: "14px",
|
8263
|
+
fontWeight: 500
|
8264
|
+
},
|
8265
|
+
dangerouslySetInnerHTML: {
|
8266
|
+
__html: content || ""
|
8181
8267
|
}
|
8182
|
-
}
|
8268
|
+
})))));
|
8183
8269
|
};
|
8184
8270
|
|
8185
8271
|
var ChatLeftItem = function ChatLeftItem(_ref) {
|
@@ -8193,6 +8279,12 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
8193
8279
|
toggleImageDialog = _ref.toggleImageDialog;
|
8194
8280
|
var _useTranslation = reactI18next.useTranslation(),
|
8195
8281
|
t = _useTranslation.t;
|
8282
|
+
React.useEffect(function () {
|
8283
|
+
if (window.MathJax) {
|
8284
|
+
var _window$MathJax;
|
8285
|
+
(_window$MathJax = window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.typeset();
|
8286
|
+
}
|
8287
|
+
}, [content]);
|
8196
8288
|
return React__default.createElement("div", null, showTimestamp && React__default.createElement(material.Typography, {
|
8197
8289
|
fontWeight: 500,
|
8198
8290
|
fontSize: "12px",
|
@@ -8246,17 +8338,15 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
8246
8338
|
}) : React__default.createElement("div", {
|
8247
8339
|
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"],
|
8248
8340
|
style: {
|
8249
|
-
maxWidth: 400
|
8250
|
-
|
8251
|
-
|
8252
|
-
|
8253
|
-
|
8254
|
-
|
8255
|
-
|
8256
|
-
sx: {
|
8257
|
-
wordBreak: "break-word"
|
8341
|
+
maxWidth: 400,
|
8342
|
+
color: styles.gray_700,
|
8343
|
+
fontSize: "14px",
|
8344
|
+
fontWeight: 500
|
8345
|
+
},
|
8346
|
+
dangerouslySetInnerHTML: {
|
8347
|
+
__html: content || ""
|
8258
8348
|
}
|
8259
|
-
}
|
8349
|
+
}))));
|
8260
8350
|
};
|
8261
8351
|
|
8262
8352
|
var ImageDetailDialog = function ImageDetailDialog(_ref) {
|
@@ -8427,6 +8517,47 @@ var iconPlusCircle = function iconPlusCircle(_ref) {
|
|
8427
8517
|
}));
|
8428
8518
|
};
|
8429
8519
|
|
8520
|
+
var TinyChatEditor = function TinyChatEditor(_ref) {
|
8521
|
+
var _ref$disabled = _ref.disabled,
|
8522
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
8523
|
+
onChange = _ref.onChange,
|
8524
|
+
initValue = _ref.initValue,
|
8525
|
+
config = _ref.config;
|
8526
|
+
var isFirstChange = React.useRef(true);
|
8527
|
+
var _useTranslation = reactI18next.useTranslation(),
|
8528
|
+
t = _useTranslation.t;
|
8529
|
+
React.useEffect(function () {
|
8530
|
+
if (window.tinymce) {
|
8531
|
+
window.tinymce = tinymce;
|
8532
|
+
}
|
8533
|
+
}, []);
|
8534
|
+
var options = {
|
8535
|
+
height: 126,
|
8536
|
+
menubar: false,
|
8537
|
+
readonly: false,
|
8538
|
+
external_plugins: {
|
8539
|
+
tiny_mce_wiris: '/editor/wiris-for-tinymce.js'
|
8540
|
+
},
|
8541
|
+
toolbar: 'tiny_mce_wiris_formulaEditor',
|
8542
|
+
branding: false,
|
8543
|
+
extended_valid_elements: '*[.*]',
|
8544
|
+
placeholder: t("send_message")
|
8545
|
+
};
|
8546
|
+
var handleChange = function handleChange(value, _) {
|
8547
|
+
if (isFirstChange.current) {
|
8548
|
+
isFirstChange.current = false;
|
8549
|
+
return;
|
8550
|
+
}
|
8551
|
+
onChange(value);
|
8552
|
+
};
|
8553
|
+
return React__default.createElement(tinymceReact.Editor, {
|
8554
|
+
disabled: disabled,
|
8555
|
+
init: config || options,
|
8556
|
+
value: initValue,
|
8557
|
+
onEditorChange: handleChange
|
8558
|
+
});
|
8559
|
+
};
|
8560
|
+
|
8430
8561
|
var UpdateMessageDialog = function UpdateMessageDialog(_ref) {
|
8431
8562
|
var open = _ref.open,
|
8432
8563
|
onClose = _ref.onClose,
|
@@ -8459,7 +8590,7 @@ var UpdateMessageDialog = function UpdateMessageDialog(_ref) {
|
|
8459
8590
|
handleUpdateMessage(content || "");
|
8460
8591
|
}
|
8461
8592
|
}, function (_ref2) {
|
8462
|
-
|
8593
|
+
var setFieldValue = _ref2.setFieldValue;
|
8463
8594
|
return React__default.createElement(formik.Form, null, React__default.createElement("label", {
|
8464
8595
|
htmlFor: "content",
|
8465
8596
|
className: styles$1['form-label'] + " " + styles$1['form-label-dialog']
|
@@ -8471,7 +8602,16 @@ var UpdateMessageDialog = function UpdateMessageDialog(_ref) {
|
|
8471
8602
|
name: "content",
|
8472
8603
|
validate: validate,
|
8473
8604
|
placeholder: t('the_problem_is_difficult'),
|
8474
|
-
className: styles$1['form-control']
|
8605
|
+
className: styles$1['form-control'],
|
8606
|
+
render: function render(_ref3) {
|
8607
|
+
var field = _ref3.field;
|
8608
|
+
return React__default.createElement(TinyChatEditor, {
|
8609
|
+
initValue: field.value,
|
8610
|
+
onChange: function onChange(text) {
|
8611
|
+
return setFieldValue("content", text);
|
8612
|
+
}
|
8613
|
+
});
|
8614
|
+
}
|
8475
8615
|
}), React__default.createElement(material.DialogActions, {
|
8476
8616
|
sx: {
|
8477
8617
|
display: 'flex',
|
@@ -8694,7 +8834,6 @@ var iconSendMessage = function iconSendMessage(_ref) {
|
|
8694
8834
|
|
8695
8835
|
var InputChat = function InputChat(_ref) {
|
8696
8836
|
var text = _ref.text,
|
8697
|
-
inputRef = _ref.inputRef,
|
8698
8837
|
onChangeInput = _ref.onChangeInput,
|
8699
8838
|
onSubmit = _ref.onSubmit,
|
8700
8839
|
isCompleted = _ref.isCompleted,
|
@@ -8707,15 +8846,6 @@ var InputChat = function InputChat(_ref) {
|
|
8707
8846
|
var handleSubmit = function handleSubmit() {
|
8708
8847
|
onSubmit();
|
8709
8848
|
};
|
8710
|
-
var handleInputChange = function handleInputChange(event) {
|
8711
|
-
onChangeInput(event.target.value);
|
8712
|
-
};
|
8713
|
-
var handleKeyPressEnter = function handleKeyPressEnter(e) {
|
8714
|
-
if (e.key === "Enter") {
|
8715
|
-
handleSubmit();
|
8716
|
-
return;
|
8717
|
-
}
|
8718
|
-
};
|
8719
8849
|
var handleSelectedFile = function handleSelectedFile(e) {
|
8720
8850
|
var files = e.target.files;
|
8721
8851
|
handleUploadImage(files[0]);
|
@@ -8738,8 +8868,8 @@ var InputChat = function InputChat(_ref) {
|
|
8738
8868
|
width: "100%"
|
8739
8869
|
}, React__default.createElement(material.Box, {
|
8740
8870
|
display: "flex",
|
8741
|
-
border: "1px solid #97A1AF",
|
8742
|
-
borderRadius: "6px",
|
8871
|
+
border: selectedFile ? "1px solid #97A1AF" : undefined,
|
8872
|
+
borderRadius: selectedFile ? "6px" : undefined,
|
8743
8873
|
flexDirection: "column"
|
8744
8874
|
}, selectedFile && React__default.createElement("div", {
|
8745
8875
|
style: {
|
@@ -8765,17 +8895,9 @@ var InputChat = function InputChat(_ref) {
|
|
8765
8895
|
}, React__default.createElement(io5.IoCloseOutline, {
|
8766
8896
|
color: "#fff",
|
8767
8897
|
size: 30
|
8768
|
-
}))), React__default.createElement(
|
8769
|
-
|
8770
|
-
|
8771
|
-
border: "none"
|
8772
|
-
},
|
8773
|
-
placeholder: t("send_message"),
|
8774
|
-
ref: inputRef,
|
8775
|
-
value: text,
|
8776
|
-
width: "100%",
|
8777
|
-
onKeyPress: handleKeyPressEnter,
|
8778
|
-
onChange: handleInputChange,
|
8898
|
+
}))), React__default.createElement(TinyChatEditor, {
|
8899
|
+
initValue: text,
|
8900
|
+
onChange: onChangeInput,
|
8779
8901
|
disabled: isCompleted
|
8780
8902
|
})), React__default.createElement(material.Typography, {
|
8781
8903
|
fontWeight: 500,
|
@@ -8785,8 +8907,8 @@ var InputChat = function InputChat(_ref) {
|
|
8785
8907
|
}, t('this_is_the_guidance_text'))), React__default.createElement(material.Box, {
|
8786
8908
|
display: "flex",
|
8787
8909
|
flexDirection: "column",
|
8788
|
-
justifyContent: "flex-
|
8789
|
-
alignItems: "flex-
|
8910
|
+
justifyContent: "flex-start",
|
8911
|
+
alignItems: "flex-end",
|
8790
8912
|
gap: "16px"
|
8791
8913
|
}, React__default.createElement(material.Button, {
|
8792
8914
|
variant: "contained",
|
@@ -9105,7 +9227,6 @@ var ChatContainer = function ChatContainer(_ref) {
|
|
9105
9227
|
onReachTop = _ref.onReachTop,
|
9106
9228
|
onReachBottom = _ref.onReachBottom,
|
9107
9229
|
onEndScrollToEnd = _ref.onEndScrollToEnd;
|
9108
|
-
var inputRef = React.useRef(null);
|
9109
9230
|
var listRef = React.useRef(null);
|
9110
9231
|
var listItemRef = React.useRef(null);
|
9111
9232
|
var scrollRef = React.useRef();
|
@@ -9188,9 +9309,7 @@ var ChatContainer = function ChatContainer(_ref) {
|
|
9188
9309
|
className: "d-flex justify-content-center align-items-center"
|
9189
9310
|
}, React__default.createElement(material.CircularProgress, null)), React__default.createElement(ChatList, Object.assign({}, chatListProps, {
|
9190
9311
|
listItemRef: listItemRef
|
9191
|
-
}))), React__default.createElement(InputChat, Object.assign({}, inputProps
|
9192
|
-
inputRef: inputRef
|
9193
|
-
})));
|
9312
|
+
}))), React__default.createElement(InputChat, Object.assign({}, inputProps)));
|
9194
9313
|
};
|
9195
9314
|
|
9196
9315
|
var MessageSortBy;
|
@@ -14367,37 +14486,12 @@ var ClassNoteDialog = function ClassNoteDialog(_ref) {
|
|
14367
14486
|
var handleSaveNote = function handleSaveNote(content) {
|
14368
14487
|
onSaveNote(content);
|
14369
14488
|
};
|
14370
|
-
var _useState = React.useState(false),
|
14371
|
-
keyboardOpen = _useState[0],
|
14372
|
-
setKeyboardOpen = _useState[1];
|
14373
|
-
React.useEffect(function () {
|
14374
|
-
var handleResize = function handleResize() {
|
14375
|
-
if (window.innerHeight < window.outerHeight) {
|
14376
|
-
setKeyboardOpen(true);
|
14377
|
-
} else {
|
14378
|
-
setKeyboardOpen(false);
|
14379
|
-
}
|
14380
|
-
};
|
14381
|
-
window.addEventListener("resize", handleResize);
|
14382
|
-
handleResize();
|
14383
|
-
return function () {
|
14384
|
-
return window.removeEventListener("resize", handleResize);
|
14385
|
-
};
|
14386
|
-
}, []);
|
14387
14489
|
return React__default.createElement(material.Dialog, {
|
14388
14490
|
onClose: onClose,
|
14389
14491
|
open: open,
|
14492
|
+
maxWidth: "md",
|
14390
14493
|
scroll: "body",
|
14391
|
-
|
14392
|
-
sx: {
|
14393
|
-
maxHeight: "unset",
|
14394
|
-
minWidth: "363px",
|
14395
|
-
overflowY: "auto",
|
14396
|
-
position: "relative",
|
14397
|
-
bottom: keyboardOpen ? "0" : undefined,
|
14398
|
-
transition: "top 0.3s ease"
|
14399
|
-
}
|
14400
|
-
}
|
14494
|
+
fullWidth: true
|
14401
14495
|
}, React__default.createElement(DialogTitle, {
|
14402
14496
|
id: "customized-dialog-title"
|
14403
14497
|
}, React__default.createElement(Typography, {
|
@@ -14460,7 +14554,8 @@ var ClassNoteDialog = function ClassNoteDialog(_ref) {
|
|
14460
14554
|
id: "content-question",
|
14461
14555
|
style: {
|
14462
14556
|
paddingRight: "40px",
|
14463
|
-
minHeight: "
|
14557
|
+
minHeight: "96px",
|
14558
|
+
width: "100%"
|
14464
14559
|
},
|
14465
14560
|
name: "content",
|
14466
14561
|
placeholder: t("the_problem_is_difficult"),
|
@@ -23471,6 +23566,7 @@ var Textbook = function Textbook(_ref) {
|
|
23471
23566
|
getTextbookList = _ref.getTextbookList,
|
23472
23567
|
onViewQA = _ref.onViewQA;
|
23473
23568
|
var isTabletUp = material.useMediaQuery(theme.breakpoints.up("lg"));
|
23569
|
+
var isStudentSite = role === exports.Role.Student;
|
23474
23570
|
var _useDrawer = useDrawer(),
|
23475
23571
|
isOpenDialog = _useDrawer.isOpenDialog,
|
23476
23572
|
handleCloseDialog = _useDrawer.handleCloseDialog,
|
@@ -23485,6 +23581,9 @@ var Textbook = function Textbook(_ref) {
|
|
23485
23581
|
handleOpenConfirmDialog = _useTextbook.handleOpenConfirmDialog,
|
23486
23582
|
handleCloseConfirmDialog = _useTextbook.handleCloseConfirmDialog,
|
23487
23583
|
handleDeleteTextbook = _useTextbook.handleDeleteTextbook;
|
23584
|
+
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) {
|
23585
|
+
return i.id === (user === null || user === void 0 ? void 0 : user.id);
|
23586
|
+
}));
|
23488
23587
|
return React__default.createElement(material.Stack, {
|
23489
23588
|
sx: {
|
23490
23589
|
border: 1,
|
@@ -23497,16 +23596,19 @@ var Textbook = function Textbook(_ref) {
|
|
23497
23596
|
sx: {
|
23498
23597
|
gap: "24px",
|
23499
23598
|
flexDirection: "row",
|
23500
|
-
alignItems: "center"
|
23501
|
-
cursor: "pointer"
|
23599
|
+
alignItems: "center"
|
23502
23600
|
}
|
23503
23601
|
}, React__default.createElement("img", {
|
23504
23602
|
style: {
|
23505
23603
|
objectFit: "contain",
|
23506
|
-
height: "100%"
|
23604
|
+
height: "100%",
|
23605
|
+
cursor: !isStudentSite ? "pointer" : undefined
|
23507
23606
|
},
|
23508
23607
|
width: 68,
|
23509
|
-
src: textbook.coverImage
|
23608
|
+
src: textbook.coverImage,
|
23609
|
+
onClick: function onClick() {
|
23610
|
+
return !isStudentSite && handleOpenDetailDialog();
|
23611
|
+
}
|
23510
23612
|
}), React__default.createElement(material.Stack, null, React__default.createElement(material.Stack, {
|
23511
23613
|
flexDirection: "row"
|
23512
23614
|
}, React__default.createElement(material.Typography, {
|
@@ -23516,7 +23618,16 @@ var Textbook = function Textbook(_ref) {
|
|
23516
23618
|
}, t("test_name")), React__default.createElement(material.Typography, {
|
23517
23619
|
fontSize: "14px",
|
23518
23620
|
color: styles.gray_900,
|
23519
|
-
fontWeight: 700
|
23621
|
+
fontWeight: 700,
|
23622
|
+
sx: _extends({}, !isStudentSite && {
|
23623
|
+
"&:hover": {
|
23624
|
+
color: styles.less_dark
|
23625
|
+
},
|
23626
|
+
cursor: "pointer"
|
23627
|
+
}),
|
23628
|
+
onClick: function onClick() {
|
23629
|
+
return !isStudentSite && handleOpenDetailDialog();
|
23630
|
+
}
|
23520
23631
|
}, textbook.name)), React__default.createElement(material.Stack, {
|
23521
23632
|
flexDirection: "row"
|
23522
23633
|
}, React__default.createElement(material.Typography, {
|
@@ -23558,9 +23669,7 @@ var Textbook = function Textbook(_ref) {
|
|
23558
23669
|
onClick: handleOpenDialog
|
23559
23670
|
}, React__default.createElement(fa.FaBookOpen, {
|
23560
23671
|
size: "20px"
|
23561
|
-
}), t("test_start")),
|
23562
|
-
return i.id === (user === null || user === void 0 ? void 0 : user.id);
|
23563
|
-
}))) && React__default.createElement(material.Button, {
|
23672
|
+
}), t("test_start")), isEditable && React__default.createElement(material.Button, {
|
23564
23673
|
variant: "outlined",
|
23565
23674
|
sx: {
|
23566
23675
|
width: "fit-content",
|
@@ -28469,10 +28578,10 @@ var RecentUserActionDialog = function RecentUserActionDialog(_ref) {
|
|
28469
28578
|
}
|
28470
28579
|
}, t(i.title)));
|
28471
28580
|
}))), React__default.createElement(material.TableBody, null, recentUserActions === null || recentUserActions === void 0 ? void 0 : recentUserActions.map(function (i, index) {
|
28472
|
-
var _i$targetUser, _i$targetUser2;
|
28581
|
+
var _i$targetUser, _i$targetUser2, _RecentUserActionName, _RecentUserActionName2;
|
28473
28582
|
return React__default.createElement(material.TableRow, {
|
28474
28583
|
key: i.id
|
28475
|
-
}, React__default.createElement(material.TableCell, null, index + 1), React__default.createElement(material.TableCell, null, ((_i$targetUser = i.targetUser) === null || _i$targetUser === void 0 ? void 0 : _i$targetUser.fullName) || ''), React__default.createElement(material.TableCell, null, formatRole((_i$targetUser2 = i.targetUser) === null || _i$targetUser2 === void 0 ? void 0 : _i$targetUser2.roles, t)), React__default.createElement(material.TableCell, null, t(RecentUserActionNames[i.action] || '')), React__default.createElement(material.TableCell, null, utcToLocalTime(i.createdAt, t("date_time_format"))));
|
28584
|
+
}, React__default.createElement(material.TableCell, null, index + 1), React__default.createElement(material.TableCell, null, ((_i$targetUser = i.targetUser) === null || _i$targetUser === void 0 ? void 0 : _i$targetUser.fullName) || ''), React__default.createElement(material.TableCell, null, formatRole((_i$targetUser2 = i.targetUser) === null || _i$targetUser2 === void 0 ? void 0 : _i$targetUser2.roles, t)), React__default.createElement(material.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(material.TableCell, null, utcToLocalTime(i.createdAt, t("date_time_format"))));
|
28476
28585
|
}), !(recentUserActions !== null && recentUserActions !== void 0 && recentUserActions.length) && React__default.createElement(material.TableRow, null, React__default.createElement(material.TableCell, {
|
28477
28586
|
sx: {
|
28478
28587
|
textAlign: 'center'
|
@@ -32451,16 +32560,18 @@ var TypeNotificationEnum;
|
|
32451
32560
|
TypeNotificationEnum[TypeNotificationEnum["Class"] = 2] = "Class";
|
32452
32561
|
TypeNotificationEnum[TypeNotificationEnum["Student"] = 3] = "Student";
|
32453
32562
|
})(TypeNotificationEnum || (TypeNotificationEnum = {}));
|
32454
|
-
var optionTypeNotification =
|
32455
|
-
|
32456
|
-
|
32457
|
-
|
32458
|
-
|
32459
|
-
|
32460
|
-
|
32461
|
-
|
32462
|
-
|
32463
|
-
|
32563
|
+
var optionTypeNotification = function optionTypeNotification(t) {
|
32564
|
+
return [{
|
32565
|
+
value: TypeNotificationEnum.Academy,
|
32566
|
+
label: t("academy")
|
32567
|
+
}, {
|
32568
|
+
value: TypeNotificationEnum.Class,
|
32569
|
+
label: t("class")
|
32570
|
+
}, {
|
32571
|
+
value: TypeNotificationEnum.Student,
|
32572
|
+
label: t("student")
|
32573
|
+
}];
|
32574
|
+
};
|
32464
32575
|
var NotificationSortBy;
|
32465
32576
|
(function (NotificationSortBy) {
|
32466
32577
|
NotificationSortBy["CreatedAt"] = "CreatedAt";
|
@@ -32476,7 +32587,7 @@ var OrderBy$2;
|
|
32476
32587
|
var NOTIFICATION_HEADERS = [{
|
32477
32588
|
title: "#"
|
32478
32589
|
}, {
|
32479
|
-
title: "
|
32590
|
+
title: "notification_title",
|
32480
32591
|
sortKey: NotificationSortBy.Name
|
32481
32592
|
}, {
|
32482
32593
|
title: "type",
|
@@ -32690,6 +32801,10 @@ var NotificationForm = function NotificationForm(_ref) {
|
|
32690
32801
|
formikProp.setValues(_extends({}, DEFAULT_NOTIFICATION_REQUEST));
|
32691
32802
|
}
|
32692
32803
|
}, [JSON.stringify(data)]);
|
32804
|
+
var optionTypes = optionTypeNotification(t);
|
32805
|
+
var notificationTypes = isAdmin ? optionTypes : optionTypes.filter(function (i) {
|
32806
|
+
return i.value !== TypeNotificationEnum.Academy;
|
32807
|
+
});
|
32693
32808
|
return React__default.createElement("div", {
|
32694
32809
|
className: "d-flex flex-column"
|
32695
32810
|
}, React__default.createElement(material.Grid, {
|
@@ -32704,14 +32819,14 @@ var NotificationForm = function NotificationForm(_ref) {
|
|
32704
32819
|
}, React__default.createElement(material.FormGroup, null, React__default.createElement(material.FormLabel, {
|
32705
32820
|
className: "mb-2 fw-bold",
|
32706
32821
|
htmlFor: "class_name"
|
32707
|
-
}, t("
|
32822
|
+
}, t("notification_title"), " ", React__default.createElement("span", {
|
32708
32823
|
className: "text-danger"
|
32709
32824
|
}, "*")), React__default.createElement(InputText, {
|
32710
32825
|
id: "name",
|
32711
32826
|
disabled: !isAdmin && (!!id && !(data !== null && data !== void 0 && data.isOwned) || isTeacherAdmin),
|
32712
32827
|
value: formikProp.values.name,
|
32713
32828
|
onChange: handleChangeClassTitle,
|
32714
|
-
placeholder: t("
|
32829
|
+
placeholder: t("notification_title")
|
32715
32830
|
}), formikProp.touched.name && formikProp.errors.name ? React__default.createElement("div", {
|
32716
32831
|
className: "mt-1"
|
32717
32832
|
}, React__default.createElement(ErrorHandler, {
|
@@ -32746,9 +32861,7 @@ var NotificationForm = function NotificationForm(_ref) {
|
|
32746
32861
|
className: "" + styles$9["teacher-selector-wrapper"]
|
32747
32862
|
}, React__default.createElement(TypeSelector, {
|
32748
32863
|
disabled: !isAdmin && (!!id && !(data !== null && data !== void 0 && data.isOwned) || isTeacherAdmin),
|
32749
|
-
optionTypeNotification:
|
32750
|
-
return i.value !== TypeNotificationEnum.Academy;
|
32751
|
-
}),
|
32864
|
+
optionTypeNotification: notificationTypes,
|
32752
32865
|
value: formikProp.values.type,
|
32753
32866
|
onChange: handleChangeType
|
32754
32867
|
}), formikProp.touched.type && formikProp.errors.type ? React__default.createElement("div", {
|
@@ -33043,6 +33156,10 @@ var NotificationList = function NotificationList(_ref) {
|
|
33043
33156
|
handleDeleteNotification = _useNotificationList.handleDeleteNotification,
|
33044
33157
|
onChangeFilterType = _useNotificationList.onChangeFilterType;
|
33045
33158
|
var Wrapper = as || Container;
|
33159
|
+
var optionTypes = optionTypeNotification(t);
|
33160
|
+
var notificationTypes = isAdmin ? optionTypes : optionTypes.filter(function (i) {
|
33161
|
+
return i.value !== TypeNotificationEnum.Academy;
|
33162
|
+
});
|
33046
33163
|
return React__default.createElement(Wrapper, {
|
33047
33164
|
maxWidth: "xl",
|
33048
33165
|
className: "bg-white pt-5 p-4 rounded-4 " + className
|
@@ -33083,9 +33200,7 @@ var NotificationList = function NotificationList(_ref) {
|
|
33083
33200
|
item: true,
|
33084
33201
|
xs: 6
|
33085
33202
|
}, React__default.createElement(SelectFilterType, {
|
33086
|
-
optionTypeNotification:
|
33087
|
-
return i.value !== TypeNotificationEnum.Academy;
|
33088
|
-
}),
|
33203
|
+
optionTypeNotification: notificationTypes,
|
33089
33204
|
value: notificationFilter.type,
|
33090
33205
|
onChange: onChangeFilterType
|
33091
33206
|
})))), React__default.createElement(material.Grid, {
|