touchstudy-core 0.1.128 → 0.1.130
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/.DS_Store +0 -0
- package/dist/components/.DS_Store +0 -0
- package/dist/components/Buttons/index.d.ts +2 -1
- package/dist/components/Dialogs/ConfirmDialog.d.ts +2 -2
- package/dist/components/Selectors/ArticleCategorySelector.d.ts +1 -0
- package/dist/components/Selectors/QuestionCountSelector.d.ts +1 -0
- package/dist/components/Selects/CustomSelect.d.ts +1 -1
- package/dist/components/Selects/theme/styles.d.ts +1 -0
- package/dist/components/TinyMCE/MathTinyEditor.d.ts +13 -0
- package/dist/components/TinyMCE/TinyEditor.d.ts +11 -0
- package/dist/components/TinyMCE/index.d.ts +3 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/containers/.DS_Store +0 -0
- package/dist/containers/Exams/components/ArticleGroupView.d.ts +3 -1
- package/dist/containers/Exams/components/QuestionView.d.ts +4 -1
- package/dist/containers/Exams/hooks/useExamDetailView.d.ts +3 -1
- package/dist/containers/Notes/index.d.ts +2 -1
- package/dist/containers/PreparedTextbook/apiClients/categoryService.d.ts +4 -3
- package/dist/containers/PreparedTextbook/apiClients/questionTypeService.d.ts +2 -0
- package/dist/containers/PreparedTextbook/components/Article.d.ts +3 -2
- package/dist/containers/PreparedTextbook/components/ArticleBlock.d.ts +18 -0
- package/dist/containers/PreparedTextbook/components/ChapterBlock.d.ts +26 -0
- package/dist/containers/PreparedTextbook/components/ChapterBlockBody.d.ts +24 -0
- package/dist/containers/PreparedTextbook/components/CustomTextbookTab.d.ts +7 -0
- package/dist/containers/PreparedTextbook/components/OwnerSelector.d.ts +2 -2
- package/dist/containers/PreparedTextbook/components/PreparedTextbookForm.d.ts +13 -0
- package/dist/containers/PreparedTextbook/components/QuestionBlock.d.ts +19 -0
- package/dist/containers/PreparedTextbook/components/QuestionGroupBlock.d.ts +28 -0
- package/dist/containers/PreparedTextbook/components/QuestionGroupBlockBody.d.ts +22 -0
- package/dist/containers/PreparedTextbook/components/QuestionTypeFilter.d.ts +10 -0
- package/dist/containers/PreparedTextbook/components/TextbookContentsTab.d.ts +7 -0
- package/dist/containers/PreparedTextbook/components/TextbookInfoTab.d.ts +11 -0
- package/dist/containers/PreparedTextbook/components/TextbookOwnersTab.d.ts +7 -0
- package/dist/containers/PreparedTextbook/configs/constants.d.ts +57 -1
- package/dist/containers/PreparedTextbook/configs/enums.d.ts +16 -0
- package/dist/containers/PreparedTextbook/configs/functions.d.ts +3 -0
- package/dist/containers/PreparedTextbook/configs/interfaces.d.ts +6 -0
- package/dist/containers/PreparedTextbook/configs/types.d.ts +97 -19
- package/dist/containers/PreparedTextbook/hooks/useExamDetailView.d.ts +3 -1
- package/dist/containers/PreparedTextbook/hooks/useSelect.d.ts +3 -2
- package/dist/containers/PreparedTextbook/hooks/useTextbookManagement.d.ts +8 -3
- package/dist/containers/PreparedTextbook/hooks/useTextbookOptions.d.ts +15 -0
- package/dist/containers/PreparedTextbook/index.d.ts +2 -2
- package/dist/containers/PreparedTextbook/views/PreparedTextbookView.d.ts +4 -0
- package/dist/containers/Textbooks/configs/types.d.ts +2 -1
- package/dist/containers/Textbooks/hooks/useTextbookDetail.d.ts +2 -2
- package/dist/index.css +29 -0
- package/dist/index.js +3516 -1754
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +3516 -1755
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/.DS_Store +0 -0
- package/dist/redux/academies/reducer.d.ts +8 -2
- package/dist/redux/commons/reducer.d.ts +3 -1
- package/dist/theme/index.d.ts +2 -1
- package/dist/utils/.DS_Store +0 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/types/exams.d.ts +5 -1
- package/package.json +4 -3
- package/dist/components/Chats/ChatHeader.d.ts +0 -25
- package/dist/components/Chats/ChatItem.d.ts +0 -31
- package/dist/components/Chats/ChatLeftItem.d.ts +0 -4
- package/dist/components/Chats/ChatList.d.ts +0 -14
- package/dist/components/Chats/ChatRightItem.d.ts +0 -4
- package/dist/components/Chats/InputChat.d.ts +0 -16
- package/dist/components/Chats/components/CustomTooltip.d.ts +0 -2
- package/dist/components/CkEditor/CkEditor.d.ts +0 -19
- package/dist/components/CkEditor/config.d.ts +0 -19
- package/dist/components/CkEditor/index.d.ts +0 -2
- package/dist/components/ErrorHandler.d.ts +0 -6
- package/dist/components/LabelRequired.d.ts +0 -8
- package/dist/components/List/List.d.ts +0 -7
- package/dist/containers/ExamResult/components/Dialog/CreateNewQuestion2.d.ts +0 -9
- package/dist/containers/ExamResult/components/MyAnswer/components/CreateNewQuestion.d.ts +0 -14
- package/dist/containers/ExamResult/components/Notes/components/ActionItem.d.ts +0 -7
- package/dist/containers/ExamResult/components/Notes/components/ActionsTooltip.d.ts +0 -14
- package/dist/containers/ExamResult/components/Notes/components/ContentTooltip.d.ts +0 -14
- package/dist/containers/ExamResult/components/Notes/components/NewNoteButton.d.ts +0 -6
- package/dist/containers/ExamResult/components/Notes/components/NoteItem.d.ts +0 -9
- package/dist/containers/ExamResult/components/Notes/components/NoteList.d.ts +0 -12
- package/dist/containers/ExamResult/components/Notes/configs/constants.d.ts +0 -2
- package/dist/containers/ExamResult/components/Notes/configs/interfaces.d.ts +0 -4
- package/dist/containers/ExamResult/components/Notes/hooks/useNotes.d.ts +0 -8
- package/dist/containers/ExamResult/components/Notes/styles/styles.d.ts +0 -67
- package/dist/containers/ExamResult/components/StudentNotes/components/ActionItem.d.ts +0 -7
- package/dist/containers/ExamResult/components/StudentNotes/components/ActionsTooltip.d.ts +0 -14
- package/dist/containers/ExamResult/components/StudentNotes/components/NewNoteButton.d.ts +0 -6
- package/dist/containers/ExamResult/components/StudentNotes/components/NoteItem.d.ts +0 -9
- package/dist/containers/ExamResult/components/StudentNotes/configs/constants.d.ts +0 -2
- package/dist/containers/ExamResult/components/StudentNotes/configs/interfaces.d.ts +0 -7
- package/dist/containers/ExamResult/components/StudentNotes/hooks/useStudentNotes.d.ts +0 -12
- package/dist/containers/ExamResult/components/StudentNotes/index.d.ts +0 -4
- package/dist/containers/ExamResult/components/StudentNotes/styles/styles.d.ts +0 -67
- package/dist/containers/ExamResult/hooks/useExamNoteDialog.d.ts +0 -18
- package/dist/containers/Exams/configs/types.d.ts +0 -22
- package/dist/containers/Login/views/LoginQRCode.d.ts +0 -10
- package/dist/containers/Notes/components/ActionItem.d.ts +0 -7
- package/dist/containers/Notes/components/ActionsTooltip.d.ts +0 -16
- package/dist/containers/Notes/components/NoteDialog.d.ts +0 -4
- package/dist/containers/PreparedTextbook/components/TextbookOwners.d.ts +0 -13
- package/dist/containers/Textbooks/components/TextbookShareDialog.d.ts +0 -26
- package/dist/containers/Users/components/Dialogs/DeleteUserCsvDialog.d.ts +0 -10
- package/dist/containers/Users/components/Dialogs/RecentUserActionDialog.d.ts +0 -9
- package/dist/containers/Users/components/Dialogs/UserDialog.d.ts +0 -12
- package/dist/utils/canAccessRoute.d.ts +0 -2
- package/dist/utils/diffFromNow.d.ts +0 -3
- package/dist/utils/encodeParams.d.ts +0 -2
- package/dist/utils/formatTime.d.ts +0 -4
- package/dist/utils/getAcademyDomain.d.ts +0 -2
- package/dist/utils/getAccessToken.d.ts +0 -2
- package/dist/utils/getErrorMessage.d.ts +0 -1
- package/dist/utils/getLanguage.d.ts +0 -2
- package/dist/utils/getLearningSpace.d.ts +0 -2
- package/dist/utils/getRedirectUrl.d.ts +0 -2
- package/dist/utils/helpers.d.ts +0 -22
- package/dist/utils/isLocalHost.d.ts +0 -2
- package/dist/utils/minutesToTimeSpan.d.ts +0 -2
- package/dist/utils/pusherTo.d.ts +0 -1
- package/dist/utils/times.d.ts +0 -6
- package/dist/utils/toISOString.d.ts +0 -2
- package/dist/utils/toLocalTime.d.ts +0 -1
- package/dist/utils/types/checkSuperUrl.d.ts +0 -1
- package/dist/utils/types.d.ts +0 -9
- package/dist/utils/utcToLocalTime.d.ts +0 -2
package/dist/.DS_Store
ADDED
Binary file
|
Binary file
|
@@ -4,9 +4,9 @@ export interface ConfirmDialogProps {
|
|
4
4
|
text: string;
|
5
5
|
cancelText?: string;
|
6
6
|
okText?: string;
|
7
|
-
onConfirm: () => void;
|
7
|
+
onConfirm: (e?: any) => void;
|
8
8
|
open: boolean;
|
9
|
-
toggle: () => void;
|
9
|
+
toggle: (e?: any) => void;
|
10
10
|
isDelete?: boolean;
|
11
11
|
title?: string;
|
12
12
|
confirmText?: string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import React from "react";
|
2
|
-
declare const CustomSelect: ({ isDefault, defaultValue, options, isDisabled, scrollBottom, value, isMulti, ...rest }: any) => React.JSX.Element;
|
2
|
+
declare const CustomSelect: ({ isDefault, defaultValue, options, isDisabled, scrollBottom, value, isMulti, optionValue, ...rest }: any) => React.JSX.Element;
|
3
3
|
export default CustomSelect;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "@wiris/mathtype-tinymce6";
|
3
|
+
declare type Props = {
|
4
|
+
config?: any;
|
5
|
+
initValue?: string;
|
6
|
+
value: string;
|
7
|
+
onChange: any;
|
8
|
+
onClearUndos?: any;
|
9
|
+
ref?: any;
|
10
|
+
onInit?: any;
|
11
|
+
};
|
12
|
+
declare const MathTinyEditor: ({ ref, value, onInit, onClearUndos, onChange, initValue, config }: Props) => React.JSX.Element;
|
13
|
+
export default MathTinyEditor;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "@wiris/mathtype-tinymce6";
|
3
|
+
declare type Props = {
|
4
|
+
config?: any;
|
5
|
+
initValue: string;
|
6
|
+
onChange: any;
|
7
|
+
disabled?: boolean;
|
8
|
+
ref?: any;
|
9
|
+
};
|
10
|
+
declare const TinyEditor: ({ ref, disabled, onChange, initValue, config }: Props) => React.JSX.Element;
|
11
|
+
export default TinyEditor;
|
@@ -13,7 +13,7 @@ export * from "./Selects";
|
|
13
13
|
export * from "./Selectors";
|
14
14
|
export * from "./Inputs";
|
15
15
|
export * from "./Chats";
|
16
|
-
export * from "./CkEditor";
|
17
16
|
export * from "./List";
|
18
17
|
export * from "./Tables";
|
18
|
+
export * from "./TinyMCE";
|
19
19
|
export { AdapterMoment, DateCalendar, MathJaxContainer, DayCalendarSkeleton, DemoContainer, LocalizationProvider, PickersDay, DatePicker, TimePicker, PrintExamView2 };
|
Binary file
|
@@ -19,13 +19,15 @@ export interface ArticleGroupViewProps {
|
|
19
19
|
onChangeQuestionCount: (article: number, questionCount: number, answerCount: number) => void;
|
20
20
|
onChangeCategory: (article: number, categoryId: number) => void;
|
21
21
|
onChangeAnswerCount: (article: number, newAnswerCount: number, answerCount: number) => void;
|
22
|
-
onChangeCorrectAnswers:
|
22
|
+
onChangeCorrectAnswers: any;
|
23
23
|
onChangeScoreAnswer: (article: number, index: number, score: number) => void;
|
24
24
|
onDelete?: (article: number) => void;
|
25
25
|
onChangeTitle?: (article: number, questionCount: number, value: string) => void;
|
26
26
|
onChangeAuthor?: (article: number, questionCount: number, value: string) => void;
|
27
27
|
onChangeSubject?: (article: number, questionCount: number, value: string) => void;
|
28
28
|
onChangeType?: (article: number, questionCount: number, type: number) => void;
|
29
|
+
onChangeQuestionAnswerType?: (article: number, index: number, type: number) => void;
|
30
|
+
onChangeTextualAnswer?: (article: number, index: number, value: string) => void;
|
29
31
|
}
|
30
32
|
declare const ArticleGroupView: FC<ArticleGroupViewProps>;
|
31
33
|
export default ArticleGroupView;
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { FC } from "react";
|
2
|
+
import { QuestionResponse } from "../../../utils";
|
2
3
|
export interface QuestionViewProps {
|
3
4
|
index: number;
|
4
|
-
question:
|
5
|
+
question: QuestionResponse;
|
5
6
|
answerCount: number;
|
6
7
|
isDisabled?: boolean;
|
7
8
|
isTextbook?: boolean;
|
@@ -10,7 +11,9 @@ export interface QuestionViewProps {
|
|
10
11
|
onChangeScoreAnswer: (value: number, index: number) => void;
|
11
12
|
onChangeTitle?: (value: string, index: number) => void;
|
12
13
|
onChangeAuthor?: (value: string, index: number) => void;
|
14
|
+
onChangeTextualAnswer: (value: string, index: number) => void;
|
13
15
|
onChangeSubject?: (value: string, index: number) => void;
|
16
|
+
onChangeQuestionAnswerType?: (value: number, index: number) => void;
|
14
17
|
onChangeType?: (value: number, index: number) => void;
|
15
18
|
}
|
16
19
|
declare const QuestionView: FC<QuestionViewProps>;
|
@@ -16,8 +16,10 @@ declare const useExamDetailView: (props: Props) => {
|
|
16
16
|
handleAddArticle: () => void;
|
17
17
|
handleChangeScoreAnswer: (article: number, index: number, score: number) => void;
|
18
18
|
handleChangeTitle: (e: ChangeEvent<HTMLInputElement>) => void;
|
19
|
+
handleChangeTextualAnswer: (article: number, index: number, value: string) => void;
|
20
|
+
handleChangeQuestionAnswerType: (article: number, index: number, value: number) => void;
|
19
21
|
handleChangeDuration: (value: any) => void;
|
20
|
-
handleChangeCorrectAnswers: (article: number, index: number, answer: number) => void;
|
22
|
+
handleChangeCorrectAnswers: (article: number, index: number, answer: number[]) => void;
|
21
23
|
handleChangeAnswerCount: (article: number, newAnswerCount: number, answerCount: number) => void;
|
22
24
|
handleChangeQuestionCount: (article: number, questionCount: number, answerCount: number) => void;
|
23
25
|
handleChangeCategory: (article: number, categoryId: number) => void;
|
@@ -7,4 +7,5 @@ import { NoteSearchQuery } from "./configs/types";
|
|
7
7
|
import { ClassNoteDialogProps, ExamNoteDialogProps } from "./configs/interfaces";
|
8
8
|
import useNotes from "./hooks/useNotes";
|
9
9
|
import NotesContainer from "./views/NotesContainer";
|
10
|
-
export { DEFAULT_NOTE_FILTER, NotesContainer, NewNoteButton, ExamNoteDialog, ClassNoteDialog,
|
10
|
+
export { DEFAULT_NOTE_FILTER, NotesContainer, NewNoteButton, ExamNoteDialog, ClassNoteDialog, useNotes };
|
11
|
+
export type { NotesContainerProps, NoteSearchQuery, ClassNoteDialogProps, ExamNoteDialogProps };
|
@@ -1,3 +1,4 @@
|
|
1
|
-
|
2
|
-
export declare const
|
3
|
-
export declare const
|
1
|
+
export declare const getCategoryListAdminApi: (data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
2
|
+
export declare const getCategoryListApi: (data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
3
|
+
export declare const getCategoryQuestionTypeListApi: (isSuper: boolean, data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
4
|
+
export declare const getSuperAdminCategoryListAdminApi: (data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import React from
|
1
|
+
import React from "react";
|
2
2
|
import { Theme } from "@mui/material";
|
3
3
|
import { ArticleResponse, ChapterResponse, TextbookState } from "../configs/types";
|
4
4
|
declare type Props = {
|
5
5
|
t: any;
|
6
|
+
errors: any;
|
6
7
|
theme: Theme;
|
7
8
|
articleIndex: number;
|
8
9
|
textbookState: any;
|
@@ -16,5 +17,5 @@ declare type Props = {
|
|
16
17
|
subChapter?: ChapterResponse;
|
17
18
|
chapter?: ChapterResponse;
|
18
19
|
};
|
19
|
-
declare const Article: ({ t, articleIndex, subChapterIndex, chapterIndex, article, values, textbookState, subChapter, chapter, subjectId, handleRedirect, onChangeFieldValue }: Props) => React.JSX.Element;
|
20
|
+
declare const Article: ({ t, errors, articleIndex, subChapterIndex, chapterIndex, article, values, textbookState, subChapter, chapter, subjectId, handleRedirect, onChangeFieldValue }: Props) => React.JSX.Element;
|
20
21
|
export default Article;
|
@@ -0,0 +1,18 @@
|
|
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
|
+
expandedIndex: number;
|
6
|
+
data: ArticleRequest;
|
7
|
+
path: string;
|
8
|
+
categories: any[];
|
9
|
+
isLoadingCategories: boolean;
|
10
|
+
optionKey: string;
|
11
|
+
onDuplicate: (data: ArticleRequest) => void;
|
12
|
+
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
13
|
+
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
14
|
+
onOpenCategoryMenu: (path: string) => void;
|
15
|
+
onCloseCategoryMenu: () => void;
|
16
|
+
}
|
17
|
+
declare const _default: React.NamedExoticComponent<Props>;
|
18
|
+
export default _default;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { FormikProps } from "formik";
|
3
|
+
import { ChapterRequest, QuestionGroupRequest, TextbookRequest } from "../configs/types";
|
4
|
+
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
data: ChapterRequest;
|
6
|
+
expandedIndex: number;
|
7
|
+
path: string;
|
8
|
+
open: boolean;
|
9
|
+
paths: number[];
|
10
|
+
isMath: boolean;
|
11
|
+
isLoadingCategories: boolean;
|
12
|
+
optionKey: string;
|
13
|
+
categories: any[];
|
14
|
+
isLoadingQuestionTypes: boolean;
|
15
|
+
questionTypes: any[];
|
16
|
+
onToggle: (index: number) => void;
|
17
|
+
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
18
|
+
onCopiedPrevQuestionGroup: (path: string, paths: number[]) => QuestionGroupRequest | undefined;
|
19
|
+
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
20
|
+
onOpenCategoryMenu: (path: string) => void;
|
21
|
+
onCloseCategoryMenu: () => void;
|
22
|
+
onOpenQuestionTypeMenu: (path: string) => void;
|
23
|
+
onCloseQuestionTypeMenu: () => void;
|
24
|
+
}
|
25
|
+
declare const ChapterBlock: FC<Props>;
|
26
|
+
export default ChapterBlock;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { FormikProps } from "formik";
|
3
|
+
import { ChapterRequest, QuestionGroupRequest, TextbookRequest } from "../configs/types";
|
4
|
+
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
path: string;
|
6
|
+
isMath: boolean;
|
7
|
+
questionGroups: QuestionGroupRequest[];
|
8
|
+
subChapters: ChapterRequest[];
|
9
|
+
paths: number[];
|
10
|
+
isLoadingCategories: boolean;
|
11
|
+
optionKey: string;
|
12
|
+
categories: any[];
|
13
|
+
isLoadingQuestionTypes: boolean;
|
14
|
+
questionTypes: any[];
|
15
|
+
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
16
|
+
onCopiedPrevQuestionGroup: (path: string, paths: number[]) => QuestionGroupRequest | undefined;
|
17
|
+
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
18
|
+
onOpenCategoryMenu: (path: string) => void;
|
19
|
+
onCloseCategoryMenu: () => void;
|
20
|
+
onOpenQuestionTypeMenu: (path: string) => void;
|
21
|
+
onCloseQuestionTypeMenu: () => void;
|
22
|
+
}
|
23
|
+
declare const ChapterBlockBody: FC<Props>;
|
24
|
+
export default ChapterBlockBody;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import React from "react";
|
2
2
|
declare type Props = {
|
3
|
-
|
3
|
+
values: any;
|
4
4
|
errors: any;
|
5
5
|
index: number;
|
6
6
|
academyId?: number;
|
7
7
|
onChangeFieldValue: any;
|
8
8
|
};
|
9
|
-
declare const OwnerSelector: ({
|
9
|
+
declare const OwnerSelector: ({ values, errors, index, academyId, onChangeFieldValue }: Props) => React.JSX.Element;
|
10
10
|
export default OwnerSelector;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { FormikProps } from "formik";
|
2
|
+
import React, { FC } from "react";
|
3
|
+
import { TextbookRequest } from "../configs/types";
|
4
|
+
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
isAdmin?: boolean;
|
6
|
+
textbookId?: string;
|
7
|
+
selected: number;
|
8
|
+
coverImage?: string;
|
9
|
+
onUploadImage: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
10
|
+
onChangeTab: (_: React.SyntheticEvent, newValue: number) => void;
|
11
|
+
}
|
12
|
+
declare const PreparedTextbookForm: FC<Props>;
|
13
|
+
export default PreparedTextbookForm;
|
@@ -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
|
+
isDisabled?: 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,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
|
+
isDisabled?: 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) => void;
|
25
|
+
onCloseQuestionTypeMenu: () => void;
|
26
|
+
}
|
27
|
+
declare const QuestionGroupBlock: FC<Props>;
|
28
|
+
export default QuestionGroupBlock;
|
@@ -0,0 +1,22 @@
|
|
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
|
+
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
|
+
onOpenQuestionTypeMenu: (path: string) => void;
|
19
|
+
onCloseQuestionTypeMenu: () => void;
|
20
|
+
}
|
21
|
+
declare const _default: React.NamedExoticComponent<Props>;
|
22
|
+
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,7 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { FormikProps } from "formik";
|
3
|
+
import { TextbookRequest } from "../configs/types";
|
4
|
+
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
}
|
6
|
+
declare const TextbookContentsTab: FC<Props>;
|
7
|
+
export default TextbookContentsTab;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React, { FC } from "react";
|
2
|
+
import { FormikProps } from "formik";
|
3
|
+
import { TextbookRequest } from "../configs/types";
|
4
|
+
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
coverImage?: string;
|
6
|
+
isAdmin?: boolean;
|
7
|
+
textbookId?: string;
|
8
|
+
handleUploadImage: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
9
|
+
}
|
10
|
+
declare const TextbookInfoTab: FC<Props>;
|
11
|
+
export default TextbookInfoTab;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { FormikProps } from "formik";
|
3
|
+
import { TextbookRequest } from "../configs/types";
|
4
|
+
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
}
|
6
|
+
declare const TextbookOwnersTab: ({ errors, values, setFieldValue }: Props) => React.JSX.Element;
|
7
|
+
export default TextbookOwnersTab;
|
@@ -1,5 +1,31 @@
|
|
1
1
|
import { Exam, QuestionAnswerType } from "../../../utils";
|
2
|
-
import {
|
2
|
+
import { HighSchoolGrade } from "./enums";
|
3
|
+
import { ArticleRequest, ChapterRequest, HeaderTable, QuestionGroupRequest, QuestionRequest, TextbookQuery, TextbookRequest } from "./types";
|
4
|
+
import * as yup from "yup";
|
5
|
+
export declare const SCHOOL_OPTIONS: {
|
6
|
+
label: string;
|
7
|
+
value: number;
|
8
|
+
}[];
|
9
|
+
export declare const SEMESTER_OPTIONS: {
|
10
|
+
label: string | number;
|
11
|
+
value: number;
|
12
|
+
}[];
|
13
|
+
export declare const CHAPTERS_OPTIONS: {
|
14
|
+
label: string | number;
|
15
|
+
value: number;
|
16
|
+
}[];
|
17
|
+
export declare const ELEMANTARY_GRADES: {
|
18
|
+
label: string | number;
|
19
|
+
value: number;
|
20
|
+
}[];
|
21
|
+
export declare const MIDDLE_GRADES: {
|
22
|
+
label: string | number;
|
23
|
+
value: number;
|
24
|
+
}[];
|
25
|
+
export declare const HIGH_GRADES: {
|
26
|
+
label: string;
|
27
|
+
value: HighSchoolGrade;
|
28
|
+
}[];
|
3
29
|
export declare const TEXTBOOK_HEADERS: HeaderTable[];
|
4
30
|
export declare const DefaultTextbookFilter: TextbookQuery;
|
5
31
|
export declare const DATE_FORMAT = "YYYY-MM-DD";
|
@@ -33,3 +59,33 @@ export declare const DURATION_OPTIONS: number[];
|
|
33
59
|
export declare const DEFAULT_ANSWER_COUNT = 5;
|
34
60
|
export declare const DEFAULT_SCORE = 2;
|
35
61
|
export declare const DEFAULT_EXAM: Exam;
|
62
|
+
export declare const preparedTextbookSchema: (t: any) => yup.ObjectSchema<{
|
63
|
+
name: string;
|
64
|
+
subjectId: number;
|
65
|
+
preparedType: string;
|
66
|
+
publicationDate: string;
|
67
|
+
publisher: string;
|
68
|
+
isbn: string;
|
69
|
+
grade: number;
|
70
|
+
type: number | undefined;
|
71
|
+
chapters: {
|
72
|
+
questionGroups: any;
|
73
|
+
subChapters: any;
|
74
|
+
}[];
|
75
|
+
}, yup.AnyObject, {
|
76
|
+
name: undefined;
|
77
|
+
subjectId: undefined;
|
78
|
+
preparedType: undefined;
|
79
|
+
publicationDate: undefined;
|
80
|
+
publisher: undefined;
|
81
|
+
isbn: undefined;
|
82
|
+
grade: undefined;
|
83
|
+
type: undefined;
|
84
|
+
chapters: "";
|
85
|
+
}, "">;
|
86
|
+
export declare const DEFAULT_TEXTBOOK_REQUEST: TextbookRequest;
|
87
|
+
export declare const DEFAULT_CHAPTER: ChapterRequest;
|
88
|
+
export declare const DEFAULT_QUESTION: QuestionRequest;
|
89
|
+
export declare const DEFAULT_QUESTION_GROUP: QuestionGroupRequest;
|
90
|
+
export declare const DEFAULT_ARTICLE: ArticleRequest;
|
91
|
+
export declare const DEFAULT_MATH_QUESTION_GROUP: QuestionGroupRequest;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export declare enum SchoolType {
|
2
|
+
Default = 0,
|
3
|
+
Elemantary = 1,
|
4
|
+
Middle = 2,
|
5
|
+
High = 3
|
6
|
+
}
|
7
|
+
export declare enum HighSchoolGrade {
|
8
|
+
Default = 0,
|
9
|
+
AdvancedMathematics1 = 1,
|
10
|
+
AdvancedMathematics2 = 2,
|
11
|
+
Algebra = 3,
|
12
|
+
Calculus1 = 4,
|
13
|
+
Calculus2 = 5,
|
14
|
+
FunWithMeasurement = 6,
|
15
|
+
Geometry = 7
|
16
|
+
}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { TextbookDetailResponse } from "./types";
|
2
|
+
export declare const reduceToMathArticles: (textbook: any, isMath: number, isInit?: boolean) => any;
|
3
|
+
export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetailResponse | undefined) => import("./types").TextbookRequest;
|