touchstudy-core 0.1.145 → 0.1.146
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/Inputs/SearchInput.d.ts +3 -0
- package/dist/components/List/configs/interfaces.d.ts +1 -1
- package/dist/components/List/partials/VirtualListItem.d.ts +1 -1
- package/dist/components/Selects/CustomSelect.d.ts +1 -1
- package/dist/components/Tables/VirtualTableRowItem.d.ts +6 -5
- package/dist/components/Tables/VirtualTableView.d.ts +1 -1
- package/dist/components/Tables/configs/interfaces.d.ts +11 -4
- package/dist/containers/Login/hooks/useLoginPhoneNumber.d.ts +4 -0
- package/dist/containers/Notes/components/NoteItem.d.ts +1 -0
- package/dist/containers/Notes/configs/enums.d.ts +4 -0
- package/dist/containers/Notes/configs/interfaces.d.ts +1 -0
- package/dist/containers/Notes/configs/types.d.ts +2 -2
- package/dist/containers/PreparedExam/configs/types.d.ts +6 -0
- package/dist/containers/PreparedTextbook/apiClients/textbookService.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/AcademySelector.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/ArticleBlock.d.ts +1 -0
- package/dist/containers/PreparedTextbook/components/ChapterBlock.d.ts +1 -0
- package/dist/containers/PreparedTextbook/components/ChapterBlockBody.d.ts +1 -0
- package/dist/containers/PreparedTextbook/components/CourseSelector.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/OwnerSelector.d.ts +3 -2
- package/dist/containers/PreparedTextbook/components/PreparedTextbookForm.d.ts +5 -0
- package/dist/containers/PreparedTextbook/components/QuestionBlock.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/QuestionGroupBlock.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/QuestionGroupBlockBody.d.ts +2 -0
- package/dist/containers/PreparedTextbook/components/TextbookContentsTab.d.ts +1 -0
- package/dist/containers/PreparedTextbook/components/TextbookInfoTab.d.ts +3 -1
- package/dist/containers/PreparedTextbook/components/TextbookOwnersTab.d.ts +2 -1
- package/dist/containers/PreparedTextbook/configs/constants.d.ts +2 -0
- package/dist/containers/PreparedTextbook/configs/enums.d.ts +5 -0
- package/dist/containers/PreparedTextbook/configs/functions.d.ts +23 -4
- package/dist/containers/PreparedTextbook/configs/interfaces.d.ts +2 -0
- package/dist/containers/PreparedTextbook/configs/types.d.ts +9 -3
- package/dist/containers/PreparedTextbook/hooks/useSelect.d.ts +8 -10
- package/dist/containers/PreparedTextbook/hooks/useTextbookManagement.d.ts +8 -1
- package/dist/containers/Textbooks/configs/types.d.ts +2 -0
- package/dist/containers/Textbooks/hooks/useTextbookList.d.ts +5 -2
- package/dist/containers/Textbooks/hooks/useTextbookShare.d.ts +0 -2
- package/dist/index.css +3 -3
- package/dist/index.js +1825 -907
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1838 -927
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/constants.d.ts +2 -10
- package/dist/utils/enums/index.d.ts +3 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/types/note.d.ts +3 -1
- package/package.json +2 -2
@@ -1,9 +1,12 @@
|
|
1
|
+
import { SxProps, Theme } from "@mui/material";
|
1
2
|
import { ChangeEvent, FC, RefObject } from "react";
|
2
3
|
interface Props {
|
3
4
|
textSearchRef: RefObject<HTMLInputElement>;
|
4
5
|
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
5
6
|
placeholder: string;
|
6
7
|
fit?: boolean;
|
8
|
+
sx?: SxProps<Theme>;
|
9
|
+
searchSx?: SxProps<Theme>;
|
7
10
|
}
|
8
11
|
declare const SearchInput: FC<Props>;
|
9
12
|
export default SearchInput;
|
@@ -6,7 +6,7 @@ export interface VirtualListViewProps<T> {
|
|
6
6
|
containerProps?: BoxProps;
|
7
7
|
listHeight?: number;
|
8
8
|
overscanRowCount?: number;
|
9
|
-
renderItem: (item: T, index: number) => ReactElement;
|
9
|
+
renderItem: (item: T, index: number, measure: () => void) => ReactElement;
|
10
10
|
onLoadMore?: () => void;
|
11
11
|
emptyElement?: ReactElement;
|
12
12
|
loadingElement?: ReactElement;
|
@@ -3,7 +3,7 @@ import { ListRowProps } from "react-virtualized";
|
|
3
3
|
interface VirtualListItemProps<T> extends ListRowProps {
|
4
4
|
isLoading?: boolean;
|
5
5
|
rowData?: T;
|
6
|
-
renderItem: (item: T, index: number) => ReactElement;
|
6
|
+
renderItem: (item: T, index: number, measure: () => void) => ReactElement;
|
7
7
|
loadingElement?: ReactElement;
|
8
8
|
}
|
9
9
|
declare const VirtualListItem: FC<VirtualListItemProps<any>>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import React from "react";
|
2
|
-
declare const CustomSelect: ({ isDefault, defaultValue, options, isDisabled, scrollBottom, value, isMulti, optionValue, ...rest }: any) => React.JSX.Element;
|
2
|
+
declare const CustomSelect: ({ isDefault, defaultValue, options, isDisabled, scrollBottom, value, isMulti, optionValue, styles, ...rest }: any) => React.JSX.Element;
|
3
3
|
export default CustomSelect;
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import {
|
2
|
-
import { GridCellProps } from "react-virtualized";
|
1
|
+
import React, { ReactElement } from "react";
|
2
|
+
import { CellMeasurerCache, GridCellProps } from "react-virtualized";
|
3
3
|
interface VirtualTableRowItemProps extends GridCellProps {
|
4
4
|
isLoading?: boolean;
|
5
|
-
renderItem: (rowIndex: number, columnIndex: number) => ReactElement;
|
5
|
+
renderItem: (rowIndex: number, columnIndex: number, measure: () => void) => ReactElement;
|
6
6
|
loadingElement?: ReactElement;
|
7
|
+
cellMeasurerCache: CellMeasurerCache;
|
7
8
|
}
|
8
|
-
declare const
|
9
|
-
export default
|
9
|
+
declare const _default: React.NamedExoticComponent<VirtualTableRowItemProps>;
|
10
|
+
export default _default;
|
@@ -1,14 +1,21 @@
|
|
1
1
|
import { BoxProps } from "@mui/material";
|
2
|
-
import { CSSProperties, ReactElement } from "react";
|
3
|
-
|
4
|
-
|
2
|
+
import { CSSProperties, ReactElement, RefObject } from "react";
|
3
|
+
import { CellMeasurerCache, Index, MultiGrid } from "react-virtualized";
|
4
|
+
export interface VirtualTableViewProps {
|
5
5
|
loading: boolean;
|
6
|
+
hasHeader?: boolean;
|
6
7
|
containerProps?: BoxProps;
|
7
8
|
columnCount: number;
|
8
9
|
listHeight?: number;
|
9
10
|
listWidth?: number;
|
11
|
+
containerRef?: RefObject<HTMLDivElement>;
|
12
|
+
multiGridRef?: RefObject<MultiGrid>;
|
10
13
|
overscanRowCount?: number;
|
11
|
-
|
14
|
+
overscanColumnCount?: number;
|
15
|
+
itemsCount: number;
|
16
|
+
cellCache?: CellMeasurerCache;
|
17
|
+
columnWidth?: number | ((params: Index, cache: CellMeasurerCache) => number);
|
18
|
+
renderItem: (rowIndex: number, columnIndex: number, measure: () => void) => ReactElement;
|
12
19
|
onLoadMore?: () => void;
|
13
20
|
emptyElement?: ReactElement;
|
14
21
|
loadingElement?: ReactElement;
|
@@ -7,6 +7,10 @@ declare const useLoginPhoneNumber: (props: LoginPhoneNumberProps) => {
|
|
7
7
|
tokenReCaptcha: string;
|
8
8
|
phoneNumber: string;
|
9
9
|
password: string;
|
10
|
+
passwordRef: import("react").RefObject<HTMLInputElement>;
|
11
|
+
submitBtnRef: import("react").RefObject<HTMLButtonElement>;
|
12
|
+
handlePasswordKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
13
|
+
handlePhoneKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
10
14
|
handleChangePassword: (e: ChangeEvent<HTMLInputElement>) => void;
|
11
15
|
handlePhoneNumberChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
12
16
|
handleLoginPhoneNumber: () => Promise<void>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { BaseSearchQuery } from "../../../utils";
|
2
|
-
import { NoteSortColumn } from "./enums";
|
2
|
+
import { NoteSortColumn, NoteType } from "./enums";
|
3
3
|
export declare type NoteSearchQuery = BaseSearchQuery<NoteSortColumn> & {
|
4
4
|
examCode?: string;
|
5
5
|
studentId?: number;
|
6
|
-
courseId?: number;
|
7
6
|
examSessionId?: number;
|
8
7
|
IsOwned?: boolean;
|
8
|
+
type?: NoteType;
|
9
9
|
};
|
@@ -174,6 +174,12 @@ export declare type ChapterResponse = {
|
|
174
174
|
accuracyRate?: number;
|
175
175
|
completedChapterQuestions?: number;
|
176
176
|
subChapters?: ChapterResponse[];
|
177
|
+
questionGroups?: QuestionGroupResponse[];
|
178
|
+
};
|
179
|
+
export declare type QuestionGroupResponse = {
|
180
|
+
id: number;
|
181
|
+
pageFrom?: number;
|
182
|
+
pageTo?: number;
|
177
183
|
};
|
178
184
|
export declare type ArticleResponse = {
|
179
185
|
id?: number;
|
@@ -4,5 +4,5 @@ export declare const getTextbookDetailApi: (id: string, isAdmin?: boolean | unde
|
|
4
4
|
export declare const getTextbookListApi: (query: TextbookQuery, isAdmin?: boolean | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
5
5
|
export declare const createTextbookApi: (values: any, isAdmin?: boolean | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
6
6
|
export declare const updateTextbookApi: (values: any, id: number, isAdmin?: boolean | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
7
|
-
export declare const
|
7
|
+
export declare const getCourseByTeacherAcademy: (email: string, academyId: number) => Promise<import("axios").AxiosResponse<any, any>>;
|
8
8
|
export declare const deleteTextbookApi: (textbookId: number, isAdmin?: boolean | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
@@ -8,10 +8,10 @@ interface Props {
|
|
8
8
|
isClearable?: boolean;
|
9
9
|
disabled?: boolean;
|
10
10
|
isLoading?: boolean;
|
11
|
-
valueById?: number;
|
12
11
|
email: string;
|
13
12
|
minimumTextSearchLength?: number;
|
14
13
|
options: any;
|
14
|
+
defaultValue: any;
|
15
15
|
}
|
16
16
|
declare const AcademySelector: FC<Props>;
|
17
17
|
export default AcademySelector;
|
@@ -8,6 +8,7 @@ interface Props extends PropsWithChildren, FormikProps<TextbookRequest> {
|
|
8
8
|
categories: any[];
|
9
9
|
isLoadingCategories: boolean;
|
10
10
|
optionKey: string;
|
11
|
+
disabled?: boolean;
|
11
12
|
onDuplicate: (data: ArticleRequest) => void;
|
12
13
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
13
14
|
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
@@ -13,6 +13,7 @@ interface Props extends FormikProps<TextbookRequest> {
|
|
13
13
|
categories: any[];
|
14
14
|
isLoadingQuestionTypes: boolean;
|
15
15
|
questionTypes: any[];
|
16
|
+
disabled?: boolean;
|
16
17
|
onToggle: (index: number) => void;
|
17
18
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
18
19
|
onCopiedPrevQuestionGroup: (path: string, paths: number[]) => QuestionGroupRequest | undefined;
|
@@ -12,6 +12,7 @@ interface Props extends FormikProps<TextbookRequest> {
|
|
12
12
|
categories: any[];
|
13
13
|
isLoadingQuestionTypes: boolean;
|
14
14
|
questionTypes: any[];
|
15
|
+
disabled?: boolean;
|
15
16
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
16
17
|
onCopiedPrevQuestionGroup: (path: string, paths: number[]) => QuestionGroupRequest | undefined;
|
17
18
|
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
@@ -3,8 +3,9 @@ declare type Props = {
|
|
3
3
|
values: any;
|
4
4
|
errors: any;
|
5
5
|
index: number;
|
6
|
-
|
6
|
+
email: string;
|
7
7
|
onChangeFieldValue: any;
|
8
|
+
disabled?: boolean;
|
8
9
|
};
|
9
|
-
declare const OwnerSelector: ({ values, errors, index,
|
10
|
+
declare const OwnerSelector: ({ values, errors, index, email, onChangeFieldValue, disabled }: Props) => React.JSX.Element;
|
10
11
|
export default OwnerSelector;
|
@@ -2,10 +2,15 @@ import { FormikProps } from "formik";
|
|
2
2
|
import React, { FC } from "react";
|
3
3
|
import { TextbookRequest } from "../configs/types";
|
4
4
|
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
isCreatedByAdmin?: boolean;
|
6
|
+
isSuperAdminUser: boolean;
|
7
|
+
isSuperAdmin?: boolean;
|
5
8
|
isAdmin?: boolean;
|
6
9
|
textbookId?: string;
|
7
10
|
selected: number;
|
8
11
|
coverImage?: string;
|
12
|
+
disabled?: boolean;
|
13
|
+
ownersDisabled?: boolean;
|
9
14
|
onUploadImage: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
10
15
|
onChangeTab: (_: React.SyntheticEvent, newValue: number) => void;
|
11
16
|
}
|
@@ -7,7 +7,7 @@ interface Props extends PropsWithChildren, FormikProps<TextbookRequest> {
|
|
7
7
|
answerCount: number;
|
8
8
|
path: string;
|
9
9
|
isMath: boolean;
|
10
|
-
|
10
|
+
disabled?: boolean;
|
11
11
|
questionTitleStyle?: SxProps<Theme>;
|
12
12
|
optionKey: string;
|
13
13
|
isLoadingQuestionTypes: boolean;
|
@@ -13,7 +13,7 @@ interface Props extends FormikProps<TextbookRequest> {
|
|
13
13
|
isLoadingQuestionTypes: boolean;
|
14
14
|
questionTypes: any[];
|
15
15
|
optionKey: string;
|
16
|
-
|
16
|
+
disabled?: boolean;
|
17
17
|
onToggle: (index: number) => void;
|
18
18
|
onQuestionCountChange: (count: number, index: number) => void;
|
19
19
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
@@ -11,6 +11,8 @@ interface Props extends FormikProps<TextbookRequest> {
|
|
11
11
|
categories: any[];
|
12
12
|
isLoadingQuestionTypes: boolean;
|
13
13
|
questionTypes: any[];
|
14
|
+
disabled?: boolean;
|
15
|
+
onQuestioStartOrderChange: (order: number) => void;
|
14
16
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
15
17
|
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
16
18
|
onOpenCategoryMenu: (path: string) => void;
|
@@ -2,6 +2,7 @@ import { FC } from "react";
|
|
2
2
|
import { FormikProps } from "formik";
|
3
3
|
import { TextbookRequest } from "../configs/types";
|
4
4
|
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
disabled?: boolean;
|
5
6
|
}
|
6
7
|
declare const TextbookContentsTab: FC<Props>;
|
7
8
|
export default TextbookContentsTab;
|
@@ -2,9 +2,11 @@ import React, { FC } from "react";
|
|
2
2
|
import { FormikProps } from "formik";
|
3
3
|
import { TextbookRequest } from "../configs/types";
|
4
4
|
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
isCreatedByAdmin?: boolean;
|
5
6
|
coverImage?: string;
|
6
|
-
|
7
|
+
isSuperAdminUser?: boolean;
|
7
8
|
textbookId?: string;
|
9
|
+
disabled?: boolean;
|
8
10
|
handleUploadImage: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
9
11
|
}
|
10
12
|
declare const TextbookInfoTab: FC<Props>;
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
2
2
|
import { FormikProps } from "formik";
|
3
3
|
import { TextbookRequest } from "../configs/types";
|
4
4
|
interface Props extends FormikProps<TextbookRequest> {
|
5
|
+
disabled?: boolean;
|
5
6
|
}
|
6
|
-
declare const TextbookOwnersTab: ({ errors, values, setFieldValue }: Props) => React.JSX.Element;
|
7
|
+
declare const TextbookOwnersTab: ({ errors, values, disabled, setFieldValue }: Props) => React.JSX.Element;
|
7
8
|
export default TextbookOwnersTab;
|
@@ -68,6 +68,7 @@ export declare const preparedTextbookSchema: (t: any) => yup.ObjectSchema<{
|
|
68
68
|
isbn: string;
|
69
69
|
grade: number;
|
70
70
|
type: number | undefined;
|
71
|
+
textbookOwners: {}[] | undefined;
|
71
72
|
chapters: {
|
72
73
|
questionGroups: any;
|
73
74
|
subChapters: any;
|
@@ -81,6 +82,7 @@ export declare const preparedTextbookSchema: (t: any) => yup.ObjectSchema<{
|
|
81
82
|
isbn: undefined;
|
82
83
|
grade: undefined;
|
83
84
|
type: undefined;
|
85
|
+
textbookOwners: "";
|
84
86
|
chapters: "";
|
85
87
|
}, "">;
|
86
88
|
export declare const DEFAULT_TEXTBOOK_REQUEST: TextbookRequest;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { TextbookDetailResponse } from "./types";
|
1
|
+
import { QuestionGroupRequest, TextbookDetailResponse } from "./types";
|
2
|
+
import { QuestionAnswerType } from "../../../utils";
|
2
3
|
export declare const reduceToMathArticles: (textbook: any, isMath?: number | undefined) => any;
|
3
4
|
export declare const resetAllCategoriesAndQuestionTypesBySubject: (textbook: any, subject?: any) => any;
|
4
5
|
export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetailResponse | undefined) => import("./types").TextbookRequest | {
|
@@ -14,7 +15,19 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
14
15
|
publisher: string;
|
15
16
|
isbn: string;
|
16
17
|
coverImage: string;
|
17
|
-
textbookOwners:
|
18
|
+
textbookOwners: {
|
19
|
+
academy: {
|
20
|
+
label: any;
|
21
|
+
value: any;
|
22
|
+
} | null;
|
23
|
+
course: {
|
24
|
+
label: any;
|
25
|
+
value: any;
|
26
|
+
} | null;
|
27
|
+
email: string;
|
28
|
+
academyId: number;
|
29
|
+
courseId: number;
|
30
|
+
}[];
|
18
31
|
isPublic: boolean;
|
19
32
|
isShared: boolean;
|
20
33
|
isPrepared: boolean;
|
@@ -27,6 +40,8 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
27
40
|
questionGroups: {
|
28
41
|
id: number;
|
29
42
|
chapterId: number;
|
43
|
+
pageFrom: number | undefined;
|
44
|
+
pageTo: number | undefined;
|
30
45
|
questions: {
|
31
46
|
questionTypeId: any;
|
32
47
|
questionType: {
|
@@ -39,7 +54,7 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
39
54
|
score: number;
|
40
55
|
questionOrder: number;
|
41
56
|
textualAnswer: string;
|
42
|
-
questionAnswerType:
|
57
|
+
questionAnswerType: QuestionAnswerType;
|
43
58
|
questionTypeName?: string | undefined;
|
44
59
|
}[];
|
45
60
|
articles: {
|
@@ -65,6 +80,8 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
65
80
|
questionGroups: {
|
66
81
|
id: number;
|
67
82
|
chapterId: number;
|
83
|
+
pageFrom: number | undefined;
|
84
|
+
pageTo: number | undefined;
|
68
85
|
questions: {
|
69
86
|
questionTypeId: any;
|
70
87
|
questionType: {
|
@@ -77,7 +94,7 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
77
94
|
score: number;
|
78
95
|
questionOrder: number;
|
79
96
|
textualAnswer: string;
|
80
|
-
questionAnswerType:
|
97
|
+
questionAnswerType: QuestionAnswerType;
|
81
98
|
questionTypeName?: string | undefined;
|
82
99
|
}[];
|
83
100
|
articles: {
|
@@ -99,3 +116,5 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
99
116
|
}[];
|
100
117
|
}[];
|
101
118
|
};
|
119
|
+
export declare const handleKeyDown: (e: any) => void;
|
120
|
+
export declare const isSequentialQuestionGroups: (questionGroups: QuestionGroupRequest[]) => boolean;
|
@@ -60,6 +60,8 @@ export declare type ChapterRequest = {
|
|
60
60
|
};
|
61
61
|
export declare type QuestionGroupRequest = {
|
62
62
|
id?: number;
|
63
|
+
pageFrom?: number;
|
64
|
+
pageTo?: number;
|
63
65
|
answerCount: number;
|
64
66
|
questionCount: number;
|
65
67
|
questions: QuestionRequest[];
|
@@ -102,21 +104,23 @@ export declare type TextbookDetailResponse = {
|
|
102
104
|
textbookOwners: TextbookOwner[];
|
103
105
|
isPrepared?: boolean;
|
104
106
|
type: number;
|
107
|
+
createdBy?: any;
|
108
|
+
isCreatedByAdmin?: boolean;
|
105
109
|
};
|
106
110
|
export declare type Academy = {
|
107
111
|
id: number;
|
108
112
|
name: string;
|
109
|
-
courses: Course[];
|
110
113
|
};
|
111
114
|
export declare type Course = {
|
112
|
-
id:
|
115
|
+
id: number;
|
113
116
|
name: string;
|
114
|
-
teacherEmails: string[];
|
115
117
|
};
|
116
118
|
export declare type TextbookOwner = {
|
117
119
|
email: string;
|
118
120
|
academyId: number;
|
119
121
|
courseId: number;
|
122
|
+
academy: any;
|
123
|
+
course: any;
|
120
124
|
};
|
121
125
|
export declare type TextbookResponse = {
|
122
126
|
id: number;
|
@@ -143,6 +147,8 @@ export declare type ArticleResponse = {
|
|
143
147
|
};
|
144
148
|
export declare type QuestionGroupResponse = {
|
145
149
|
id: number;
|
150
|
+
pageFrom?: number;
|
151
|
+
pageTo?: number;
|
146
152
|
chapterId?: number;
|
147
153
|
questions: Question[];
|
148
154
|
articles: ArticleResponse[];
|
@@ -1,18 +1,16 @@
|
|
1
1
|
declare type Props = {
|
2
|
-
|
3
|
-
handleChangeEmail: any;
|
2
|
+
email: string;
|
4
3
|
};
|
5
|
-
declare const useSelect: ({
|
4
|
+
declare const useSelect: ({ email }: Props) => {
|
6
5
|
t: any;
|
7
|
-
loadData: any;
|
8
6
|
isLoading: boolean;
|
9
|
-
|
10
|
-
label:
|
11
|
-
value:
|
7
|
+
academies: {
|
8
|
+
label: any;
|
9
|
+
value: any;
|
12
10
|
}[];
|
13
|
-
|
11
|
+
courses: {
|
14
12
|
label: string;
|
15
|
-
value:
|
16
|
-
}[]
|
13
|
+
value: any;
|
14
|
+
}[];
|
17
15
|
};
|
18
16
|
export default useSelect;
|
@@ -1,16 +1,23 @@
|
|
1
1
|
import { ChapterResponse, TextbookRequest, TextbookDetailResponse } from "../configs/types";
|
2
|
+
import { Role } from "../../../utils";
|
2
3
|
import { FormikHelpers } from "formik";
|
3
4
|
declare type Props = {
|
5
|
+
role: Role;
|
4
6
|
textbookId?: string;
|
5
7
|
onNavigateList: () => void;
|
6
8
|
};
|
7
|
-
declare const useTextbookManagement: ({ textbookId, onNavigateList }: Props) => {
|
9
|
+
declare const useTextbookManagement: ({ textbookId, role, onNavigateList }: Props) => {
|
8
10
|
t: any;
|
11
|
+
isAdminSite: boolean;
|
12
|
+
disabledTextbookOwners: boolean;
|
13
|
+
isReadonly: boolean;
|
14
|
+
isEditable: any;
|
9
15
|
isAdmin: any;
|
10
16
|
theme: import("@mui/material").Theme;
|
11
17
|
history: History;
|
12
18
|
coverImage: string | undefined;
|
13
19
|
isSuperAdmin: boolean;
|
20
|
+
isSuperAdminUser: any;
|
14
21
|
openDialog: boolean;
|
15
22
|
handleSubmit: (values: TextbookRequest, _formikHelpers: FormikHelpers<TextbookRequest>) => Promise<void>;
|
16
23
|
selectedTextbook: TextbookDetailResponse | undefined;
|
@@ -2,10 +2,13 @@
|
|
2
2
|
import { TextbookResponse } from "../configs/types";
|
3
3
|
import { TextbookListProps } from "../views/TextbookList";
|
4
4
|
declare const useTextbookList: (props: TextbookListProps) => {
|
5
|
-
|
5
|
+
user: any;
|
6
|
+
isTeacherSite: boolean;
|
7
|
+
isTeacher: boolean;
|
8
|
+
filter: import("../../../utils").SearchQuery;
|
6
9
|
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
7
10
|
getData: (isLoading?: boolean) => Promise<void>;
|
8
|
-
paging: import("
|
11
|
+
paging: import("../../../utils").PagingResponse;
|
9
12
|
textbooks: TextbookResponse[];
|
10
13
|
selectedTextbook: TextbookResponse | undefined;
|
11
14
|
handleSort: (sortColumnName: string) => void;
|
@@ -30,8 +30,6 @@ declare const useTextbookShare: (props: TextbookShareProps) => {
|
|
30
30
|
isUpdate: boolean;
|
31
31
|
handleUpdateSharedTextbook: (teacherIds: number[], textbookId: number) => Promise<void>;
|
32
32
|
currentModel: TextbookResponse | undefined;
|
33
|
-
enabledSave: (textbook: TextbookResponse) => any;
|
34
|
-
enabledShare: (textbook: TextbookResponse) => any;
|
35
33
|
isAdmin: any;
|
36
34
|
isAdminSite: boolean;
|
37
35
|
};
|
package/dist/index.css
CHANGED
@@ -1409,7 +1409,7 @@
|
|
1409
1409
|
|
1410
1410
|
._11aYm {
|
1411
1411
|
width: 70vw;
|
1412
|
-
height: calc(
|
1412
|
+
height: calc(100dvh - 78px);
|
1413
1413
|
position: fixed;
|
1414
1414
|
right: -100%;
|
1415
1415
|
bottom: 0;
|
@@ -1582,7 +1582,7 @@
|
|
1582
1582
|
@charset "UTF-8";
|
1583
1583
|
._1k4kj {
|
1584
1584
|
width: 70vw;
|
1585
|
-
height: calc(
|
1585
|
+
height: calc(100dvh - 78px);
|
1586
1586
|
position: fixed;
|
1587
1587
|
right: -100%;
|
1588
1588
|
bottom: 0;
|
@@ -1593,7 +1593,7 @@
|
|
1593
1593
|
|
1594
1594
|
._xnHGE {
|
1595
1595
|
width: 100vw;
|
1596
|
-
height:
|
1596
|
+
height: 100dvh;
|
1597
1597
|
background-color: rgba(0, 0, 0, 0);
|
1598
1598
|
position: fixed;
|
1599
1599
|
right: 0;
|