touchstudy-core 0.1.195 → 0.1.196

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.
Files changed (115) hide show
  1. package/dist/add-ts-nocheck.js +33 -0
  2. package/dist/alert-circle-fill~CSSkoNUz.svg +3 -0
  3. package/dist/calendar_fill~zEgxFwDs.svg +4 -0
  4. package/dist/check-circle_fill~bbGHfKpz.svg +3 -0
  5. package/dist/checked-circle_fill~KLGxfRpW.svg +3 -0
  6. package/dist/clock_fill~mcRclYYO.svg +3 -0
  7. package/dist/close-circle_fill~PRVaHJUQ.svg +3 -0
  8. package/dist/components/Chats/ChatContainer.d.ts +5 -1
  9. package/dist/components/Chats/components/CanvasOverlay.d.ts +11 -0
  10. package/dist/components/Chats/components/InputChat.d.ts +8 -2
  11. package/dist/components/Chats/components/SketchDialog/BgColorTool.d.ts +8 -0
  12. package/dist/components/Chats/components/SketchDialog/BgImgAlignTool.d.ts +10 -0
  13. package/dist/components/Chats/components/SketchDialog/BgImgAlignToolList.d.ts +9 -0
  14. package/dist/components/Chats/components/SketchDialog/BgImgTool.d.ts +13 -0
  15. package/dist/components/Chats/components/SketchDialog/CanvasOverlay.d.ts +11 -0
  16. package/dist/components/Chats/components/SketchDialog/ColorPicker.d.ts +8 -0
  17. package/dist/components/Chats/components/SketchDialog/EraserTool.d.ts +9 -0
  18. package/dist/components/Chats/components/SketchDialog/PencilTool.d.ts +11 -0
  19. package/dist/components/Chats/components/SketchDialog/WidthSlider.d.ts +7 -0
  20. package/dist/components/Chats/components/SketchDialog/index.d.ts +9 -0
  21. package/dist/components/Chats/components/SketchDialog.d.ts +7 -0
  22. package/dist/components/Chats/configs/constants.d.ts +8 -1
  23. package/dist/components/Chats/configs/types.d.ts +2 -0
  24. package/dist/components/Chats/hooks/useChatContainer.d.ts +6 -2
  25. package/dist/components/Chats/styles/styles.d.ts +42 -0
  26. package/dist/components/CkEditor/CkEditor.d.ts +10 -0
  27. package/dist/components/CkEditor/config.d.ts +19 -0
  28. package/dist/components/CkEditor/index.d.ts +2 -0
  29. package/dist/components/Print/hooks/useDeviceType.d.ts +4 -0
  30. package/dist/containers/ExamResult/components/GradesByTerritory/Textbook.d.ts +12 -0
  31. package/dist/containers/ExamResult/components/GradesByTerritory/index.d.ts +12 -0
  32. package/dist/containers/ExamResult/components/ProtractedProblem/index.d.ts +10 -0
  33. package/dist/containers/ExamResult/components/TrickyProblem/Textbook.d.ts +10 -0
  34. package/dist/containers/ExamResult/components/TrickyProblem/index.d.ts +11 -0
  35. package/dist/containers/ExamResult/components/Vulnerable/Textbook.d.ts +11 -0
  36. package/dist/containers/ExamResult/components/Vulnerable/index.d.ts +12 -0
  37. package/dist/containers/Exams/components/ArticleBlock.d.ts +20 -0
  38. package/dist/containers/Exams/components/ArticleGroupView.d.ts +33 -0
  39. package/dist/containers/Exams/components/QuestionBlock.d.ts +19 -0
  40. package/dist/containers/Exams/components/QuestionCompareType.d.ts +9 -0
  41. package/dist/containers/Exams/components/QuestionGroupBlock.d.ts +28 -0
  42. package/dist/containers/Exams/components/QuestionGroupBlockBody.d.ts +23 -0
  43. package/dist/containers/Exams/components/QuestionOrderName.d.ts +9 -0
  44. package/dist/containers/Exams/components/QuestionShortInput.d.ts +13 -0
  45. package/dist/containers/Exams/components/QuestionView.d.ts +20 -0
  46. package/dist/containers/Exams/hooks/useOverallChartContainer.d.ts +9 -0
  47. package/dist/containers/Exams/styles/styles.d.ts +6 -0
  48. package/dist/containers/Notes/components/TeacherAdminNoteDialog.d.ts +4 -0
  49. package/dist/containers/PreparedTextbook/components/Article.d.ts +20 -0
  50. package/dist/containers/PreparedTextbook/components/ArticleBlock.d.ts +20 -0
  51. package/dist/containers/PreparedTextbook/components/Chapter.d.ts +19 -0
  52. package/dist/containers/PreparedTextbook/components/QuestionBlock.d.ts +19 -0
  53. package/dist/containers/PreparedTextbook/components/QuestionCompareType.d.ts +8 -0
  54. package/dist/containers/PreparedTextbook/components/QuestionGroupBlock.d.ts +28 -0
  55. package/dist/containers/PreparedTextbook/components/QuestionGroupBlockBody.d.ts +24 -0
  56. package/dist/containers/PreparedTextbook/components/QuestionOrderName.d.ts +9 -0
  57. package/dist/containers/PreparedTextbook/components/QuestionScore.d.ts +9 -0
  58. package/dist/containers/PreparedTextbook/components/QuestionShortInput.d.ts +12 -0
  59. package/dist/containers/PreparedTextbook/components/QuestionTypeFilter.d.ts +10 -0
  60. package/dist/containers/PreparedTextbook/components/SubChapter.d.ts +18 -0
  61. package/dist/containers/PreparedTextbook/components/TextbookOwners.d.ts +13 -0
  62. package/dist/containers/PreparedTextbook/hooks/useExamDetailView.d.ts +30 -0
  63. package/dist/containers/PreparedTextbook/hooks/useTextbookOptions.d.ts +15 -0
  64. package/dist/containers/PreparedTextbook/styles/styles.d.ts +6 -0
  65. package/dist/containers/PreparedTextbook/views/PreparedTextbook.d.ts +8 -0
  66. package/dist/containers/StudentInfoDrawer/components/Attendance/AttedanceFormDialog.d.ts +13 -0
  67. package/dist/containers/StudentInfoDrawer/components/AttendanceCourseTable.d.ts +15 -0
  68. package/dist/containers/StudentInfoDrawer/components/CourseAttendanceItem.d.ts +10 -0
  69. package/dist/containers/StudentInfoDrawer/components/CourseAttendanceList.d.ts +4 -0
  70. package/dist/containers/StudentInfoDrawer/components/DrawerAttendanceTab.d.ts +4 -0
  71. package/dist/containers/StudentInfoDrawer/components/DrawerExamResultTab.d.ts +9 -0
  72. package/dist/containers/StudentInfoDrawer/components/DrawerNoteTab.d.ts +8 -0
  73. package/dist/containers/StudentInfoDrawer/components/DrawerTextbookResultTab.d.ts +7 -0
  74. package/dist/containers/StudentInfoDrawer/components/Exam/ExanResultList.d.ts +4 -0
  75. package/dist/containers/StudentInfoDrawer/components/ExamResultDrawer.d.ts +13 -0
  76. package/dist/containers/StudentInfoDrawer/components/ExamResultItem.d.ts +10 -0
  77. package/dist/containers/StudentInfoDrawer/components/ExanResultList.d.ts +4 -0
  78. package/dist/containers/StudentInfoDrawer/components/LessonTooltip.d.ts +8 -0
  79. package/dist/containers/StudentInfoDrawer/components/NoteDrawer.d.ts +13 -0
  80. package/dist/containers/StudentInfoDrawer/components/TextbookResultItem.d.ts +10 -0
  81. package/dist/containers/StudentInfoDrawer/components/TextbookResultList.d.ts +4 -0
  82. package/dist/containers/Textbooks/components/ChapterBox.d.ts +4 -0
  83. package/dist/containers/Textbooks/configs/interfaces.d.ts +21 -0
  84. package/dist/containers/Textbooks/hooks/useExam.d.ts +16 -0
  85. package/dist/containers/Textbooks/hooks/useTextbookDetail.d.ts +55 -0
  86. package/dist/containers/Textbooks/views/TextbookDetail.d.ts +15 -0
  87. package/dist/iconPerson~bfprHOKm.svg +4 -0
  88. package/dist/index.js +1001 -139
  89. package/dist/index.js.map +1 -1
  90. package/dist/index.modern.js +1006 -144
  91. package/dist/index.modern.js.map +1 -1
  92. package/dist/layouts/HeaderLink.d.ts +8 -0
  93. package/dist/layouts/TimerCountItem.d.ts +10 -0
  94. package/dist/layouts/TimerDialog.d.ts +9 -0
  95. package/dist/layouts/TimerDropdown.d.ts +3 -0
  96. package/dist/layouts/TimerItem.d.ts +11 -0
  97. package/dist/layouts/configs/constants.d.ts +12 -0
  98. package/dist/layouts/hooks/useCountDownTimer.d.ts +9 -0
  99. package/dist/layouts/partials/AlarmClock.d.ts +10 -0
  100. package/dist/layouts/partials/AlarmClockPanel.d.ts +10 -0
  101. package/dist/layouts/partials/AlarmClockTab.d.ts +10 -0
  102. package/dist/layouts/partials/CircularTimer/index.d.ts +11 -0
  103. package/dist/layouts/partials/CircularTimer/tick.d.ts +9 -0
  104. package/dist/layouts/partials/CircularTimer.d.ts +11 -0
  105. package/dist/layouts/partials/StudyTimerTab.d.ts +12 -0
  106. package/dist/layouts/partials/TimerCountItem.d.ts +10 -0
  107. package/dist/layouts/partials/TimerItem.d.ts +11 -0
  108. package/dist/layouts/partials/TimerTabPanel.d.ts +8 -0
  109. package/dist/layouts/partials/TimerTabs.d.ts +7 -0
  110. package/dist/utils/enums/subject.d.ts +6 -0
  111. package/dist/utils/functions/checkSuperUrl.d.ts +1 -0
  112. package/dist/utils/functions/isRealTabletOrMobileDevice.d.ts +1 -0
  113. package/dist/utils/types/subjects.d.ts +19 -0
  114. package/package.json +2 -2
  115. /package/dist/utils/types/{questionTypeFilter.d.ts → QuestionTypeFilter.d.ts} +0 -0
@@ -0,0 +1,20 @@
1
+ import { FC } from "react";
2
+ import { QuestionResponse } from "../../../utils";
3
+ export interface QuestionViewProps {
4
+ index: number;
5
+ question: QuestionResponse;
6
+ answerCount: number;
7
+ isDisabled?: boolean;
8
+ isTextbook?: boolean;
9
+ subCategoryOptions?: any[];
10
+ onChangeCorrectAnswers: (value: any, index: number) => void;
11
+ onChangeScoreAnswer: (value: number, index: number) => void;
12
+ onChangeTitle?: (value: string, index: number) => void;
13
+ onChangeAuthor?: (value: string, index: number) => void;
14
+ onChangeTextualAnswer: (value: string, index: number) => void;
15
+ onChangeSubject?: (value: string, index: number) => void;
16
+ onChangeQuestionAnswerType?: (value: number, index: number) => void;
17
+ onChangeType?: (value: number, index: number) => void;
18
+ }
19
+ declare const QuestionView: FC<QuestionViewProps>;
20
+ export default QuestionView;
@@ -0,0 +1,9 @@
1
+ declare const useOverallChartContainer: (isStudent: boolean, examCode: string, code: string, examSessionId: number, chapterId: number, studentId: number) => {
2
+ isLoading: boolean;
3
+ myData: number[];
4
+ avgData: number[];
5
+ shortCategories: string[];
6
+ xAxisLabelFormatter: (_: string, { dataPointIndex }: any) => any;
7
+ formatTooltip: ({ dataPointIndex, w }: any) => string;
8
+ };
9
+ export default useOverallChartContainer;
@@ -0,0 +1,6 @@
1
+ export declare const labelStyle: {
2
+ textOverflow: string;
3
+ overflowX: string;
4
+ width: string;
5
+ whiteSpace: string;
6
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { ClassNoteDialogProps } from "../configs/interfaces";
3
+ declare const TeacherAdminNoteDialog: FC<ClassNoteDialogProps>;
4
+ export default TeacherAdminNoteDialog;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { Theme } from "@mui/material";
3
+ import { ArticleResponse, ChapterResponse, TextbookState } from "../configs/types";
4
+ declare type Props = {
5
+ t: any;
6
+ theme: Theme;
7
+ articleIndex: number;
8
+ textbookState: any;
9
+ subChapterIndex: number;
10
+ values: any;
11
+ chapterIndex: number;
12
+ article?: ArticleResponse;
13
+ handleRedirect: (type: TextbookState) => void;
14
+ onChangeFieldValue: any;
15
+ subjectId?: number | string;
16
+ subChapter?: ChapterResponse;
17
+ chapter?: ChapterResponse;
18
+ };
19
+ declare const Article: ({ t, articleIndex, subChapterIndex, chapterIndex, article, values, textbookState, subChapter, chapter, subjectId, handleRedirect, onChangeFieldValue }: Props) => React.JSX.Element;
20
+ export default Article;
@@ -0,0 +1,20 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ import { FormikProps } from "formik";
3
+ import { ArticleRequest, TextbookRequest } from "../configs/types";
4
+ interface Props extends PropsWithChildren, FormikProps<TextbookRequest> {
5
+ isMath: boolean;
6
+ expandedIndex: number;
7
+ data: ArticleRequest;
8
+ path: string;
9
+ categories: any[];
10
+ isLoadingCategories: boolean;
11
+ optionKey: string;
12
+ disabled?: boolean;
13
+ onDuplicate: (data: ArticleRequest) => void;
14
+ onDelete: (text: string, confirmText: string, path: string, index: number) => void;
15
+ onOpenSubCategoryMenu: (path: string, id?: number) => void;
16
+ onOpenCategoryMenu: (path: string) => void;
17
+ onCloseCategoryMenu: () => void;
18
+ }
19
+ declare const _default: React.NamedExoticComponent<Props>;
20
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import { Theme } from "@mui/material";
3
+ import { ArticleResponse, ChapterResponse, TextbookState } from "../configs/types";
4
+ declare type Props = {
5
+ t: any;
6
+ theme: Theme;
7
+ subChapters?: ChapterResponse[];
8
+ chapter?: ChapterResponse;
9
+ articles?: ArticleResponse[];
10
+ errors: any;
11
+ onChangeFieldValue: any;
12
+ handleRedirect: (type: TextbookState) => void;
13
+ handleSetSubChapterSection: (index: number) => void;
14
+ handleSetArticleSection: (index: number) => void;
15
+ chapterIndex: number;
16
+ articleIndex?: number;
17
+ };
18
+ declare const Chapter: ({ t, errors, onChangeFieldValue, handleRedirect, handleSetArticleSection, handleSetSubChapterSection, subChapters, articles, chapter, chapterIndex }: Props) => React.JSX.Element;
19
+ export default Chapter;
@@ -0,0 +1,19 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ import { SxProps, Theme } from "@mui/material";
3
+ import { FormikProps } from "formik";
4
+ import { QuestionRequest, TextbookRequest } from "../configs/types";
5
+ interface Props extends PropsWithChildren, FormikProps<TextbookRequest> {
6
+ data: QuestionRequest;
7
+ answerCount: number;
8
+ path: string;
9
+ isMath: boolean;
10
+ disabled?: boolean;
11
+ questionTitleStyle?: SxProps<Theme>;
12
+ optionKey: string;
13
+ isLoadingQuestionTypes: boolean;
14
+ questionTypes: any[];
15
+ onOpenQuestionTypeMenu: (key: string) => void;
16
+ onCloseQuestionTypeMenu: () => void;
17
+ }
18
+ declare const _default: React.NamedExoticComponent<Props>;
19
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import React, { FC } from "react";
2
+ import { QuestionAnswerType } from "../../../utils";
3
+ interface Props {
4
+ value: QuestionAnswerType;
5
+ onChange: (e: React.ChangeEvent<HTMLInputElement>, value: any) => void;
6
+ }
7
+ declare const QuestionCompareType: FC<Props>;
8
+ export default QuestionCompareType;
@@ -0,0 +1,28 @@
1
+ import { FC } from "react";
2
+ import { FormikProps } from "formik";
3
+ import { QuestionGroupRequest, TextbookRequest } from "../configs/types";
4
+ interface Props extends FormikProps<TextbookRequest> {
5
+ data: QuestionGroupRequest;
6
+ expandedIndex: number;
7
+ open: boolean;
8
+ paths: number[];
9
+ path: string;
10
+ isMath: boolean;
11
+ categories: any[];
12
+ isLoadingCategories: boolean;
13
+ isLoadingQuestionTypes: boolean;
14
+ questionTypes: any[];
15
+ optionKey: string;
16
+ disabled?: boolean;
17
+ onToggle: (index: number) => void;
18
+ onQuestionCountChange: (count: number, index: number) => void;
19
+ onDelete: (text: string, confirmText: string, path: string, index: number) => void;
20
+ onOpenSubCategoryMenu: (path: string, id?: number) => void;
21
+ onOpenCategoryMenu: (path: string) => void;
22
+ onCloseCategoryMenu: () => void;
23
+ onCopiedPrevQuestionGroup: (path: string, paths: number[]) => QuestionGroupRequest | undefined;
24
+ onOpenQuestionTypeMenu: (path: string, categoryId?: number, subCategoryId?: number) => void;
25
+ onCloseQuestionTypeMenu: () => void;
26
+ }
27
+ declare const QuestionGroupBlock: FC<Props>;
28
+ export default QuestionGroupBlock;
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { FormikProps } from "formik";
3
+ import { QuestionGroupRequest, TextbookRequest } from "../configs/types";
4
+ interface Props extends FormikProps<TextbookRequest> {
5
+ path: string;
6
+ isMath: boolean;
7
+ open: boolean;
8
+ data: QuestionGroupRequest;
9
+ isLoadingCategories: boolean;
10
+ optionKey: string;
11
+ categories: any[];
12
+ isLoadingQuestionTypes: boolean;
13
+ questionTypes: any[];
14
+ disabled?: boolean;
15
+ onQuestioStartOrderChange: (order: number) => void;
16
+ onDelete: (text: string, confirmText: string, path: string, index: number) => void;
17
+ onOpenSubCategoryMenu: (path: string, id?: number) => void;
18
+ onOpenCategoryMenu: (path: string) => void;
19
+ onCloseCategoryMenu: () => void;
20
+ onOpenQuestionTypeMenu: (path: string, categoryId?: number, subCategoryId?: number) => void;
21
+ onCloseQuestionTypeMenu: () => void;
22
+ }
23
+ declare const _default: React.NamedExoticComponent<Props>;
24
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ import { SxProps, Theme } from "@mui/material";
3
+ interface Props {
4
+ questionOrder: number;
5
+ isMath: boolean;
6
+ questionTitleStyle?: SxProps<Theme>;
7
+ }
8
+ declare const QuestionOrderName: FC<Props>;
9
+ export default QuestionOrderName;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface Props {
3
+ path: string;
4
+ isTabletUp: boolean;
5
+ disabled?: boolean;
6
+ setFieldValue: any;
7
+ }
8
+ declare const _default: React.NamedExoticComponent<Props>;
9
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { FormikErrors } from "formik";
3
+ import { TextbookRequest } from "../configs/types";
4
+ interface Props {
5
+ name: string;
6
+ value: string;
7
+ deletable?: boolean;
8
+ errors: FormikErrors<TextbookRequest>;
9
+ onDelete: () => void;
10
+ }
11
+ declare const _default: React.NamedExoticComponent<Props>;
12
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import React, { Dispatch, FC, RefObject } from "react";
2
+ import { TextbookFilter } from "../configs/types";
3
+ interface Props {
4
+ inputRef: RefObject<HTMLInputElement>;
5
+ fixedRef: RefObject<HTMLInputElement>;
6
+ filter: TextbookFilter;
7
+ setFilter: Dispatch<React.SetStateAction<TextbookFilter>>;
8
+ }
9
+ declare const QuestionTypeFilter: FC<Props>;
10
+ export default QuestionTypeFilter;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { Theme } from "@mui/material";
3
+ import { ArticleResponse, ChapterResponse, TextbookState } from "../configs/types";
4
+ declare type Props = {
5
+ t: any;
6
+ articles?: ArticleResponse[];
7
+ theme: Theme;
8
+ errors: any;
9
+ handleRedirect: (type: TextbookState) => void;
10
+ handleSetArticleSection: (index: number) => void;
11
+ chapterIndex: number;
12
+ subChapterIndex: number;
13
+ onChangeFieldValue: any;
14
+ subChapter?: ChapterResponse;
15
+ chapter?: ChapterResponse;
16
+ };
17
+ declare const SubChapter: ({ t, errors, handleRedirect, onChangeFieldValue, handleSetArticleSection, articles, chapter, subChapter, chapterIndex, subChapterIndex }: Props) => React.JSX.Element;
18
+ export default SubChapter;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Theme } from "@mui/material";
3
+ import { TextbookOwner } from "../configs/types";
4
+ declare type Props = {
5
+ t: any;
6
+ theme: Theme;
7
+ onChangeFieldValue: any;
8
+ textbookOwners?: TextbookOwner[];
9
+ errors: any;
10
+ values: any;
11
+ };
12
+ declare const TextbookOwners: ({ t, errors, values, onChangeFieldValue, textbookOwners }: Props) => React.JSX.Element;
13
+ export default TextbookOwners;
@@ -0,0 +1,30 @@
1
+ import { ArticleResponse, Category } from "../configs/types";
2
+ interface Props {
3
+ article?: ArticleResponse;
4
+ onChangeFieldValue: any;
5
+ articleIndex: number;
6
+ subChapterIndex: number;
7
+ textbookState: any;
8
+ values: any;
9
+ chapterIndex: number;
10
+ subjectId?: number | string;
11
+ }
12
+ declare const useExamDetailView: (props: Props) => {
13
+ t: any;
14
+ categoryList: Category[];
15
+ handleChangeScoreAnswer: (article: number, index: number, score: number) => void;
16
+ handleChangeCorrectAnswers: (article: number, index: number, answer: number) => void;
17
+ handleChangeAnswerCount: (article: number, newAnswerCount: number, answerCount: number) => void;
18
+ handleChangeQuestionCount: (article: number, questionCount: number, answerCount: number) => void;
19
+ handleChangeCategory: (_: number, values: any) => void;
20
+ handleChangeTitle: (article: number, index: number, title: string) => void;
21
+ handleChangeAuthor: (article: number, index: number, author: string) => void;
22
+ handleChangeSubject: (article: number, index: number, subject: string) => void;
23
+ handleChangeType: (article: number, index: number, type: number) => void;
24
+ subCategoryOptions: ({
25
+ label: string;
26
+ value: number | undefined;
27
+ } | undefined)[];
28
+ handleDeleteArticle: (article: number) => void;
29
+ };
30
+ export default useExamDetailView;
@@ -0,0 +1,15 @@
1
+ import { RefObject } from "react";
2
+ import { TextbookFilter } from "../configs/types";
3
+ declare const useTextbookOptions: (subjectId: number, isMath: boolean, filter: TextbookFilter, inputRef: RefObject<HTMLInputElement>) => {
4
+ isSuperAdmin: boolean;
5
+ categories: any[];
6
+ questionTypes: any[];
7
+ isLoadingCategories: boolean;
8
+ isLoadingQuestionTypes: boolean;
9
+ getCategories: () => Promise<void>;
10
+ getSubCategories: (categoryId?: number | undefined) => Promise<void>;
11
+ getQuestionTypes: (categoryId?: number | undefined, subCategoryId?: number | undefined) => Promise<void>;
12
+ resetCategories: () => void;
13
+ resetQuestionTypes: () => void;
14
+ };
15
+ export default useTextbookOptions;
@@ -0,0 +1,6 @@
1
+ export declare const labelStyle: {
2
+ textOverflow: string;
3
+ overflowX: string;
4
+ width: string;
5
+ whiteSpace: string;
6
+ };
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ textbookId?: string;
4
+ onNavigateList: () => void;
5
+ navigate: any;
6
+ }
7
+ export declare const PreparedTextbook: FC<Props>;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import { FC } from "react";
2
+ import { Attendance, AttendanceRequest, LessonResponse } from "../../configs/types";
3
+ interface Props {
4
+ lesson: LessonResponse;
5
+ open: boolean;
6
+ studentId: number;
7
+ attendance?: Attendance;
8
+ onSearchTeachers: (text: string) => void;
9
+ onClose: () => void;
10
+ onSubmit: (attendance: AttendanceRequest) => void;
11
+ }
12
+ declare const LessonFormDialog: FC<Props>;
13
+ export default LessonFormDialog;
@@ -0,0 +1,15 @@
1
+ import { FC } from "react";
2
+ import { LessonAttendance, LessonResponse } from "../configs/types";
3
+ interface AttendanceCourseTableProps {
4
+ data: LessonAttendance[];
5
+ containerProps?: any;
6
+ listHeight?: number;
7
+ listWidth?: number;
8
+ mainTeacherName: string;
9
+ courseName: string;
10
+ courseId: number;
11
+ studentId: number;
12
+ onCheckInLesson: (lesson: LessonResponse, studentId: number) => void;
13
+ }
14
+ declare const AttendanceCourseTable: FC<AttendanceCourseTableProps>;
15
+ export default AttendanceCourseTable;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { CourseAttendanceResponse, LessonResponse } from "../configs/types";
3
+ interface Props {
4
+ studentId: number;
5
+ data: CourseAttendanceResponse;
6
+ onCheckInLesson: (lesson: LessonResponse, studentId: number) => void;
7
+ onLoad?: () => void;
8
+ }
9
+ declare const CourseAttendanceItem: FC<Props>;
10
+ export default CourseAttendanceItem;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { CourseAttendanceListProps } from "../configs/interfaces";
3
+ declare const CourseAttendanceList: FC<CourseAttendanceListProps>;
4
+ export default CourseAttendanceList;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { TabContentProps } from "../configs/interfaces";
3
+ declare const DrawerAttendanceTab: FC<TabContentProps>;
4
+ export default DrawerAttendanceTab;
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ import { TabContentProps } from "../configs/interfaces";
3
+ import { StudentInfo } from "../configs/types";
4
+ interface Props extends TabContentProps {
5
+ history: any;
6
+ student?: StudentInfo;
7
+ }
8
+ declare const DrawerExamResultTab: FC<Props>;
9
+ export default DrawerExamResultTab;
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { TabContentProps } from "../configs/interfaces";
3
+ import { StudentInfo } from "../configs/types";
4
+ interface Props extends TabContentProps {
5
+ student?: StudentInfo;
6
+ }
7
+ declare const DrawerNoteTab: FC<Props>;
8
+ export default DrawerNoteTab;
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { TabContentProps } from "../configs/interfaces";
3
+ interface Props extends TabContentProps {
4
+ history: any;
5
+ }
6
+ declare const DrawerTextbookResultTab: FC<Props>;
7
+ export default DrawerTextbookResultTab;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { ExamResultListProps } from "../../configs/interfaces";
3
+ declare const ExanResultList: FC<ExamResultListProps>;
4
+ export default ExanResultList;
@@ -0,0 +1,13 @@
1
+ import { FC } from "react";
2
+ import { ExamSessionResponse, StudentInfo } from "../configs/types";
3
+ interface Props {
4
+ open?: boolean;
5
+ student?: StudentInfo;
6
+ anchor?: "left" | "top" | "right" | "bottom";
7
+ onClose?: () => void;
8
+ width?: number | string;
9
+ data?: ExamSessionResponse;
10
+ history: any;
11
+ }
12
+ declare const ExamResultDrawer: FC<Props>;
13
+ export default ExamResultDrawer;
@@ -0,0 +1,10 @@
1
+ import { ExamSessionResponse } from "../configs/types";
2
+ import { FC } from "react";
3
+ interface Props {
4
+ studentId: number;
5
+ data: ExamSessionResponse;
6
+ onItemClick: (data: ExamSessionResponse) => void;
7
+ onLoad?: () => void;
8
+ }
9
+ declare const ExamResultItem: FC<Props>;
10
+ export default ExamResultItem;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { ExamResultListProps } from "../configs/interfaces";
3
+ declare const ExanResultList: FC<ExamResultListProps>;
4
+ export default ExanResultList;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Attendance, LessonResponse } from "../configs/types";
3
+ declare type Props = {
4
+ lesson: LessonResponse;
5
+ lessonAttendance?: Attendance;
6
+ };
7
+ declare const LessonTooltip: ({ lesson, lessonAttendance }: Props) => React.JSX.Element;
8
+ export default LessonTooltip;
@@ -0,0 +1,13 @@
1
+ import { FC } from "react";
2
+ import { NoteResponse } from "../../../utils";
3
+ import { StudentInfo } from "../configs/types";
4
+ interface Props {
5
+ open: boolean;
6
+ onClose: () => void;
7
+ student?: StudentInfo;
8
+ data?: NoteResponse;
9
+ anchor?: "left" | "top" | "right" | "bottom";
10
+ width?: number | string;
11
+ }
12
+ declare const NoteDrawer: FC<Props>;
13
+ export default NoteDrawer;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { TextbookResponse } from "../configs/types";
3
+ interface Props {
4
+ studentId: number;
5
+ data: TextbookResponse;
6
+ onItemClick: (data: TextbookResponse) => void;
7
+ onLoad?: () => void;
8
+ }
9
+ declare const TextbookResultItem: FC<Props>;
10
+ export default TextbookResultItem;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { TextbookListProps } from "../configs/interfaces";
3
+ declare const TextbookResultList: FC<TextbookListProps>;
4
+ export default TextbookResultList;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { ChapterBoxProps } from "../configs/interfaces";
3
+ declare const ChapterBox: FC<ChapterBoxProps>;
4
+ export default ChapterBox;
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { ChapterResponse, SubjectResponse, ChapterOption, ArticleResponse } from "./types";
3
+ export interface ChapterBoxProps {
4
+ parentChapterId?: number;
5
+ data: ChapterResponse;
6
+ subject: SubjectResponse;
7
+ categoryOptions: any[];
8
+ isReadonly?: boolean;
9
+ onClickAddSubchapter?: (chapter: ChapterOption) => void;
10
+ onChangeName?: (text: string, chapterId: number, parentChapterId?: number) => void;
11
+ onChangePageFrom?: (value: number, chapterId: number, parentChapterId?: number) => void;
12
+ onChangePageTo?: (value: number, chapterId: number, parentChapterId?: number) => void;
13
+ onAddArticle?: (chapter: ChapterResponse, callback?: Function) => void;
14
+ handleCheckArticle: (e: React.ChangeEvent<HTMLInputElement>, article: ArticleResponse) => void;
15
+ onRemoveArticle?: (articleNumber: number, chapterName: string, articles: ArticleResponse[], chapterId: number, parentChapterId?: number, callback?: Function) => void;
16
+ onUpdateArticleQuestionCount?: (articleNumber: number, questionCount: number, answerCount: number, articles: ArticleResponse[], chapterId: number, parentChapterId?: number, callback?: Function) => void;
17
+ onUpdateArticleCategory?: (articleNumber: number, categoryId: number, articles: ArticleResponse[], chapterId: number, parentChapterId?: number, callback?: Function) => void;
18
+ onUpdateArticleQuestionAnswerCount?: (articleNumber: number, newAnswerCount: number, answerCount: number, articles: ArticleResponse[], chapterId: number, parentChapterId?: number, callback?: Function) => void;
19
+ onUpdateArticleQuestion?: (articleNumber: number, index: number, value: number | number[], key: string, articles: ArticleResponse[], chapterId: number, parentChapterId?: number, callback?: Function) => void;
20
+ onRemoveChapter?: (chapterName: string, chapterId: number, parentChapterId?: number) => void;
21
+ }
@@ -0,0 +1,16 @@
1
+ import { Exam } from "../../../utils/types";
2
+ interface Props {
3
+ keep?: boolean;
4
+ callback?: () => Promise<void>;
5
+ navigate?: any;
6
+ }
7
+ declare const useExam: (props: Props) => {
8
+ isOpenDialog: boolean;
9
+ examRequest: Exam;
10
+ handleChangeExamRequest: (value: Exam) => void;
11
+ handleOpenCreateExamDialog: () => void;
12
+ handleSaveExam: () => Promise<void>;
13
+ handleCloseDialog: () => void;
14
+ handleCreateExam: () => Promise<void>;
15
+ };
16
+ export default useExam;
@@ -0,0 +1,55 @@
1
+ import { ChangeEvent } from "react";
2
+ import { ArticleCreateRequest, ArticleResponse, ChapterOption, ChapterResponse, DeleteItem, TextbookDetailResponse } from "../configs/types";
3
+ import { TextbookDetailProps } from "../views/TextbookDetail";
4
+ import { Category } from "../../Select/Category/configs/types";
5
+ declare const useTextbookDetail: (props: TextbookDetailProps) => {
6
+ id: string;
7
+ t: any;
8
+ textbook: TextbookDetailResponse;
9
+ textbookSubject: {
10
+ label: string;
11
+ value: number;
12
+ } | undefined;
13
+ isReadonly: boolean;
14
+ isNotFound: boolean;
15
+ textbookId: number | undefined;
16
+ parentChapter: ChapterOption | undefined;
17
+ selectedChapter: ChapterResponse | undefined;
18
+ selectedDeleteItem: DeleteItem | undefined;
19
+ isEditedTitle: boolean;
20
+ isReadonlyParam: boolean | undefined;
21
+ articlesSelected: number[];
22
+ isOpenDialog: boolean;
23
+ examRequest: import("../../../utils").Exam;
24
+ categoryList: Category[];
25
+ handleChangeExamRequest: (value: import("../../../utils").Exam) => void;
26
+ handleCheckArticle: (e: React.ChangeEvent<HTMLInputElement>, article: ArticleResponse) => void;
27
+ handleOpenCreateExamDialog: () => void;
28
+ handleSaveExam: () => Promise<void>;
29
+ handleCloseDialog: () => void;
30
+ handleCreateExam: () => Promise<void>;
31
+ handleChangeTextbookTitle: (e: ChangeEvent<HTMLInputElement>) => void;
32
+ handleCreateOrUpdateTextbook: () => Promise<void>;
33
+ handleChangeTextbookSubject: (val: any) => void;
34
+ handleGoToTextbookList: () => void;
35
+ handleCloseChapterNameDialog: () => void;
36
+ handleCreateChapter: (chapterName: string) => Promise<void>;
37
+ handleAddChapterToTextbook: () => void;
38
+ handleAddChapterToParentSubchapter: (chapter: ChapterOption) => void;
39
+ handleChangeChapterName: (name: string, chapterId: number, parentChapterId?: number | undefined, callback?: Function | undefined) => void;
40
+ handleUpdateChapter: (chapterId: number, chapter: ChapterResponse, callback?: Function | undefined) => Promise<void>;
41
+ handleChangeChapterPageFrom: (value: number, chapterId: number, parentChapterId?: number | undefined, callback?: Function | undefined) => void;
42
+ handleChangeChapterPageTo: (value: number, chapterId: number, parentChapterId?: number | undefined, callback?: Function | undefined) => void;
43
+ handleAddArticleToChapter: (article: ArticleCreateRequest) => Promise<void>;
44
+ handleUpdateArticleQuestionCountFromChapter: (articleNumber: number, questionCount: number, answerCount: number, articles: ArticleResponse[], chapterId: number, parentChapterId?: number | undefined) => void;
45
+ handleUpdateArticleCategory: (articleNumber: number, categoryId: number, articles: ArticleResponse[], chapterId: number, parentChapterId?: number | undefined) => void;
46
+ handleUpdateArticleAnswerCount: (articleNumber: number, newAnswerCount: number, answerCount: number, articles: ArticleResponse[], chapterId: number, parentChapterId?: number | undefined) => void;
47
+ handleUpdateArticleQuestion: (articleNumber: number, index: number, value: number | number[], key: string, articles: ArticleResponse[], chapterId: number, parentChapterId?: number | undefined) => void;
48
+ handleOpenAddArticleDialog: (chapter: ChapterResponse) => void;
49
+ handleCloseArticleDialog: () => void;
50
+ handleOpenRemoveArticleConfirmDialog: (articleNumber: number, chapterName: string, articles: ArticleResponse[], chapterId: number, parentChapterId?: number | undefined) => void;
51
+ handleCloseConfirmDeleteDialog: () => void;
52
+ handleRemoveSelectedItem: () => void;
53
+ handleOpenRemoveChapterConfirmDialog: (chapterName: string, chapterId: number, parentChapterId?: number | undefined) => void;
54
+ };
55
+ export default useTextbookDetail;
@@ -0,0 +1,15 @@
1
+ import { FC } from "react";
2
+ import { Role } from "../../../utils/constants";
3
+ export interface TextbookDetailProps {
4
+ role: Role;
5
+ isReadonlyParam?: boolean;
6
+ navigate: any;
7
+ id: string;
8
+ isSuperAdmin: any;
9
+ as?: any;
10
+ onNavigateDetail?: (data: any, readOnly?: boolean, replace?: boolean) => void;
11
+ onNavigateList: (replace?: boolean) => void;
12
+ className?: string;
13
+ }
14
+ declare const TextbookViewDetail: FC<TextbookDetailProps>;
15
+ export default TextbookViewDetail;
@@ -0,0 +1,4 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10.395 2.01813C9.78691 1.36156 8.93753 1 8.00003 1C7.05753 1 6.20534 1.35937 5.60003 2.01187C4.98815 2.67156 4.69003 3.56813 4.76003 4.53625C4.89878 6.44625 6.35222 8 8.00003 8C9.64784 8 11.0988 6.44656 11.2397 4.53687C11.3107 3.5775 11.0107 2.68281 10.395 2.01813Z" fill="#97A1AF"/>
3
+ <path d="M13.4999 15H2.49993C2.35595 15.0019 2.21337 14.9716 2.08255 14.9115C1.95173 14.8513 1.83597 14.7627 1.74368 14.6522C1.54056 14.4094 1.45868 14.0778 1.51931 13.7425C1.78306 12.2794 2.60618 11.0503 3.89993 10.1875C5.04931 9.42156 6.50525 9 7.99993 9C9.49462 9 10.9506 9.42188 12.0999 10.1875C13.3937 11.05 14.2168 12.2791 14.4806 13.7422C14.5412 14.0775 14.4593 14.4091 14.2562 14.6519C14.1639 14.7625 14.0482 14.8511 13.9174 14.9113C13.7865 14.9715 13.6439 15.0018 13.4999 15Z" fill="#97A1AF"/>
4
+ </svg>