@authing/react18-ui-components 4.2.1-alpha.0 → 4.3.4-alpha.10

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 (44) hide show
  1. package/lib/index.min.css +1 -1
  2. package/lib/index.min.js +1 -1
  3. package/lib/index.min.js.LICENSE.txt +6 -0
  4. package/package.json +2 -1
  5. package/types/AppOtpVerify/DownloadVerifier.d.ts +1 -0
  6. package/types/AppOtpVerify/LoginApp.d.ts +1 -0
  7. package/types/AppOtpVerify/ScanQrcode.d.ts +2 -0
  8. package/types/AppOtpVerify/Steps.d.ts +11 -0
  9. package/types/AppOtpVerify/index.d.ts +2 -0
  10. package/types/ForgetPassword/core/resetPassword.d.ts +2 -1
  11. package/types/ForgetPassword/interface.d.ts +1 -0
  12. package/types/Guard/config.d.ts +2 -1
  13. package/types/Guard/core/hooks/useAgreements.d.ts +14 -0
  14. package/types/Guard/core/hooks/useGuardView.d.ts +7 -0
  15. package/types/Guard/core/hooks/useMultipleAccounts.d.ts +1 -1
  16. package/types/Guard/event.d.ts +11 -1
  17. package/types/Guard/module.d.ts +3 -1
  18. package/types/IdentityBinding/IdentityBinding.d.ts +3 -1
  19. package/types/IdentityBinding/businessRequest.d.ts +5 -2
  20. package/types/LazyloadImage/index.d.ts +12 -0
  21. package/types/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +17 -0
  22. package/types/Login/core/withAuthingOtpPush/HowBindClient.d.ts +1 -0
  23. package/types/Login/core/withAuthingOtpPush/HowGetAppLoginUrl.d.ts +1 -0
  24. package/types/Login/core/withAuthingOtpPush/HowUsePushLogin.d.ts +1 -0
  25. package/types/Login/core/withAuthingOtpPush/PendingLogin.d.ts +6 -0
  26. package/types/Login/core/withAuthingOtpPush/PushLoginGuideModal.d.ts +2 -0
  27. package/types/Login/core/withAuthingOtpPush/PushLoginGuideSelector.d.ts +8 -0
  28. package/types/Login/core/withAuthingOtpPush/index.d.ts +2 -0
  29. package/types/Login/core/withAuthingOtpPush/types.d.ts +28 -0
  30. package/types/Login/hooks/useOtpPushLogin.d.ts +10 -0
  31. package/types/Login/index.d.ts +4 -1
  32. package/types/Login/multipleAccounts/panel.d.ts +1 -0
  33. package/types/Login/resetAccountName/businessRequest.d.ts +6 -0
  34. package/types/Login/resetAccountName/index.d.ts +3 -0
  35. package/types/NewSubmitSuccess/interface.d.ts +2 -0
  36. package/types/TenantPortalSelect/index.d.ts +0 -13
  37. package/types/TenantPortalSelect/interface.d.ts +33 -0
  38. package/types/Type/application.d.ts +32 -1
  39. package/types/_utils/config/index.d.ts +1 -0
  40. package/types/_utils/context.d.ts +5 -0
  41. package/types/_utils/index.d.ts +1 -0
  42. package/types/_utils/responseManagement/interface.d.ts +3 -1
  43. package/types/index.d.ts +1 -0
  44. package/types/version/version.d.ts +1 -1
@@ -133,6 +133,12 @@ object-assign
133
133
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
134
134
  */
135
135
 
136
+ /**
137
+ * @license qrcode.react
138
+ * Copyright (c) Paul O'Shannessy
139
+ * SPDX-License-Identifier: ISC
140
+ */
141
+
136
142
  /** @license React v16.13.1
137
143
  * react-is.development.js
138
144
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react18-ui-components",
3
- "version": "4.2.1-alpha.0",
3
+ "version": "4.3.4-alpha.10",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -17,6 +17,7 @@
17
17
  "global": "^4.4.0",
18
18
  "phone": "^3.1.12",
19
19
  "prompt": "^1.3.0",
20
+ "qrcode.react": "^3.1.0",
20
21
  "qs": "^6.9.4",
21
22
  "react": "18.2.0",
22
23
  "react-dom": "18.2.0",
@@ -0,0 +1 @@
1
+ export declare function DownloadVerifier(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function LoginApp(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ScanQrcode: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>;
@@ -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 {};
@@ -0,0 +1,2 @@
1
+ import './styles.less';
2
+ export declare function AppOtpVerify(): JSX.Element;
@@ -1,14 +1,15 @@
1
+ import React from 'react';
1
2
  export declare enum InputMethodMap {
2
3
  email = "email-code",
3
4
  phone = "phone-code"
4
5
  }
5
6
  interface ResetPasswordProps {
6
7
  publicConfig: any;
7
- setPhoneOrEmail: any;
8
8
  setControlShow: any;
9
9
  setPolicyStrength: any;
10
10
  setCustomPasswordStrength: any;
11
11
  setPhoneOrEmailText: any;
12
+ setResetToken: React.Dispatch<React.SetStateAction<string>>;
12
13
  }
13
14
  export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
14
15
  export {};
@@ -9,6 +9,7 @@ export interface ForgetPasswordEvents extends IG2Events {
9
9
  onPwdResetError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
10
10
  }
11
11
  export interface ForgetPasswordConfig extends IG2Config {
12
+ goBack?: null | (() => void);
12
13
  }
13
14
  export interface ForgetPasswordProps extends IG2FCProps, ForgetPasswordEvents {
14
15
  config: Partial<IG2Config>;
@@ -1,8 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { GuardModuleType } from '.';
3
+ import { ForgetPasswordConfig } from '../ForgetPassword/interface';
3
4
  import { LoginConfig } from '../Login/interface';
4
5
  import { RegisterConfig } from '../Register/interface';
5
- export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
6
+ export interface GuardLocalConfig extends RegisterConfig, LoginConfig, ForgetPasswordConfig {
6
7
  isSSO?: boolean;
7
8
  defaultScenes?: GuardModuleType;
8
9
  defaultInitData?: any;
@@ -0,0 +1,14 @@
1
+ import { Agreement } from '../../../Type';
2
+ interface Options {
3
+ agreements: Agreement[];
4
+ checkedAgreements: (string | number)[];
5
+ checkAllAgreements: () => void;
6
+ unCheckAllAgreements: () => void;
7
+ }
8
+ export declare function useAgreements(options: Options): {
9
+ agreements: Agreement[];
10
+ checkedAgreements: (string | number)[];
11
+ checkAllAgreements: () => void;
12
+ unCheckAllAgreements: () => void;
13
+ };
14
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface Options {
3
+ changeTab?: React.Dispatch<any>;
4
+ currentTab?: string;
5
+ }
6
+ export declare function useGuardView(options?: Options): void;
7
+ export {};
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
13
13
  * 登录时所有支持的登录列表(前端定义列表)
14
14
  * 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
15
15
  */
16
- export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone';
16
+ export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
17
17
  /**
18
18
  * when: 多账号页面跳转进入登录页面
19
19
  * 携带的回填数据信息
@@ -5,9 +5,17 @@ import { IdentityBindingEvents } from '../IdentityBinding/interface';
5
5
  import { IdentityBindingAskEvents } from '../IdentityBindingAsk';
6
6
  import { LoginEvents } from '../Login/interface';
7
7
  import { RegisterEvents } from '../Register/interface';
8
+ import { TenantPortalEvents } from '../TenantPortalSelect/interface';
8
9
  import { StoreInstance } from './core/hooks/useMultipleAccounts';
9
- export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
10
+ export interface OnAfterChangeModuleOptions {
11
+ currentView: string;
12
+ currentModule: GuardModuleType;
13
+ currentTab?: string;
14
+ data?: any;
15
+ }
16
+ export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents, TenantPortalEvents {
10
17
  onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
18
+ onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
11
19
  }
12
20
  export declare const guardEventsFilter: (props: any, multipleInstance?: StoreInstance, openEventsMapping?: boolean) => GuardEvents;
13
21
  export declare const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean) => GuardEvents;
@@ -33,6 +41,7 @@ export declare const GuardEventsCamelToKebabMapping: {
33
41
  readonly onRegisterInfoCompletedError: "register-info-completed-error";
34
42
  readonly onLangChange: "lang-change";
35
43
  readonly onBeforeChangeModule: "before-change-module";
44
+ readonly onAfterChangeModule: "after-change-module";
36
45
  };
37
46
  export interface GuardEventsKebabToCamelType {
38
47
  load: GuardEvents['onLoad'];
@@ -56,4 +65,5 @@ export interface GuardEventsKebabToCamelType {
56
65
  'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
57
66
  'lang-change': GuardEvents['onLangChange'];
58
67
  'before-change-module': GuardEvents['onBeforeChangeModule'];
68
+ 'after-change-module': GuardEvents['onAfterChangeModule'];
59
69
  }
@@ -18,11 +18,13 @@ export declare enum GuardModuleType {
18
18
  SUBMIT_SUCCESS = "submitSuccess",
19
19
  IDENTITY_BINDING_ASK = "identityBindingAsk",
20
20
  IDENTITY_BINDING = "identityBinding",
21
+ IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",
21
22
  SELF_UNLOCK = "selfUnlock",
22
23
  FLOW_SELECT_ACCOUNT = "flowSelectAccount",
23
24
  /** 多租户门户选择页 */
24
25
  TENANT_PORTAL = "tenant-portal",
25
- New_SUBMIT_SUCCESS = "newSubmitSuccess"
26
+ New_SUBMIT_SUCCESS = "newSubmitSuccess",
27
+ RESET_ACCOUNT_NAME = "resetAccountName"
26
28
  }
27
29
  export interface GuardModuleAction {
28
30
  action: string;
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
2
  import './styles.less';
3
- export declare const GuardIdentityBindingView: React.FC;
3
+ export declare const GuardIdentityBindingView: React.FC<{
4
+ skipAsk?: boolean;
5
+ }>;
@@ -21,12 +21,15 @@ 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",
24
- BindByEmailCode = "bind-identity-by-email-code"
24
+ BindByEmailCode = "bind-identity-by-email-code",
25
+ RegisterByPassword = "register-bind-by-password",
26
+ RegisterByPhoneCode = "register-bind-by-phone-code",
27
+ RegisterByEmailCode = "register-bind-by-email-code"
25
28
  }
26
29
  export declare const PhoneCode: (params: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
27
30
  export declare const EmailCode: (params: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
28
31
  export declare const Password: (params: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
29
- export declare const useIdentityBindingBusinessRequest: () => {
32
+ export declare const useIdentityBindingBusinessRequest: (type?: 'register' | 'bind') => {
30
33
  "phone-code": (params: PhoneCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
31
34
  "emial-code": (params: EmailCodeParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
32
35
  password: (params: PasswordParams) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
@@ -0,0 +1,12 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ interface LazyloadImageProps {
3
+ src: string;
4
+ placeholder: ReactNode;
5
+ className?: string;
6
+ style?: CSSProperties;
7
+ alt?: string;
8
+ width?: string;
9
+ height?: string;
10
+ }
11
+ export declare function LazyloadImage(props: LazyloadImageProps): JSX.Element;
12
+ export {};
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { OnPushSuccessProps, OnLoginProps } from './types';
3
+ import { AuthingGuardResponse } from '../../../_utils/http';
4
+ import { Agreement } from '../../../Type';
5
+ interface BeforeLoginProps {
6
+ onPushSuccess: (props: OnPushSuccessProps) => void;
7
+ signinByPush: (props: OnLoginProps) => Promise<AuthingGuardResponse<{
8
+ pushCodeId: string;
9
+ }>>;
10
+ pushLoginStatus: boolean;
11
+ onchangePushLoginStatus: () => void;
12
+ defaultAccount: string;
13
+ setAccount: React.Dispatch<any>;
14
+ agreements: Agreement[];
15
+ }
16
+ export declare function BeforeLogin(props: BeforeLoginProps): JSX.Element;
17
+ export {};
@@ -0,0 +1 @@
1
+ export declare function HowBindClient(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function HowGetAppLoginUrl(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function HowUsePushLogin(): JSX.Element;
@@ -0,0 +1,6 @@
1
+ import './styles.less';
2
+ interface PendingLoginProps {
3
+ onCancelLogin: () => void;
4
+ }
5
+ export declare function PendingLogin(props: PendingLoginProps): JSX.Element;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import { PushLoginGudeModalProps } from './types';
2
+ export declare function PushLoginGudeModal(props: PushLoginGudeModalProps): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { SelectorOptions, Selector } from './types';
2
+ interface PushLoginGuideSelectorProps {
3
+ defaultValue: Selector;
4
+ onChange: (value: Selector) => void;
5
+ options: SelectorOptions;
6
+ }
7
+ export declare function PushLoginGuideSelector(props: PushLoginGuideSelectorProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import { LoginWithAuthingOtpPushProps } from './types';
2
+ export declare function LoginWithAuthingOtpPush(props: LoginWithAuthingOtpPushProps): JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { BackFillMultipleState, StoreInstance } from '../../../Guard/core/hooks/useMultipleAccounts';
2
+ import { Agreement } from '../../../Type';
3
+ export interface OnPushSuccessProps {
4
+ pushCodeId: string;
5
+ }
6
+ export interface CheckPushCodeStatusProps {
7
+ pushCodeId: string;
8
+ }
9
+ export interface OnLoginProps {
10
+ account: string;
11
+ }
12
+ export type LoginStatus = 'before' | 'pending';
13
+ export interface LoginWithAuthingOtpPushProps {
14
+ onLoginSuccess?: any;
15
+ multipleInstance?: StoreInstance;
16
+ initData?: BackFillMultipleState;
17
+ agreements: Agreement[];
18
+ }
19
+ export interface PushLoginGudeModalProps {
20
+ visible: boolean;
21
+ onClose: () => void;
22
+ }
23
+ export type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
24
+ export interface SelectorOption {
25
+ value: Selector;
26
+ label: string;
27
+ }
28
+ export type SelectorOptions = SelectorOption[];
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export declare function useOtpPushLoginWay(setLoginWay: React.Dispatch<any>): void;
3
+ export declare function useOtpPushLoginCache(): {
4
+ getCachedOtpLoginAccount: typeof getCachedOtpLoginAccount;
5
+ cacheOtpLoginAccount: typeof cacheOtpLoginAccount;
6
+ clearOtpLoginAccountCache: typeof clearOtpLoginAccountCache;
7
+ };
8
+ export declare function cacheOtpLoginAccount(account: string): void;
9
+ export declare function getCachedOtpLoginAccount(): string;
10
+ export declare function clearOtpLoginAccountCache(): void;
@@ -1,2 +1,5 @@
1
+ import { FC } from 'react';
1
2
  import './styles.less';
2
- export declare const GuardLoginView: () => JSX.Element;
3
+ export declare const GuardLoginView: FC<{
4
+ isResetPage?: boolean;
5
+ }>;
@@ -40,6 +40,7 @@ export interface SelectOptions {
40
40
  * 替代图片元素
41
41
  */
42
42
  element?: React.ReactElement;
43
+ way: string;
43
44
  }
44
45
  declare const SelectPanel: React.FC<SelectPanelProps>;
45
46
  export { SelectPanel };
@@ -0,0 +1,6 @@
1
+ export declare const enum ResetAccountBusinessAction {
2
+ ResetName = "reset-username-before-auth"
3
+ }
4
+ export declare const authFlow: (action: ResetAccountBusinessAction, content: {
5
+ username: string;
6
+ }) => Promise<import("../../_utils/http").AuthingGuardResponse<any>>;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import './style.less';
3
+ export declare const ResetAccountName: FC;
@@ -10,6 +10,8 @@ export interface SubmitSuccessInitData {
10
10
  text?: string;
11
11
  countDesc?: string;
12
12
  changeModule?: GuardModuleType;
13
+ needBack?: boolean;
14
+ goBack?: () => void;
13
15
  }
14
16
  export interface GuardNewSubmitSuccessViewProps extends IG2FCViewProps, SubmitSuccessEvents {
15
17
  config: SubmitSuccessConfig;
@@ -1,15 +1,2 @@
1
1
  import './styles.less';
2
- /** 租户门户选择状态机返回数据类型 */
3
- export interface TenantPortalSelectType {
4
- title: string;
5
- description: string;
6
- logo: string;
7
- list: {
8
- tenantName: string;
9
- tenantId: string;
10
- tenantLogo: string;
11
- host: string;
12
- userName: string;
13
- }[];
14
- }
15
2
  export declare const GuardTenantPortalSelectView: () => JSX.Element;
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import { AvatarProps } from 'antd/lib/avatar';
3
+ import { AuthenticationClient, IG2Events, User } from '../Type';
4
+ export interface TenantPortalListType {
5
+ tenantName: string;
6
+ tenantId: string;
7
+ tenantLogo: string;
8
+ host: string;
9
+ description: string;
10
+ /** 是否为用户池 */
11
+ isUserPool: boolean;
12
+ userName?: string;
13
+ }
14
+ export interface TenantPortalSelectType extends Omit<TenantPortalListType, 'userName'> {
15
+ }
16
+ /** 租户门户选择状态机返回数据类型 */
17
+ export interface TenantPortalDataType {
18
+ title: string;
19
+ description: string;
20
+ logo: string;
21
+ list: TenantPortalListType[];
22
+ }
23
+ export interface TenantPortalDataItem extends TenantPortalListType {
24
+ avatar?: AvatarProps;
25
+ extra?: React.ReactNode;
26
+ title?: string;
27
+ }
28
+ /** 租户门户相关事件 */
29
+ export interface TenantPortalEvents extends IG2Events {
30
+ onLogin?: (user: User, authClient: AuthenticationClient) => void;
31
+ /** 租户门户选择回调 */
32
+ onTenantSelect?: (data?: TenantPortalSelectType) => void;
33
+ }
@@ -8,7 +8,8 @@ export declare enum LoginMethods {
8
8
  PhoneCode = "phone-code",
9
9
  WxMinQr = "wechat-miniprogram-qrcode",
10
10
  AD = "ad",
11
- WechatMpQrcode = "wechatmp-qrcode"
11
+ WechatMpQrcode = "wechatmp-qrcode",
12
+ AuthingOtpPush = "authing-otp-push"
12
13
  }
13
14
  export declare enum OIDCConnectionMode {
14
15
  FRONT_CHANNEL = "FRONT_CHANNEL",
@@ -177,6 +178,14 @@ export interface TabFieldsI18nItem {
177
178
  [propName in Lang]?: string;
178
179
  };
179
180
  }
181
+ interface LoginTypeI18nProps {
182
+ tab: {
183
+ default: string;
184
+ i18n: {
185
+ [propName: string]: string;
186
+ };
187
+ };
188
+ }
180
189
  export interface ApplicationConfig {
181
190
  id: string;
182
191
  allowedOrigins: string[];
@@ -262,6 +271,12 @@ export interface ApplicationConfig {
262
271
  socialLoginBtns: boolean;
263
272
  userPasswordInput: boolean;
264
273
  wxMpScanTab: boolean;
274
+ loginMethodsI18nDisplaySettings: {
275
+ password?: LoginTypeI18nProps;
276
+ verifyCode?: LoginTypeI18nProps;
277
+ ad?: LoginTypeI18nProps;
278
+ ldap?: LoginTypeI18nProps;
279
+ };
265
280
  };
266
281
  protocol: Protocol;
267
282
  oidcConfig: OidcClientMetadata;
@@ -292,6 +307,11 @@ export interface ApplicationConfig {
292
307
  loginMethodsSort: string[];
293
308
  };
294
309
  tabMethodsFields: TabFieldsI18nItem[];
310
+ regexRules?: {
311
+ key: string;
312
+ appLevel: string;
313
+ userpoolLevel: string;
314
+ }[];
295
315
  /** 是否为租户控制台应用 */
296
316
  isTenantConsole?: boolean;
297
317
  /** 是否默认为租户应用面板应用 */
@@ -302,4 +322,15 @@ export interface ApplicationConfig {
302
322
  mfa: {
303
323
  faceScore: number;
304
324
  };
325
+ authingOtpPushTabConfig: {
326
+ enabledLoginMethods: Array<string> | null;
327
+ validLoginMethods: Array<string> | null;
328
+ validRegisterMethods: Array<string> | null;
329
+ };
330
+ /** 是否开启自定义安全规则 */
331
+ customSecurityEnabled: boolean;
332
+ /** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
333
+ appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
334
+ /** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
335
+ userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
305
336
  }
@@ -100,6 +100,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
100
100
  withCustomData?: boolean | undefined;
101
101
  } | undefined;
102
102
  _closeLoopCheckQrcode?: boolean | undefined;
103
+ goBack?: (() => void) | null | undefined;
103
104
  };
104
105
  guardPageConfig: GuardPageConfig;
105
106
  } | {
@@ -43,6 +43,7 @@ export interface IGuardContext {
43
43
  */
44
44
  clearBackFillData?: () => void;
45
45
  };
46
+ phoneRegex: RegExp | null;
46
47
  defaultLanguageConfig: Lang;
47
48
  /** 租户信息获取和操作处理相关 */
48
49
  tenantInstance?: MultipleTenant;
@@ -82,6 +83,7 @@ export declare const useGuardEvents: () => Partial<GuardEvents>;
82
83
  export declare const useGuardModule: () => {
83
84
  changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
84
85
  backModule: (() => void) | undefined;
86
+ currentModule: ModuleState;
85
87
  };
86
88
  export declare const useGuardFinallyConfig: () => GuardLocalConfig;
87
89
  export declare const useGuardContextLoaded: () => boolean;
@@ -146,9 +148,12 @@ export declare const useGuardMultipleInstance: () => {
146
148
  */
147
149
  clearBackFillData?: (() => void) | undefined;
148
150
  };
151
+ export declare const useGuardPhoneRegex: () => RegExp | null;
149
152
  /**
150
153
  * 默认语言
151
154
  */
152
155
  export declare const useGuardDefaultLanguage: () => Lang;
153
156
  /** 用来操作和获取租户相关的内容 */
154
157
  export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
158
+ /** 当前人机验证策略 */
159
+ export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
@@ -92,6 +92,7 @@ export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registe
92
92
  } | undefined;
93
93
  export declare const getPasswordIdentify: (identity: string) => string;
94
94
  export declare const getCurrentLng: () => Lang;
95
+ export declare const regexFromString: (string: string) => RegExp | null;
95
96
  export declare const getI18nLabel: (method: string | RegisterSortMethods, i18nFields: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
96
97
  export declare const getSortLabels: (methods: string[], i18nConfig: Map<string, TabFieldsI18nItem>, defaultLanguageConfig: Lang) => string;
97
98
  export declare const getSortTabs: (tabs: string[], tab?: string) => string[];
@@ -7,6 +7,7 @@ export declare enum CodeAction {
7
7
  export declare enum ApiCode {
8
8
  IDENTITY_BINDING_ASK = 1641,
9
9
  IDENTITY_BINDING = 1640,
10
+ IDENTITY_BINDING_NO_ASK = 1666,
10
11
  APP_MFA = 1636,
11
12
  MFA = 1635,
12
13
  ABORT_FLOW = 1699,
@@ -18,6 +19,7 @@ export declare enum ApiCode {
18
19
  UNSAFE_PASSWORD_TIP = 2061,
19
20
  UNSAFE_PASSWORD_RESET = 2071,
20
21
  FLOW_SELECT_ACCOUNT = 2921,
21
- TENANT_PORTAL = 1644
22
+ TENANT_PORTAL = 1644,
23
+ RESET_ACCOUNT_NAME = 1108
22
24
  }
23
25
  export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
package/types/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './AuthClientProvider';
4
4
  export * from './Guard';
5
5
  export * from './Type';
6
6
  export * from './version';
7
+ export * from './Guard/core/hooks/useGuardView';
@@ -1,2 +1,2 @@
1
- declare const _default: "4.2.1-alpha.0";
1
+ declare const _default: "4.3.4-alpha.10";
2
2
  export default _default;