touchstudy-core 0.1.139 → 0.1.141
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/StudyTouch_Character_v1_Question~jLFvuYmI.png +0 -0
- package/dist/components/Chats/ChatHeader.d.ts +25 -0
- package/dist/components/Chats/ChatItem.d.ts +31 -0
- package/dist/components/Chats/ChatLeftItem.d.ts +4 -0
- package/dist/components/Chats/ChatList.d.ts +14 -0
- package/dist/components/Chats/ChatRightItem.d.ts +4 -0
- package/dist/components/Chats/InputChat.d.ts +16 -0
- package/dist/components/Chats/components/CustomTooltip.d.ts +2 -0
- package/dist/components/CkEditor/CkEditor.d.ts +19 -0
- package/dist/components/CkEditor/config.d.ts +19 -0
- package/dist/components/CkEditor/index.d.ts +2 -0
- package/dist/components/ErrorHandler.d.ts +6 -0
- package/dist/components/LabelRequired.d.ts +8 -0
- package/dist/components/List/configs/interfaces.d.ts +1 -1
- package/dist/components/List/partials/VirtualListItem.d.ts +1 -1
- package/dist/components/Selectors/InActiveAcademySelector.d.ts +16 -0
- 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/components/Tables/hooks/useVirtualTableView.d.ts +7 -0
- package/dist/containers/Academies/hooks/usePassCodeDialog.d.ts +10 -0
- package/dist/containers/ExamResult/components/MyAnswer/components/CreateNewQuestion.d.ts +15 -0
- package/dist/containers/Exams/configs/types.d.ts +22 -0
- package/dist/containers/Notes/components/NoteItem.d.ts +1 -0
- package/dist/containers/PreparedTextbook/apiClients/academyService.d.ts +1 -0
- package/dist/containers/PreparedTextbook/apiClients/textbookService.d.ts +1 -1
- package/dist/containers/PreparedTextbook/components/AcademySelector.d.ts +1 -0
- package/dist/containers/PreparedTextbook/components/Article.d.ts +2 -3
- package/dist/containers/PreparedTextbook/components/OwnerSelector.d.ts +2 -2
- package/dist/containers/PreparedTextbook/components/PreparedTextbookForm.d.ts +1 -0
- package/dist/containers/PreparedTextbook/components/TextbookOwners.d.ts +13 -0
- package/dist/containers/PreparedTextbook/configs/types.d.ts +1 -3
- package/dist/containers/PreparedTextbook/hooks/useSelect.d.ts +8 -10
- package/dist/containers/Users/components/Dialogs/DeleteUserCsvDialog.d.ts +10 -0
- package/dist/containers/Users/components/Dialogs/RecentUserActionDialog.d.ts +9 -0
- package/dist/containers/Users/components/Dialogs/UserDialog.d.ts +12 -0
- package/dist/index.css +9 -9
- package/dist/index.js +762 -454
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +764 -465
- package/dist/index.modern.js.map +1 -1
- package/dist/tests/performances/do-exam-session-list-student.d.ts +19 -0
- package/dist/tests/performances/do-exam-session-request-answer-one-time.d.ts +19 -0
- package/dist/tests/performances/do-exam-session-skip-answer.d.ts +19 -0
- package/dist/tests/performances/do-exam-session2.d.ts +19 -0
- package/dist/utils/canAccessRoute.d.ts +2 -0
- package/dist/utils/constants.d.ts +2 -10
- package/dist/utils/diffFromNow.d.ts +3 -0
- package/dist/utils/encodeParams.d.ts +2 -0
- package/dist/utils/formatTime.d.ts +4 -0
- package/dist/utils/getAcademyDomain.d.ts +2 -0
- package/dist/utils/getAccessToken.d.ts +2 -0
- package/dist/utils/getErrorMessage.d.ts +1 -0
- package/dist/utils/getLanguage.d.ts +2 -0
- package/dist/utils/getLearningSpace.d.ts +2 -0
- package/dist/utils/getRedirectUrl.d.ts +2 -0
- package/dist/utils/helpers.d.ts +22 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/isLocalHost.d.ts +2 -0
- package/dist/utils/minutesToTimeSpan.d.ts +2 -0
- package/dist/utils/pusherTo.d.ts +1 -0
- package/dist/utils/times.d.ts +6 -0
- package/dist/utils/toISOString.d.ts +2 -0
- package/dist/utils/toLocalTime.d.ts +1 -0
- package/dist/utils/types/checkSuperUrl.d.ts +1 -0
- package/dist/utils/types.d.ts +9 -0
- package/dist/utils/utcToLocalTime.d.ts +2 -0
- package/package.json +102 -102
- package/dist/.DS_Store +0 -0
- package/dist/components/.DS_Store +0 -0
- package/dist/containers/.DS_Store +0 -0
- package/dist/redux/.DS_Store +0 -0
- package/dist/utils/.DS_Store +0 -0
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/).
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
export interface IExamOption {
|
3
|
+
id: number;
|
4
|
+
code: string;
|
5
|
+
title: string;
|
6
|
+
createdAt: string;
|
7
|
+
startTime: string;
|
8
|
+
}
|
9
|
+
export interface IChatHeaderProps {
|
10
|
+
fullName?: string;
|
11
|
+
examTitle?: string;
|
12
|
+
createdAt?: string;
|
13
|
+
durationExam?: string;
|
14
|
+
score?: number | null;
|
15
|
+
totalScore?: number | null;
|
16
|
+
courseId?: number | null;
|
17
|
+
category?: string | null;
|
18
|
+
questionOrder?: number;
|
19
|
+
conversationId?: number;
|
20
|
+
isCompleted?: boolean;
|
21
|
+
teacherName?: string;
|
22
|
+
roles?: Array<string>;
|
23
|
+
}
|
24
|
+
declare const ChatHeader: FC<IChatHeaderProps>;
|
25
|
+
export default ChatHeader;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { StudentsConversationResponse } from "./configs/types";
|
3
|
+
export interface IChatItemProps {
|
4
|
+
id?: number;
|
5
|
+
isMe?: boolean;
|
6
|
+
avatar?: string;
|
7
|
+
content?: string;
|
8
|
+
createdAt: string;
|
9
|
+
sender?: StudentsConversationResponse;
|
10
|
+
isRead: boolean;
|
11
|
+
contentType?: number;
|
12
|
+
conversationId?: number;
|
13
|
+
}
|
14
|
+
export interface IChatItemWithActionProps extends IChatItemProps {
|
15
|
+
onReTrySendMessage?: () => void;
|
16
|
+
handleUpdateMessage: (conversationId: number, id: number, message: string, callback: any) => void;
|
17
|
+
handleDeleteMessage: (conversationId: number, id: number, callback: any) => void;
|
18
|
+
showTimestamp?: boolean;
|
19
|
+
showName?: boolean;
|
20
|
+
isStudent?: boolean;
|
21
|
+
toggleImageDialog?: () => void;
|
22
|
+
toggleConfirmDialog?: () => void;
|
23
|
+
toggleUpdateDialog?: () => void;
|
24
|
+
}
|
25
|
+
export declare enum ChatItemType {
|
26
|
+
Default = 0,
|
27
|
+
Exam = 1,
|
28
|
+
Class = 2
|
29
|
+
}
|
30
|
+
declare const ChatItem: FC<IChatItemWithActionProps>;
|
31
|
+
export default ChatItem;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React, { FC } from "react";
|
2
|
+
import { IChatItemProps } from "./ChatItem";
|
3
|
+
export interface IChatListProps {
|
4
|
+
messages?: IChatItemProps[];
|
5
|
+
onReTrySendMessage?: () => void;
|
6
|
+
roles: Array<String>;
|
7
|
+
handleUpdateMessage: (conversationId: number, id: number, message: string, callback: any) => Promise<void>;
|
8
|
+
handleDeleteMessage: (conversationId: number, id: number, callback: any) => Promise<void>;
|
9
|
+
}
|
10
|
+
interface Props extends IChatListProps {
|
11
|
+
listItemRef: React.RefObject<HTMLUListElement>;
|
12
|
+
}
|
13
|
+
declare const ChatList: FC<Props>;
|
14
|
+
export default ChatList;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React, { FC } from "react";
|
2
|
+
import { MessageRequest } from "./configs/types";
|
3
|
+
export interface IInputChatProps {
|
4
|
+
text: string;
|
5
|
+
onSubmit: () => void;
|
6
|
+
onChangeInput: (text: string) => void;
|
7
|
+
isCompleted?: boolean;
|
8
|
+
handleUploadImage: (file: File) => void;
|
9
|
+
selectedFile?: MessageRequest | null;
|
10
|
+
handleDeleteSelectedImage: () => void;
|
11
|
+
}
|
12
|
+
interface Props extends IInputChatProps {
|
13
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
14
|
+
}
|
15
|
+
declare const InputChat: FC<Props>;
|
16
|
+
export default InputChat;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React from "react";
|
2
|
+
interface Props {
|
3
|
+
ref?: any;
|
4
|
+
value: string;
|
5
|
+
onChange: any;
|
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
|
+
disabled: boolean;
|
17
|
+
}
|
18
|
+
declare const CkEditor: ({ ref, value, option, onBlur, onFocus, onChange, onAfterInsertHtml, onInsertElement, onInsertHtml, onInsertText, onDataReady, onSelectionChange, disabled, ...action }: Props) => React.JSX.Element;
|
19
|
+
export default CkEditor;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export declare const config: {
|
2
|
+
height: number;
|
3
|
+
allowedContent: boolean;
|
4
|
+
toolbar: (string | string[] | {
|
5
|
+
name: string;
|
6
|
+
groups: string[];
|
7
|
+
items: string[];
|
8
|
+
} | {
|
9
|
+
name: string;
|
10
|
+
items: string[];
|
11
|
+
groups?: undefined;
|
12
|
+
} | {
|
13
|
+
name: string;
|
14
|
+
groups?: undefined;
|
15
|
+
items?: undefined;
|
16
|
+
})[];
|
17
|
+
filebrowserImageUploadUrl: string;
|
18
|
+
filebrowserUploadUrl: string;
|
19
|
+
};
|
@@ -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>>;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { Role } from "../../utils/constants";
|
3
|
+
interface Props {
|
4
|
+
value?: any;
|
5
|
+
onChange: any;
|
6
|
+
externalAcademyIds?: number[];
|
7
|
+
title?: string;
|
8
|
+
isMulti?: boolean;
|
9
|
+
minimumTextSearchLength?: number;
|
10
|
+
isDisabled?: boolean;
|
11
|
+
defaultValueAtFirst?: boolean;
|
12
|
+
placeholder?: string;
|
13
|
+
role: Role;
|
14
|
+
}
|
15
|
+
declare const InActiveAcademySelector: FC<Props>;
|
16
|
+
export default InActiveAcademySelector;
|
@@ -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;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ScrollParams } from "react-virtualized";
|
2
|
+
import { VirtualTableViewProps } from "../configs/interfaces";
|
3
|
+
declare const useVirtualTableView: (props: VirtualTableViewProps) => {
|
4
|
+
rowCount: number;
|
5
|
+
onScroll: ({ scrollTop, clientHeight, scrollHeight }: ScrollParams) => void;
|
6
|
+
};
|
7
|
+
export default useVirtualTableView;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
declare const usePassCodeDialog: () => {
|
2
|
+
isStudent: any;
|
3
|
+
isOpenDialog: boolean;
|
4
|
+
handleOpenDialog: () => void;
|
5
|
+
handleCloseDialog: () => void;
|
6
|
+
handleSubmit: () => Promise<void>;
|
7
|
+
textCodeValue: string;
|
8
|
+
handleChangeText: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
9
|
+
};
|
10
|
+
export default usePassCodeDialog;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare type Props = {
|
3
|
+
openCreateQuestionDialog: boolean;
|
4
|
+
toggleCreateQuestion: () => void;
|
5
|
+
handleCreateQuestion: any;
|
6
|
+
questionOrderSelected?: number;
|
7
|
+
examSessionId?: number;
|
8
|
+
textbookSessionId?: number;
|
9
|
+
questionOptions: {
|
10
|
+
label: string;
|
11
|
+
value: number;
|
12
|
+
}[];
|
13
|
+
};
|
14
|
+
export default function CreateNewQuestionDialog({ handleCreateQuestion, openCreateQuestionDialog, toggleCreateQuestion, examSessionId, textbookSessionId, questionOrderSelected, questionOptions }: Props): React.JSX.Element;
|
15
|
+
export {};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
export declare type Question = {
|
2
|
+
id?: number;
|
3
|
+
numberOfAnswers: number;
|
4
|
+
correctAnswers: number[];
|
5
|
+
score: number;
|
6
|
+
categoryId?: number;
|
7
|
+
article: number;
|
8
|
+
questionOrder: number;
|
9
|
+
};
|
10
|
+
export declare type Exam = {
|
11
|
+
title: string;
|
12
|
+
subjectId: number;
|
13
|
+
duration: number;
|
14
|
+
questions: Question[];
|
15
|
+
};
|
16
|
+
export declare type ArticleGroup = {
|
17
|
+
article: number;
|
18
|
+
categoryId?: number;
|
19
|
+
answerCount: number;
|
20
|
+
questionCount: number;
|
21
|
+
questions: Question[];
|
22
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getAcademiesApi: (textSearch: string, isAdmin: boolean) => Promise<import("axios").AxiosResponse<any, any>>;
|
@@ -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>>;
|
@@ -1,9 +1,8 @@
|
|
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;
|
7
6
|
theme: Theme;
|
8
7
|
articleIndex: number;
|
9
8
|
textbookState: any;
|
@@ -17,5 +16,5 @@ declare type Props = {
|
|
17
16
|
subChapter?: ChapterResponse;
|
18
17
|
chapter?: ChapterResponse;
|
19
18
|
};
|
20
|
-
declare const Article: ({ t,
|
19
|
+
declare const Article: ({ t, articleIndex, subChapterIndex, chapterIndex, article, values, textbookState, subChapter, chapter, subjectId, handleRedirect, onChangeFieldValue }: Props) => React.JSX.Element;
|
21
20
|
export default Article;
|
@@ -3,8 +3,8 @@ declare type Props = {
|
|
3
3
|
values: any;
|
4
4
|
errors: any;
|
5
5
|
index: number;
|
6
|
-
|
6
|
+
email: string;
|
7
7
|
onChangeFieldValue: any;
|
8
8
|
};
|
9
|
-
declare const OwnerSelector: ({ values, errors, index,
|
9
|
+
declare const OwnerSelector: ({ values, errors, index, email, onChangeFieldValue, }: Props) => React.JSX.Element;
|
10
10
|
export default OwnerSelector;
|
@@ -2,6 +2,7 @@ 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
|
+
isSuperAdmin?: boolean;
|
5
6
|
isAdmin?: boolean;
|
6
7
|
textbookId?: string;
|
7
8
|
selected: number;
|
@@ -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;
|
@@ -106,12 +106,10 @@ export declare type TextbookDetailResponse = {
|
|
106
106
|
export declare type Academy = {
|
107
107
|
id: number;
|
108
108
|
name: string;
|
109
|
-
courses: Course[];
|
110
109
|
};
|
111
110
|
export declare type Course = {
|
112
|
-
id:
|
111
|
+
id: number;
|
113
112
|
name: string;
|
114
|
-
teacherEmails: string[];
|
115
113
|
};
|
116
114
|
export declare type TextbookOwner = {
|
117
115
|
email: string;
|
@@ -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;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
interface Props {
|
3
|
+
open: boolean;
|
4
|
+
file?: File;
|
5
|
+
onChangeFile: (file?: File) => void;
|
6
|
+
onClose: () => void;
|
7
|
+
onSubmit: () => Promise<boolean>;
|
8
|
+
}
|
9
|
+
declare const DeleteUserCsvDialog: FC<Props>;
|
10
|
+
export default DeleteUserCsvDialog;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { Types } from "../../../..";
|
3
|
+
interface Props {
|
4
|
+
open: boolean;
|
5
|
+
onClose: () => void;
|
6
|
+
recentUserActions?: Types.RecentUserActionResponse[];
|
7
|
+
}
|
8
|
+
declare const RecentUserActionDialog: FC<Props>;
|
9
|
+
export default RecentUserActionDialog;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { UserForm } from "../../configs/types";
|
3
|
+
import { User } from "../../../../utils/types/users";
|
4
|
+
interface Props {
|
5
|
+
open: boolean;
|
6
|
+
data?: User;
|
7
|
+
disabled?: boolean;
|
8
|
+
onClose: () => void;
|
9
|
+
onSubmitForm: (data: UserForm) => void;
|
10
|
+
}
|
11
|
+
declare const UserDialog: FC<Props>;
|
12
|
+
export default UserDialog;
|