@authing/react-ui-components 4.2.2-alpha.0 → 4.2.3-alpha.0

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 (54) hide show
  1. package/lib/index.min.css +2 -2
  2. package/lib/index.min.js +1 -1
  3. package/package.json +1 -1
  4. package/types/AuthClientProvider/AuthClientProvider.d.ts +2 -4
  5. package/types/Back/index.d.ts +1 -3
  6. package/types/BindTotp/businessRequest.d.ts +1 -1
  7. package/types/ChangePassword/businessRequest.d.ts +1 -1
  8. package/types/ChangePassword/index.d.ts +1 -2
  9. package/types/CompleteInfo/businessRequest.d.ts +2 -2
  10. package/types/CompleteInfo/interface.d.ts +1 -2
  11. package/types/ForgetPassword/core/resetPassword.d.ts +1 -5
  12. package/types/ForgetPassword/interface.d.ts +1 -1
  13. package/types/Guard/GuardModule/stateMachine.d.ts +1 -1
  14. package/types/Guard/core/hooks/useMultipleAccounts.d.ts +2 -4
  15. package/types/Guard/core/renderContext.d.ts +1 -2
  16. package/types/Guard/core/renderModule.d.ts +1 -1
  17. package/types/Guard/event.d.ts +1 -2
  18. package/types/Guard/module.d.ts +2 -6
  19. package/types/IdentityBinding/businessRequest.d.ts +2 -2
  20. package/types/ImagePro/index.d.ts +0 -1
  21. package/types/InputPassword/index.d.ts +4 -2
  22. package/types/Login/core/withPassword/FormItemAccount.d.ts +2 -1
  23. package/types/Login/core/withPassword/InputAccount.d.ts +2 -2
  24. package/types/Login/core/withPassword/index.d.ts +2 -2
  25. package/types/Login/hooks/useLoginMultiple.d.ts +1 -2
  26. package/types/Login/interface.d.ts +2 -2
  27. package/types/MFA/businessRequest.d.ts +1 -1
  28. package/types/MFA/interface.d.ts +1 -4
  29. package/types/Qrcode/UiQrCode.d.ts +1 -1
  30. package/types/RecoveryCode/businessRequest.d.ts +1 -1
  31. package/types/Register/core/WithEmail.d.ts +0 -2
  32. package/types/Register/interface.d.ts +2 -2
  33. package/types/Type/application.d.ts +7 -50
  34. package/types/Type/index.d.ts +4 -4
  35. package/types/ValidatorRules/ValidatorFormItem.d.ts +0 -3
  36. package/types/ValidatorRules/index.d.ts +2 -3
  37. package/types/_utils/GuardErrorCode.d.ts +1 -1
  38. package/types/_utils/config/index.d.ts +4 -4
  39. package/types/_utils/context.d.ts +4 -21
  40. package/types/_utils/hooks/index.d.ts +1 -1
  41. package/types/_utils/index.d.ts +5 -11
  42. package/types/_utils/logger/interface.d.ts +1 -1
  43. package/types/_utils/responseManagement/interface.d.ts +3 -5
  44. package/types/version/version.d.ts +1 -1
  45. package/types/ForgetPassword/InputPassword/index.d.ts +0 -4
  46. package/types/ForgetPassword/core/inputIdentify.d.ts +0 -7
  47. package/types/GuardFace/index.d.ts +0 -16
  48. package/types/GuardSelect/index.d.ts +0 -29
  49. package/types/NewSubmitSuccess/index.d.ts +0 -2
  50. package/types/NewSubmitSuccess/interface.d.ts +0 -17
  51. package/types/SelectAccount/index.d.ts +0 -3
  52. package/types/TenantPortalSelect/index.d.ts +0 -16
  53. package/types/_utils/getCaptchaUrl.d.ts +0 -1
  54. package/types/_utils/tenant.d.ts +0 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.2.2-alpha.0",
3
+ "version": "4.2.3-alpha.0",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -1,6 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import React from 'react';
2
2
  import { AuthClientContextProps } from './context';
3
- export declare const AuthClientProvider: React.FC<AuthClientContextProps & {
4
- children: ReactNode;
5
- }>;
3
+ export declare const AuthClientProvider: React.FC<AuthClientContextProps>;
6
4
  export declare const useGlobalAuthClient: () => import("authing-js-sdk").AuthenticationClient | undefined;
@@ -7,6 +7,4 @@ 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 & {
11
- children: any;
12
- }>;
10
+ export declare const BackCustom: React.FC<BackCustomProps>;
@@ -1,4 +1,4 @@
1
- export declare enum BindTotpBusinessAction {
1
+ export declare const enum BindTotpBusinessAction {
2
2
  VerifyTotpFirstTime = "verify-totp-first-time",
3
3
  ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
4
4
  }
@@ -1,4 +1,4 @@
1
- export declare enum ChangePasswordBusinessAction {
1
+ export declare const enum ChangePasswordBusinessAction {
2
2
  ResetPassword = "reset-password-first-time",
3
3
  FirstLoginReset = "reset-password-forced",
4
4
  ResetPasswordStrengthDetection = "reset-password-strength-detection"
@@ -1,8 +1,7 @@
1
- import React, { ReactNode } from 'react';
1
+ import React from 'react';
2
2
  export declare const GuardChangePassword: React.FC<{
3
3
  title: string;
4
4
  explain: string;
5
- children: ReactNode;
6
5
  }>;
7
6
  export declare const GuardFirstLoginPasswordResetView: React.FC;
8
7
  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 enum CompleteInfoAuthFlowAction {
3
+ export declare const 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'] | string, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
8
+ export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>> | undefined;
9
9
  export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("../_utils/http").AuthingGuardResponse<any> | undefined>;
@@ -95,6 +95,5 @@ export interface CompleteInfoRequest {
95
95
  export declare enum OmitCompleteInfo {
96
96
  'registerByEmail' = "email",
97
97
  'registerByPhoneCode' = "phone",
98
- 'registerByEmailCode' = "email",
99
- 'phone-password' = "phone"
98
+ 'registerByEmailCode' = "email"
100
99
  }
@@ -4,12 +4,8 @@ export declare enum InputMethodMap {
4
4
  phone = "phone-code"
5
5
  }
6
6
  interface ResetPasswordProps {
7
+ onReset: any;
7
8
  publicConfig: any;
8
- setPhoneOrEmail: any;
9
- setControlShow: any;
10
- setPolicyStrength: any;
11
- setCustomPasswordStrength: any;
12
- setPhoneOrEmailText: any;
13
9
  }
14
10
  export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
15
11
  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?: CommonMessage, authClient?: AuthenticationClient, sence?: EmailScene) => void;
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;
@@ -4,7 +4,7 @@ export interface ModuleState {
4
4
  moduleName: GuardModuleType;
5
5
  initData?: any;
6
6
  }
7
- export declare enum ActionType {
7
+ export declare const enum ActionType {
8
8
  ChangeModule = "ChangeModule",
9
9
  Back = "Back",
10
10
  Init = "Init"
@@ -248,8 +248,7 @@ declare class MultipleAccount {
248
248
  } | undefined) => void;
249
249
  setUserInfo: (user: Pick<User & {
250
250
  id: string;
251
- loginAccount?: string | undefined;
252
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
251
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
253
252
  setLoginWayByHttpData: (account: string, data: {
254
253
  username?: string | undefined;
255
254
  phone?: string | undefined;
@@ -291,8 +290,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
291
290
  } | undefined) => void;
292
291
  setUserInfo: (user: Pick<User & {
293
292
  id: string;
294
- loginAccount?: string | undefined;
295
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
293
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
296
294
  setLoginWayByHttpData: (account: string, data: {
297
295
  username?: string | undefined;
298
296
  phone?: string | undefined;
@@ -1,8 +1,7 @@
1
1
  import { GuardProps } from '..';
2
- import React, { ReactNode } from 'react';
2
+ import React 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;
8
7
  }>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { GuardProps } from '..';
3
3
  import '../styles.less';
4
- export declare enum LangMAP {
4
+ export declare const enum LangMAP {
5
5
  zhCn = "zh-CN",
6
6
  enUs = "en-US",
7
7
  jaJp = "ja-JP"
@@ -19,8 +19,7 @@ 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
- loginAccount?: string | undefined;
23
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
22
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
24
23
  setLoginWayByHttpData: (account: string, data: {
25
24
  username?: string | undefined;
26
25
  phone?: string | undefined;
@@ -1,4 +1,4 @@
1
- export declare enum GuardModuleType {
1
+ export declare const enum GuardModuleType {
2
2
  ERROR = "error",
3
3
  LOGIN = "login",
4
4
  REGISTER = "register",
@@ -18,11 +18,7 @@ export declare enum GuardModuleType {
18
18
  SUBMIT_SUCCESS = "submitSuccess",
19
19
  IDENTITY_BINDING_ASK = "identityBindingAsk",
20
20
  IDENTITY_BINDING = "identityBinding",
21
- SELF_UNLOCK = "selfUnlock",
22
- FLOW_SELECT_ACCOUNT = "flowSelectAccount",
23
- /** 多租户门户选择页 */
24
- TENANT_PORTAL = "tenant-portal",
25
- New_SUBMIT_SUCCESS = "newSubmitSuccess"
21
+ SELF_UNLOCK = "selfUnlock"
26
22
  }
27
23
  export interface GuardModuleAction {
28
24
  action: string;
@@ -1,4 +1,4 @@
1
- export declare enum IdentityBindingBusinessAction {
1
+ export declare const 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 enum IdentityBindingAction {
20
+ export declare const enum IdentityBindingAction {
21
21
  CreateUser = "create-federation-account",
22
22
  BindByPassword = "bind-identity-by-password",
23
23
  BindByPhoneCode = "bind-identity-by-phone-code",
@@ -12,4 +12,3 @@ export interface ImageProProps extends React.ImgHTMLAttributes<HTMLImageElement>
12
12
  noSpin?: boolean;
13
13
  }
14
14
  export declare const ImagePro: (props: ImageProProps) => JSX.Element;
15
- export declare const ImagePro2: (props: ImageProProps) => JSX.Element;
@@ -1,2 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const InputPassword: (props: any) => JSX.Element;
1
+ import { Input } from 'antd';
2
+ import { PasswordProps } from 'antd/lib/input';
3
+ import React from 'react';
4
+ export declare const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
@@ -1,6 +1,7 @@
1
1
  import { FormItemProps } from 'antd/lib/form';
2
2
  import React from 'react';
3
+ import { PasswordLoginMethods } from '../../../Type/application';
3
4
  export interface FormItemAccountProps extends FormItemProps {
4
- validPasswordLoginMethods: string[];
5
+ passwordLoginMethods: PasswordLoginMethods[];
5
6
  }
6
7
  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';
3
4
  export interface InputAccountProps extends InputProps {
4
- passwordLoginMethods: string[];
5
- placeholder: string;
5
+ passwordLoginMethods: PasswordLoginMethods[];
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 } from '../../../Type/application';
3
+ import { Agreement, LoginMethods, PasswordLoginMethods } 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: string[];
13
+ passwordLoginMethods: PasswordLoginMethods[];
14
14
  agreements: Agreement[];
15
15
  loginWay?: LoginMethods;
16
16
  submitButText?: string;
@@ -34,8 +34,7 @@ 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
- loginAccount?: string | undefined;
38
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
37
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
39
38
  setLoginWayByHttpData: (account: string, data: {
40
39
  username?: string | undefined;
41
40
  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, SocialConnectionProvider } from '../Type/application';
4
+ import { Agreement, LoginMethods, PasswordLoginMethods, 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?: string[];
11
+ passwordLoginMethods?: PasswordLoginMethods[];
12
12
  socialConnections?: SocialConnectionProvider[];
13
13
  socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
14
14
  enterpriseConnections?: string[];
@@ -1,4 +1,4 @@
1
- export declare enum MfaBusinessAction {
1
+ export declare const enum MfaBusinessAction {
2
2
  VerifyEmail = "verify-email",
3
3
  VerifySms = "verify-sms",
4
4
  VerifyTotp = "verify-totp",
@@ -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 enum MFAType {
10
+ export declare const enum MFAType {
11
11
  SMS = "SMS",
12
12
  EMAIL = "EMAIL",
13
13
  TOTP = "OTP",
@@ -29,9 +29,6 @@ export interface GuardMFAInitData {
29
29
  nickme?: string;
30
30
  username?: string;
31
31
  current?: MFAType;
32
- mfaPhoneCountryCode?: string;
33
- mfaPhone?: string;
34
- mfaEmail?: string;
35
32
  }
36
33
  export interface GuardMFAProps extends IG2FCProps, MFAEvents {
37
34
  config: Partial<MFAConfig>;
@@ -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: string;
5
+ export declare const prefix = "refactor";
6
6
  export interface UiQrProps {
7
7
  /**
8
8
  * Loading 组件
@@ -1,4 +1,4 @@
1
- export declare enum TotpRecoveryCodeBusinessAction {
1
+ export declare const enum TotpRecoveryCodeBusinessAction {
2
2
  RecoveryTotp = "recovery-totp",
3
3
  ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
4
4
  }
@@ -7,7 +7,5 @@ export interface RegisterWithEmailProps {
7
7
  publicConfig?: ApplicationConfig;
8
8
  agreements: Agreement[];
9
9
  registeContext?: any;
10
- label?: string;
11
- method?: string;
12
10
  }
13
11
  export declare const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
@@ -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?: string[];
7
- defaultRegisterMethod?: string;
6
+ registerMethods?: RegisterMethods[];
7
+ defaultRegisterMethod?: RegisterMethods;
8
8
  publicKey?: string;
9
9
  agreementEnabled?: boolean;
10
10
  agreements?: Agreement[];
@@ -1,7 +1,7 @@
1
1
  import { Lang } from '..';
2
2
  import { PasswordStrength } from '../_utils';
3
3
  export * from 'authing-js-sdk';
4
- export declare enum LoginMethods {
4
+ export declare const enum LoginMethods {
5
5
  LDAP = "ldap",
6
6
  AppQr = "app-qrcode",
7
7
  Password = "password",
@@ -10,11 +10,11 @@ export declare enum LoginMethods {
10
10
  AD = "ad",
11
11
  WechatMpQrcode = "wechatmp-qrcode"
12
12
  }
13
- export declare enum OIDCConnectionMode {
13
+ export declare const enum OIDCConnectionMode {
14
14
  FRONT_CHANNEL = "FRONT_CHANNEL",
15
15
  BACK_CHANNEL = "BACK_CHANNEL"
16
16
  }
17
- export declare enum SocialConnectionProvider {
17
+ export declare const enum SocialConnectionProvider {
18
18
  ALIPAY = "alipay",
19
19
  GOOGLE = "google",
20
20
  WECHATPC = "wechat:pc",
@@ -41,7 +41,7 @@ export declare enum SocialConnectionProvider {
41
41
  QINGCLOUD = "qingcloud",
42
42
  FACEBOOK = "facebook"
43
43
  }
44
- export declare enum Protocol {
44
+ export declare const enum Protocol {
45
45
  AD = "ad",
46
46
  CAS = "cas",
47
47
  LDAP = "ldap",
@@ -98,22 +98,16 @@ export interface SocialConnectionItem {
98
98
  authorizationUrl: string;
99
99
  tooltip: Record<Lang, string>;
100
100
  }
101
- export declare enum RegisterMethods {
101
+ export declare const enum RegisterMethods {
102
102
  Email = "email",
103
103
  Phone = "phone",
104
104
  EmailCode = "emailCode"
105
105
  }
106
- export declare enum RegisterSortMethods {
107
- Email = "email-password",
108
- Phone = "phone-code",
109
- EmailCode = "email-code"
110
- }
111
- export interface QrCodeItem {
106
+ export declare type QrcodeTabsSettings = Record<LoginMethods, Array<{
112
107
  id: string;
113
108
  title: string;
114
109
  isDefault?: boolean;
115
- }
116
- export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
110
+ }>>;
117
111
  export interface OidcClientMetadata {
118
112
  grant_types: string[];
119
113
  client_id: string;
@@ -151,13 +145,9 @@ export interface UserExtendsField {
151
145
  export declare type ExtendsField = InternalExtendsField | UserExtendsField;
152
146
  export interface ApplicationPasswordTabConfig {
153
147
  enabledLoginMethods?: PasswordLoginMethods[];
154
- validRegisterMethods?: string[];
155
- validLoginMethods?: string[];
156
148
  }
157
149
  export interface ApplicationVerifyCodeTabConfig {
158
150
  enabledLoginMethods: VerifyLoginMethods[];
159
- validRegisterMethods?: string[];
160
- validLoginMethods?: string[];
161
151
  }
162
152
  export interface Agreement {
163
153
  id: number;
@@ -169,14 +159,6 @@ export interface Agreement {
169
159
  export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
170
160
  export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
171
161
  export declare type ComplateFiledsPlace = 'register' | 'login';
172
- export interface TabFieldsI18nItem {
173
- key: string;
174
- label: string;
175
- labelEn: string;
176
- i18n: {
177
- [propName in Lang]?: string;
178
- };
179
- }
180
162
  export interface ApplicationConfig {
181
163
  id: string;
182
164
  allowedOrigins: string[];
@@ -216,9 +198,6 @@ export interface ApplicationConfig {
216
198
  };
217
199
  };
218
200
  qrcodeTabsSettings: QrcodeTabsSettings;
219
- qrCodeSortConfig: {
220
- loginMethodsSort?: string[];
221
- };
222
201
  loginTabs: {
223
202
  list: string[];
224
203
  default: string;
@@ -285,26 +264,4 @@ export interface ApplicationConfig {
285
264
  * 是否开启注册密码补全
286
265
  */
287
266
  enableCompletePassword: boolean;
288
- /**
289
- * 登录注册排序
290
- */
291
- tabMethodsSortConfig: {
292
- loginMethodsSort: string[];
293
- };
294
- tabMethodsFields: TabFieldsI18nItem[];
295
- regexRules?: {
296
- key: string;
297
- appLevel: string;
298
- userpoolLevel: string;
299
- }[];
300
- /** 是否为租户控制台应用 */
301
- isTenantConsole?: boolean;
302
- /** 是否默认为租户应用面板应用 */
303
- isTenantDefault?: boolean;
304
- /** 租户详情 */
305
- tenantInfo?: Record<string, any>;
306
- /** mfa 相关 */
307
- mfa: {
308
- faceScore: number;
309
- };
310
267
  }
@@ -5,7 +5,7 @@ import { ApplicationConfig } from './application';
5
5
  export * from './application';
6
6
  export type { CommonMessage, User };
7
7
  export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
8
- export declare enum GuardMode {
8
+ export declare const enum GuardMode {
9
9
  Modal = "modal",
10
10
  Normal = "normal"
11
11
  }
@@ -55,11 +55,11 @@ export interface IG2Events {
55
55
  }
56
56
  export declare const getDefaultG2Config: () => IG2Config;
57
57
  export declare const LanguageMap: any;
58
- export declare enum InputMethod {
58
+ export declare const enum InputMethod {
59
59
  EmailCode = "email-code",
60
60
  PhoneCode = "phone-code"
61
61
  }
62
- export declare enum GuardPageSene {
62
+ export declare const enum GuardPageSene {
63
63
  Global = "global"
64
64
  }
65
65
  export interface GuardPageConfig {
@@ -68,7 +68,7 @@ export interface GuardPageConfig {
68
68
  defaultLanguage: Lang | 'browser';
69
69
  };
70
70
  }
71
- export declare enum EmailScene {
71
+ export declare const enum EmailScene {
72
72
  WELCOME_EMAIL = "WELCOME_EMAIL",
73
73
  FIRST_CREATED_USER = "FIRST_CREATED_USER",
74
74
  REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
@@ -3,6 +3,3 @@ import { ValidatorFormItemProps } from '.';
3
3
  export declare const EmailFormItem: React.FC<ValidatorFormItemProps>;
4
4
  export declare const PhoneFormItem: React.FC<ValidatorFormItemProps>;
5
5
  export declare const UserNameFormItem: React.FC<ValidatorFormItemProps>;
6
- export declare const CustomNameFormItem: React.FC<ValidatorFormItemProps & {
7
- method: string;
8
- }>;
@@ -1,7 +1,7 @@
1
1
  import { FormInstance, FormItemProps } from 'antd/lib/form';
2
2
  import FormItem from 'antd/lib/form/FormItem';
3
3
  import { PasswordFormItem } from './PasswordFormItem';
4
- import { EmailFormItem, PhoneFormItem, UserNameFormItem, CustomNameFormItem } from './ValidatorFormItem';
4
+ import { EmailFormItem, PhoneFormItem, UserNameFormItem } from './ValidatorFormItem';
5
5
  export interface ValidatorFormItemProps extends FormItemProps {
6
6
  form?: FormInstance;
7
7
  checkRepeat?: boolean;
@@ -13,7 +13,7 @@ export interface ValidatorFormItemProps extends FormItemProps {
13
13
  isCheckPattern?: boolean;
14
14
  }
15
15
  export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
16
- method: 'email' | 'phone' | 'username' | string;
16
+ method: 'email' | 'phone' | 'username';
17
17
  }
18
18
  export interface PasswordFormItemProps extends FormItemProps {
19
19
  }
@@ -26,7 +26,6 @@ interface FormItemInterface extends InternalFormItemType {
26
26
  Email: typeof EmailFormItem;
27
27
  Phone: typeof PhoneFormItem;
28
28
  UserName: typeof UserNameFormItem;
29
- CustomName: typeof CustomNameFormItem;
30
29
  }
31
30
  declare const CustomFormItem: FormItemInterface;
32
31
  export default CustomFormItem;
@@ -1,4 +1,4 @@
1
- export declare enum ErrorCode {
1
+ export declare const enum ErrorCode {
2
2
  OTP_MFA_CODE = 1635,
3
3
  APP_MFA_CODE = 1636,
4
4
  INPUT_CAPTCHACODE = 2000,
@@ -2,7 +2,7 @@
2
2
  import { GuardLocalConfig } from '../../Guard/config';
3
3
  import { GuardHttp } from '../guardHttp';
4
4
  import { GuardPageConfig } from '../../Type';
5
- import { ApplicationConfig, LoginMethods } from '../../Type/application';
5
+ import { ApplicationConfig, LoginMethods, 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 getPageConfig: (appId: string) => GuardPageConfig;
@@ -26,8 +26,8 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
26
26
  loadingComponent?: import("react").ReactNode;
27
27
  openEventsMapping?: boolean | undefined;
28
28
  disableRegister?: boolean | undefined;
29
- registerMethods?: string[] | undefined;
30
- defaultRegisterMethod?: string | undefined;
29
+ registerMethods?: RegisterMethods[] | undefined;
30
+ defaultRegisterMethod?: RegisterMethods | undefined;
31
31
  publicKey?: string | undefined;
32
32
  agreementEnabled?: boolean | undefined;
33
33
  agreements?: import("../../Type").Agreement[] | undefined;
@@ -50,7 +50,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
50
50
  disableResetPwd?: boolean | undefined;
51
51
  defaultLoginMethod?: LoginMethods | undefined;
52
52
  loginMethods?: LoginMethods[] | undefined;
53
- passwordLoginMethods?: string[] | undefined;
53
+ passwordLoginMethods?: import("../../Type").PasswordLoginMethods[] | undefined;
54
54
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
55
55
  socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
56
56
  enterpriseConnections?: string[] | undefined;
@@ -1,10 +1,9 @@
1
- import React, { ReactNode } from 'react';
2
- import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig, Lang } from '..';
1
+ import React from 'react';
2
+ import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '..';
3
3
  import { BackFillMultipleState, StoreInstance } from '../Guard/core/hooks/useMultipleAccounts';
4
4
  import { ModuleState } from '../Guard/GuardModule/stateMachine';
5
5
  import { ApplicationConfig } from '../Type/application';
6
6
  import { GuardHttp } from './guardHttp';
7
- import { MultipleTenant } from './tenant';
8
7
  export interface IGuardContext {
9
8
  finallyConfig: GuardLocalConfig;
10
9
  defaultMergedConfig: GuardLocalConfig;
@@ -43,22 +42,16 @@ export interface IGuardContext {
43
42
  */
44
43
  clearBackFillData?: () => void;
45
44
  };
46
- phoneRegex: RegExp | null;
47
- defaultLanguageConfig: Lang;
48
- /** 租户信息获取和操作处理相关 */
49
- tenantInstance?: MultipleTenant;
50
45
  }
51
46
  export declare const createGuardXContext: () => {
52
47
  Provider: React.FC<{
53
48
  value: Partial<IGuardContext>;
54
- children: ReactNode;
55
49
  }>;
56
50
  Consumer: React.Consumer<IGuardContext>;
57
51
  };
58
52
  export declare const useGuardXContext: () => {
59
53
  Provider: React.FC<{
60
54
  value: Partial<IGuardContext>;
61
- children: ReactNode;
62
55
  }>;
63
56
  Consumer: React.Consumer<IGuardContext>;
64
57
  };
@@ -67,9 +60,7 @@ export interface IGuardContextProvider {
67
60
  spinChange: (spin: boolean) => void;
68
61
  }
69
62
  export declare const useGuardButtonContext: () => {
70
- GuardButtonProvider: React.FC<{
71
- children: ReactNode;
72
- }>;
63
+ GuardButtonProvider: React.FC<{}>;
73
64
  };
74
65
  export declare const useGuardButtonState: () => IGuardContextProvider;
75
66
  export declare const useGuardPublicConfig: () => ApplicationConfig;
@@ -115,8 +106,7 @@ export declare const useGuardMultipleInstance: () => {
115
106
  } | undefined) => void;
116
107
  setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
117
108
  id: string;
118
- loginAccount?: string | undefined;
119
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
109
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
120
110
  setLoginWayByHttpData: (account: string, data: {
121
111
  username?: string | undefined;
122
112
  phone?: string | undefined;
@@ -147,10 +137,3 @@ export declare const useGuardMultipleInstance: () => {
147
137
  */
148
138
  clearBackFillData?: (() => void) | undefined;
149
139
  };
150
- export declare const useGuardPhoneRegex: () => RegExp | null;
151
- /**
152
- * 默认语言
153
- */
154
- export declare const useGuardDefaultLanguage: () => Lang;
155
- /** 用来操作和获取租户相关的内容 */
156
- export declare const useGuardTenantProvider: () => MultipleTenant | undefined;