@authing/react-ui-components 4.3.4-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.
@@ -25,6 +25,12 @@
25
25
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
26
26
  */
27
27
 
28
+ /**
29
+ * @license qrcode.react
30
+ * Copyright (c) Paul O'Shannessy
31
+ * SPDX-License-Identifier: ISC
32
+ */
33
+
28
34
  /** @license React v16.13.1
29
35
  * react-is.production.min.js
30
36
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.3.4-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-responsive": "^9.0.0-beta.5",
22
23
  "react-use": "^17.3.1",
@@ -1,15 +1,15 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare enum InputMethodMap {
3
3
  email = "email-code",
4
4
  phone = "phone-code"
5
5
  }
6
6
  interface ResetPasswordProps {
7
7
  publicConfig: any;
8
- setPhoneOrEmail: any;
9
8
  setControlShow: any;
10
9
  setPolicyStrength: any;
11
10
  setCustomPasswordStrength: any;
12
11
  setPhoneOrEmailText: any;
12
+ setResetToken: React.Dispatch<React.SetStateAction<string>>;
13
13
  }
14
14
  export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
15
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;
@@ -5,13 +5,14 @@ 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
  interface OnAfterChangeModuleOptions {
9
10
  currentView: string;
10
11
  currentModule: GuardModuleType;
11
12
  currentTab?: string;
12
13
  data?: any;
13
14
  }
14
- export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
15
+ export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents, TenantPortalEvents {
15
16
  onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
16
17
  onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
17
18
  }
@@ -21,7 +21,6 @@ export declare enum GuardModuleType {
21
21
  IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",
22
22
  SELF_UNLOCK = "selfUnlock",
23
23
  FLOW_SELECT_ACCOUNT = "flowSelectAccount",
24
- APP_OTP_VERIFY = "appOtpVerify",
25
24
  /** 多租户门户选择页 */
26
25
  TENANT_PORTAL = "tenant-portal",
27
26
  New_SUBMIT_SUCCESS = "newSubmitSuccess",
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function HowBindClient(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function HowGetAppLoginUrl(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function HowUsePushLogin(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { PushLoginGudeModalProps } from './types';
3
+ export declare function PushLoginGudeModal(props: PushLoginGudeModalProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { SelectorOptions, Selector } from './types';
3
+ interface PushLoginGuideSelectorProps {
4
+ defaultValue: Selector;
5
+ onChange: (value: Selector) => void;
6
+ options: SelectorOptions;
7
+ }
8
+ export declare function PushLoginGuideSelector(props: PushLoginGuideSelectorProps): JSX.Element;
9
+ export {};
@@ -16,3 +16,13 @@ export interface LoginWithAuthingOtpPushProps {
16
16
  initData?: BackFillMultipleState;
17
17
  agreements: Agreement[];
18
18
  }
19
+ export interface PushLoginGudeModalProps {
20
+ visible: boolean;
21
+ onClose: () => void;
22
+ }
23
+ export declare type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
24
+ export interface SelectorOption {
25
+ value: Selector;
26
+ label: string;
27
+ }
28
+ export declare type SelectorOptions = SelectorOption[];
@@ -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,16 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import './styles.less';
3
- /** 租户门户选择状态机返回数据类型 */
4
- export interface TenantPortalSelectType {
5
- title: string;
6
- description: string;
7
- logo: string;
8
- list: {
9
- tenantName: string;
10
- tenantId: string;
11
- tenantLogo: string;
12
- host: string;
13
- userName: string;
14
- }[];
15
- }
16
3
  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
+ }
@@ -178,6 +178,14 @@ export interface TabFieldsI18nItem {
178
178
  [propName in Lang]?: string;
179
179
  };
180
180
  }
181
+ interface LoginTypeI18nProps {
182
+ tab: {
183
+ default: string;
184
+ i18n: {
185
+ [propName: string]: string;
186
+ };
187
+ };
188
+ }
181
189
  export interface ApplicationConfig {
182
190
  id: string;
183
191
  allowedOrigins: string[];
@@ -263,6 +271,12 @@ export interface ApplicationConfig {
263
271
  socialLoginBtns: boolean;
264
272
  userPasswordInput: boolean;
265
273
  wxMpScanTab: boolean;
274
+ loginMethodsI18nDisplaySettings: {
275
+ password?: LoginTypeI18nProps;
276
+ verifyCode?: LoginTypeI18nProps;
277
+ ad?: LoginTypeI18nProps;
278
+ ldap?: LoginTypeI18nProps;
279
+ };
266
280
  };
267
281
  protocol: Protocol;
268
282
  oidcConfig: OidcClientMetadata;
@@ -313,4 +327,10 @@ export interface ApplicationConfig {
313
327
  validLoginMethods: Array<string> | null;
314
328
  validRegisterMethods: Array<string> | null;
315
329
  };
330
+ /** 是否开启自定义安全规则 */
331
+ customSecurityEnabled: boolean;
332
+ /** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
333
+ appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
334
+ /** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
335
+ userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
316
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
  } | {
@@ -155,3 +155,5 @@ export declare const useGuardPhoneRegex: () => RegExp | null;
155
155
  export declare const useGuardDefaultLanguage: () => Lang;
156
156
  /** 用来操作和获取租户相关的内容 */
157
157
  export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
158
+ /** 当前人机验证策略 */
159
+ export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
@@ -1,2 +1,2 @@
1
- declare const _default: "4.3.3-alpha.0";
1
+ declare const _default: "4.3.4-alpha.10";
2
2
  export default _default;