touchstudy-core 0.1.82 → 0.1.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Chats/configs/types.d.ts +1 -0
- package/dist/containers/Login/apiClient/index.d.ts +15 -0
- package/dist/containers/Login/configs/helpers.d.ts +1 -0
- package/dist/containers/Login/hooks/useLogin.d.ts +21 -4
- package/dist/containers/Login/hooks/useLoginWithEmail.d.ts +10 -0
- package/dist/containers/Login/views/Login.d.ts +1 -1
- package/dist/containers/Login/views/LoginWithEmail.d.ts +11 -0
- package/dist/containers/Login/views/block/BlockLogin.d.ts +15 -1
- package/dist/index.css +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +484 -95
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +483 -95
- package/dist/index.modern.js.map +1 -1
- package/dist/services/recentUserActionService.d.ts +4 -4
- package/dist/utils/types/login.d.ts +1 -0
- package/dist/utils/types/recentUserAction.d.ts +1 -2
- package/package.json +1 -1
@@ -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
|
-
|
5
|
-
captcha: string;
|
6
|
-
rememberMe: boolean;
|
5
|
+
otp: number | string;
|
7
6
|
};
|
8
|
-
declare
|
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;
|
@@ -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
|
-
|
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;
|
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
|
-
|
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 };
|