@authing/react-ui-components 4.0.4-alpha.4 → 4.0.4-rc.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.
Files changed (43) hide show
  1. package/lib/index.min.css +2 -2
  2. package/lib/index.min.js +1 -1
  3. package/lib/index.min.js.LICENSE.txt +0 -16
  4. package/package.json +2 -3
  5. package/types/ChangePassword/businessRequest.d.ts +1 -2
  6. package/types/ChangePassword/core/completePassword.d.ts +0 -6
  7. package/types/ChangePassword/index.d.ts +0 -12
  8. package/types/CompleteInfo/businessRequest.d.ts +3 -9
  9. package/types/CompleteInfo/core/completeInfo.d.ts +0 -5
  10. package/types/CompleteInfo/index.d.ts +0 -11
  11. package/types/CompleteInfo/interface.d.ts +1 -1
  12. package/types/CompleteInfo/utils.d.ts +7 -1
  13. package/types/ForgetPassword/index.d.ts +0 -3
  14. package/types/Guard/core/hooks/useMultipleAccounts.d.ts +0 -4
  15. package/types/IdentityBinding/IdentityBinding.d.ts +0 -5
  16. package/types/IdentityBinding/businessRequest.d.ts +6 -3
  17. package/types/Login/core/withPassword/FormItemAccount.d.ts +0 -5
  18. package/types/Login/core/withPassword/GraphicVerifyCode.d.ts +0 -5
  19. package/types/Login/core/withPassword/InputAccount.d.ts +0 -4
  20. package/types/Login/core/withPassword/index.d.ts +0 -5
  21. package/types/Login/hooks/useLoginMultiple.d.ts +1 -3
  22. package/types/MFA/businessRequest.d.ts +0 -11
  23. package/types/MFA/core/email.d.ts +0 -15
  24. package/types/MFA/core/face.d.ts +0 -5
  25. package/types/MFA/core/face_deps.d.ts +0 -6
  26. package/types/MFA/core/sms.d.ts +0 -10
  27. package/types/MFA/core/totp.d.ts +0 -17
  28. package/types/MFA/index.d.ts +0 -4
  29. package/types/Qrcode/WorkQrCode.d.ts +1 -1
  30. package/types/RecoveryCode/businessRequest.d.ts +1 -1
  31. package/types/RecoveryCode/index.d.ts +0 -3
  32. package/types/Register/core/WithCode.d.ts +3 -4
  33. package/types/Register/core/WithEmail.d.ts +1 -7
  34. package/types/Register/interface.d.ts +1 -17
  35. package/types/SelfUnlock/index.d.ts +0 -4
  36. package/types/SendCode/SendCodeByPhone.d.ts +1 -1
  37. package/types/Type/index.d.ts +0 -14
  38. package/types/_utils/config/index.d.ts +3 -11
  39. package/types/_utils/http.d.ts +0 -17
  40. package/types/_utils/index.d.ts +1 -16
  41. package/types/_utils/locales/index.d.ts +1 -2
  42. package/types/_utils/responseManagement/index.d.ts +0 -6
  43. 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.4",
3
+ "version": "4.0.4-rc.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
- "axios": "^0.27.2",
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",
@@ -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
- }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
9
+ }) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
@@ -1,8 +1,2 @@
1
1
  import React from 'react';
2
- /**
3
- * 注册补全密码
4
- * 进入流程:
5
- * 1. 控制台登陆方式 短信验证码 && 手机号密码
6
- * 2. 注册方式 短信验证码
7
- */
8
2
  export declare const CompletePassword: React.FC;
@@ -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 { AxiosRequestConfig } from 'axios';
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, config?: AxiosRequestConfig<any> | undefined) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
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>;
@@ -8,9 +8,4 @@ export interface FieldMetadata {
8
8
  key: string;
9
9
  options: any;
10
10
  }
11
- /**
12
- * 信息补全
13
- * @param props
14
- * @returns
15
- */
16
11
  export declare const CompleteInfo: React.FC<CompleteInfoProps>;
@@ -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;
@@ -63,7 +63,7 @@ export declare enum CompleteInfoExtendsControls {
63
63
  IMAGE = "image",
64
64
  NUMBER = "number",
65
65
  DATE = "date",
66
- DATE_TIME = "dateTime",
66
+ DATE_TIME = "datetime",
67
67
  SELECT = "select",
68
68
  DROPDOWN = "dropdown",
69
69
  BOOLEAN = "boolean",
@@ -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) => Record<string, any>;
16
+ }[] | undefined) => {
17
+ registerProfile: Record<string, any>;
18
+ udf: {
19
+ key: string;
20
+ value: string;
21
+ }[];
22
+ };
@@ -1,5 +1,2 @@
1
1
  import React from 'react';
2
- /**
3
- * 忘记密码
4
- */
5
2
  export declare const GuardForgetPassword: React.FC;
@@ -23,10 +23,6 @@ export interface BackFillMultipleState extends Omit<User, 'id' | 'name' | 'nickn
23
23
  * 回填的账号名称 邮箱/用户名/手机
24
24
  */
25
25
  account: string;
26
- /**
27
- * 具体登录方式 way 是tabs页控制 originWay 具体方式
28
- */
29
- originWay?: string;
30
26
  }
31
27
  /**
32
28
  * Store instance
@@ -1,8 +1,3 @@
1
1
  import React from 'react';
2
2
  import './styles.less';
3
- /**
4
- * 身份源绑定 第三方登陆时
5
- * 需要身份源绑定相关 Authing 账号
6
- * @returns
7
- */
8
3
  export declare const GuardIdentityBindingView: React.FC;
@@ -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": (data: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
28
- "emial-code": (data: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
29
- password: (data: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
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>;
@@ -4,9 +4,4 @@ export interface GraphicVerifyCodeProps extends InputProps {
4
4
  verifyCodeUrl: string;
5
5
  changeCode: () => void;
6
6
  }
7
- /**
8
- * 图形验证码
9
- * @param props
10
- * @returns
11
- */
12
7
  export declare const GraphicVerifyCode: React.FC<GraphicVerifyCodeProps>;
@@ -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
  }
@@ -24,10 +24,5 @@ interface LoginWithPasswordProps {
24
24
  */
25
25
  backfillData?: BackFillMultipleState;
26
26
  }
27
- /**
28
- * 密码登陆
29
- * @param props
30
- * @returns
31
- */
32
27
  export declare const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
33
28
  export {};
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { FormInstance } from 'antd/lib/form';
3
- import { InputMethod } from 'components/Type';
4
3
  import { BackFillMultipleState, LoginWay } from '../../Guard/core/hooks/useMultipleAccounts';
5
4
  /**
6
5
  * 多账号登录下 账户 & 登录方式自动回填
@@ -15,7 +14,6 @@ declare function useLoginMultipleBackFill(options: {
15
14
  isOnlyInternationSms?: boolean;
16
15
  setAreaCode?: React.Dispatch<React.SetStateAction<string>>;
17
16
  cancelBackfill?: boolean;
18
- setCurrentMethod?: React.Dispatch<React.SetStateAction<InputMethod>>;
19
17
  }): void;
20
18
  /**
21
19
  * 多账号统一状态管理
@@ -57,7 +55,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
57
55
  getOriginAccount: () => string;
58
56
  getOriginWay: () => string;
59
57
  } | undefined;
60
- referMultipleState: ((type: "multiple" | "login") => void) | undefined;
58
+ referMultipleState: ((type: "login" | "multiple") => void) | undefined;
61
59
  backfillData: BackFillMultipleState | undefined;
62
60
  defaultQrWay: string | undefined;
63
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;
@@ -1,7 +1,2 @@
1
1
  /// <reference types="react" />
2
- /**
3
- * 面部认证
4
- * @param props
5
- * @returns
6
- */
7
2
  export declare const MFAFace: (props: any) => JSX.Element;
@@ -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;
@@ -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;
@@ -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>;
@@ -5,9 +5,5 @@ interface MFABackStateContextType {
5
5
  mfaBackState: string;
6
6
  }
7
7
  export declare const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
8
- /**
9
- * MFA 相关页面
10
- * @returns
11
- */
12
8
  export declare const GuardMFAView: React.FC;
13
9
  export {};
@@ -11,7 +11,7 @@ export interface WorkQrCodeRef {
11
11
  url: string;
12
12
  } | undefined>;
13
13
  }
14
- export interface WorkQrCodeProps extends Omit<UiQrProps, 'description' | 'status'> {
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, data: any): Promise<import("../_utils/http").AuthingGuardResponse<T>>;
5
+ export declare function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("../_utils/http").AuthingGuardResponse<T>>;
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
2
  import './style.less';
3
3
  export declare const RecoveryCode: React.FC;
4
- /**
5
- * authFlow 中恢复
6
- */
7
4
  export declare const RecoveryCodeAuthFlow: React.FC;
8
5
  export declare const GuardRecoveryCodeView: React.FC;
@@ -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?: GetRegisterEvent<'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 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?: GetRegisterEvent<'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>;
@@ -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: onBeforeRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
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,6 +1,2 @@
1
1
  import React from 'react';
2
- /**
3
- * 自助解锁
4
- * @returns
5
- */
6
2
  export declare const GuardUnlockView: React.FC;
@@ -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;
@@ -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?: "button" | "default" | "icon" | undefined;
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, baseURL?: string | undefined) => Promise<GuardPageConfig>;
104
- export declare const useGuardPageConfig: (forceUpdate: number, appId?: string | undefined, defaultConfig?: GuardLocalConfig | undefined, serError?: any) => GuardPageConfig | 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;
@@ -28,23 +28,6 @@ export interface AuthingResponse<T = any> {
28
28
  flowHandle?: string;
29
29
  }
30
30
  export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
31
- /**
32
- * 根据 Server 返回状态进行的状态流转函数
33
- * 默认响应拦截器中自动调用
34
- */
35
31
  onGuardHandling?: () => CodeAction;
36
- /**
37
- * Response 返回 actions 是否需要模块内部处理
38
- * 根据 status === 200 判断
39
- */
40
- isBusiness?: boolean;
41
- /**
42
- * 流程是否结束(兼容老版本字段)
43
- */
44
32
  isFlowEnd?: boolean;
45
- /**
46
- * 本次响应 Action 类型
47
- * see: packages/react-components/components/_utils/responseManagement/interface.ts
48
- */
49
- responseActionType?: CodeAction;
50
33
  }
@@ -1,10 +1,9 @@
1
- import { FormInstance, Rule, RuleObject } from 'antd/lib/form';
1
+ import { Rule } from 'antd/lib/form';
2
2
  import qs from 'qs';
3
3
  import { User } from 'authing-js-sdk';
4
4
  import { GuardProps } from '../Guard';
5
5
  import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods } from '../Type/application';
6
6
  import { Lang } from '../Type';
7
- import { InputMethod } from 'components';
8
7
  export * from './popupCenter';
9
8
  export * from './clipboard';
10
9
  export declare const VALIDATE_PATTERN: {
@@ -17,20 +16,6 @@ export declare const VALIDATE_PATTERN: {
17
16
  export declare const validate: (type: keyof typeof VALIDATE_PATTERN, val: string) => boolean;
18
17
  export declare const getRequiredRules: (msg: string) => Rule[];
19
18
  export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string | undefined) => Rule[];
20
- /**
21
- * 验证码是否正确
22
- * @param form form 实例
23
- * @param key 当前 FormItem 对应值的 key,比如当前为邮箱验证码就传入邮箱输入框的 formItem name
24
- * @returns Array
25
- */
26
- export declare const fieldCodeCorrect: (form: FormInstance, key: string | undefined, options: {
27
- currentMethod: InputMethod;
28
- areaCode: string;
29
- isInternationSms?: boolean | undefined;
30
- }) => {
31
- validateTrigger: string[];
32
- validator: (rule: RuleObject, value: string) => Promise<void>;
33
- }[];
34
19
  export declare function getDeviceName(): string | null | undefined;
35
20
  export declare type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
36
21
  export declare const insertStyles: (styles: string | any, recordKey?: "appConfig" | "userConfig" | undefined) => void;