@authing/react-ui-components 4.0.4-alpha.1 → 4.0.4-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 +2 -2
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +0 -16
- package/package.json +2 -3
- package/types/AccountMerge/UserRadio.d.ts +5 -0
- package/types/AccountMerge/index.d.ts +3 -0
- package/types/AccountMerge/interface.d.ts +27 -0
- package/types/AccountMerge/utils.d.ts +3 -0
- package/types/ChangePassword/businessRequest.d.ts +1 -2
- package/types/ChangePassword/core/completePassword.d.ts +0 -6
- package/types/ChangePassword/index.d.ts +0 -12
- package/types/CompleteInfo/businessRequest.d.ts +3 -9
- package/types/CompleteInfo/core/completeInfo.d.ts +0 -5
- package/types/CompleteInfo/core/components/TreeSelect.d.ts +11 -0
- package/types/CompleteInfo/index.d.ts +0 -11
- package/types/CompleteInfo/utils.d.ts +7 -1
- package/types/ForgetPassword/index.d.ts +0 -3
- package/types/IdentityBinding/IdentityBinding.d.ts +0 -5
- package/types/IdentityBinding/businessRequest.d.ts +6 -3
- package/types/Login/core/withPassword/FormItemAccount.d.ts +0 -5
- package/types/Login/core/withPassword/GraphicVerifyCode.d.ts +0 -5
- package/types/Login/core/withPassword/InputAccount.d.ts +0 -4
- package/types/Login/core/withPassword/index.d.ts +0 -5
- package/types/Login/core/withWeComQrcode.d.ts +2 -0
- package/types/Login/hooks/useLoginMultiple.d.ts +1 -1
- package/types/MFA/businessRequest.d.ts +0 -11
- package/types/MFA/core/email.d.ts +0 -15
- package/types/MFA/core/face.d.ts +0 -5
- package/types/MFA/core/face_deps.d.ts +0 -6
- package/types/MFA/core/sms.d.ts +0 -10
- package/types/MFA/core/totp.d.ts +0 -17
- package/types/MFA/index.d.ts +0 -4
- package/types/Qrcode/WorkQrCode.d.ts +1 -1
- package/types/RecoveryCode/businessRequest.d.ts +1 -1
- package/types/RecoveryCode/index.d.ts +0 -3
- package/types/Register/core/WithCode.d.ts +3 -4
- package/types/Register/core/WithEmail.d.ts +1 -7
- package/types/Register/core/WithEmailCode.d.ts +11 -0
- package/types/Register/core/WithPhone.d.ts +10 -0
- package/types/Register/interface.d.ts +1 -17
- package/types/SelfUnlock/index.d.ts +0 -4
- package/types/SendCode/SendCodeByPhone.d.ts +1 -1
- package/types/Type/index.d.ts +0 -14
- package/types/_utils/config/index.d.ts +3 -11
- package/types/_utils/http.d.ts +0 -17
- package/types/_utils/index.d.ts +1 -16
- package/types/_utils/locales/index.d.ts +1 -2
- package/types/_utils/responseManagement/index.d.ts +0 -6
- package/types/version/version.d.ts +1 -1
|
@@ -16,22 +16,6 @@
|
|
|
16
16
|
http://jedwatson.github.io/classnames
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
/*!
|
|
20
|
-
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
21
|
-
Code licensed under the BSD License:
|
|
22
|
-
http://developer.yahoo.com/yui/license.html
|
|
23
|
-
version: 2.9.0
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @fileOverview
|
|
28
|
-
* @name asn1-1.0.js
|
|
29
|
-
* @author Kenji Urushima kenji.urushima@gmail.com
|
|
30
|
-
* @version asn1 1.0.13 (2017-Jun-02)
|
|
31
|
-
* @since jsrsasign 2.1
|
|
32
|
-
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
19
|
/**
|
|
36
20
|
* @license
|
|
37
21
|
* Lodash <https://lodash.com/>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/react-ui-components",
|
|
3
|
-
"version": "4.0.4-alpha.
|
|
3
|
+
"version": "4.0.4-alpha.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/index.min.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
"antd": "^4.8.0",
|
|
14
14
|
"authing-js-sdk": "4.23.35",
|
|
15
15
|
"classnames": "^2.3.1",
|
|
16
|
-
"
|
|
16
|
+
"fastclick": "^1.0.6",
|
|
17
17
|
"global": "^4.4.0",
|
|
18
|
-
"jsencrypt": "^3.2.1",
|
|
19
18
|
"phone": "^3.1.12",
|
|
20
19
|
"prompt": "^1.3.0",
|
|
21
20
|
"qs": "^6.9.4",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface BriefUserInfo {
|
|
2
|
+
displayName: string;
|
|
3
|
+
avatar: string;
|
|
4
|
+
phone: string;
|
|
5
|
+
email: string;
|
|
6
|
+
username: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GuardAccountMergeInitData {
|
|
10
|
+
currentUserInfo: BriefUserInfo;
|
|
11
|
+
existingUserInfo: BriefUserInfo;
|
|
12
|
+
mergeToken?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface UserRadioProps {
|
|
15
|
+
currentUserInfo: BriefUserInfo;
|
|
16
|
+
existingUserInfo: BriefUserInfo;
|
|
17
|
+
onChange?: (value: any) => void;
|
|
18
|
+
value?: any;
|
|
19
|
+
}
|
|
20
|
+
export interface UserRadioItemProps extends BriefUserInfo {
|
|
21
|
+
value: boolean;
|
|
22
|
+
selected: boolean;
|
|
23
|
+
onClick: (value: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare enum AuthFlowAction {
|
|
26
|
+
MERGE = "confirm-account-merge"
|
|
27
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from 'axios';
|
|
2
1
|
export declare enum ChangePasswordBusinessAction {
|
|
3
2
|
ResetPassword = "reset-password-first-time",
|
|
4
3
|
FirstLoginReset = "reset-password-forced",
|
|
@@ -7,4 +6,4 @@ export declare enum ChangePasswordBusinessAction {
|
|
|
7
6
|
export declare const authFlow: (action: ChangePasswordBusinessAction, content: {
|
|
8
7
|
password: string;
|
|
9
8
|
oldPassword?: string;
|
|
10
|
-
}
|
|
9
|
+
}) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
@@ -3,20 +3,8 @@ export declare const GuardChangePassword: React.FC<{
|
|
|
3
3
|
title: string;
|
|
4
4
|
explain: string;
|
|
5
5
|
}>;
|
|
6
|
-
/**
|
|
7
|
-
* 首次登陆重制密码
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
6
|
export declare const GuardFirstLoginPasswordResetView: React.FC;
|
|
11
7
|
export declare const GuardPasswordNotSafeResetView: React.FC;
|
|
12
8
|
export declare const GuardForcedPasswordResetView: React.FC;
|
|
13
|
-
/**
|
|
14
|
-
* 提示修改密码
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
9
|
export declare const GuardNoticePasswordResetView: React.FC;
|
|
18
|
-
/**
|
|
19
|
-
* 注册密码补全
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
10
|
export declare const GuardRegisterCompletePasswordView: React.FC;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { User } from 'authing-js-sdk';
|
|
2
2
|
import { CompleteInfoRequest, RegisterCompleteInfoInitData } from './interface';
|
|
3
3
|
export declare enum CompleteInfoAuthFlowAction {
|
|
4
4
|
Complete = "complete-completion",
|
|
5
5
|
Skip = "skip-completion"
|
|
6
6
|
}
|
|
7
|
-
export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined
|
|
8
|
-
/**
|
|
9
|
-
* 注册点击跳过
|
|
10
|
-
* @param fnName
|
|
11
|
-
* @param content
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
7
|
+
export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
14
8
|
export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>> | undefined;
|
|
15
|
-
export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<import("../_utils/http").AuthingGuardResponse<any> | undefined>;
|
|
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,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type OptionType = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
children: OptionType[];
|
|
6
|
+
};
|
|
7
|
+
interface TreeSelectProps {
|
|
8
|
+
options: OptionType[];
|
|
9
|
+
}
|
|
10
|
+
declare const TreeSelect: React.FC<TreeSelectProps>;
|
|
11
|
+
export default TreeSelect;
|
|
@@ -2,21 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { CompleteInfoMetaData, CompleteInfoRequest } from './interface';
|
|
3
3
|
import './styles.less';
|
|
4
4
|
import { CompleteInfoAuthFlowAction } from './businessRequest';
|
|
5
|
-
/**
|
|
6
|
-
* 登录时信息补全
|
|
7
|
-
* @param param0
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
5
|
export declare const GuardCompleteInfo: React.FC<{
|
|
11
6
|
metaData: CompleteInfoMetaData[];
|
|
12
7
|
skipComplateFileds: boolean;
|
|
13
8
|
businessRequest: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<void>;
|
|
14
9
|
}>;
|
|
15
|
-
/**
|
|
16
|
-
* 登录信息补全
|
|
17
|
-
*/
|
|
18
10
|
export declare const GuardLoginCompleteInfoView: React.FC;
|
|
19
|
-
/**
|
|
20
|
-
* 注册信息补全
|
|
21
|
-
*/
|
|
22
11
|
export declare const GuardRegisterCompleteInfoView: React.FC;
|
|
@@ -13,4 +13,10 @@ export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationCo
|
|
|
13
13
|
name: string;
|
|
14
14
|
value: string;
|
|
15
15
|
code?: string | undefined;
|
|
16
|
-
}[] | undefined) =>
|
|
16
|
+
}[] | undefined) => {
|
|
17
|
+
registerProfile: Record<string, any>;
|
|
18
|
+
udf: {
|
|
19
|
+
key: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
@@ -23,8 +23,11 @@ export declare enum IdentityBindingAction {
|
|
|
23
23
|
BindByPhoneCode = "bind-identity-by-phone-code",
|
|
24
24
|
BindByEmailCode = "bind-identity-by-email-code"
|
|
25
25
|
}
|
|
26
|
+
export declare const PhoneCode: (params: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
27
|
+
export declare const EmailCode: (params: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
28
|
+
export declare const Password: (params: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
26
29
|
export declare const useIdentityBindingBusinessRequest: () => {
|
|
27
|
-
"phone-code": (
|
|
28
|
-
"emial-code": (
|
|
29
|
-
password: (
|
|
30
|
+
"phone-code": (params: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
31
|
+
"emial-code": (params: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
32
|
+
password: (params: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
30
33
|
};
|
|
@@ -4,9 +4,4 @@ import { PasswordLoginMethods } from '../../../Type/application';
|
|
|
4
4
|
export interface FormItemAccountProps extends FormItemProps {
|
|
5
5
|
passwordLoginMethods: PasswordLoginMethods[];
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* 根据对应的配置:邮箱/用户名/Email渲染FormItem
|
|
9
|
-
* @param props
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
7
|
export declare const FormItemAccount: React.FC<FormItemAccountProps>;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { InputProps } from 'antd/lib/input';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PasswordLoginMethods } from '../../../Type/application';
|
|
4
|
-
/**
|
|
5
|
-
* 账号输入框
|
|
6
|
-
* 根据邮箱/手机号/密码配置自适应
|
|
7
|
-
*/
|
|
8
4
|
export interface InputAccountProps extends InputProps {
|
|
9
5
|
passwordLoginMethods: PasswordLoginMethods[];
|
|
10
6
|
}
|
|
@@ -55,7 +55,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
|
55
55
|
getOriginAccount: () => string;
|
|
56
56
|
getOriginWay: () => string;
|
|
57
57
|
} | undefined;
|
|
58
|
-
referMultipleState: ((type: "
|
|
58
|
+
referMultipleState: ((type: "login" | "multiple") => void) | undefined;
|
|
59
59
|
backfillData: BackFillMultipleState | undefined;
|
|
60
60
|
defaultQrWay: string | undefined;
|
|
61
61
|
};
|
|
@@ -39,19 +39,8 @@ export declare const AssociateFace: (content: AssociateFaceContent) => Promise<i
|
|
|
39
39
|
export declare const useMfaBusinessRequest: () => {
|
|
40
40
|
"verify-email": (content: VerifyEmailContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
41
41
|
"verify-sms": (content: VerifySmsContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
42
|
-
/**
|
|
43
|
-
* Totp 状态请求
|
|
44
|
-
* @param content
|
|
45
|
-
* @returns
|
|
46
|
-
*/
|
|
47
42
|
"verify-totp": (content: VerifyTotpContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
48
|
-
/**
|
|
49
|
-
* 人脸验证
|
|
50
|
-
*/
|
|
51
43
|
"verify-face": (content: VerifyFaceContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
52
|
-
/**
|
|
53
|
-
* 人脸绑定
|
|
54
|
-
*/
|
|
55
44
|
"associate-face": (content: AssociateFaceContent) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
|
|
56
45
|
};
|
|
57
46
|
export {};
|
|
@@ -5,11 +5,6 @@ interface BindMFAEmailProps {
|
|
|
5
5
|
onBind: (email: string) => void;
|
|
6
6
|
config: any;
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
9
|
-
* 绑定邮箱页面
|
|
10
|
-
* @param param0
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
8
|
export declare const BindMFAEmail: React.FC<BindMFAEmailProps>;
|
|
14
9
|
interface VerifyMFAEmailProps {
|
|
15
10
|
email: string;
|
|
@@ -18,17 +13,7 @@ interface VerifyMFAEmailProps {
|
|
|
18
13
|
sendCodeRef: React.RefObject<HTMLButtonElement>;
|
|
19
14
|
codeLength: number;
|
|
20
15
|
}
|
|
21
|
-
/**
|
|
22
|
-
* 验证邮箱
|
|
23
|
-
* @param param0
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
16
|
export declare const VerifyMFAEmail: React.FC<VerifyMFAEmailProps>;
|
|
27
|
-
/**
|
|
28
|
-
* 邮箱验证方式
|
|
29
|
-
* @param param0
|
|
30
|
-
* @returns
|
|
31
|
-
*/
|
|
32
17
|
export declare const MFAEmail: React.FC<{
|
|
33
18
|
mfaToken: string;
|
|
34
19
|
email?: string;
|
package/types/MFA/core/face.d.ts
CHANGED
|
@@ -5,13 +5,7 @@ export declare const devicesConstraints: {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
export declare const FACE_SCORE = 0.65;
|
|
8
|
-
/**
|
|
9
|
-
* 人脸检测配置
|
|
10
|
-
*/
|
|
11
8
|
export declare function getFaceDetectorOptions(): any;
|
|
12
|
-
/**
|
|
13
|
-
* 获取 facePlugin tinyFaceDetector 微型人脸探测(三种方式之一)
|
|
14
|
-
*/
|
|
15
9
|
export declare function getCurrentFaceDetectionNet(): any;
|
|
16
10
|
export declare function isFaceDetectionModelLoaded(): boolean;
|
|
17
11
|
export declare function dataURItoBlob(base64Data: any): Blob;
|
package/types/MFA/core/sms.d.ts
CHANGED
|
@@ -8,11 +8,6 @@ export interface BindMFASmsProps {
|
|
|
8
8
|
setAreaCode: (areaCode: string) => void;
|
|
9
9
|
isInternationSms: boolean;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* 绑定手机号
|
|
13
|
-
* @param param0
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
11
|
export declare const BindMFASms: React.FC<BindMFASmsProps>;
|
|
17
12
|
export interface VerifyMFASmsProps {
|
|
18
13
|
mfaToken: string;
|
|
@@ -26,11 +21,6 @@ export interface VerifyMFASmsProps {
|
|
|
26
21
|
userPhone?: string;
|
|
27
22
|
}
|
|
28
23
|
export declare const VerifyMFASms: React.FC<VerifyMFASmsProps>;
|
|
29
|
-
/**
|
|
30
|
-
* 手机 MFA
|
|
31
|
-
* @param param0
|
|
32
|
-
* @returns
|
|
33
|
-
*/
|
|
34
24
|
export declare const MFASms: React.FC<{
|
|
35
25
|
mfaLogin: any;
|
|
36
26
|
config: MFAConfig;
|
package/types/MFA/core/totp.d.ts
CHANGED
|
@@ -4,22 +4,12 @@ export interface BindMFATotpProps {
|
|
|
4
4
|
initData: GuardMFAInitData;
|
|
5
5
|
changeModule: any;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* 绑定 ToTp 页面 跳转 Totp
|
|
9
|
-
* @param param0
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
7
|
export declare const BindMFATotp: React.FC<BindMFATotpProps>;
|
|
13
8
|
export interface VerifyMFATotpProps {
|
|
14
9
|
mfaToken: string;
|
|
15
10
|
mfaLogin: any;
|
|
16
11
|
changeModule: any;
|
|
17
12
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Totp 验证页面
|
|
20
|
-
* @param param0
|
|
21
|
-
* @returns
|
|
22
|
-
*/
|
|
23
13
|
export declare const VerifyMFATotp: React.FC<VerifyMFATotpProps>;
|
|
24
14
|
export interface MFATotpProps {
|
|
25
15
|
changeModule: any;
|
|
@@ -27,11 +17,4 @@ export interface MFATotpProps {
|
|
|
27
17
|
initData: GuardMFAInitData;
|
|
28
18
|
mfaLogin: any;
|
|
29
19
|
}
|
|
30
|
-
/**
|
|
31
|
-
* MFA Totp 页面
|
|
32
|
-
* 开启 => 渲染 VerifyMFATotp 绑定
|
|
33
|
-
* 不开启 => 渲染绑定页面
|
|
34
|
-
* @param param
|
|
35
|
-
* @returns
|
|
36
|
-
*/
|
|
37
20
|
export declare const MFATotp: React.FC<MFATotpProps>;
|
package/types/MFA/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface WorkQrCodeRef {
|
|
|
11
11
|
url: string;
|
|
12
12
|
} | undefined>;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface WorkQrCodeProps extends Omit<UiQrProps, 'description' | 'status'> {
|
|
15
15
|
/**
|
|
16
16
|
* 二维码场景
|
|
17
17
|
*/
|
|
@@ -2,4 +2,4 @@ export declare enum TotpRecoveryCodeBusinessAction {
|
|
|
2
2
|
RecoveryTotp = "recovery-totp",
|
|
3
3
|
ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
|
|
4
4
|
}
|
|
5
|
-
export declare function authFlow<T>(action: TotpRecoveryCodeBusinessAction,
|
|
5
|
+
export declare function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("../_utils/http").AuthingGuardResponse<T>>;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Agreement, ApplicationConfig } from '../../Type/application';
|
|
3
|
-
import { GetRegisterEvent } from '../interface';
|
|
4
3
|
export interface RegisterWithCodeProps {
|
|
5
4
|
onRegisterSuccess: Function;
|
|
6
5
|
onRegisterFailed: Function;
|
|
7
|
-
onBeforeRegister?:
|
|
6
|
+
onBeforeRegister?: Function;
|
|
8
7
|
agreements: Agreement[];
|
|
9
8
|
publicConfig?: ApplicationConfig;
|
|
10
9
|
registeContext?: any;
|
|
11
10
|
methods: any[];
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param
|
|
13
|
+
* 手机 Code 注册
|
|
14
|
+
* @param param0
|
|
16
15
|
* @returns
|
|
17
16
|
*/
|
|
18
17
|
export declare const RegisterWithCode: React.FC<RegisterWithCodeProps>;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { GetRegisterEvent } from '../interface';
|
|
3
2
|
import { Agreement, ApplicationConfig } from '../../Type/application';
|
|
4
3
|
export interface RegisterWithEmailProps {
|
|
5
4
|
onRegisterSuccess: Function;
|
|
6
5
|
onRegisterFailed: Function;
|
|
7
|
-
onBeforeRegister?:
|
|
6
|
+
onBeforeRegister?: Function;
|
|
8
7
|
publicConfig?: ApplicationConfig;
|
|
9
8
|
agreements: Agreement[];
|
|
10
9
|
registeContext?: any;
|
|
11
10
|
}
|
|
12
|
-
/**
|
|
13
|
-
* 邮箱 + 密码注册 头部显示密码注册
|
|
14
|
-
* @param param
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
11
|
export declare const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Agreement, ApplicationConfig } from '../../Type/application';
|
|
3
|
+
export interface RegisterWithEmailCodeProps {
|
|
4
|
+
onRegisterSuccess: Function;
|
|
5
|
+
onRegisterFailed: Function;
|
|
6
|
+
onBeforeRegister?: Function;
|
|
7
|
+
agreements: Agreement[];
|
|
8
|
+
publicConfig?: ApplicationConfig;
|
|
9
|
+
registeContext?: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Agreement, ApplicationConfig } from '../../Type/application';
|
|
3
|
+
export interface RegisterWithPhoneProps {
|
|
4
|
+
onRegisterSuccess: Function;
|
|
5
|
+
onRegisterFailed: Function;
|
|
6
|
+
agreements: Agreement[];
|
|
7
|
+
publicConfig?: ApplicationConfig;
|
|
8
|
+
registeContext?: any;
|
|
9
|
+
}
|
|
10
|
+
export declare const RegisterWithPhone: React.FC<RegisterWithPhoneProps>;
|
|
@@ -10,24 +10,8 @@ export interface RegisterConfig extends IG2Config {
|
|
|
10
10
|
agreements?: Agreement[];
|
|
11
11
|
registerContext?: any;
|
|
12
12
|
}
|
|
13
|
-
export declare type SupportRegisterMethods = 'email' | 'email-code' | 'phone-code';
|
|
14
|
-
/**
|
|
15
|
-
* 注册前回调事件接受参数
|
|
16
|
-
*/
|
|
17
|
-
export interface onBeforeRegisterParams {
|
|
18
|
-
type: SupportRegisterMethods;
|
|
19
|
-
data: {
|
|
20
|
-
account: string;
|
|
21
|
-
password?: string;
|
|
22
|
-
code?: string;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* 获取用户注册事件的类型
|
|
27
|
-
*/
|
|
28
|
-
export declare type GetRegisterEvent<T extends keyof RegisterEvents> = RegisterEvents[T];
|
|
29
13
|
export interface RegisterEvents extends IG2Events {
|
|
30
|
-
onBeforeRegister?: (registerInfo:
|
|
14
|
+
onBeforeRegister?: (registerInfo: any, authClient: AuthenticationClient) => boolean | Promise<boolean>;
|
|
31
15
|
onRegister?: (user: User, authClient: AuthenticationClient) => void;
|
|
32
16
|
onRegisterError?: (error: any) => void;
|
|
33
17
|
onRegisterTabChange?: (activeTab: RegisterMethods) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { SceneType } from 'authing-js-sdk';
|
|
2
3
|
import './style.less';
|
|
3
4
|
import { InputProps } from 'antd/lib/input';
|
|
4
|
-
import { SceneType } from 'components/Type';
|
|
5
5
|
export interface SendCodeByPhoneProps extends InputProps {
|
|
6
6
|
data?: string;
|
|
7
7
|
form?: any;
|
package/types/Type/index.d.ts
CHANGED
|
@@ -82,17 +82,3 @@ export declare enum EmailScene {
|
|
|
82
82
|
EMAIL_UNBIND_VERIFY_CODE = "EMAIL_UNBIND_VERIFY_CODE",
|
|
83
83
|
SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE"
|
|
84
84
|
}
|
|
85
|
-
/**
|
|
86
|
-
* 验证码场景类型
|
|
87
|
-
*/
|
|
88
|
-
export declare enum SceneType {
|
|
89
|
-
SCENE_TYPE_LOGIN = "login",
|
|
90
|
-
SCENE_TYPE_REGISTER = "register",
|
|
91
|
-
SCENE_TYPE_RESET = "reset",
|
|
92
|
-
SCENE_TYPE_BIND = "bind",
|
|
93
|
-
SCENE_TYPE_UNBIND = "unbind",
|
|
94
|
-
SCENE_TYPE_MFA_BIND = "mfa-bind",
|
|
95
|
-
SCENE_TYPE_MFA_VERIFY = "mfa-verify",
|
|
96
|
-
SCENE_TYPE_MFA_UNBIND = "mfa-unbind",
|
|
97
|
-
SCENE_TYPE_COMPLETE_PHONE = "complete-phone"
|
|
98
|
-
}
|
|
@@ -6,14 +6,6 @@ import { ApplicationConfig, RegisterMethods } from '../../Type/application';
|
|
|
6
6
|
export declare const getPublicConfig: (appId: string) => ApplicationConfig;
|
|
7
7
|
export declare const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
|
|
8
8
|
export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param appId
|
|
12
|
-
* @param config 默认配置
|
|
13
|
-
* @param httpClient
|
|
14
|
-
* @param setError
|
|
15
|
-
* @returns 合并后的 finallyConfig
|
|
16
|
-
*/
|
|
17
9
|
export declare const useMergePublicConfig: (forceUpdate: number, appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
18
10
|
host: string;
|
|
19
11
|
isSSO?: boolean | undefined;
|
|
@@ -50,7 +42,7 @@ export declare const useMergePublicConfig: (forceUpdate: number, appId?: string
|
|
|
50
42
|
loginMethods?: import("../../Type").LoginMethods[] | undefined;
|
|
51
43
|
passwordLoginMethods?: import("../../Type").PasswordLoginMethods[] | undefined;
|
|
52
44
|
socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
|
|
53
|
-
socialConnectionsBtnShape?: "
|
|
45
|
+
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
54
46
|
enterpriseConnections?: string[] | undefined;
|
|
55
47
|
qrCodeScanOptions?: {
|
|
56
48
|
extIdpConnId?: string | undefined;
|
|
@@ -100,5 +92,5 @@ export declare const useMergePublicConfig: (forceUpdate: number, appId?: string
|
|
|
100
92
|
} | undefined;
|
|
101
93
|
export declare const getPageConfig: (appId: string) => GuardPageConfig;
|
|
102
94
|
export declare const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
|
|
103
|
-
export declare const requestGuardPageConfig: (appId: string,
|
|
104
|
-
export declare const useGuardPageConfig: (forceUpdate: number, appId?: string | undefined,
|
|
95
|
+
export declare const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
|
|
96
|
+
export declare const useGuardPageConfig: (forceUpdate: number, appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
|