touchstudy-core 0.1.143 → 0.1.145
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/README.md +46 -46
- package/dist/add-ts-nocheck.js +33 -0
- package/dist/components/CkEditor/CkEditor.d.ts +2 -11
- 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 +5 -6
- package/dist/components/Tables/VirtualTableView.d.ts +1 -1
- package/dist/components/Tables/configs/interfaces.d.ts +4 -11
- package/dist/containers/Notes/components/NoteItem.d.ts +0 -1
- 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 +0 -1
- package/dist/containers/PreparedTextbook/components/ChapterBlock.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/ChapterBlockBody.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/CourseSelector.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/OwnerSelector.d.ts +2 -3
- package/dist/containers/PreparedTextbook/components/PreparedTextbookForm.d.ts +0 -5
- 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 +0 -1
- package/dist/containers/PreparedTextbook/components/TextbookContentsTab.d.ts +0 -1
- package/dist/containers/PreparedTextbook/components/TextbookInfoTab.d.ts +1 -3
- package/dist/containers/PreparedTextbook/components/TextbookOwnersTab.d.ts +1 -2
- package/dist/containers/PreparedTextbook/configs/constants.d.ts +0 -2
- package/dist/containers/PreparedTextbook/configs/enums.d.ts +0 -5
- package/dist/containers/PreparedTextbook/configs/functions.d.ts +3 -17
- package/dist/containers/PreparedTextbook/configs/interfaces.d.ts +0 -2
- package/dist/containers/PreparedTextbook/configs/types.d.ts +3 -5
- package/dist/containers/PreparedTextbook/hooks/useExamDetailView.d.ts +1 -3
- package/dist/containers/PreparedTextbook/hooks/useSelect.d.ts +10 -8
- package/dist/containers/PreparedTextbook/hooks/useTextbookManagement.d.ts +1 -8
- package/dist/containers/Textbooks/configs/types.d.ts +0 -2
- package/dist/containers/Textbooks/hooks/useTextbookList.d.ts +2 -5
- package/dist/containers/Textbooks/hooks/useTextbookShare.d.ts +2 -0
- package/dist/index.css +12 -12
- package/dist/index.js +768 -1373
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +780 -1376
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/constants.d.ts +10 -2
- package/dist/utils/index.d.ts +0 -1
- package/package.json +102 -102
- package/dist/StudyTouch_Character_v1_Question~jLFvuYmI.png +0 -0
- 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/ErrorHandler.d.ts +0 -6
- package/dist/components/LabelRequired.d.ts +0 -8
- package/dist/components/Selectors/InActiveAcademySelector.d.ts +0 -16
- package/dist/containers/Academies/hooks/usePassCodeDialog.d.ts +0 -10
- package/dist/containers/ExamResult/components/MyAnswer/components/CreateNewQuestion.d.ts +0 -15
- package/dist/containers/Exams/configs/types.d.ts +0 -22
- package/dist/containers/PreparedTextbook/apiClients/academyService.d.ts +0 -1
- 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/tests/performances/do-exam-session-list-student.d.ts +0 -19
- package/dist/tests/performances/do-exam-session-request-answer-one-time.d.ts +0 -19
- package/dist/tests/performances/do-exam-session-skip-answer.d.ts +0 -19
- package/dist/tests/performances/do-exam-session2.d.ts +0 -19
- 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/README.md
CHANGED
@@ -1,46 +1,46 @@
|
|
1
|
-
# Getting Started with Create React App
|
2
|
-
|
3
|
-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
4
|
-
|
5
|
-
## Available Scripts
|
6
|
-
|
7
|
-
In the project directory, you can run:
|
8
|
-
|
9
|
-
### `npm start`
|
10
|
-
|
11
|
-
Runs the app in the development mode.\
|
12
|
-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
13
|
-
|
14
|
-
The page will reload if you make edits.\
|
15
|
-
You will also see any lint errors in the console.
|
16
|
-
|
17
|
-
### `npm test`
|
18
|
-
|
19
|
-
Launches the test runner in the interactive watch mode.\
|
20
|
-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
21
|
-
|
22
|
-
### `npm run build`
|
23
|
-
|
24
|
-
Builds the app for production to the `build` folder.\
|
25
|
-
It correctly bundles React in production mode and optimizes the build for the best performance.
|
26
|
-
|
27
|
-
The build is minified and the filenames include the hashes.\
|
28
|
-
Your app is ready to be deployed!
|
29
|
-
|
30
|
-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
31
|
-
|
32
|
-
### `npm run eject`
|
33
|
-
|
34
|
-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
35
|
-
|
36
|
-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
37
|
-
|
38
|
-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
39
|
-
|
40
|
-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
41
|
-
|
42
|
-
## Learn More
|
43
|
-
|
44
|
-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
45
|
-
|
46
|
-
To learn React, check out the [React documentation](https://reactjs.org/).
|
1
|
+
# Getting Started with Create React App
|
2
|
+
|
3
|
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
4
|
+
|
5
|
+
## Available Scripts
|
6
|
+
|
7
|
+
In the project directory, you can run:
|
8
|
+
|
9
|
+
### `npm start`
|
10
|
+
|
11
|
+
Runs the app in the development mode.\
|
12
|
+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
13
|
+
|
14
|
+
The page will reload if you make edits.\
|
15
|
+
You will also see any lint errors in the console.
|
16
|
+
|
17
|
+
### `npm test`
|
18
|
+
|
19
|
+
Launches the test runner in the interactive watch mode.\
|
20
|
+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
21
|
+
|
22
|
+
### `npm run build`
|
23
|
+
|
24
|
+
Builds the app for production to the `build` folder.\
|
25
|
+
It correctly bundles React in production mode and optimizes the build for the best performance.
|
26
|
+
|
27
|
+
The build is minified and the filenames include the hashes.\
|
28
|
+
Your app is ready to be deployed!
|
29
|
+
|
30
|
+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
31
|
+
|
32
|
+
### `npm run eject`
|
33
|
+
|
34
|
+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
35
|
+
|
36
|
+
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
37
|
+
|
38
|
+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
39
|
+
|
40
|
+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
41
|
+
|
42
|
+
## Learn More
|
43
|
+
|
44
|
+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
45
|
+
|
46
|
+
To learn React, check out the [React documentation](https://reactjs.org/).
|
@@ -0,0 +1,33 @@
|
|
1
|
+
const fs = require('fs');
|
2
|
+
const path = require('path');
|
3
|
+
|
4
|
+
// Recursively find all .ts and .tsx files in the src directory
|
5
|
+
const directoryPath = path.join(__dirname, 'src'); // Adjust to your src directory
|
6
|
+
|
7
|
+
function addTsNoCheck(filePath) {
|
8
|
+
const fileContent = fs.readFileSync(filePath, 'utf-8');
|
9
|
+
|
10
|
+
// Add // @ts-nocheck only if it's not already added
|
11
|
+
if (!fileContent.startsWith('// @ts-nocheck')) {
|
12
|
+
const newContent = `// @ts-nocheck\n${fileContent}`;
|
13
|
+
fs.writeFileSync(filePath, newContent, 'utf-8');
|
14
|
+
console.log(`Added // @ts-nocheck to ${filePath}`);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
function walkDirectory(dir) {
|
19
|
+
const files = fs.readdirSync(dir);
|
20
|
+
|
21
|
+
files.forEach(file => {
|
22
|
+
const fullPath = path.join(dir, file);
|
23
|
+
const stat = fs.statSync(fullPath);
|
24
|
+
|
25
|
+
if (stat.isDirectory()) {
|
26
|
+
walkDirectory(fullPath); // Recursively walk directories
|
27
|
+
} else if (fullPath.endsWith('.ts') || fullPath.endsWith('.tsx')) {
|
28
|
+
addTsNoCheck(fullPath); // Add // @ts-nocheck to each TypeScript file
|
29
|
+
}
|
30
|
+
});
|
31
|
+
}
|
32
|
+
|
33
|
+
walkDirectory(directoryPath);
|
@@ -1,19 +1,10 @@
|
|
1
|
-
import React from
|
1
|
+
import React from 'react';
|
2
2
|
interface Props {
|
3
3
|
ref?: any;
|
4
4
|
value: string;
|
5
5
|
onChange: any;
|
6
6
|
option?: any;
|
7
|
-
onBlur?: any;
|
8
|
-
onFocus?: any;
|
9
|
-
onAfterInsertHtml?: any;
|
10
|
-
onInsertElement?: any;
|
11
|
-
onInsertHtml?: any;
|
12
|
-
onInsertText?: any;
|
13
|
-
onDataReady?: any;
|
14
|
-
onSelectionChange?: any;
|
15
|
-
action?: any;
|
16
7
|
disabled: boolean;
|
17
8
|
}
|
18
|
-
declare const CkEditor: ({ ref, value,
|
9
|
+
declare const CkEditor: ({ ref, value, onChange, option, disabled }: Props) => React.JSX.Element;
|
19
10
|
export default CkEditor;
|
@@ -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
|
9
|
+
renderItem: (item: T, index: number) => 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
|
6
|
+
renderItem: (item: T, index: number) => 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,
|
2
|
+
declare const CustomSelect: ({ isDefault, defaultValue, options, isDisabled, scrollBottom, value, isMulti, optionValue, ...rest }: any) => React.JSX.Element;
|
3
3
|
export default CustomSelect;
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
2
|
-
import {
|
1
|
+
import { FC, ReactElement } from "react";
|
2
|
+
import { GridCellProps } from "react-virtualized";
|
3
3
|
interface VirtualTableRowItemProps extends GridCellProps {
|
4
4
|
isLoading?: boolean;
|
5
|
-
renderItem: (rowIndex: number, columnIndex: number
|
5
|
+
renderItem: (rowIndex: number, columnIndex: number) => ReactElement;
|
6
6
|
loadingElement?: ReactElement;
|
7
|
-
cellMeasurerCache: CellMeasurerCache;
|
8
7
|
}
|
9
|
-
declare const
|
10
|
-
export default
|
8
|
+
declare const VirtualTableRowItem: FC<VirtualTableRowItemProps>;
|
9
|
+
export default VirtualTableRowItem;
|
@@ -1,21 +1,14 @@
|
|
1
1
|
import { BoxProps } from "@mui/material";
|
2
|
-
import { CSSProperties, ReactElement
|
3
|
-
|
4
|
-
|
2
|
+
import { CSSProperties, ReactElement } from "react";
|
3
|
+
export interface VirtualTableViewProps<T> {
|
4
|
+
data: T[];
|
5
5
|
loading: boolean;
|
6
|
-
hasHeader?: boolean;
|
7
6
|
containerProps?: BoxProps;
|
8
7
|
columnCount: number;
|
9
8
|
listHeight?: number;
|
10
9
|
listWidth?: number;
|
11
|
-
containerRef?: RefObject<HTMLDivElement>;
|
12
|
-
multiGridRef?: RefObject<MultiGrid>;
|
13
10
|
overscanRowCount?: number;
|
14
|
-
|
15
|
-
itemsCount: number;
|
16
|
-
cellCache?: CellMeasurerCache;
|
17
|
-
columnWidth?: number | ((params: Index, cache: CellMeasurerCache) => number);
|
18
|
-
renderItem: (rowIndex: number, columnIndex: number, measure: () => void) => ReactElement;
|
11
|
+
renderItem: (item: T, index: number) => ReactElement;
|
19
12
|
onLoadMore?: () => void;
|
20
13
|
emptyElement?: ReactElement;
|
21
14
|
loadingElement?: ReactElement;
|
@@ -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 getAcademyByTeacher: (email: string, isAdmin?: boolean | undefined) => 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;
|
11
12
|
email: string;
|
12
13
|
minimumTextSearchLength?: number;
|
13
14
|
options: any;
|
14
|
-
defaultValue: any;
|
15
15
|
}
|
16
16
|
declare const AcademySelector: FC<Props>;
|
17
17
|
export default AcademySelector;
|
@@ -8,7 +8,6 @@ interface Props extends PropsWithChildren, FormikProps<TextbookRequest> {
|
|
8
8
|
categories: any[];
|
9
9
|
isLoadingCategories: boolean;
|
10
10
|
optionKey: string;
|
11
|
-
disabled?: boolean;
|
12
11
|
onDuplicate: (data: ArticleRequest) => void;
|
13
12
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
14
13
|
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
@@ -13,7 +13,6 @@ interface Props extends FormikProps<TextbookRequest> {
|
|
13
13
|
categories: any[];
|
14
14
|
isLoadingQuestionTypes: boolean;
|
15
15
|
questionTypes: any[];
|
16
|
-
disabled?: boolean;
|
17
16
|
onToggle: (index: number) => void;
|
18
17
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
19
18
|
onCopiedPrevQuestionGroup: (path: string, paths: number[]) => QuestionGroupRequest | undefined;
|
@@ -12,7 +12,6 @@ interface Props extends FormikProps<TextbookRequest> {
|
|
12
12
|
categories: any[];
|
13
13
|
isLoadingQuestionTypes: boolean;
|
14
14
|
questionTypes: any[];
|
15
|
-
disabled?: boolean;
|
16
15
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
17
16
|
onCopiedPrevQuestionGroup: (path: string, paths: number[]) => QuestionGroupRequest | undefined;
|
18
17
|
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
@@ -3,9 +3,8 @@ declare type Props = {
|
|
3
3
|
values: any;
|
4
4
|
errors: any;
|
5
5
|
index: number;
|
6
|
-
|
6
|
+
academyId?: number;
|
7
7
|
onChangeFieldValue: any;
|
8
|
-
disabled?: boolean;
|
9
8
|
};
|
10
|
-
declare const OwnerSelector: ({ values, errors, index,
|
9
|
+
declare const OwnerSelector: ({ values, errors, index, academyId, onChangeFieldValue }: Props) => React.JSX.Element;
|
11
10
|
export default OwnerSelector;
|
@@ -2,15 +2,10 @@ 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;
|
8
5
|
isAdmin?: boolean;
|
9
6
|
textbookId?: string;
|
10
7
|
selected: number;
|
11
8
|
coverImage?: string;
|
12
|
-
disabled?: boolean;
|
13
|
-
ownersDisabled?: boolean;
|
14
9
|
onUploadImage: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
15
10
|
onChangeTab: (_: React.SyntheticEvent, newValue: number) => void;
|
16
11
|
}
|
@@ -7,7 +7,7 @@ interface Props extends PropsWithChildren, FormikProps<TextbookRequest> {
|
|
7
7
|
answerCount: number;
|
8
8
|
path: string;
|
9
9
|
isMath: boolean;
|
10
|
-
|
10
|
+
isDisabled?: 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
|
+
isDisabled?: 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,7 +11,6 @@ interface Props extends FormikProps<TextbookRequest> {
|
|
11
11
|
categories: any[];
|
12
12
|
isLoadingQuestionTypes: boolean;
|
13
13
|
questionTypes: any[];
|
14
|
-
disabled?: boolean;
|
15
14
|
onDelete: (text: string, confirmText: string, path: string, index: number) => void;
|
16
15
|
onOpenSubCategoryMenu: (path: string, id?: number) => void;
|
17
16
|
onOpenCategoryMenu: (path: string) => void;
|
@@ -2,7 +2,6 @@ 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;
|
6
5
|
}
|
7
6
|
declare const TextbookContentsTab: FC<Props>;
|
8
7
|
export default TextbookContentsTab;
|
@@ -2,11 +2,9 @@ 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;
|
6
5
|
coverImage?: string;
|
7
|
-
|
6
|
+
isAdmin?: boolean;
|
8
7
|
textbookId?: string;
|
9
|
-
disabled?: boolean;
|
10
8
|
handleUploadImage: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
11
9
|
}
|
12
10
|
declare const TextbookInfoTab: FC<Props>;
|
@@ -2,7 +2,6 @@ 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;
|
6
5
|
}
|
7
|
-
declare const TextbookOwnersTab: ({ errors, values,
|
6
|
+
declare const TextbookOwnersTab: ({ errors, values, setFieldValue }: Props) => React.JSX.Element;
|
8
7
|
export default TextbookOwnersTab;
|
@@ -68,7 +68,6 @@ export declare const preparedTextbookSchema: (t: any) => yup.ObjectSchema<{
|
|
68
68
|
isbn: string;
|
69
69
|
grade: number;
|
70
70
|
type: number | undefined;
|
71
|
-
textbookOwners: {}[] | undefined;
|
72
71
|
chapters: {
|
73
72
|
questionGroups: any;
|
74
73
|
subChapters: any;
|
@@ -82,7 +81,6 @@ export declare const preparedTextbookSchema: (t: any) => yup.ObjectSchema<{
|
|
82
81
|
isbn: undefined;
|
83
82
|
grade: undefined;
|
84
83
|
type: undefined;
|
85
|
-
textbookOwners: "";
|
86
84
|
chapters: "";
|
87
85
|
}, "">;
|
88
86
|
export declare const DEFAULT_TEXTBOOK_REQUEST: TextbookRequest;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { TextbookDetailResponse } from "./types";
|
2
|
-
import { QuestionAnswerType } from "../../../utils";
|
3
2
|
export declare const reduceToMathArticles: (textbook: any, isMath?: number | undefined) => any;
|
4
3
|
export declare const resetAllCategoriesAndQuestionTypesBySubject: (textbook: any, subject?: any) => any;
|
5
4
|
export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetailResponse | undefined) => import("./types").TextbookRequest | {
|
@@ -15,19 +14,7 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
15
14
|
publisher: string;
|
16
15
|
isbn: string;
|
17
16
|
coverImage: string;
|
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
|
-
}[];
|
17
|
+
textbookOwners: import("./types").TextbookOwner[];
|
31
18
|
isPublic: boolean;
|
32
19
|
isShared: boolean;
|
33
20
|
isPrepared: boolean;
|
@@ -52,7 +39,7 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
52
39
|
score: number;
|
53
40
|
questionOrder: number;
|
54
41
|
textualAnswer: string;
|
55
|
-
questionAnswerType: QuestionAnswerType;
|
42
|
+
questionAnswerType: import("../../..").QuestionAnswerType;
|
56
43
|
questionTypeName?: string | undefined;
|
57
44
|
}[];
|
58
45
|
articles: {
|
@@ -90,7 +77,7 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
90
77
|
score: number;
|
91
78
|
questionOrder: number;
|
92
79
|
textualAnswer: string;
|
93
|
-
questionAnswerType: QuestionAnswerType;
|
80
|
+
questionAnswerType: import("../../..").QuestionAnswerType;
|
94
81
|
questionTypeName?: string | undefined;
|
95
82
|
}[];
|
96
83
|
articles: {
|
@@ -112,4 +99,3 @@ export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetai
|
|
112
99
|
}[];
|
113
100
|
}[];
|
114
101
|
};
|
115
|
-
export declare const handleKeyDown: (e: any) => void;
|
@@ -102,23 +102,21 @@ export declare type TextbookDetailResponse = {
|
|
102
102
|
textbookOwners: TextbookOwner[];
|
103
103
|
isPrepared?: boolean;
|
104
104
|
type: number;
|
105
|
-
createdBy?: any;
|
106
|
-
isCreatedByAdmin?: boolean;
|
107
105
|
};
|
108
106
|
export declare type Academy = {
|
109
107
|
id: number;
|
110
108
|
name: string;
|
109
|
+
courses: Course[];
|
111
110
|
};
|
112
111
|
export declare type Course = {
|
113
|
-
id:
|
112
|
+
id: 1;
|
114
113
|
name: string;
|
114
|
+
teacherEmails: string[];
|
115
115
|
};
|
116
116
|
export declare type TextbookOwner = {
|
117
117
|
email: string;
|
118
118
|
academyId: number;
|
119
119
|
courseId: number;
|
120
|
-
academy: any;
|
121
|
-
course: any;
|
122
120
|
};
|
123
121
|
export declare type TextbookResponse = {
|
124
122
|
id: number;
|
@@ -12,10 +12,8 @@ interface Props {
|
|
12
12
|
declare const useExamDetailView: (props: Props) => {
|
13
13
|
t: any;
|
14
14
|
categoryList: Category[];
|
15
|
-
handleChangeTextualAnswer: (article: number, index: number, value: string) => void;
|
16
|
-
handleChangeQuestionAnswerType: (article: number, index: number, value: number) => void;
|
17
15
|
handleChangeScoreAnswer: (article: number, index: number, score: number) => void;
|
18
|
-
handleChangeCorrectAnswers: (article: number, index: number, answer: number
|
16
|
+
handleChangeCorrectAnswers: (article: number, index: number, answer: number) => void;
|
19
17
|
handleChangeAnswerCount: (article: number, newAnswerCount: number, answerCount: number) => void;
|
20
18
|
handleChangeQuestionCount: (article: number, questionCount: number, answerCount: number) => void;
|
21
19
|
handleChangeCategory: (_: number, values: any) => void;
|
@@ -1,16 +1,18 @@
|
|
1
1
|
declare type Props = {
|
2
|
-
|
2
|
+
academyId?: number;
|
3
|
+
handleChangeEmail: any;
|
3
4
|
};
|
4
|
-
declare const useSelect: ({
|
5
|
+
declare const useSelect: ({ academyId, handleChangeEmail }: Props) => {
|
5
6
|
t: any;
|
7
|
+
loadData: any;
|
6
8
|
isLoading: boolean;
|
7
|
-
|
8
|
-
label: any;
|
9
|
-
value: any;
|
10
|
-
}[];
|
11
|
-
courses: {
|
9
|
+
academyOptions: {
|
12
10
|
label: string;
|
13
|
-
value:
|
11
|
+
value: number;
|
14
12
|
}[];
|
13
|
+
courseOptions: {
|
14
|
+
label: string;
|
15
|
+
value: 1;
|
16
|
+
}[] | undefined;
|
15
17
|
};
|
16
18
|
export default useSelect;
|
@@ -1,23 +1,16 @@
|
|
1
1
|
import { ChapterResponse, TextbookRequest, TextbookDetailResponse } from "../configs/types";
|
2
|
-
import { Role } from "../../../utils";
|
3
2
|
import { FormikHelpers } from "formik";
|
4
3
|
declare type Props = {
|
5
|
-
role: Role;
|
6
4
|
textbookId?: string;
|
7
5
|
onNavigateList: () => void;
|
8
6
|
};
|
9
|
-
declare const useTextbookManagement: ({ textbookId,
|
7
|
+
declare const useTextbookManagement: ({ textbookId, onNavigateList }: Props) => {
|
10
8
|
t: any;
|
11
|
-
isAdminSite: boolean;
|
12
|
-
disabledTextbookOwners: any;
|
13
|
-
isReadonly: boolean;
|
14
|
-
isEditable: any;
|
15
9
|
isAdmin: any;
|
16
10
|
theme: import("@mui/material").Theme;
|
17
11
|
history: History;
|
18
12
|
coverImage: string | undefined;
|
19
13
|
isSuperAdmin: boolean;
|
20
|
-
isSuperAdminUser: any;
|
21
14
|
openDialog: boolean;
|
22
15
|
handleSubmit: (values: TextbookRequest, _formikHelpers: FormikHelpers<TextbookRequest>) => Promise<void>;
|
23
16
|
selectedTextbook: TextbookDetailResponse | undefined;
|
@@ -2,13 +2,10 @@
|
|
2
2
|
import { TextbookResponse } from "../configs/types";
|
3
3
|
import { TextbookListProps } from "../views/TextbookList";
|
4
4
|
declare const useTextbookList: (props: TextbookListProps) => {
|
5
|
-
|
6
|
-
isTeacherSite: boolean;
|
7
|
-
isTeacher: boolean;
|
8
|
-
filter: import("../../../utils").SearchQuery;
|
5
|
+
filter: import("../../..").SearchQuery;
|
9
6
|
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
10
7
|
getData: (isLoading?: boolean) => Promise<void>;
|
11
|
-
paging: import("
|
8
|
+
paging: import("../../..").PagingResponse;
|
12
9
|
textbooks: TextbookResponse[];
|
13
10
|
selectedTextbook: TextbookResponse | undefined;
|
14
11
|
handleSort: (sortColumnName: string) => void;
|
@@ -30,6 +30,8 @@ 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;
|
33
35
|
isAdmin: any;
|
34
36
|
isAdminSite: boolean;
|
35
37
|
};
|