@authing/react-ui-components 4.2.3-alpha.0 → 4.2.3-alpha.2
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/lib/index.min.css +1 -1
- package/lib/index.min.js +1 -1
- package/package.json +1 -1
- package/types/AppOtpVerify/DownloadVerifier.d.ts +2 -0
- package/types/AppOtpVerify/LoginApp.d.ts +2 -0
- package/types/AppOtpVerify/ScanQrcode.d.ts +2 -0
- package/types/AppOtpVerify/Steps.d.ts +11 -0
- package/types/AppOtpVerify/index.d.ts +3 -0
- package/types/AuthClientProvider/AuthClientProvider.d.ts +4 -2
- package/types/Back/index.d.ts +3 -1
- package/types/BindTotp/businessRequest.d.ts +1 -1
- package/types/ChangePassword/businessRequest.d.ts +1 -1
- package/types/ChangePassword/index.d.ts +2 -1
- package/types/CompleteInfo/businessRequest.d.ts +2 -2
- package/types/CompleteInfo/interface.d.ts +2 -1
- package/types/ForgetPassword/InputPassword/index.d.ts +4 -0
- package/types/ForgetPassword/core/inputIdentify.d.ts +7 -0
- package/types/ForgetPassword/core/resetPassword.d.ts +5 -1
- package/types/ForgetPassword/interface.d.ts +1 -1
- package/types/Guard/GuardModule/stateMachine.d.ts +1 -1
- package/types/Guard/core/hooks/useMultipleAccounts.d.ts +4 -2
- package/types/Guard/core/renderContext.d.ts +2 -1
- package/types/Guard/core/renderModule.d.ts +1 -1
- package/types/Guard/event.d.ts +2 -1
- package/types/Guard/module.d.ts +7 -2
- package/types/GuardFace/index.d.ts +16 -0
- package/types/GuardSelect/index.d.ts +29 -0
- package/types/IdentityBinding/businessRequest.d.ts +2 -2
- package/types/ImagePro/index.d.ts +1 -0
- package/types/InputPassword/index.d.ts +2 -4
- package/types/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +13 -0
- package/types/Login/core/withAuthingOtpPush/PendingLogin.d.ts +7 -0
- package/types/Login/core/withAuthingOtpPush/index.d.ts +3 -0
- package/types/Login/core/withAuthingOtpPush/types.d.ts +13 -0
- package/types/Login/core/withPassword/FormItemAccount.d.ts +1 -2
- package/types/Login/core/withPassword/InputAccount.d.ts +2 -2
- package/types/Login/core/withPassword/index.d.ts +2 -2
- package/types/Login/hooks/useLoginMultiple.d.ts +2 -1
- package/types/Login/hooks/useOtpPushLogin.d.ts +6 -0
- package/types/Login/interface.d.ts +2 -2
- package/types/MFA/businessRequest.d.ts +1 -1
- package/types/MFA/interface.d.ts +4 -1
- package/types/NewSubmitSuccess/index.d.ts +2 -0
- package/types/NewSubmitSuccess/interface.d.ts +17 -0
- package/types/Qrcode/UiQrCode.d.ts +1 -1
- package/types/RecoveryCode/businessRequest.d.ts +1 -1
- package/types/Register/core/WithEmail.d.ts +2 -0
- package/types/Register/interface.d.ts +2 -2
- package/types/SelectAccount/index.d.ts +3 -0
- package/types/TenantPortalSelect/index.d.ts +16 -0
- package/types/Type/application.d.ts +57 -8
- package/types/Type/index.d.ts +4 -4
- package/types/ValidatorRules/ValidatorFormItem.d.ts +3 -0
- package/types/ValidatorRules/index.d.ts +3 -2
- package/types/_utils/GuardErrorCode.d.ts +1 -1
- package/types/_utils/config/index.d.ts +4 -4
- package/types/_utils/context.d.ts +21 -4
- package/types/_utils/getCaptchaUrl.d.ts +1 -0
- package/types/_utils/hooks/index.d.ts +1 -1
- package/types/_utils/index.d.ts +10 -4
- package/types/_utils/logger/interface.d.ts +1 -1
- package/types/_utils/responseManagement/interface.d.ts +5 -3
- package/types/_utils/tenant.d.ts +19 -0
- package/types/version/version.d.ts +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import './steps.styles.less';
|
|
3
|
+
interface StepsProps {
|
|
4
|
+
current: number;
|
|
5
|
+
items: StepItem[];
|
|
6
|
+
}
|
|
7
|
+
interface StepItem {
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function Steps(props: StepsProps): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { AuthClientContextProps } from './context';
|
|
3
|
-
export declare const AuthClientProvider: React.FC<AuthClientContextProps
|
|
3
|
+
export declare const AuthClientProvider: React.FC<AuthClientContextProps & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}>;
|
|
4
6
|
export declare const useGlobalAuthClient: () => import("authing-js-sdk").AuthenticationClient | undefined;
|
package/types/Back/index.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ export declare const BackLogin: React.FC<BackProps>;
|
|
|
7
7
|
export interface BackCustomProps extends BackProps {
|
|
8
8
|
onBack?: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const BackCustom: React.FC<BackCustomProps
|
|
10
|
+
export declare const BackCustom: React.FC<BackCustomProps & {
|
|
11
|
+
children: any;
|
|
12
|
+
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare enum ChangePasswordBusinessAction {
|
|
2
2
|
ResetPassword = "reset-password-first-time",
|
|
3
3
|
FirstLoginReset = "reset-password-forced",
|
|
4
4
|
ResetPasswordStrengthDetection = "reset-password-strength-detection"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export declare const GuardChangePassword: React.FC<{
|
|
3
3
|
title: string;
|
|
4
4
|
explain: string;
|
|
5
|
+
children: ReactNode;
|
|
5
6
|
}>;
|
|
6
7
|
export declare const GuardFirstLoginPasswordResetView: React.FC;
|
|
7
8
|
export declare const GuardPasswordNotSafeResetView: React.FC;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { User } from 'authing-js-sdk';
|
|
2
2
|
import { CompleteInfoRequest, RegisterCompleteInfoInitData } from './interface';
|
|
3
|
-
export declare
|
|
3
|
+
export declare enum CompleteInfoAuthFlowAction {
|
|
4
4
|
Complete = "complete-completion",
|
|
5
5
|
Skip = "skip-completion"
|
|
6
6
|
}
|
|
7
7
|
export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
8
|
-
export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any
|
|
8
|
+
export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'] | string, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
9
9
|
export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("../_utils/http").AuthingGuardResponse<any> | undefined>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputProps } from 'antd/lib/input';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { VerifyLoginMethods } from '../../Type/application';
|
|
4
|
+
export interface InputIdentifyProps extends InputProps {
|
|
5
|
+
methods: VerifyLoginMethods[];
|
|
6
|
+
}
|
|
7
|
+
export declare const InputIdentify: React.FC<InputIdentifyProps>;
|
|
@@ -4,8 +4,12 @@ export declare enum InputMethodMap {
|
|
|
4
4
|
phone = "phone-code"
|
|
5
5
|
}
|
|
6
6
|
interface ResetPasswordProps {
|
|
7
|
-
onReset: any;
|
|
8
7
|
publicConfig: any;
|
|
8
|
+
setPhoneOrEmail: any;
|
|
9
|
+
setControlShow: any;
|
|
10
|
+
setPolicyStrength: any;
|
|
11
|
+
setCustomPasswordStrength: any;
|
|
12
|
+
setPhoneOrEmailText: any;
|
|
9
13
|
}
|
|
10
14
|
export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
|
|
11
15
|
export {};
|
|
@@ -2,7 +2,7 @@ import { AuthenticationClient, CommonMessage, SceneType } from 'authing-js-sdk';
|
|
|
2
2
|
import { EmailScene, IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
|
|
3
3
|
export interface ForgetPasswordEvents extends IG2Events {
|
|
4
4
|
onEmailSend?: (authClient: AuthenticationClient, sence?: EmailScene) => void;
|
|
5
|
-
onEmailSendError?: (error
|
|
5
|
+
onEmailSendError?: (error?: CommonMessage, authClient?: AuthenticationClient, sence?: EmailScene) => void;
|
|
6
6
|
onPhoneSend?: (authClient: AuthenticationClient, sence?: SceneType) => void;
|
|
7
7
|
onPhoneSendError?: (error: CommonMessage, authClient: AuthenticationClient, sence?: SceneType) => void;
|
|
8
8
|
onPwdReset?: (authClient: AuthenticationClient) => void;
|
|
@@ -248,7 +248,8 @@ declare class MultipleAccount {
|
|
|
248
248
|
} | undefined) => void;
|
|
249
249
|
setUserInfo: (user: Pick<User & {
|
|
250
250
|
id: string;
|
|
251
|
-
|
|
251
|
+
loginAccount?: string | undefined;
|
|
252
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
252
253
|
setLoginWayByHttpData: (account: string, data: {
|
|
253
254
|
username?: string | undefined;
|
|
254
255
|
phone?: string | undefined;
|
|
@@ -290,7 +291,8 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
|
|
|
290
291
|
} | undefined) => void;
|
|
291
292
|
setUserInfo: (user: Pick<User & {
|
|
292
293
|
id: string;
|
|
293
|
-
|
|
294
|
+
loginAccount?: string | undefined;
|
|
295
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
294
296
|
setLoginWayByHttpData: (account: string, data: {
|
|
295
297
|
username?: string | undefined;
|
|
296
298
|
phone?: string | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { GuardProps } from '..';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
3
|
import { ModuleState } from '../GuardModule/stateMachine';
|
|
4
4
|
export declare const RenderContext: React.FC<{
|
|
5
5
|
guardProps: GuardProps;
|
|
6
6
|
initState: ModuleState;
|
|
7
|
+
children: ReactNode;
|
|
7
8
|
}>;
|
package/types/Guard/event.d.ts
CHANGED
|
@@ -19,7 +19,8 @@ export declare const guardEventsFilter: (props: any, multipleInstance?: {
|
|
|
19
19
|
} | undefined) => void;
|
|
20
20
|
setUserInfo: (user: Pick<import("./core/hooks/useMultipleAccounts").User & {
|
|
21
21
|
id: string;
|
|
22
|
-
|
|
22
|
+
loginAccount?: string | undefined;
|
|
23
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
23
24
|
setLoginWayByHttpData: (account: string, data: {
|
|
24
25
|
username?: string | undefined;
|
|
25
26
|
phone?: string | undefined;
|
package/types/Guard/module.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare enum GuardModuleType {
|
|
2
2
|
ERROR = "error",
|
|
3
3
|
LOGIN = "login",
|
|
4
4
|
REGISTER = "register",
|
|
@@ -18,7 +18,12 @@ export declare const enum GuardModuleType {
|
|
|
18
18
|
SUBMIT_SUCCESS = "submitSuccess",
|
|
19
19
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
20
20
|
IDENTITY_BINDING = "identityBinding",
|
|
21
|
-
SELF_UNLOCK = "selfUnlock"
|
|
21
|
+
SELF_UNLOCK = "selfUnlock",
|
|
22
|
+
FLOW_SELECT_ACCOUNT = "flowSelectAccount",
|
|
23
|
+
APP_OTP_VERIFY = "appOtpVerify",
|
|
24
|
+
/** 多租户门户选择页 */
|
|
25
|
+
TENANT_PORTAL = "tenant-portal",
|
|
26
|
+
New_SUBMIT_SUCCESS = "newSubmitSuccess"
|
|
22
27
|
}
|
|
23
28
|
export interface GuardModuleAction {
|
|
24
29
|
action: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './styles.less';
|
|
2
|
+
import { AvatarProps } from 'antd/lib/avatar';
|
|
3
|
+
import { TagProps } from 'antd/lib/tag';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface GuardFaceProps {
|
|
6
|
+
/** 顶部 avatar 头像展示 */
|
|
7
|
+
avatar: AvatarProps | string;
|
|
8
|
+
/** 标题头部 */
|
|
9
|
+
title: React.ReactNode;
|
|
10
|
+
/** 标题描述 */
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
/** 标签功能 */
|
|
13
|
+
tags?: TagProps[];
|
|
14
|
+
}
|
|
15
|
+
/** 顶部通用区域封装,同时兼容样式的层叠和功能的自定义 */
|
|
16
|
+
export declare const GuardFace: (props: GuardFaceProps) => JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import './styles.less';
|
|
2
|
+
import { AvatarProps } from 'antd/lib/avatar';
|
|
3
|
+
import { ListItemProps, ListProps } from 'antd/lib/list';
|
|
4
|
+
import React, { CSSProperties } from 'react';
|
|
5
|
+
export interface GuardSelectItem {
|
|
6
|
+
/** avatar 头像展示 */
|
|
7
|
+
avatar?: AvatarProps | string;
|
|
8
|
+
/** 标题 */
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
/** 描述 */
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
/** 右侧操作组 */
|
|
13
|
+
actions?: ListItemProps['actions'];
|
|
14
|
+
/** 右侧额外的渲染内容 */
|
|
15
|
+
extra?: ListItemProps['extra'];
|
|
16
|
+
/** 数据项子内容,便于自定义 */
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
/** 其他元字段 */
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
export interface GuardSelectProps<T = any> extends ListProps<any> {
|
|
22
|
+
/**数据项之间的间隙,默认`20px` */
|
|
23
|
+
gap?: CSSProperties['marginBottom'];
|
|
24
|
+
/** 数据源 */
|
|
25
|
+
dataSource: T[];
|
|
26
|
+
onSelect?: (item?: T, index?: number) => void;
|
|
27
|
+
}
|
|
28
|
+
/** 选择列表组件 兼容绝大多数选择场景 */
|
|
29
|
+
export declare const GuardSelect: <D extends GuardSelectItem = any>(props: GuardSelectProps<D>) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare enum IdentityBindingBusinessAction {
|
|
2
2
|
PhoneCode = "phone-code",
|
|
3
3
|
EmailCode = "emial-code",
|
|
4
4
|
Password = "password"
|
|
@@ -17,7 +17,7 @@ export interface PasswordParams {
|
|
|
17
17
|
password: string;
|
|
18
18
|
captchaCode: string;
|
|
19
19
|
}
|
|
20
|
-
export declare
|
|
20
|
+
export declare enum IdentityBindingAction {
|
|
21
21
|
CreateUser = "create-federation-account",
|
|
22
22
|
BindByPassword = "bind-identity-by-password",
|
|
23
23
|
BindByPhoneCode = "bind-identity-by-phone-code",
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export declare const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InputPassword: (props: any) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OnPushSuccessProps, OnLoginProps } from './types';
|
|
3
|
+
import { AuthingGuardResponse } from '../../../_utils/http';
|
|
4
|
+
interface BeforeLoginProps {
|
|
5
|
+
onPushSuccess: (props: OnPushSuccessProps) => void;
|
|
6
|
+
signinByPush: (props: OnLoginProps) => Promise<AuthingGuardResponse<{
|
|
7
|
+
pushCodeId: string;
|
|
8
|
+
}>>;
|
|
9
|
+
pushLoginStatus: boolean;
|
|
10
|
+
onchangePushLoginStatus: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function BeforeLogin(props: BeforeLoginProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface OnPushSuccessProps {
|
|
2
|
+
pushCodeId: string;
|
|
3
|
+
}
|
|
4
|
+
export interface CheckPushCodeStatusProps {
|
|
5
|
+
pushCodeId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OnLoginProps {
|
|
8
|
+
account: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type LoginStatus = 'before' | 'pending';
|
|
11
|
+
export interface LoginWithAuthingOtpPushProps {
|
|
12
|
+
onLoginSuccess?: any;
|
|
13
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FormItemProps } from 'antd/lib/form';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { PasswordLoginMethods } from '../../../Type/application';
|
|
4
3
|
export interface FormItemAccountProps extends FormItemProps {
|
|
5
|
-
|
|
4
|
+
validPasswordLoginMethods: string[];
|
|
6
5
|
}
|
|
7
6
|
export declare const FormItemAccount: React.FC<FormItemAccountProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputProps } from 'antd/lib/input';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { PasswordLoginMethods } from '../../../Type/application';
|
|
4
3
|
export interface InputAccountProps extends InputProps {
|
|
5
|
-
passwordLoginMethods:
|
|
4
|
+
passwordLoginMethods: string[];
|
|
5
|
+
placeholder: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const InputAccount: React.FC<InputAccountProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AuthingResponse } from '../../../_utils/http';
|
|
3
|
-
import { Agreement, LoginMethods
|
|
3
|
+
import { Agreement, LoginMethods } from '../../../Type/application';
|
|
4
4
|
import { BackFillMultipleState, StoreInstance } from '../../../Guard/core/hooks/useMultipleAccounts';
|
|
5
5
|
interface LoginWithPasswordProps {
|
|
6
6
|
publicKey: string;
|
|
@@ -10,7 +10,7 @@ interface LoginWithPasswordProps {
|
|
|
10
10
|
onLoginSuccess?: any;
|
|
11
11
|
onLoginFailed?: any;
|
|
12
12
|
onLoginRequest?: (loginInfo: any) => Promise<AuthingResponse>;
|
|
13
|
-
passwordLoginMethods:
|
|
13
|
+
passwordLoginMethods: string[];
|
|
14
14
|
agreements: Agreement[];
|
|
15
15
|
loginWay?: LoginMethods;
|
|
16
16
|
submitButText?: string;
|
|
@@ -34,7 +34,8 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
|
34
34
|
} | undefined) => void;
|
|
35
35
|
setUserInfo: (user: Pick<import("../../Guard/core/hooks/useMultipleAccounts").User & {
|
|
36
36
|
id: string;
|
|
37
|
-
|
|
37
|
+
loginAccount?: string | undefined;
|
|
38
|
+
}, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
|
|
38
39
|
setLoginWayByHttpData: (account: string, data: {
|
|
39
40
|
username?: string | undefined;
|
|
40
41
|
phone?: string | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
|
|
2
2
|
import { AuthenticationClient, User } from 'authing-js-sdk';
|
|
3
3
|
import { QrCodeAuthenticationClient } from 'authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient';
|
|
4
|
-
import { Agreement, LoginMethods,
|
|
4
|
+
import { Agreement, LoginMethods, SocialConnectionProvider } from '../Type/application';
|
|
5
5
|
export interface LoginConfig extends IG2Config {
|
|
6
6
|
autoRegister?: boolean;
|
|
7
7
|
disableResetPwd?: boolean;
|
|
8
8
|
disableRegister?: boolean;
|
|
9
9
|
defaultLoginMethod?: LoginMethods;
|
|
10
10
|
loginMethods?: LoginMethods[];
|
|
11
|
-
passwordLoginMethods?:
|
|
11
|
+
passwordLoginMethods?: string[];
|
|
12
12
|
socialConnections?: SocialConnectionProvider[];
|
|
13
13
|
socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
|
|
14
14
|
enterpriseConnections?: string[];
|
package/types/MFA/interface.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const getDefaultMFAConfig: () => MFAConfig;
|
|
|
7
7
|
export interface MFAEvents extends IG2Events {
|
|
8
8
|
onLogin?: (user: User, authClient: AuthenticationClient) => void;
|
|
9
9
|
}
|
|
10
|
-
export declare
|
|
10
|
+
export declare enum MFAType {
|
|
11
11
|
SMS = "SMS",
|
|
12
12
|
EMAIL = "EMAIL",
|
|
13
13
|
TOTP = "OTP",
|
|
@@ -29,6 +29,9 @@ export interface GuardMFAInitData {
|
|
|
29
29
|
nickme?: string;
|
|
30
30
|
username?: string;
|
|
31
31
|
current?: MFAType;
|
|
32
|
+
mfaPhoneCountryCode?: string;
|
|
33
|
+
mfaPhone?: string;
|
|
34
|
+
mfaEmail?: string;
|
|
32
35
|
}
|
|
33
36
|
export interface GuardMFAProps extends IG2FCProps, MFAEvents {
|
|
34
37
|
config: Partial<MFAConfig>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GuardModuleType } from '../Guard';
|
|
2
|
+
import { IG2Config, IG2Events, IG2FCViewProps } from '../Type';
|
|
3
|
+
export interface SubmitSuccessEvents extends IG2Events {
|
|
4
|
+
}
|
|
5
|
+
export interface SubmitSuccessConfig extends IG2Config {
|
|
6
|
+
}
|
|
7
|
+
export interface SubmitSuccessInitData {
|
|
8
|
+
title?: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
countDesc?: string;
|
|
12
|
+
changeModule?: GuardModuleType;
|
|
13
|
+
}
|
|
14
|
+
export interface GuardNewSubmitSuccessViewProps extends IG2FCViewProps, SubmitSuccessEvents {
|
|
15
|
+
config: SubmitSuccessConfig;
|
|
16
|
+
initData?: SubmitSuccessInitData;
|
|
17
|
+
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { CodeStatusDescriptions } from './WorkQrCode';
|
|
4
4
|
export declare type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
|
|
5
|
-
export declare const prefix
|
|
5
|
+
export declare const prefix: string;
|
|
6
6
|
export interface UiQrProps {
|
|
7
7
|
/**
|
|
8
8
|
* Loading 组件
|
|
@@ -3,8 +3,8 @@ import { IG2FCProps, IG2Config, IG2Events } from '../Type';
|
|
|
3
3
|
import { Agreement, RegisterMethods } from '../Type/application';
|
|
4
4
|
export interface RegisterConfig extends IG2Config {
|
|
5
5
|
disableRegister?: boolean;
|
|
6
|
-
registerMethods?:
|
|
7
|
-
defaultRegisterMethod?:
|
|
6
|
+
registerMethods?: string[];
|
|
7
|
+
defaultRegisterMethod?: string;
|
|
8
8
|
publicKey?: string;
|
|
9
9
|
agreementEnabled?: boolean;
|
|
10
10
|
agreements?: Agreement[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './styles.less';
|
|
3
|
+
/** 租户门户选择状态机返回数据类型 */
|
|
4
|
+
export interface TenantPortalSelectType {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
logo: string;
|
|
8
|
+
list: {
|
|
9
|
+
tenantName: string;
|
|
10
|
+
tenantId: string;
|
|
11
|
+
tenantLogo: string;
|
|
12
|
+
host: string;
|
|
13
|
+
userName: string;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
export declare const GuardTenantPortalSelectView: () => JSX.Element;
|