touchstudy-core 0.1.68 → 0.1.70

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 (35) hide show
  1. package/dist/components/Chats/hooks/useMessageList.d.ts +5 -2
  2. package/dist/components/Commons/NotFound.d.ts +1 -1
  3. package/dist/components/Dialogs/PassCodeDialog.d.ts +10 -0
  4. package/dist/components/Dialogs/configs/types.d.ts +4 -0
  5. package/dist/components/Loading/LoadingComponent.d.ts +6 -0
  6. package/dist/components/Selectors/InActiveAcademySelector.d.ts +16 -0
  7. package/dist/containers/Academies/apiClients/academyService.d.ts +1 -2
  8. package/dist/containers/Academies/components/PassCodeDialog.d.ts +10 -0
  9. package/dist/containers/Academies/hooks/useAcademyList.d.ts +1 -2
  10. package/dist/containers/ExamResult/apiClients/index.d.ts +0 -1
  11. package/dist/containers/ExamResult/hooks/useExamResult.d.ts +1 -0
  12. package/dist/containers/Login/hooks/useLogin.d.ts +1 -1
  13. package/dist/containers/PassCodes/configs/types.d.ts +6 -0
  14. package/dist/containers/PassCodes/hooks/usePassCodeCheck.d.ts +19 -0
  15. package/dist/containers/PassCodes/views/PassCodeCheck.d.ts +13 -0
  16. package/dist/containers/Textbooks/apiClient/examSessionService.d.ts +0 -2
  17. package/dist/index.css +0 -1
  18. package/dist/index.d.ts +6 -3
  19. package/dist/index.js +1036 -323
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.modern.js +1015 -307
  22. package/dist/index.modern.js.map +1 -1
  23. package/dist/services/academyService.d.ts +4 -1
  24. package/dist/services/accountService.d.ts +1 -0
  25. package/dist/services/passCodeService.d.ts +1 -0
  26. package/dist/services/recentUserActionService.d.ts +10 -0
  27. package/dist/utils/constants.d.ts +21 -0
  28. package/dist/utils/enums/index.d.ts +2 -1
  29. package/dist/utils/enums/recentUserAction.d.ts +7 -0
  30. package/dist/utils/hooks/useLayoutContext.d.ts +3 -1
  31. package/dist/utils/hooks/useSwitchAcademy.d.ts +1 -1
  32. package/dist/utils/types/checkSuperUrl.d.ts +1 -0
  33. package/dist/utils/types/index.d.ts +2 -1
  34. package/dist/utils/types/recentUserAction.d.ts +33 -0
  35. package/package.json +1 -1
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { MessageResponse, MessageFilter } from "../configs/types";
3
- declare const useMessageList: () => {
2
+ import { MessageResponse, MessageFilter, StudentsConversationResponse } from "../configs/types";
3
+ interface Props {
4
+ student?: StudentsConversationResponse;
5
+ }
6
+ declare const useMessageList: ({ student }: Props) => {
4
7
  isLoading: boolean;
5
8
  messageFilter: MessageFilter;
6
9
  messages: MessageResponse[];
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
2
  interface Props {
3
- history: any;
3
+ history?: any;
4
4
  }
5
5
  declare const NotFound: FC<Props>;
6
6
  export default NotFound;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { PassCodeFomSubmit } from "./configs/types";
3
+ interface Props {
4
+ open: boolean;
5
+ onClose: (event?: any, reason?: "backdropClick" | "escapeKeyDown") => void;
6
+ onSubmit: (data: PassCodeFomSubmit, callback?: any) => Promise<void>;
7
+ academyDomain?: string;
8
+ }
9
+ declare const PassCodeDialog: FC<Props>;
10
+ export default PassCodeDialog;
@@ -0,0 +1,4 @@
1
+ export declare type PassCodeFomSubmit = {
2
+ code: string;
3
+ academyDomain?: string;
4
+ };
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ isLoading: boolean;
4
+ }
5
+ declare const LoadingComponent: FC<Props>;
6
+ export default LoadingComponent;
@@ -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,2 +1 @@
1
- export declare const getAcademyList: () => Promise<import("axios").AxiosResponse<any, any>>;
2
- export declare const switchAcademy: (academyId: number) => Promise<import("axios").AxiosResponse<any, any>>;
1
+ export declare const getAcademyList: (role: string) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -0,0 +1,10 @@
1
+ import { ChangeEvent, FC } from "react";
2
+ interface Props {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ onSubmit: () => void;
6
+ textCodeValue: string;
7
+ handleChangeText: (e: ChangeEvent<HTMLInputElement>) => void;
8
+ }
9
+ declare const PassCodeDialog: FC<Props>;
10
+ export default PassCodeDialog;
@@ -1,7 +1,6 @@
1
- import { AcademyResponse } from "../configs/types";
2
1
  import { Role } from "../../../utils/constants";
3
2
  declare const useAcademyList: (history: any, role: Role, homeAcademyUrl: string, homeUrl: string, registerUrl?: string | undefined) => {
4
- academyList: AcademyResponse[];
3
+ academyList: any;
5
4
  handleSwitchAcademy: (id: number, domain: string) => Promise<void>;
6
5
  };
7
6
  export default useAcademyList;
@@ -9,4 +9,3 @@ export declare const getResultsEffectSizeTeacher: (id: number, studentId: number
9
9
  export declare const getResultsTimeOrderQuestionTeacher: (id: number, studentId: number) => Promise<import("axios").AxiosResponse<any, any>>;
10
10
  export declare const getResultsCategoriesTeacher: (id: number, studentId: number) => Promise<import("axios").AxiosResponse<any, any>>;
11
11
  export declare const createConversationApi: (data: any) => Promise<import("axios").AxiosResponse<any, any>>;
12
- export declare const getCheckStatusExam: (examCode?: string | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { CategoryResponse, EffectSize, ExamResult, LongTimeSpendQuestion, TimelyOrderQuestion } from "../configs/types";
3
3
  declare const useExamResult: (searchParam: string, history: any, examSessionId: number | undefined, studentId: number | undefined, code: string | undefined, handleChangeTab: (newValue: number) => void, selectedTab: number) => {
4
+ isLoading: boolean;
4
5
  examTime: string;
5
6
  series: {
6
7
  name: any;
@@ -5,7 +5,7 @@ declare type LoginInfo = {
5
5
  captcha: string;
6
6
  rememberMe: boolean;
7
7
  };
8
- declare const useLogin: () => {
8
+ declare const useLogin: (homeAcademyUrl: string, homeUrl: string) => {
9
9
  defaultInfo: LoginInfo;
10
10
  openLogin: boolean;
11
11
  toggle: () => void;
@@ -0,0 +1,6 @@
1
+ export declare type Academy = {
2
+ id: number;
3
+ domain: string;
4
+ name: string;
5
+ isOwned?: boolean;
6
+ };
@@ -0,0 +1,19 @@
1
+ import { PassCodeFomSubmit } from "../../../components/Dialogs/configs/types";
2
+ import { Role } from "../../../utils/constants";
3
+ import { Academy } from "../configs/types";
4
+ interface Props {
5
+ role: Role;
6
+ homeAcademyUrl: string;
7
+ homeUrl: string;
8
+ registerUrl?: string;
9
+ history: any;
10
+ domain?: string;
11
+ }
12
+ declare const usePassCodeCheck: (props: Props) => {
13
+ academy: Academy | undefined;
14
+ isLoadingAcademy: boolean | undefined;
15
+ academyDomain: any;
16
+ email: any;
17
+ handleCheckPassCode: (form: PassCodeFomSubmit, callback?: any) => Promise<void>;
18
+ };
19
+ export default usePassCodeCheck;
@@ -0,0 +1,13 @@
1
+ import { FC } from "react";
2
+ import { Role } from "../../../utils/constants";
3
+ export interface PassCodeCheckProps {
4
+ role: Role;
5
+ open: boolean;
6
+ onClose: (event?: any, reason?: "backdropClick" | "escapeKeyDown") => void;
7
+ homeAcademyUrl: string;
8
+ homeUrl: string;
9
+ registerUrl?: string;
10
+ history: any;
11
+ domain?: string;
12
+ }
13
+ export declare const PassCodeCheck: FC<PassCodeCheckProps>;
@@ -3,8 +3,6 @@ export declare const increaseDuration: (id: number, data: string) => Promise<imp
3
3
  export declare const terminateExam: (id: number) => Promise<import("axios").AxiosResponse<any, any>>;
4
4
  export declare const getListExamSession: (query: Exam) => Promise<import("axios").AxiosResponse<any, any>>;
5
5
  export declare const startExam: (examId: number) => Promise<import("axios").AxiosResponse<any, any>>;
6
- export declare const checkStatusExamApi: (code: string) => Promise<import("axios").AxiosResponse<any, any>>;
7
6
  export declare const apiDeleteExam: (examId: number) => Promise<import("axios").AxiosResponse<any, any>>;
8
- export declare const apiActivePendingExam: (id: number) => Promise<import("axios").AxiosResponse<any, any>>;
9
7
  export declare const apiKickOutStudent: (studentId: number, examCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
10
8
  export declare const apiGetJoinedStudents: (examCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
package/dist/index.css CHANGED
@@ -933,7 +933,6 @@
933
933
  padding: 6px 0px;
934
934
  font-family: "Pretendard"; }
935
935
  ._eDBpS ._2K_sx ._2qiLh {
936
- cursor: pointer;
937
936
  padding: 6px 8px; }
938
937
  ._eDBpS ._2K_sx ._6TCOK {
939
938
  padding: 8px 12px 16px 84px;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { setLoading, setAlert, setUser, setLanguage, setReFetchUserAcademies, setReadyRegisterPusher } from "./redux/commons/action";
2
- import { BASE_URL, SUPER_ADMIN_BASE_URL, ACCESS_TOKEN, PUSHER_CONFIG, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, ACADEMY_DOMAIN, AcademyHeaders, Role, DefaultErrorMessage } from "./utils/constants";
2
+ import { BASE_URL, SUPER_ADMIN_BASE_URL, ACCESS_TOKEN, PUSHER_CONFIG, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, ACADEMY_DOMAIN, AcademyHeaders, Role, DefaultErrorMessage, RecentUserAction } from "./utils/constants";
3
3
  import utcToLocalTime from "./utils/utcToLocalTime";
4
4
  import Login from "./containers/Login/views/Login";
5
5
  import store from "./store";
@@ -69,7 +69,10 @@ import getAcademyDomain from "./utils/getAcademyDomain";
69
69
  import { getOrdinalSuffix } from './utils/helpers';
70
70
  import { Language } from './utils/constants';
71
71
  import useCountDownTimer from "./utils/hooks/useCountDownTimer";
72
- import useCheckExam from "./utils/hooks/useCheckExam";
73
72
  import useLoadMore from "./utils/hooks/useLoadMore";
74
73
  import useVirtualizeList from "./utils/hooks/useVirtualizeList";
75
- 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, PUSHER_CONFIG, ExamEvent, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, setLanguage, i18n, TheLanguageDropdown, TheAcademyDropdown, useTranslation, I18nextProvider, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, ACADEMY_DOMAIN, minutesToTimeSpan, toISOString, canAccessRoute, CustomSelect, CustomAsyncSelect, CustomSelectOption, LoginWithPassword, 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, 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, useCheckExam, useLoadMore, useVirtualizeList };
74
+ import { getRecentUserActionListApi, createRecentUserActionListApi } from "./services/recentUserActionService";
75
+ import { PassCodeCheck, PassCodeCheckProps } from "./containers/PassCodes/views/PassCodeCheck";
76
+ import LoadingComponent from "./components/Loading/LoadingComponent";
77
+ import { checkSuperUrl } from "./utils/types/checkSuperUrl";
78
+ 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, 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, checkSuperUrl };