touchstudy-core 0.1.82 → 0.1.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/components/Chats/configs/types.d.ts +1 -0
  2. package/dist/components/ErrorHandler.d.ts +6 -0
  3. package/dist/components/LabelRequired.d.ts +8 -0
  4. package/dist/containers/Classes/apiClients/classService.d.ts +16 -0
  5. package/dist/containers/Classes/apiClients/teacherService.d.ts +2 -0
  6. package/dist/containers/Classes/components/ClassForm.d.ts +4 -0
  7. package/dist/containers/Classes/components/CorrectAnswerSelector.d.ts +7 -0
  8. package/dist/containers/Classes/components/LessonFormBody.d.ts +4 -0
  9. package/dist/containers/Classes/components/LessonFormDialog.d.ts +14 -0
  10. package/dist/containers/Classes/components/LessonList.d.ts +27 -0
  11. package/dist/containers/Classes/components/SelectDialog.d.ts +30 -0
  12. package/dist/containers/Classes/components/StudentList.d.ts +21 -0
  13. package/dist/containers/Classes/components/TeacherList.d.ts +21 -0
  14. package/dist/containers/Classes/components/TeacherSelector.d.ts +11 -0
  15. package/dist/containers/Classes/configs/constants.d.ts +70 -0
  16. package/dist/containers/Classes/configs/interfaces.d.ts +23 -0
  17. package/dist/containers/Classes/configs/types.d.ts +215 -0
  18. package/dist/containers/Classes/hooks/useClassDetail.d.ts +105 -0
  19. package/dist/containers/Classes/hooks/useClassList.d.ts +20 -0
  20. package/dist/containers/Classes/hooks/useLessonClassList.d.ts +20 -0
  21. package/dist/containers/Classes/hooks/useStudentClassList.d.ts +22 -0
  22. package/dist/containers/Classes/hooks/useTab.d.ts +5 -0
  23. package/dist/containers/Classes/hooks/useTeacherClassList.d.ts +22 -0
  24. package/dist/containers/Classes/hooks/useTeacherList.d.ts +6 -0
  25. package/dist/containers/Classes/views/ClassDetail.d.ts +10 -0
  26. package/dist/containers/Classes/views/ClassList.d.ts +10 -0
  27. package/dist/containers/Login/apiClient/index.d.ts +15 -0
  28. package/dist/containers/Login/configs/helpers.d.ts +1 -0
  29. package/dist/containers/Login/hooks/useLogin.d.ts +21 -4
  30. package/dist/containers/Login/hooks/useLoginWithEmail.d.ts +10 -0
  31. package/dist/containers/Login/views/Login.d.ts +1 -1
  32. package/dist/containers/Login/views/LoginWithEmail.d.ts +11 -0
  33. package/dist/containers/Login/views/block/BlockLogin.d.ts +15 -1
  34. package/dist/containers/Select/Category/hook/useCategorySelect.d.ts +0 -1
  35. package/dist/containers/Textbooks/apiClient/articleService.d.ts +5 -6
  36. package/dist/containers/Textbooks/apiClient/chapterService.d.ts +5 -6
  37. package/dist/containers/Textbooks/apiClient/textbookService.d.ts +5 -6
  38. package/dist/containers/Textbooks/hooks/useTextbookDetail.d.ts +2 -0
  39. package/dist/containers/Users/apiClient/userService.d.ts +9 -0
  40. package/dist/containers/Users/components/Dialogs/DeleteUserCsvDialog.d.ts +10 -0
  41. package/dist/containers/Users/components/Dialogs/RecentUserActionDialog.d.ts +9 -0
  42. package/dist/containers/Users/components/Dialogs/UserDialog.d.ts +12 -0
  43. package/dist/containers/Users/configs/constants.d.ts +37 -0
  44. package/dist/containers/Users/configs/types.d.ts +11 -0
  45. package/dist/containers/Users/hooks/useExportUsersCsv.d.ts +5 -0
  46. package/dist/containers/Users/hooks/useRecentUserAction.d.ts +10 -0
  47. package/dist/containers/Users/hooks/useUserList.d.ts +40 -0
  48. package/dist/containers/Users/views/UserList.d.ts +7 -0
  49. package/dist/index.css +6 -0
  50. package/dist/index.d.ts +2 -1
  51. package/dist/index.js +625 -229
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.modern.js +624 -229
  54. package/dist/index.modern.js.map +1 -1
  55. package/dist/services/recentUserActionService.d.ts +4 -4
  56. package/dist/utils/enums/UserSortColumn.d.ts +11 -0
  57. package/dist/utils/toLocalTime.d.ts +1 -0
  58. package/dist/utils/types/login.d.ts +1 -0
  59. package/dist/utils/types/recentUserAction.d.ts +1 -2
  60. package/dist/utils/types/user.d.ts +3 -0
  61. package/dist/utils/types/users.d.ts +17 -0
  62. package/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ import { ChangeEvent } from "react";
2
+ import { StudentClassQuery, UserClassSortBy, StudentClassResponse } from "../configs/types";
3
+ import _ from "lodash";
4
+ import { PagingResponse } from "../../../utils/types/pagingResponse";
5
+ declare const useStudentClassList: (courseId: number) => {
6
+ paging: PagingResponse;
7
+ classList: StudentClassResponse[];
8
+ filter: StudentClassQuery;
9
+ selectedStudent: StudentClassResponse | undefined;
10
+ t: any;
11
+ textSearchRef: import("react").RefObject<HTMLInputElement>;
12
+ debounceSearch: _.DebouncedFunc<() => void>;
13
+ handleOpenDeleteClassDialog: (value: StudentClassResponse) => void;
14
+ handleCloseConfirmDialog: () => void;
15
+ handleSort: (key: UserClassSortBy) => void;
16
+ handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
17
+ handleChangePage: (_: any, page: number) => void;
18
+ handleRemoveStudentFromClass: () => Promise<void>;
19
+ getStudents: () => Promise<void>;
20
+ resetData: () => void;
21
+ };
22
+ export default useStudentClassList;
@@ -0,0 +1,5 @@
1
+ declare const useTab: () => {
2
+ selected: number;
3
+ handleChangeTab: (newValue: number) => void;
4
+ };
5
+ export default useTab;
@@ -0,0 +1,22 @@
1
+ import { ChangeEvent } from "react";
2
+ import { StudentClassQuery, TeacherClassResponse, UserClassSortBy } from "../configs/types";
3
+ import _ from "lodash";
4
+ import { PagingResponse } from "../../../utils/types/pagingResponse";
5
+ declare const useTeacherClassList: (courseId: number) => {
6
+ paging: PagingResponse;
7
+ classList: TeacherClassResponse[];
8
+ filter: StudentClassQuery;
9
+ selectedTeacher: TeacherClassResponse | undefined;
10
+ t: any;
11
+ textSearchRef: import("react").RefObject<HTMLInputElement>;
12
+ debounceSearch: _.DebouncedFunc<() => void>;
13
+ handleOpenDeleteClassDialog: (value: TeacherClassResponse) => void;
14
+ handleCloseConfirmDialog: () => void;
15
+ handleSort: (key: UserClassSortBy) => void;
16
+ handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
17
+ handleChangePage: (_: any, page: number) => void;
18
+ handleRemoveTeacherFromClass: () => Promise<void>;
19
+ getTeachers: () => Promise<void>;
20
+ resetData: () => void;
21
+ };
22
+ export default useTeacherClassList;
@@ -0,0 +1,6 @@
1
+ import { TeacherSimpleResponse } from "../configs/types";
2
+ declare const useTeacherList: () => {
3
+ teachers: TeacherSimpleResponse[];
4
+ handleChangeTextSearch: (text: string) => void;
5
+ };
6
+ export default useTeacherList;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { Role } from "../../../utils/constants";
3
+ interface Props {
4
+ id?: string;
5
+ classListUrl: string;
6
+ history: any;
7
+ role: Role;
8
+ }
9
+ declare const ClassDetail: FC<Props>;
10
+ export default ClassDetail;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { Role } from "../../../utils/constants";
3
+ interface Props {
4
+ history: any;
5
+ role: Role;
6
+ classCreateUrl?: string;
7
+ classUpdateUrl?: string;
8
+ }
9
+ declare const ClassList: FC<Props>;
10
+ export default ClassList;
@@ -4,6 +4,21 @@ export declare const signInApi: ({ email, password, role }: {
4
4
  password: string;
5
5
  role: string;
6
6
  }) => Promise<import("axios").AxiosResponse<any, any>>;
7
+ export declare const signInWithEmailApi: ({ academyDomain, email, reCaptcha }: {
8
+ academyDomain: string;
9
+ email: string;
10
+ reCaptcha: string;
11
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
12
+ export declare const signInWithOTPApi: ({ academyDomain, otp, role }: {
13
+ academyDomain: string;
14
+ otp: number;
15
+ role?: string | undefined;
16
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
17
+ export declare const signInWithKeyApi: ({ academyDomain, key, role }: {
18
+ academyDomain: string;
19
+ key: string;
20
+ role?: string | undefined;
21
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
7
22
  export declare const signInSuperAdminApi: ({ email, password, role }: {
8
23
  email: string;
9
24
  password: string;
@@ -0,0 +1 @@
1
+ export declare const urlSafeFormat: (text: string) => string;
@@ -1,11 +1,24 @@
1
1
  /// <reference types="react" />
2
+ import { Role } from "../../../utils/constants";
2
3
  declare type LoginInfo = {
3
4
  email: string;
4
- password: string;
5
- captcha: string;
6
- rememberMe: boolean;
5
+ otp: number | string;
7
6
  };
8
- declare const useLogin: (homeAcademyUrl: string, homeUrl: string) => {
7
+ declare type Props = {
8
+ history: any;
9
+ homeAcademyUrl: string;
10
+ homeUrl: string;
11
+ registerUrl?: string;
12
+ role: Role;
13
+ };
14
+ declare const useLogin: ({ history, homeAcademyUrl, homeUrl, registerUrl, role }: Props) => {
15
+ isOTP: boolean;
16
+ isEmail: boolean;
17
+ onVerify: (token: string) => void;
18
+ tokenReCaptcha: string;
19
+ refreshReCaptcha: boolean;
20
+ handleSwitchOTP: (bool: boolean) => void;
21
+ handleSwitchEmail: (bool: boolean) => void;
9
22
  clientId: string | undefined;
10
23
  defaultInfo: LoginInfo;
11
24
  openLogin: boolean;
@@ -13,6 +26,10 @@ declare const useLogin: (homeAcademyUrl: string, homeUrl: string) => {
13
26
  isShowPassword: boolean;
14
27
  setIsShowPassword: import("react").Dispatch<import("react").SetStateAction<boolean>>;
15
28
  infoUser: any;
29
+ handleSubmit: (values: {
30
+ email?: string;
31
+ otp?: number;
32
+ }) => Promise<void>;
16
33
  setInfoUser: import("react").Dispatch<any>;
17
34
  };
18
35
  export default useLogin;
@@ -0,0 +1,10 @@
1
+ import { Role } from "../../../utils/constants";
2
+ declare type Props = {
3
+ history: any;
4
+ homeAcademyUrl: string;
5
+ homeUrl: string;
6
+ registerUrl?: string;
7
+ role: Role;
8
+ };
9
+ declare const useLoginWithEmail: ({ history, homeAcademyUrl, homeUrl, registerUrl, role }: Props) => {};
10
+ export default useLoginWithEmail;
@@ -2,7 +2,7 @@ import { FC } from "react";
2
2
  import { INavigateProps } from "../../../utils/types";
3
3
  import { Role } from "../../../utils/constants";
4
4
  interface Props {
5
- role?: Role;
5
+ role: Role;
6
6
  homeAcademyUrl: string;
7
7
  homeUrl: string;
8
8
  registerUrl?: string;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { Role } from '../../../utils/constants';
3
+ declare type Props = {
4
+ history: any;
5
+ homeAcademyUrl: string;
6
+ homeUrl: string;
7
+ registerUrl?: string;
8
+ role: Role;
9
+ };
10
+ declare const LoginWithEmail: ({ history, homeAcademyUrl, homeUrl, registerUrl, role }: Props) => React.JSX.Element;
11
+ export default LoginWithEmail;
@@ -2,12 +2,26 @@ import { FC } from "react";
2
2
  import { Role } from "../../../../utils/constants";
3
3
  import { INavigateProps } from "../../../../utils/types";
4
4
  interface Props {
5
- defaultInfo?: any;
5
+ isOTP: boolean;
6
+ isEmail: boolean;
7
+ tokenReCaptcha: string;
8
+ refreshReCaptcha: boolean;
9
+ onVerify: (token: string) => void;
10
+ handleSwitchEmail: (bool: boolean) => void;
11
+ handleSwitchOTP: (bool: boolean) => void;
12
+ defaultInfo: {
13
+ email: string;
14
+ otp: number | string;
15
+ };
6
16
  role?: Role;
7
17
  homeAcademyUrl: string;
8
18
  homeUrl: string;
9
19
  registerUrl?: string;
10
20
  clientId: string;
21
+ onSubmit: (values: {
22
+ email: string;
23
+ otp: number;
24
+ }) => void;
11
25
  }
12
26
  declare const BlockLogin: FC<Props & INavigateProps>;
13
27
  export default BlockLogin;
@@ -1,6 +1,5 @@
1
1
  import { Category } from "../configs/types";
2
2
  declare type Props = {
3
- subjectId?: number;
4
3
  categoryList?: Category[];
5
4
  };
6
5
  declare const useCategorySelect: ({ categoryList }: Props) => {
@@ -1,7 +1,6 @@
1
- import { Role } from "../../../utils/constants";
2
1
  import { ArticleRequest } from "../configs/types";
3
- export declare const getArticleListApi: (query: any, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
4
- export declare const getArticleByIdApi: (articleId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
5
- export declare const createArticleApi: (article: ArticleRequest, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
6
- export declare const updateArticleApi: (articleId: number, article: ArticleRequest, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
7
- export declare const deleteArticleApi: (articleId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
2
+ export declare const getArticleListApi: (query: any) => Promise<import("axios").AxiosResponse<any, any>>;
3
+ export declare const getArticleByIdApi: (articleId: number) => Promise<import("axios").AxiosResponse<any, any>>;
4
+ export declare const createArticleApi: (article: ArticleRequest) => Promise<import("axios").AxiosResponse<any, any>>;
5
+ export declare const updateArticleApi: (articleId: number, article: ArticleRequest) => Promise<import("axios").AxiosResponse<any, any>>;
6
+ export declare const deleteArticleApi: (articleId: number) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,7 +1,6 @@
1
- import { Role } from "../../../utils/constants";
2
1
  import { ChapterRequest } from "../configs/types";
3
- export declare const getChapterListApi: (query: any, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
4
- export declare const getChapterByIdApi: (chapterId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
5
- export declare const createChapterApi: (chapter: ChapterRequest, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
6
- export declare const updateChapterApi: (chapterId: number, chapter: ChapterRequest, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
7
- export declare const deleteChapterApi: (chapterId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
2
+ export declare const getChapterListApi: (query: any) => Promise<import("axios").AxiosResponse<any, any>>;
3
+ export declare const getChapterByIdApi: (chapterId: number) => Promise<import("axios").AxiosResponse<any, any>>;
4
+ export declare const createChapterApi: (chapter: ChapterRequest) => Promise<import("axios").AxiosResponse<any, any>>;
5
+ export declare const updateChapterApi: (chapterId: number, chapter: ChapterRequest) => Promise<import("axios").AxiosResponse<any, any>>;
6
+ export declare const deleteChapterApi: (chapterId: number) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,7 +1,6 @@
1
- import { Role } from "../../../utils/constants";
2
1
  import { TextbookRequest, TextbookSearchQuery, TextbookUpdateRequest } from "../configs/types";
3
- export declare const getTextbookListApi: (query: TextbookSearchQuery, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
4
- export declare const getTextbookByIdApi: (textbookId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
5
- export declare const createTextbookApi: (data: TextbookRequest, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
6
- export declare const updateTextbookApi: (textbookId: number, data: TextbookUpdateRequest, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
7
- export declare const deleteTextbookApi: (textbookId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
2
+ export declare const getTextbookListApi: (query: TextbookSearchQuery) => Promise<import("axios").AxiosResponse<any, any>>;
3
+ export declare const getTextbookByIdApi: (textbookId: number) => Promise<import("axios").AxiosResponse<any, any>>;
4
+ export declare const createTextbookApi: (data: TextbookRequest) => Promise<import("axios").AxiosResponse<any, any>>;
5
+ export declare const updateTextbookApi: (textbookId: number, data: TextbookUpdateRequest) => Promise<import("axios").AxiosResponse<any, any>>;
6
+ export declare const deleteTextbookApi: (textbookId: number) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,6 +1,7 @@
1
1
  import { ChangeEvent } from "react";
2
2
  import { ArticleCreateRequest, ArticleResponse, ChapterOption, ChapterResponse, DeleteItem, TextbookDetailResponse } from "../configs/types";
3
3
  import { TextbookDetailProps } from "../views/TextbookDetail";
4
+ import { Category } from "../../Select/Category/configs/types";
4
5
  declare const useTextbookDetail: (props: TextbookDetailProps) => {
5
6
  id: string;
6
7
  t: any;
@@ -20,6 +21,7 @@ declare const useTextbookDetail: (props: TextbookDetailProps) => {
20
21
  articlesSelected: number[];
21
22
  isOpenDialog: boolean;
22
23
  examRequest: import("../../..").Exam;
24
+ categoryList: Category[];
23
25
  handleChangeExamRequest: (value: import("../../..").Exam) => void;
24
26
  handleCheckArticle: (e: React.ChangeEvent<HTMLInputElement>, article: ArticleResponse) => void;
25
27
  handleOpenCreateExamDialog: () => void;
@@ -0,0 +1,9 @@
1
+ import { UserSearchQuery } from "../../../utils/types/users";
2
+ import { UserForm } from "../configs/types";
3
+ export declare const getUserListApi: (query: UserSearchQuery) => Promise<import("axios").AxiosResponse<any, any>>;
4
+ export declare const getUserTemplateApi: () => Promise<import("axios").AxiosResponse<any, any>>;
5
+ export declare const exportUserCsvApi: (query: UserSearchQuery) => Promise<import("axios").AxiosResponse<any, any>>;
6
+ export declare const importUserCsvApi: (data: FormData, isDelete: boolean) => Promise<import("axios").AxiosResponse<any, any>>;
7
+ export declare const updateUserApi: (data: UserForm, id: number) => Promise<import("axios").AxiosResponse<any, any>>;
8
+ export declare const createUserApi: (data: UserForm) => Promise<import("axios").AxiosResponse<any, any>>;
9
+ export declare const deleteUserApi: (id: number) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -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;
@@ -0,0 +1,37 @@
1
+ import { Role } from "../../../utils/constants";
2
+ import { UserSortColumn } from "../../../utils/enums";
3
+ import * as yup from "yup";
4
+ import { User, UserSearchQuery } from "../../../utils/types/users";
5
+ export declare const USER_HEADERS: ({
6
+ title: string;
7
+ sortKey?: undefined;
8
+ } | {
9
+ title: string;
10
+ sortKey: UserSortColumn;
11
+ })[];
12
+ export declare const DEFAULT_USER_FILTERS: UserSearchQuery;
13
+ export declare const UserSchema: yup.ObjectSchema<{
14
+ fullName: string;
15
+ email: string;
16
+ phoneNumber: string;
17
+ schoolName: string | undefined;
18
+ grade: number | null | undefined;
19
+ major: string | undefined;
20
+ parentPhoneNumber: string | undefined;
21
+ parentName: string | undefined;
22
+ }, yup.AnyObject, {
23
+ fullName: undefined;
24
+ email: undefined;
25
+ phoneNumber: undefined;
26
+ schoolName: undefined;
27
+ grade: undefined;
28
+ major: undefined;
29
+ parentPhoneNumber: undefined;
30
+ parentName: undefined;
31
+ }, "">;
32
+ export declare const DEFAULT_USER: User;
33
+ export declare const ROLES: Role[];
34
+ export declare const RECENT_USER_ACTION_HEADERS: {
35
+ title: string;
36
+ }[];
37
+ export declare const CSV_PREFIX = "data:text/csv;charset=utf-8,";
@@ -0,0 +1,11 @@
1
+ export declare type UserForm = {
2
+ fullName: string;
3
+ email: string;
4
+ phoneNumber: string;
5
+ schoolName?: string;
6
+ grade?: number | null;
7
+ major?: string;
8
+ parentName?: string;
9
+ parentPhoneNumber?: string;
10
+ roles?: string[];
11
+ };
@@ -0,0 +1,5 @@
1
+ import { UserSearchQuery } from "../../../utils/types/users";
2
+ declare const useExportUsersCsv: () => {
3
+ exportUsers: (filters: UserSearchQuery) => Promise<void>;
4
+ };
5
+ export default useExportUsersCsv;
@@ -0,0 +1,10 @@
1
+ import { Types } from "../../..";
2
+ import { Role } from "../../../utils/constants";
3
+ declare const useRecentUserAction: (role: Role) => {
4
+ recentUserActions: Types.RecentUserActionResponse[] | undefined;
5
+ isOpenRecentUserActionDialog: boolean;
6
+ handleOpenRecentUserActionDialog: () => void;
7
+ handleCloseRecentUserActionDialog: () => void;
8
+ getRecentExam: () => Promise<void>;
9
+ };
10
+ export default useRecentUserAction;
@@ -0,0 +1,40 @@
1
+ import { ChangeEvent } from "react";
2
+ import { UserForm } from "../configs/types";
3
+ import _ from "lodash";
4
+ import { Enums, Role } from "../../..";
5
+ import { PagingResponse } from "../../../utils/types/pagingResponse";
6
+ import { UserSortColumn } from "../../../utils/enums";
7
+ import { User } from "../../../utils/types/users";
8
+ declare const useUserList: (role: Role) => {
9
+ inputFileRef: import("react").RefObject<HTMLInputElement>;
10
+ paging: PagingResponse;
11
+ openConfirmDialog: boolean;
12
+ openUserDialog: boolean;
13
+ userList: User[];
14
+ selectedUser: User | undefined;
15
+ filter: import("../../../utils/types/searchQuery").BaseSearchQuery<Enums.UserSortColumn>;
16
+ textSearchRef: import("react").RefObject<HTMLInputElement>;
17
+ deleteFile: File | undefined;
18
+ isOpenDeleteUserCsv: boolean;
19
+ handleToggleDeleteUserCsv: () => void;
20
+ handleDeleteUserCsv: () => Promise<boolean>;
21
+ handleChangeDeleteFile: (file?: File | undefined) => void;
22
+ handleChangePage: (_: any, page: number) => void;
23
+ setUserList: import("react").Dispatch<import("react").SetStateAction<User[]>>;
24
+ toggleConfirmDialog: () => void;
25
+ openDeleteDialog: (user: User) => void;
26
+ handleSort: _.DebouncedFunc<(key: UserSortColumn) => void>;
27
+ handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
28
+ handleOpenUserDialog: (user: User) => Promise<void>;
29
+ handleCreateOrUpdateUser: (value: UserForm) => Promise<void>;
30
+ handleCloseUserDialog: () => void;
31
+ handleDeleteUser: () => Promise<void>;
32
+ downloadTemplate: () => Promise<void>;
33
+ handleChooseFile: () => void;
34
+ handleChangeFileImport: (e: ChangeEvent<HTMLInputElement>) => Promise<void>;
35
+ recentUserActions: import("../../../utils/types").RecentUserActionResponse[] | undefined;
36
+ isOpenRecentUserActionDialog: boolean;
37
+ handleOpenRecentUserActionDialog: () => void;
38
+ handleCloseRecentUserActionDialog: () => void;
39
+ };
40
+ export default useUserList;
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { Role } from "../../../utils/constants";
3
+ interface Props {
4
+ role: Role;
5
+ }
6
+ declare const UserList: FC<Props>;
7
+ export default UserList;
package/dist/index.css CHANGED
@@ -959,6 +959,12 @@
959
959
  color: #3ACB46; }
960
960
  ._eDBpS ._2K_sx ._1qkxy {
961
961
  color: #5D5D5B; }
962
+ ._eDBpS ._2K_sx ._1AeGu {
963
+ color: #DB4D4D; }
964
+ ._eDBpS ._2K_sx ._1xTB0 {
965
+ color: #FEAF06; }
966
+ ._eDBpS ._2K_sx ._3Yu_5 {
967
+ color: #3ACB46; }
962
968
  ._eDBpS ._2K_sx ._2jIeT {
963
969
  font-weight: 500;
964
970
  font-size: 12px;
package/dist/index.d.ts CHANGED
@@ -77,4 +77,5 @@ import LoadingComponent from "./components/Loading/LoadingComponent";
77
77
  import { checkSuperUrl } from "./utils/types/checkSuperUrl";
78
78
  import PrintExamResultView from "./containers/ExamResult/views/PrintExamResultView";
79
79
  import PrintExamView2 from "./components/Print/PrintExamView2";
80
- export { diffFromNow, formatTime, utcToLocalTime, setLoading, setReadyRegisterPusher, BASE_URL, SUPER_ADMIN_BASE_URL, ACCESS_TOKEN, Login, store, setAlert, setUser, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, CustomPagination, useGoogleSignOut, RecentUserAction, PUSHER_CONFIG, ExamEvent, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, setLanguage, i18n, TheLanguageDropdown, PrintExamView2, TheAcademyDropdown, useTranslation, I18nextProvider, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, ACADEMY_DOMAIN, minutesToTimeSpan, toISOString, canAccessRoute, CustomSelect, CustomAsyncSelect, CustomSelectOption, LoginWithPassword, getRecentUserActionListApi, getAccessToken, ChatContainer, getOrdinalSuffix, IChatContainerProps, IChatItemProps, IChatHeaderProps, IInputChatProps, ChatItemType, useChatContainer, ConversationResponse, usePusherConversation, ExamResultV2, ToastContainer, toast, Role, useLanguage, useSwitchAcademy, LANGUAGES, CustomCreatable, moment, ExamDetailView, ExamDetailViewProps, Exam, Question, ArticleGroup, getAcademyDomain, useSubjectSelect, useLogin, useAutoAcademyDomain, createRecentUserActionListApi, LoginAccessTokenRequest, LoginRequest, setReFetchUserAcademies, ChatTypes, AcademyHeaders, Types, Enums, CoreHooks, Language, ArticleGroupView, AnswerCountSelector, QuestionCountSelector, ScoreSelector, ArticleCategorySelector, SubjectSelector, useCategorySelect, InputText, Textbook, TextbookDetail, TextbookList, timeUtils, Header, DEFAULT_PAGING_RESPONSE, PagingResponse, AcademyList, getErrorMessage, DefaultErrorMessage, useCountDownTimer, useLoadMore, useVirtualizeList, PassCodeCheck, PassCodeCheckProps, LoadingComponent, PrintExamResultView, checkSuperUrl };
80
+ import LoginWithEmail from "./containers/Login/views/LoginWithEmail";
81
+ export { diffFromNow, formatTime, utcToLocalTime, setLoading, setReadyRegisterPusher, BASE_URL, SUPER_ADMIN_BASE_URL, ACCESS_TOKEN, Login, store, setAlert, setUser, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, LoginWithEmail, CustomPagination, useGoogleSignOut, RecentUserAction, PUSHER_CONFIG, ExamEvent, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, setLanguage, i18n, TheLanguageDropdown, PrintExamView2, TheAcademyDropdown, useTranslation, I18nextProvider, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, ACADEMY_DOMAIN, minutesToTimeSpan, toISOString, canAccessRoute, CustomSelect, CustomAsyncSelect, CustomSelectOption, LoginWithPassword, getRecentUserActionListApi, getAccessToken, ChatContainer, getOrdinalSuffix, IChatContainerProps, IChatItemProps, IChatHeaderProps, IInputChatProps, ChatItemType, useChatContainer, ConversationResponse, usePusherConversation, ExamResultV2, ToastContainer, toast, Role, useLanguage, useSwitchAcademy, LANGUAGES, CustomCreatable, moment, ExamDetailView, ExamDetailViewProps, Exam, Question, ArticleGroup, getAcademyDomain, useSubjectSelect, useLogin, useAutoAcademyDomain, createRecentUserActionListApi, LoginAccessTokenRequest, LoginRequest, setReFetchUserAcademies, ChatTypes, AcademyHeaders, Types, Enums, CoreHooks, Language, ArticleGroupView, AnswerCountSelector, QuestionCountSelector, ScoreSelector, ArticleCategorySelector, SubjectSelector, useCategorySelect, InputText, Textbook, TextbookDetail, TextbookList, timeUtils, Header, DEFAULT_PAGING_RESPONSE, PagingResponse, AcademyList, getErrorMessage, DefaultErrorMessage, useCountDownTimer, useLoadMore, useVirtualizeList, PassCodeCheck, PassCodeCheckProps, LoadingComponent, PrintExamResultView, checkSuperUrl };